Commit Graph

9 Commits

Author SHA1 Message Date
dyoung 6333e1495e Let us qualify 'route flush' and 'route show' commands with -llinfo
and -host flags, which is useful for displaying/flushing ARP entries:

# route -n show -inet -llinfo -host
Routing table

Internet:
Destination        Gateway            Flags
169.254.1.119      link#1             UH
169.254.230.110    00:02:6f:21:e6:6e  UH
# route -n flush -inet -llinfo -host
169.254.1.119                             done
169.254.230.110      0.2.6f.21.e6.6e      done
169.254.237.70                            done
# route -n show -inet -llinfo -host
Routing table
#

This will help me address bin/11079, "dhclient may require arp and sed".

Extract common code from flushroutes() and show(), creating
parse_show_opts().

While I'm here, make small cosmetic changes to flushroutes().
2006-09-23 22:41:25 +00:00
dogcow f2d329dca0 remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
christos 81a178c561 PR/32632: Yves-Emmanuel JUTARD: Improvment suggestion in 'route' display.
Add a new -S flag that prints a space for missing flags.
2006-01-25 16:29:10 +00:00
ginsbach 6e420616a8 Make sure that a netmask socket address value prints appropriately when the
family is unset.  Either the destination or interface address socket address
family value is used.  This change prevents the following sort of output:

RTM_NEWADDR: address being added to iface: len 60, metric 0, flags:<UP>
sockaddrs: <NETMASK,IFA,BRD>
 (0) 00.00.ff.00.00 127.0.0.1 127.0.0.1

With this change the last line becomes:

 255.0.0.0 127.0.0.1 127.0.0.1

Also make sure that when using a generated inet netmask the address family
is set.  With this change a generated netmask will print appropriately
when using the verbose (-v) option.
2005-08-15 19:28:08 +00:00
ginsbach 08af90d648 Accept protocol flags, i.e. -inet, -inet6, with the show command.
[From OpenBSD via DragonFly BSD]
2005-08-09 21:25:42 +00:00
christos dea4bd707c const poisoning. 2005-06-26 21:28:15 +00:00
xtraeme 69cbd40c14 Kill __P(), use ANSI function declarations. 2005-02-05 14:05:23 +00:00
atatat 2e4d1a174e Print a R on reject routes to indicate that they're not normal routes,
and check netmask (or prefix) length as well as the destination
address when determining if a route is a "default" or not.  This means
that the output from 'route show' will no longer say:

	Internet6:
	Destination       Gateway            Flags
	default           localhost          UG
	default           localhost          UG

but instead

	Internet6:
	Destination       Gateway            Flags
	::/104            localhost          UGR
	::/96             localhost          UGR

which makes much more sense.
2001-10-24 16:05:06 +00:00
christos d9349e61e1 - Add netatalk bits
- Add prototypes
- Fix printf formats
1997-04-03 02:35:46 +00:00