in_status() handles the whole inet address family. in_alias() handles
printout for single address (for both the primary address or an alias).
it is more consistent with, for example, the way at_status() is used.
rather a bug in the code (which is violating the C standard by casting
an unaligned pointer to a pointer with more strict alignment constraints).
Fix the code to not do such things. Fixes port-alpha/9494.
this is intentional - IPv6 assumes multiple addresses on an interface,
and it is not very safe to "delete" arbitrary one. -alias with
explicit IPv6 address works fine.
(i.e., 10baseT carrier/no carrier) of an interface from scripts
ifconfig -s <interface> will exit with a false status if the interface
reports its unconnected.
-s also works in conjunction with -l and -a, filtering out interfaces
which are reporting down.
Also, add -b (which shows only broadcast interfaces with -l and -a).
I find these options useful in network autoconfig scripts for mobile
systems.
code would hit the interface multiple times. Now, all media and media
options are gathered and processed at once, hitting the interface only
once (except to grab the currently selected media exactly once; there is
no way to avoid that).
display. The display now looks like this:
bishop:thorpej 35$ obj.alpha/ifconfig -m fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
media: Ethernet autoselect (100baseTX full-duplex)
status: active
supported Ethernet media:
media autoselect
media 100baseTX mediaopt full-duplex
media 100baseTX
media 10baseT mediaopt full-duplex
media 10baseT
media 100baseTX mediaopt loopback
inet 129.99.50.41 netmask 0xffffff00 broadcast 129.99.50.255
bishop:thorpej 36$
The intent here is to allow cut'n'pasting of the output to a command
line, or allow easier automatic extraction from scripts, etc.
XXX Still at issue is what to do about non-0 media instances.
data structure is used, but a much saner matching mechanism is used, one
which allows greater ease in adding new types.
Also, rewrite the way media words are displayed. The status display now
looks like this:
bishop:thorpej 137$ ifconfig -m fxp0
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
media: Ethernet autoselect (10baseT)
status: active
supported media:
Ethernet autoselect
Ethernet 100baseTX <full-duplex>
Ethernet 100baseTX
Ethernet 10baseT <full-duplex>
Ethernet 10baseT
Ethernet 100baseTX <loopback>
inet 129.99.50.41 netmask 0xffffff00 broadcast 129.99.50.255
bishop:thorpej 138$
This makes it more clear which media type (e.g. Ethernet) is currently
in-use, handy for devices such as the TI ThunderLAN which can also have
both Ethernet and Token Ring PHYs attached.