Commit Graph

61 Commits

Author SHA1 Message Date
christos 7852090868 Add support for displaying interface alias information. Based on PR/6109 by
Phil Nelson.
1998-09-06 17:51:32 +00:00
thorpej 6bd72c7fd7 Cross-reference ifmedia(4). 1998-08-09 00:39:02 +00:00
thorpej 1dc9284e4f Document "instance". 1998-08-08 22:50:13 +00:00
thorpej e1a1084860 Oops, add the "instance" command to the usage info. 1998-08-08 22:40:57 +00:00
thorpej ecbe14b11c Allow the user to explicitly set the media instance. 1998-08-08 22:33:17 +00:00
thorpej 2e7d9319e9 Hm, actions might not always be deferred; rename appropriately. 1998-08-08 18:14:20 +00:00
thorpej 051e24ecad Completely rewrite the engine that sets media and media options. Previous
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).
1998-08-08 01:30:18 +00:00
thorpej 1549ffa563 Implement a suggestion from Wolfgang Solfrank on the "supported media"
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.
1998-08-06 19:22:00 +00:00
thorpej 3f0296f8ce Print the media instance if it's not zero, a reasonable compromise such
that no one will have to see those ugly instance numbers if they have
an interface with only one PHY (most of them out there).
1998-08-06 03:47:28 +00:00
thorpej 85fd419492 Completely rewrite the way media descriptions are represented. The same
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.
1998-08-06 02:24:40 +00:00
thorpej d2d470e18d Copyright assigned to The NetBSD Foundation, Inc. 1998-08-05 23:35:17 +00:00
enami 4385d9fe62 - Use .Nm "" instead of .Nm ifconfig in SYNOPSIS.
- Delete space at the end of line.
1997-10-11 02:44:36 +00:00
lukem 76e13a0128 all but the first .Nm in SYNOPSIS need to be spelt out. [bin/4256] 1997-10-10 16:12:45 +00:00
enami 21d836180a Don't declare optind. 1997-10-01 02:18:14 +00:00
lukem 92f7af5b8d * cleanup for WARNS=1
* deprecate register
* use .Nm correctly
1997-09-15 01:53:35 +00:00
mrg 70707ec9bc note that we have set ifflags so that we can reset them again after
setting the interface address.  this is necessary as we may want to
configure an interface `down' by default, but, SIOCAIFADDR turns the
interface back on for us.
1997-09-08 05:26:08 +00:00
is 2b70f759c5 ifr_metric vs. ifr_mtu: don't confuse people. Its a union anyway. 1997-07-14 12:54:27 +00:00
lukem 39cef8b32a Don't define the address of an interface to 0.0.0.0 if it's just being
brought "up" (without an address); don't give it an address at all.
From Koji Imada <koji@math.human.nagoya-u.ac.jp> in [bin/3477]
1997-05-30 05:44:11 +00:00
lukem b4123d6862 Add "mask" argument to description of "broadcast".
From Thorsten Frueauf <frueauf@ira.uka.de> in [misc/3657]
1997-05-30 03:49:36 +00:00
thorpej fd196425a8 Force the ifaliasreq "addreq" to have 4-byte alignment, so that casting
one of its sockaddrs to a sockaddr_in doesn't cause an unaligned access
fault on the Alpha.
1997-05-05 06:32:11 +00:00
lukem 13d5dd4446 Implemented two modifier flags for -a and -l: -d (only show "down" interfaces)
and -u (only show "up" interfaces)
1997-04-21 01:17:57 +00:00
is d743f36705 Add mtu n parameter. Part of code by Matthias Pfaller (PR 1648). 1997-04-10 19:10:16 +00:00
jeremy 90a04776b1 Fix typo in media selector example. (from frueauf@ira.uka.de)
Fixes half of PR#3470.
1997-04-10 06:30:26 +00:00
christos 8e9ba6bac6 - netatalk additions
- KNF
- prototype fixes
- ifconfig -a now prints all the address family parameters for all configured
  interfaces.
1997-04-03 02:07:58 +00:00
thorpej dbdde72e82 Add a "-l" flag, which lists available network interfaces, with no
additional information.
1997-03-27 22:50:09 +00:00
thorpej a285d77f82 Print the station address of interfaces that have one. From
Matt Thomas <matt@3am-software.com>
1997-03-26 01:46:49 +00:00
thorpej 315d0c6cbb Display the correct interface name in the event SIOCGIFMEDIA "succeeds"
but doesn't return any media types.
1997-03-25 01:37:11 +00:00
thorpej 66addb16d6 Fix a slight bogon in printing active/current media, from Matt Thomas. 1997-03-24 00:45:30 +00:00
thorpej 797e996927 Fix lookup_media_word() to properly distinguish between the "autoselect"
media type and error.  (oops!)
1997-03-18 05:04:50 +00:00
thorpej af71bad528 Do that last change somewhat differently; We need to know the
currently selected media, and thus cannot allow E2BIG, since the
top-level kernel ioctl code won't perform the copyout of the
ifmediareq if it sees an "error".
1997-03-18 01:50:01 +00:00
thorpej 55e07c34a2 Ignore E2BIG in domediaopt() like we do in setmedia(). Oversight pointed
out by Andrew Gallatin <gallatin@CS.Duke.EDU>.
1997-03-18 00:37:34 +00:00
thorpej 4fcebbc43a Add support for BSD/OS-style media selection:
- new "media" keyword specified media to select:
		ifconfig de0 media utp
	- new "mediaopt/-mediaopt" keywords for setting/clearing
	  media options (such as full-duplex)
	- new "-m" flag to display all supported media types for
	  a given interface.
Also, some generial cleanup of argument parsing while I was there.
Manual page updates from Jeremy Cooper <jeremy@netbsd.org>.
1997-03-17 03:08:46 +00:00
mycroft f5b5efa5d5 Update to match kernel changes. 1996-09-08 14:37:39 +00:00
pk 9a4742e3ce Merge with lite-2. 1996-01-04 21:27:29 +00:00
pk 5f0532320e Agree with kernel on format of SIOCGIFCONF results. 1996-01-04 20:11:20 +00:00
gwr ad5a72a23c Add support for -DINET_ONLY to make this smaller in a ramdisk. 1995-10-08 23:03:54 +00:00
mycroft 7888507f63 Use inet_aton(), not inet_addr(). Suggested by John Hawkinson. 1995-05-19 20:17:16 +00:00
cgd 0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
glass ddbe84a0ec fix usage message to include -a. fix command line handling for same 1995-01-21 21:22:16 +00:00
cgd 06e2955ff1 specify man pages the new way. 1994-12-22 10:44:04 +00:00
cgd 9e821e2de7 spacing nit. 1994-12-18 12:58:39 +00:00
cgd 5eeab43e28 more cleanups from Jim Jegers, passed over by me. 1994-12-05 20:15:31 +00:00
cgd f12bf2a597 ioctl types. 1994-10-31 04:24:09 +00:00
mycroft ea7b5d4ec6 Eliminate uses of some obsolete functions. 1994-09-23 14:26:58 +00:00
mycroft 3c78ef3311 Merge with 4.4-Lite version. 1994-09-23 01:38:45 +00:00
cgd 4e9cb67485 (1) update usage info
(2) fix every instance of fprintf/exit except usage to use err()/errx()
(3) make netmask print out with a leading 0x, so that you can paste it back.
1994-01-22 02:04:35 +00:00
cgd bc980fa1b4 fix a botch 1994-01-22 00:29:20 +00:00
jtc ab3a89f913 Fix spelling errors 1994-01-14 02:05:23 +00:00
cgd 7489d1a908 add MULTICAST recognition 1993-12-10 11:29:42 +00:00
cgd 285bdc5f46 LLC -> LINK, documentation 1993-12-10 11:23:54 +00:00