Commit Graph

14 Commits

Author SHA1 Message Date
Sam Leffler
58ac5e5b7a add a callback mechanism for code that wants to defer committing changes
until all the command line args have been processed

Reviewed by:	ambrisko
2004-12-11 02:33:33 +00:00
Sam Leffler
5faf8dcb55 Overhaul to cleanup some of the tangled logic that's grown over the years.
o break per-address family support out into separate files
o modularize per-address family and functional operations using
  a registration mechanism; this permits configuration according
  to which files you include (but beware that order of the files
  is important to insure backwards compatibility)
o many cleanups to eliminate incestuous behaviour, global variables,
  and poor coding practices (still much more to fix)

The original motivation of this work was to support dynamic addition
of functionality based on the interface so we can eliminate the various
little control programs and so that vendors can distribute ifconfig
plugins that support their in-kernel code.  That work is still to be
completed.

o Update 802.11 support for all the new net80211 functionality; some
  of these operations (e.g. list *) may be better suited in a different
  program
2004-12-08 19:18:07 +00:00
Sam Leffler
a6b03f428a add support for setting 802.11 rtsthreshold, transmit power,
and 11g protection mode

Reviewed by:	imp (just code)
2004-03-30 22:59:22 +00:00
Brooks Davis
a4fa9864bf Use IFNAMSIZ instead of a magic value for the length of an interface
name.

Prevent the kernel from potentially overflowing the interface name
variable.  The size argument of strlcpy is complex because the name is
not null-terminated in sdl_data.
2004-01-27 01:43:14 +00:00
Sam Leffler
4e61f6f1f6 add a "mode" directive to specify the operating mode for multi-mode devices;
this is mostly intended for use with multi-mode 802.11 devices that support
some combination of 11a, 11b, and 11g
2003-04-28 16:37:38 +00:00
Robert Watson
97490f4b3c Rename ifconfig's "mac" argument to "maclabel" to prevent confusion
regarding 802.1 MAC and Mandatory Access Control (MAC).  Some
potential for confusion remains further in other areas of the
system regarding Message Authentication Codes (MAC).

Requested by:	wollman
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 22:50:04 +00:00
Robert Watson
2d58d642d2 Teach ifconfig(8) how to print and set the MAC labels on network
interfaces using the 'mac' argument.  Without MAC support in the
kernel, this does not change the behavior of ifconfig.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-23 03:40:47 +00:00
Poul-Henning Kamp
ca299b1fc0 When using interfaces that support if_media, the supported media list is
printed on a single, very long, and generally unreadable line.  This
isn't very useful.  It's also really ugly and most of the time you don't
care what media is supported anyway.

PR:		27701
Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
2001-05-29 09:13:44 +00:00
Poul-Henning Kamp
419d8080a4 Currently, each wireless networking driver has it's own control program
despite the fact that most people want to set exactly the same settings
regardless of which card they have.  It has been repeatidly suggested
that this configuration should be done via ifconfig.  This patch
implements the required functionality in ifconfig and add support to the
wi and an drivers.  It also provides partial, untested support for the
awi driver.

PR:		25577
Submitted by:	Brooks Davis <brooks@one-eyed-alien.net>
2001-05-26 09:27:08 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Bill Paul
97ed1257f9 Grrr... botched remote commit. Let's try this again: vlan updates,
take two.
1999-03-15 01:22:01 +00:00
Peter Wemm
c514950585 Clean up some more. Move parsing of sysctl iflist data into a single
place rather than updating the main loop's index variables from within
a subroutine and other revolting things like that.  Move some more
globals into local variables.
1997-05-10 17:14:53 +00:00
Peter Wemm
eca42d3ce0 Grumble.. My last patchup here didn't quite work either. I hate this
program and it's use of global variables.  Somehow, I managed to miss the
most obvious case.. "ifconfig ed0 10.0.0.1" failed (no "inet")

Submitted by: dfr
1997-05-10 14:47:35 +00:00
Peter Wemm
9906480a84 Commit hooks for ifmedia support. It's optional in the Makefile, and
can be trivially disabled.
1997-05-04 06:27:45 +00:00