NetBSD/sbin/route
atatat cdc6282274 Provide a short output format for the get command that only prints the
address corresponding to RTA_GATEWAY, or nothing if it doesn't exist.
Modify the exit value of route depending on this, so that one can do
stuff like:

#!/bin/sh
gw=`route -sn get default 2>/dev/null`
if [ -z "$gw" ]; then
	echo no default route
	exit 1
fi
ping -w1 -c1 $gw >/dev/null 2>&1
if ! route -sn get $gw >/dev/null; then
	echo default gateway not responding
	exit 1
fi
echo default gateway is at $gw
2001-10-24 18:40:16 +00:00
..
Makefile s/CFLAGS/CPPFLAGS/ for -D and -I. 1999-07-03 06:26:25 +00:00
ccitt_addr.c resolve conflicts from lite-2 import 1997-09-16 07:04:17 +00:00
extern.h Print a R on reject routes to indicate that they're not normal routes, 2001-10-24 16:05:06 +00:00
keywords.c regen 2001-01-27 04:51:25 +00:00
keywords.h regen 2001-01-27 04:51:25 +00:00
keywords.sh add a keyword, cloned 2001-01-27 04:51:17 +00:00
route.8 Provide a short output format for the get command that only prints the 2001-10-24 18:40:16 +00:00
route.c Provide a short output format for the get command that only prints the 2001-10-24 18:40:16 +00:00
show.c Print a R on reject routes to indicate that they're not normal routes, 2001-10-24 16:05:06 +00:00