various address families (inet, inet6, iso, atalk) and protocols
(802.11, 802.3ad, CARP), simply by trimming the list of sources in
the Makefile. This helps one customize ifconfig for an embedded
device or for install media, and it eliminates a lot of grotty
#ifdef'age. Now, the ifconfig syntax and semantics are finalized
at run-time using the constructor routines in each address-family/protocol
module.
(In principle, ifconfig could load virtually all of its syntax from
shared objects.)
Extract a lot of common code into subroutines, in order to shrink
the ifconfig binary a bit. Make all of the address families share
code for address addition/replacement/removal, and delete "legacy"
code for manipulating addresses. That may have broken atalk and
iso, despite my best efforts.
Extract an include file, Makefile.inc, containing the make-fu that
both ifconfig and x_ifconfig share.
Sprinkle static. Change some int's to bool's. Constify.
Add RCS Ids to carp.c and env.c. Move media code to a new file,
media.c. Delete several unneeded header files.
Set, reset, and display the IEEE 802.11 attribute, 'dot11RTSThreshold'.
Bug fix: do not require both a interface address and a destination
address for point-to-point interfaces, but accept a interface
address by itself.
instead of zeroing them in commit_address().
Switch to in6_commit_address() from in6_getprefix() and in6_getaddr().
Temporarily add some debugging code to setia6eui64_impl().
to support IPv6 as well as IPv4 (a work in progress).
Make the second argument of af_status() a bool instead of an int.
Exit early with an error if the operator specifies an unsupported
address family on the command line. The change should help rc
scripts to detect that IPv6 support is missing from the kernel,
with 'ifconfig lo0 inet6'.
Start using prop_dictionary_util(3).
improved modularity and extensibility.
In the new architecture, a directed graph of argument-matching
objects (match objects) expresses the set of feasible ifconfig
statements. Match objects are labelled by subroutines that provide
the statement semantics.
Many IPv4, IPv6, 802.11, tunnel, and media configurations have been
tested.
AppleTalk, ISO, carp(4), agr(4), and vlan(4) configuration need
testing.
Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses. Make ifconfig(8) set/display preference
numbers.
To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.
Miscellaneous changes in support of source-address selection:
1 Factor out some common code, producing rt_replace_ifa().
2 Abbreviate a for-loop with TAILQ_FOREACH().
3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
IN_PRIVATE(), that are true for link-local unicast
(169.254/16) and RFC1918 private addresses, respectively.
Add the predicate IN_ANY_LOCAL() that is true for link-local
unicast and multicast.
4 Add IPv4-specific interface attach/detach routines,
in_domifattach and in_domifdetach, which build #ifdef
IPSELSRC.
See in_getifa(9) for a more thorough description of source-address
selection policy.
ifconfig(8) from printing errors like "ifconfig: socket: Address
family not supported by protocol family" when examining the status
of a network interface.