yamt
5240b887db
add agr(4), a pseudo network device driver for link aggregation.
2005-03-18 11:11:50 +00:00
matt
57537259e8
Add ifconfig support for TCP Segment Offload
2005-03-06 00:13:36 +00:00
perry
5c9f370160
remove obsolete "register" declarations.
2005-02-06 06:13:47 +00:00
xtraeme
843cdb1983
Fix the cast for the getnameinfo() call in the status() function, which
...
should be "const struct" not "struct" for sockaddr.
WARNS=3
2005-01-20 16:16:10 +00:00
lukem
7157011597
Only compile in IPv6 support if ${USE_INET6} != "no"
...
MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2005-01-10 02:58:58 +00:00
dyoung
9f2359d605
ifconfig -v prints 802.11 statistics. ifconfig -v prints and zeroes
...
802.11 statistics.
2004-12-20 23:04:55 +00:00
itojun
b95181fc9b
NI_WITHSCOPEID was not picked up by IETF standardization process.
2004-11-16 05:59:32 +00:00
dsl
9d819ed558
Functions for converting media types to/from text are now in libutil.
2004-11-11 20:37:18 +00:00
dsl
57030cf931
More isdigit() calls that need (unsigned char) cast
2004-10-28 20:10:29 +00:00
dsl
eef12d4ee1
De __P
2004-10-11 20:13:37 +00:00
dsl
edfa669ef6
Remove all the caddr_t - mainly casts of the 3rd arg to ioctl()
2004-10-11 17:13:55 +00:00
yamt
230c4c9c74
err -> errx where appropriate.
2004-07-27 14:25:19 +00:00
mycroft
1e7044a4ca
The change in revision 1.38 (in 1997!) was wrong. If we don't want the kernel
...
to automatically bring up interfaces, then we should move that code into
ifconfig(8) and out of the kernel, not cycle the interface up and down. Fixes
PR 9400 -- ifconfig(8) was not working as documented.
2004-07-06 23:26:31 +00:00
wiz
7725807d73
Add an article.
2004-03-01 00:19:06 +00:00
perry
3900dd63b3
Change "nwid" to "ssid", list "nwid" as a synonym for "ssid", and
...
clean up the ssid explanation a bit (including mentioning that if you
want to use a hex ssid, you precede it with a 0x, which really needed
documenting.)
2004-03-01 00:16:24 +00:00
perry
be009ae585
Very minimal changes to make "ssid" and "nwid" aliases, and make the
...
ssid print out as "ssid", not "nwid".
XXX Really, someone should go through and change around all the
variable names etc. to ssid, but not today.
2004-03-01 00:11:33 +00:00
wiz
028911b136
Drop trailing whitespace (hi perry! :) ).
2004-02-29 23:51:05 +00:00
perry
d7493f9be2
update man page date. (hi wiz!)
2004-02-29 23:32:51 +00:00
perry
688c6af823
document that if you are using a hex wep key, you need to put 0x in
...
front of it.
2004-02-29 23:32:15 +00:00
perry
2e45f00a18
document "mode" -- taken from FreeBSD
2004-02-29 23:27:28 +00:00
itojun
566986e38d
check strlcpy error. idea from Ryan McBride
2004-02-27 21:36:17 +00:00
dyoung
abda32ca8b
Add 'mode' option to change PHY media for 802.11 devices. Also,
...
display PHY mode. E.g., run an 802.11a (5GHz, 54Mbps max) access
point:
> ifconfig ath0 nwid my_access_point mode 11a mediaopt hostap
> ifconfig -m ath0
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
nwid my_access_point
powersave off
bssid 00:05:5d:84:cc:6e chan 3
address: 00:05:5d:84:cc:6e
media: IEEE802.11 autoselect mode 11a hostap
status: active
supported IEEE802.11 media:
media autoselect
media autoselect mediaopt adhoc
media autoselect mediaopt hostap
media autoselect mediaopt monitor
media autoselect mode 11a
media autoselect mode 11a mediaopt adhoc
media autoselect mode 11a mediaopt hostap
media autoselect mode 11a mediaopt monitor
*snip snip*
2003-10-13 08:27:35 +00:00
agc
276d62f603
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
christos
dffc5f5133
PR/21860: Robert Elz: ifconfig doesn't allow addr/N notation for INET6
2003-06-11 19:51:31 +00:00
itojun
fe09a0efcb
use strlcpy
2003-05-17 23:03:28 +00:00
lukem
3b7c75cfba
Change -b from skipping POINTTOPOINT|LOOPBACK to skipping ! BROADCAST.
...
Fixes my [bin/21604]
2003-05-17 00:48:13 +00:00
wiz
1745a4efd2
Combine no-argument options in SYNOPSIS.
2003-04-16 12:55:15 +00:00
perry
765e98ca6e
Document the -v and -z flags.
2003-04-12 01:08:28 +00:00
perry
d229e19ca4
Add an option (-z) like -v except that it clears the input/output
...
stats after printing them.
(Basically this just calls SIOCZIFDATA instead of SIOCGIFDATA).
Submitted by Jean-Edouard BABIN in PR bin/21078
However, he suggested using -c, and cgd (reasonably) noted that -z for
"zero" was probably more reasonable.
I've also changed the code very slightly.
2003-04-12 01:07:43 +00:00
wiz
990562bfef
.Nm does not need a dummy argument ("") before punctuation or
...
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
grant
00377ec504
New sentence, new line.
2002-09-30 07:37:09 +00:00
onoe
e70c67bb57
Fix the option name 'channel' to 'chan' to be consistent with the source.
...
Add documents for '-chan' to unset the desired channel to associate.
2002-09-30 05:42:59 +00:00
onoe
4b4c894d3f
Hide bssid/chan for 802.11 if not specified nor not associated.
...
Allow "-chan" to allow any channel to associate, it doesn't affect
create channel for IBSS/AP mode.
2002-09-30 05:38:13 +00:00
wiz
4016313db7
Grammar fixes. Bump Dd for recent additions.
2002-09-25 00:24:25 +00:00
thorpej
c82ad7ea91
Add missing newline.
2002-09-23 00:10:28 +00:00
thorpej
3f89292591
New commands:
...
* bssid xx:xx:xx:xx:xx:xx -- set the desired BSSID of an 802.11
interface.
* -bssid -- unset the desired BSSID of an 802.11 interface, so
the interface will choose automatically (default).
* channel x -- set the channel (radio frequency) of an 802.11 interface.
Current BSSID and channel are now reported in the 802.11 status
display, if supported by the interface.
Above changes from David Young <dyoung@ojctech.com>, with some slight
changes by me (use ethers(3) functions rather than hand-parsing/printing
the 802.11 address).
Document bssid/-bssid/channel, and clean up markup of parentheticals
in the manual page.
2002-09-22 15:29:23 +00:00
christos
5b90483a76
use snprintb()
2002-09-20 21:21:53 +00:00
ross
8473dbb8b4
xref ifconfig.if(5)
2002-09-01 03:05:34 +00:00
jwise
ad8bd5db78
Fix mandoc glitch in description of `eui64' command.
2002-08-06 19:29:35 +00:00
grant
6742cb1812
sweep of errx/warnx, remove unnecessary trailing \n
2002-07-20 08:36:17 +00:00
itojun
e923169715
grab eui64 only from the same interface.
2002-06-14 09:12:08 +00:00
itojun
331dc975fb
support "eui64" option (grab interface ID from link-local addr).
...
from: ww@styx.org
2002-06-14 09:01:59 +00:00
itojun
65eb0105f4
init variable before strtoul
2002-06-14 01:07:00 +00:00
itojun
5bcf2ac974
metric and mtu are u_long, not int.
2002-06-14 01:04:41 +00:00
itojun
0dcc61701e
now "ifconfig tunnel" is usable for gre too, change wording slightly
2002-06-09 17:47:33 +00:00
matt
2ea027698b
Add support to print interface counters (via SIOCGIFDATA) when the [new]
...
option -v is provided.
2002-05-23 21:38:01 +00:00
thorpej
177f0931bd
Don't bother testing if a u_short is > 0xffff -- that test is always false.
2002-05-06 20:14:36 +00:00
itojun
2e7169447f
use in_aliasreq for inet address manipulation, not ifaliasreq. they have
...
different alignment constraint. [tests on 64bit arch wanted]
2002-04-25 09:39:17 +00:00
wiz
4ce43ae0cd
Whitespace nits
2001-11-16 10:25:42 +00:00
lukem
9bf29de9d5
fix many -Wshadow warnings
2001-11-02 05:57:38 +00:00
atatat
70478477a0
Clean up the code a bit so that the ioctl() return value is always
...
compared to -1 (instead of <0 or !=0) and always to call err() with
EXIT_FAILURE instead of sometimes using 1.
2001-10-24 22:10:15 +00:00
bjh21
3821a9917d
Use getnameinfo() to format AF_LINK addresses again.
2001-10-06 17:05:29 +00:00
bjh21
daa1982d02
Revert last change. getnameinfo() AF_LINK support is going away until I can
...
make it lint-clean.
2001-10-05 20:50:19 +00:00
bjh21
10237f4efc
Use getnameinfo() to format AF_LINK addresses rather than doing it ourselves.
2001-10-04 23:12:22 +00:00
itojun
04e80984bf
remove duplicated line in cmds[].
2001-09-26 07:20:16 +00:00
thorpej
f7a04ba84f
Add tcp4csum-rx and udp4csum-rx commands for interfaces that only
...
support TCP/UDP checksums on the in-bound direction.
2001-09-17 17:36:06 +00:00
itojun
4d4d43e300
snprintf return value audit. from deraadt
2001-08-19 01:27:43 +00:00
david
11680bf9c9
Correct style of a comment, and bad else {} scoping from my previous
...
commit.
Thanks to enami tsugutomo for pointing both out.
2001-08-09 01:25:35 +00:00
david
92d578c744
Cause multiple uses of alias, -alias, and delete to produce an error,
...
and exit.
Previously, combinations would produce unintended results, such as
deleting the primary IP on an interface, instead of deleting an specified
alias.
2001-08-08 21:22:35 +00:00
itojun
fdd3ee1f18
embed scopeid on scoped ipv6 address. sync with kame
2001-07-31 23:27:35 +00:00
itojun
a7005bd7d6
do not go over the end of memory region we are supposed to touch,
...
overrun on "prefixlen" operation. there's no SEGV possibility.
2001-07-25 17:29:14 +00:00
onoe
c4eb8932f8
Add support of persistent key of IEEE 802.11 wireless LAN card.
...
Currently, only Aironet ("an") driver/card can be used.
nwkey persist (IEEE 802.11 devices only) Enable WEP encryption for IEEE
802.11-based wireless network interfaces with the persis-
tent key written in the network card.
nwkey persist:key
(IEEE 802.11 devices only) Write the key to the persis-
tent memory of the network card, and enable WEP encryp-
tion for IEEE 802.11-based wireless network interfaces
with the key.
2001-06-21 13:36:24 +00:00
wiz
73f545bb5b
Drop arguments of .Os.
2001-06-05 11:22:41 +00:00
thorpej
ca4d373730
Implement support for IP/TCP/UDP checksum offloading provided by
...
network interfaces. This works by pre-computing the pseudo-header
checksum and caching it, delaying the actual checksum to ip_output()
if the hardware cannot perform the sum for us. In-bound checksums
can either be fully-checked by hardware, or summed up for final
verification by software. This method was modeled after how this
is done in FreeBSD, although the code is significantly different in
most places.
We don't delay checksums for IPv6/TCP, but we do take advantage of the
cached pseudo-header checksum.
Note: hardware-assisted checksumming defaults to "off". It is
enabled with ifconfig(8). See the manual page for details.
Implement hardware-assisted checksumming on the DP83820 Gigabit Ethernet,
3c90xB/3c90xC 10/100 Ethernet, and Alteon Tigon/Tigon2 Gigabit Ethernet.
2001-06-02 16:17:06 +00:00
itojun
cb58c8c6b6
make -A a default. present MAC adderss on all ifconfig operations.
2001-04-28 04:11:10 +00:00
itojun
7d54359fb0
assume the presense of getifaddrs(3).
2001-04-28 00:00:06 +00:00
itojun
59ba739cf6
sync usage() more to the reality. document alias/-alias.
2001-04-27 09:10:04 +00:00
itojun
be4c7a7c16
allow ifconfig to take "deprecated" and "-deprecated" for IPv6. sync with kame
...
sync usage() with reality. take "up" and "down" outside of "[af ...],
as "up" and "down" are independent from interface address configuration.
2001-04-27 09:08:44 +00:00
itojun
db6f3bcf39
whitespace at EOL
2001-03-01 08:35:16 +00:00
itojun
b57caf4727
on "tunnel" subcommand, use specified address family.
2001-03-01 08:34:10 +00:00
christos
b58136d76c
PR/12275:Kimmo Suominen: show -C in usage
2001-02-23 19:49:54 +00:00
itojun
1e48b7fbb5
add SIOC[SG]LIFPHYADDR ioctl. greatly simplify tunnel address settings.
...
sync with kame. old ioctls are supplied but not recommended for new code.
2001-02-20 15:35:19 +00:00
cgd
8a986b2e96
convert to use getprogname()
2001-02-19 22:48:57 +00:00
christos
f0cf3bcdfb
fix nested externs
2001-02-04 20:05:20 +00:00
garbled
b17f8c01fa
Fix the usage string so it displays the -b and s options to ifconfig -l
2001-01-24 18:06:51 +00:00
itojun
b3705ee26f
unbroken slash notation (10.0.0.0/8) for IPv4.
2001-01-17 06:10:37 +00:00
itojun
f3a31dc12d
support "prefixlen n" for IPv4 too.
2001-01-17 06:07:32 +00:00
itojun
c5520fd00b
uninitialized pointer. PR 11702
2001-01-08 14:06:12 +00:00
onoe
86d874c2bf
Add powersave/powersavesleep into usage.
...
Fold usage output (still 14 lines...)
2000-12-12 20:27:42 +00:00
onoe
f56e1f272f
powersavesleep requires argument
2000-12-12 20:22:45 +00:00
thorpej
b22f104458
Add powersave, -powersave, and powersavesleep to manipulate 802.11
...
power management parameters.
2000-12-12 04:08:40 +00:00
itojun
374c623f95
show IPv6 interface address status "deprecated" (preferred lifetime = 0).
...
RFC2462. sync with kame.
2000-11-07 14:47:59 +00:00
kleink
e90b215b52
Don't make references to _10Mb/s_ Ethernet where not appropriate; from
...
Christian Weisgerber.
2000-10-18 07:27:11 +00:00
thorpej
9e992b012b
In tunnel_status(), if we have an IPv6 kernel, but a driver doesn't
...
support IPv6 tunnel endpoint addresses, fall back on the sockaddr
version of the ioctls.
2000-10-02 22:30:40 +00:00
thorpej
c77c2baf89
Add vlan(4) support. From Andy Doran <ad@netbsd.org>.
2000-09-27 23:00:24 +00:00
wiz
fb3d40deab
add two letters in strategically important places, and replace one
...
ifconfig by .Nm
2000-08-13 17:17:26 +00:00
onoe
afa6a922a6
also note that the WaveLAN/IEEE Gold cards accept the 104 bits key.
...
pointed out by jhawk.
XXX this doesn't match to wiconfig(8), which is probably wrong.
2000-07-21 18:31:03 +00:00
onoe
05079cfc6d
Clarify the restrictions in length for argument of the nwid and nwkey.
2000-07-21 17:37:12 +00:00
onoe
9efdccbdb5
Add nwkey and -nwkey keywords, to enable/disable WEP,
...
and to set WEP encryption key for IEEE802.11 wireless network interfaces.
2000-07-21 04:53:03 +00:00
thorpej
5bf452f867
Add a -C flag, to list all available network interface cloners.
2000-07-20 18:42:02 +00:00
enami
1c1b132cda
- Fix off-by-one error in previous.
...
- Fix a typo of ioctl name in warning message.
2000-07-19 06:01:24 +00:00
onoe
f989129a77
check the length of nwid argument before copy to avoid SEGV.
...
pointed out by enami-san
2000-07-19 04:43:34 +00:00
onoe
b4a8e334e8
hexadecimal digits for nwid.
2000-07-06 11:02:02 +00:00
onoe
27f79f7369
cast u_char for ctype (nwid stuff) to fix possible overrun problems.
2000-07-06 08:20:51 +00:00
onoe
197deeeff8
warn instead of print 802.11 nwid with bad length field.
2000-07-06 00:50:49 +00:00
onoe
807a12c8cd
change the argument of SIOCS80211NWID and SIOCG80211NWID ioctls from
...
u_int8_t array to struct ieee80211_nwid to prepend length field.
The length field is necessary because IEEE 802.11 spec doesn't prohibit
even '\0' for SSID.
Though the name and the value of SIOC... macro is unchanged, this change
breaks binary compatibility. The only affected userland program on the
tree is ifconfig(8).
As Jason suggested on tech-net, it is better than live with problems
since there are no releases for this ioctls yet.
2000-07-05 02:35:53 +00:00
enami
a6edd9cf2f
- Remove description about trailers/-trailers since they are no longer
...
a meaningful option.
- Don't captialize the word address or interface when it refers an arugment.
- Use .Ar macro for dest_address since it is not a keyword.
2000-07-03 09:18:52 +00:00
enami
34c3137212
Sort the SEE ALSO list first by section and kill the comma at the
...
end of the list.
2000-07-03 08:55:14 +00:00
thorpej
f70c591ad2
Add `create' and `destroy' commands.
2000-07-02 00:28:00 +00:00
thorpej
1a9289d09a
- Add `tunnel' and `deletetunnel' commands, which issue the ioctls
...
that gifconfig(8) would issue to configure tunnel endpoints. This
allows IP tunnel interfaces (`gif' right now, and `gre' later) to
be configured with ifconfig(8), and via /etc/ifconfig.<interface>.
Partially taken from similar changes in OpenBSD.
- Const poison the command functions a bit. We really need to clean
up the command function interface.
2000-06-30 17:45:11 +00:00
enami
16fcce9bb7
Allocate flagreq on stack.
2000-04-20 02:08:55 +00:00
itojun
4a58ed7b4f
use getifaddrs, not SIOCGIFCONF, to avoid alignment constraints.
...
TODO: maybe it's better to pass struct ifaddrs * to in{,6}_alias.
2000-04-13 07:39:57 +00:00
itojun
dbe85fd5ef
clarify in_alias() and in_status().
...
in_status() handles the whole inet address family. in_alias() handles
printout for single address (for both the primary address or an alias).
it is more consistent with, for example, the way at_status() is used.
2000-04-13 07:16:54 +00:00
enami
2a9be1168a
Explicitly pick up ''the first address'' to delete.
2000-04-03 03:54:42 +00:00
onoe
36af21fa48
Set flagreq.ifr_name before issueing SIOCGIFFLAGS for setifflags.
...
Withoug this change, flagreq was never initialized and ifconfig w/o addr
always failed with ENXIO.
2000-03-20 21:10:03 +00:00
castor
70e0196cb3
Fix PR bin/9629. The global variable ifr was used to save interface
...
flags even though the media routines tweak it.
2000-03-18 21:10:50 +00:00
enami
5fa4437659
Remove unnecessary continue statement.
2000-03-06 09:00:13 +00:00
enami
f7f205fedf
Remove now unnecessary assignment. It looks like 4.4lite merge left over.
2000-03-06 08:45:35 +00:00
enami
e5f114df26
Don't copy from destination to destination.
2000-03-06 08:08:15 +00:00
thorpej
600e504f64
Per a discussion on gcc-bugs, port-alpha/9494 is not a compiler bug, but
...
rather a bug in the code (which is violating the C standard by casting
an unaligned pointer to a pointer with more strict alignment constraints).
Fix the code to not do such things. Fixes port-alpha/9494.
2000-03-06 01:06:17 +00:00
enami
6059f8bc37
Fix typo.
2000-03-01 03:32:55 +00:00
enami
eb6c30723e
Salvage the better comment appeared in rev 1.51 but gone in 1.53.
2000-03-01 03:21:56 +00:00
itojun
bd3400c592
more fix to SIOCGIFCONF alignment.
2000-02-18 08:14:26 +00:00
itojun
a6cfc0a168
note that ifconfig delete does not work for IPv6
...
this is intentional - IPv6 assumes multiple addresses on an interface,
and it is not very safe to "delete" arbitrary one. -alias with
explicit IPv6 address works fine.
2000-01-31 18:02:01 +00:00
itojun
809b9a5822
add "nwid" directive.
...
XXX there are too many flags that are not listed in usage().
what should we do?
2000-01-31 17:22:28 +00:00
mycroft
3d237fafa8
Fix a buglet that caused media-specific options to *always* be printed, even if
...
they were not set.
2000-01-25 06:11:25 +00:00
thorpej
409e9f1b38
Fix a logic buglet in status printing code.
2000-01-25 02:16:57 +00:00
thorpej
efe1032de0
- Print 802.11 status (i.e. network ID) after mtu, etc. but before
...
protcol addresses.
- When searching for status bits, use the currently selected media type,
not the currently active media type.
2000-01-25 01:46:57 +00:00
thorpej
98ac9f3fdb
Update copyright.
2000-01-25 01:03:21 +00:00
thorpej
4e10c0202f
Make display of media status information (e.g. carrier, etc.) table-driven
...
and easily extensible (by merely adding to the tables in ifmedia.h).
2000-01-25 00:59:39 +00:00
chopps
2377e11b8d
allow setting (and reporting) nwid for ieee 802.11 devices.
2000-01-24 23:24:16 +00:00
thorpej
9e4fad9efa
Fix a bug in get_media_options() which wasn't caught with global options;
...
make sure we only return option bits.
2000-01-24 22:31:27 +00:00
joda
4aafeffb6f
implement netmask slash notation for IP and IPv6 addresses
2000-01-12 10:29:35 +00:00
itojun
5f036cce1d
bring in KAME scopeid hack. always show scopeid if it is scoped.
...
sync with latest KAME.
1999-12-13 15:24:45 +00:00
itojun
b9cc391094
prepare -DKAME_SCOPEID for extended scope id printing (commented out)
1999-12-12 11:44:53 +00:00
itojun
a338a0d47b
add reference to "inet6" family.
...
document -alias.
1999-12-09 01:28:25 +00:00
itojun
76a67357f0
fix alignment problem of SIOCGIFCONF, on 64bit arch.
1999-07-29 15:40:48 +00:00
thorpej
c483de17ca
Make the previous actually compile.
1999-07-26 19:38:36 +00:00
darrenr
0717bdfdf2
cleanup error message
1999-07-26 12:00:47 +00:00
darrenr
870447b902
don't allow destination addresses to be set for non-Point-to-point interfaces
1999-07-26 11:56:55 +00:00
sommerfeld
8bfcc5ad34
Add a new -s option to make it easier to test the link-level status
...
(i.e., 10baseT carrier/no carrier) of an interface from scripts
ifconfig -s <interface> will exit with a false status if the interface
reports its unconnected.
-s also works in conjunction with -l and -a, filtering out interfaces
which are reporting down.
Also, add -b (which shows only broadcast interfaces with -l and -a).
I find these options useful in network autoconfig scripts for mobile
systems.
1999-07-03 17:31:15 +00:00
itojun
9a6abc8c5d
s/CFLAGS/CPPFLAGS/ for -D and -I.
1999-07-03 06:26:25 +00:00
itojun
565fad43fa
write up IPv6 operations (prefixlen and others)
1999-07-02 15:45:46 +00:00
itojun
25eb444e29
make ifconfig IPv6-ready.
...
TODO: update manpage for new options.
1999-07-01 13:19:20 +00:00
thorpej
e9d0bd756d
Fix a slight braino in last.
1999-05-18 18:01:08 +00:00
thorpej
52971adece
Don't force `inet' on status display; get all address families that have
...
configured addresses. From Jun-ichiro itojun Hagino, PR #7593 .
1999-05-17 16:00:05 +00:00
chopps
20a608fe88
revert the previous changes that removed special cased ioctls for ISO
...
stuff.
1999-04-01 08:12:23 +00:00
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
mycroft
e9d867ef50
Add RCS identifiers.
1993-08-01 17:54:45 +00:00
mycroft
dfb9caab49
Add RCS indentifiers.
1993-08-01 07:32:48 +00:00
mycroft
cda4f8f6ee
Add RCS identifiers.
1993-08-01 05:37:30 +00:00
deraadt
2c8e44c31a
removed aui/bnc hack from ifconfig. Use -llc0/llc0 instead.
1993-06-09 20:04:38 +00:00
deraadt
daa25cdf09
fix ifconfig once again. multiple protocols really cooked hte code i wrote
...
before for -a.
1993-06-06 08:55:30 +00:00
cgd
9d87d1d2e1
Remove ifdefs hiding ISO and XNS functionality
...
(from Havard Eidnes <Havard.Eidnes@runit.sintef.no>)
1993-05-21 12:48:49 +00:00
deraadt
46c2563196
Added another sunos-ism: ifconfig -a
1993-05-04 09:26:52 +00:00
cgd
06be60083d
changed "Id" to "Header" for rcsids
1993-03-23 00:22:59 +00:00
cgd
346aa5dd48
added rcs ids to all files
1993-03-22 08:04:00 +00:00
cgd
e541169ce2
after 0.2.2 "stable" patches applied
1993-03-21 18:04:42 +00:00
cgd
61f282557f
initial import of 386bsd-0.1 sources
1993-03-21 09:45:37 +00:00