Commit Graph

13 Commits

Author SHA1 Message Date
dyoung
3e89e7b09b Only describe flags -L and -m in the usage if they are available.
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.
2008-07-15 20:56:13 +00:00
dyoung
d75414adf5 Let us add/remove features from ifconfig, such as support for
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.
2008-07-02 07:44:13 +00:00
dyoung
7b01455a0e Overhaul ifconfig. Use fewer global variables. Take a leap toward
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.
2008-05-06 04:33:42 +00:00
christos
2a1607d040 Programs that use efun. 2006-08-26 18:14:28 +00:00
elad
d10cf99230 fix incorrect usage of strncpy() to (an internal implementation of)
estrlcpy().

okay christos
2006-06-16 23:48:35 +00:00
thorpej
e00adb14b6 Split the IPv4 support into its own file. 2005-03-20 02:43:50 +00:00
thorpej
26dbe00d59 Split IPv6 support out into its own file. 2005-03-20 01:09:16 +00:00
thorpej
acdfacb1c3 Split off AppleTalk support into its own file. 2005-03-19 23:32:55 +00:00
thorpej
c6266968d5 const'ify afswtch 2005-03-19 23:16:55 +00:00
thorpej
1a5470cfdd Split off 802.11 interface handling into its own file. 2005-03-19 23:13:42 +00:00
thorpej
519737e8ff Don't hare-code inet/inet6 in tunnel_status(), lookup the address family
name instead.
2005-03-19 22:57:06 +00:00
thorpej
e6d38785ff Split tunnel support into its own file. 2005-03-19 17:32:26 +00:00
thorpej
1054956d85 Move extern decls to extern.h 2005-03-19 03:56:06 +00:00