so that this part doesn't get included in install media versions
of ifconfig, as per comments on source-changes@ from Izumi Tsutsui.
Also re-instate the use of ${.CURDIR} when setting up the include path.
may be included by different parts of the source tree, in particular
deep down in the distrib/ tree, where ../.. isn't sufficient to "climb"
up to the top of the tree. Fixes the build at least for our arc port.
Pfsync interface exposes change in the pf(4) over a pseudo-interface, and can
be used to synchronise different pf.
This work was part of my 2009 GSoC
No objection on tech-net@
addresses. Make the kernel support SIOC[SG]IFADDRPREF for IPv6
interface addresses.
In in6ifa_ifpforlinklocal(), consult preference numbers before
making an otherwise arbitrary choice of in6_ifaddr. Otherwise,
preference numbers are *not* consulted by the kernel, but that will
be rather easy for somebody with a little bit of free time to fix.
Please note that setting the preference number for a link-local
IPv6 address does not work right, yet, but that ought to be fixed
soon.
In support of the changes above,
1 Add a method to struct domain for "externalizing" a sockaddr, and
provide an implementation for IPv6. Expect more work in this area: it
may be more proper to say that the IPv6 implementation "internalizes"
a sockaddr. Add sockaddr_externalize().
2 Add a subroutine, sofamily(), that returns a struct socket's address
family or AF_UNSPEC.
3 Make a lot of IPv4-specific code generic, and move it from
sys/netinet/ to sys/net/ for re-use by IPv6 parts of the kernel and
ifconfig(8).
or route(8): it tells ifconfig(8) to try to resolve numbers to
hosts and service names.
This default ifconfig behavior stays the same as it always was.
value to put a prop_string_t into the environment, but the keyword
parser put a prop_data_t into the environment, instead. That broke
the -vlanif and -carpdev keywords and defied developer expectations.
Let's put a prop_string_t into the environment.
Thanks to Arnaud Degroote for reporting the problem.
when figuring out Where In The Kernel Is Carmen Sandiego's ioctl
for an ifconfig command line, since we can simply single-step into
the kernel.
Activated by "make RUMP_ACTION=1". No changes to normal case.
ifa_data member of every AF_LINK struct ifaddrs points at the
corresponding struct if_data. In ifconfig(8), do not try to suppress
duplicate AF_LINK ifaddrs by checking for a NULL ifa_data.
Don't copy out two AF_LINK struct ifaddrs for each active link-layer
address. getifaddrs(3) used to copy out one ifaddrs for the kernel's
RTM_IFINFO message, and one more for the kernel's RTM_NEWADDR message.
I suppress the first duplicate with a highly conservative change that
wastes a little bit of ifaddrs storage. The storage is not leaked.
'address: ' field, don't treat the first address as the active address,
but search the link-layer addresses for the ones flagged IFLR_ACTIVE,
and print those. Extract a subroutine, print_link_addresses(), for
printing link-layer addresses.
support was removed quite a while ago.
Mention the 'link' address family. Describe the 'active' keyword.
Add examples for adding and activating a link-layer address.
without subsequently doing anything with it, so commit_address()
works with an address with phase == 0. phase == 0 is not allowed,
hence
random84# ifconfig nfe0 atalk 3.14
ifconfig: SIOCAIFADDR: Invalid argument
Solution: copy the new sockaddr_at to a temporary input environment,
and pass that environment to commit_address(). I may as well copy
the new sockaddr_at to the output environment, while I am at it.
only in the AF_UNSPEC/AF_INET/AF_INET6 cases. Maybe this will fix
the AF_APPLETALK problem that is@ reports:
random84# ifconfig nfe0 atalk 3.14
ifconfig: SIOCAIFADDR: Invalid argument
That helps me get rid of some conditional compilation (INET6) in
ifconfig.
Let each protocol/feature-module print its own usage, so that the
ifconfig usage reflects the modules that are actually compiled-in.
Write usage information for carp(4) options.
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.
1 Let us associate a keyword with either a signed or an unsigned
number. Associate the '-chan' keyword with an unsigned number.
This fixes the defect that crashed 'ifconfig wi0 -chan', reported
by Michael van Elst.
2 Do not try to interpret names as ISO addresses unless the ISO
address family was specified. iso_addr(3) does not report errors,
so it appears to interpret *everything* as an ISO address. This
is a stopgap fix for the defect in 'ifconfig lo0 inet6' on a
!INET6 kernel that deletes the first IPv4 address on lo0.
(Reported by Scott Ellis.)