dyoung
ad19851f11
Move net80211 and agr(4) syntax out of ifconfig.c and into ieee80211.c
...
and agr.c, respectively.
2008-05-07 19:55:24 +00:00
dyoung
e4942eb316
Interpret 'prefixlen 0' as the maximum prefix length, as ifconfig
...
has always done.
2008-05-07 18:17:42 +00:00
dyoung
ed7181ed99
Fix a bug that I introduced in rev 1.88, where the default IPv6
...
prefix length changed from 64 to 128. While I am here, allow an
address to be given with prefix length /0, but interpret it as
/128.
2008-05-07 18:08:30 +00:00
yamt
2f1a30af0d
agrsetport: fix a use of uninitialized variable.
2008-05-07 01:13:51 +00:00
dyoung
f32d909d6e
Use the right key, "ifcaps" not "ifcap", in do_setifcaps(). assert()
...
that the object associated with that key is the right size.
2008-05-06 21:58:05 +00:00
dyoung
1c6c1fd531
Extract subroutine do_setifcaps() and fix the bug that uwe@ reported
...
in capabilities-setting.
Use prop_dictionary_util(3).
Rename the parser snpaoffset to parse_snpaoffset.
2008-05-06 21:20:05 +00:00
dyoung
502f5a16a5
Use prop_dictionary_util(3).
...
Re-use set80211() some more.
2008-05-06 21:18:17 +00:00
dyoung
fac0aeb0a0
Use prop_dictionary_util(3).
2008-05-06 21:13:20 +00:00
dyoung
4e8b81ea3e
Use prop_dictionary_util(3).
2008-05-06 18:58:47 +00:00
dyoung
55927815b6
Use prop_dictionary_util(3).
2008-05-06 18:35:38 +00:00
dyoung
42acbb2b0d
Fix syntax error in last.
2008-05-06 18:16:34 +00:00
dyoung
990c1a7873
Cosmetic: use return rc ? 0 : -1;
...
Make sure to release a prop_object_t that I am no longer using.
2008-05-06 18:09:50 +00:00
dyoung
a2e4fb3562
Use prop_dictionary_util(3) some more.
...
When we read interface flags and capabilities from the kernel, take
care not to record them in our current environment (env), but record
them in the output environment (oenv), instead. This helps us get
interface capabilities and flags right.
2008-05-06 17:29:04 +00:00
dyoung
32cf2beed0
Rename in_addr_commit() to commit_address(), and refactor slightly
...
to support IPv6 as well as IPv4 (a work in progress).
Make the second argument of af_status() a bool instead of an int.
Exit early with an error if the operator specifies an unsupported
address family on the command line. The change should help rc
scripts to detect that IPv6 support is missing from the kernel,
with 'ifconfig lo0 inet6'.
Start using prop_dictionary_util(3).
2008-05-06 16:15:17 +00:00
dyoung
e51773dc79
Add a license.
2008-05-06 16:09:18 +00:00
dyoung
40b61e5050
Add WARNS=4 and a dependency on ${LIBPROP}.
2008-05-06 16:07:00 +00:00
dyoung
8db3a2f0ba
If the address family is not set, assume AF_APPLETALK. Exit
...
at_status() quietly if the address family is set, and it is not
set to AF_APPLETALK.
2008-05-06 15:02:49 +00:00
skrll
77ecd4421a
Restore RCSId lost in 1.11
2008-05-06 08:16:12 +00:00
dyoung
c62cf792b0
Take out my CFLAGS settings for debugging.
2008-05-06 04:40:45 +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
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
dyoung
52440afe4e
Don't cast memset(3) to void. Remove a needless cast to struct
...
in6_addr *.
2008-04-24 05:29:40 +00:00
dyoung
35eb8b696a
Copy a const string to a temporary buffer instead of using __UNCONST().
...
Cosmetic: get rid of superflous curly braces and cast to (void *).
2008-04-22 17:18:11 +00:00
dyoung
d5063688b1
Delete some gratuitous casts, s/(char *)//.
2008-04-22 00:14:20 +00:00
dyoung
197afa999c
Change int to bool in a couple of places.
2008-04-21 05:33:55 +00:00
dyoung
babbbc034d
s/(caddr_t)//
2008-04-21 02:10:45 +00:00
dyoung
246781acda
Change bzero calls to memset calls.
2008-04-21 02:08:09 +00:00
dyoung
f7545c1509
Straggler from last: call fewer protocol family-specific initialization
...
routines from main(), since the protocol-family modules are taking
care of it.
2008-04-15 22:26:58 +00:00
dyoung
499909306a
Use static initializers to setup ISO and IPv6 addresses, instead
...
of calling protocol family-specific routines from main().
2008-04-15 22:24:37 +00:00
dyoung
8de26a0c60
Cosmetic: write strcmp() == 0 instead of !strcmp().
2008-04-15 22:14:07 +00:00
dyoung
adc446d581
Cosmetic: delete dead code.
2008-04-14 15:57:15 +00:00
dyoung
18685458ac
Cosmetic: use NULL instead of 0 for pointers. Shorten staircase.
2008-04-11 01:14:28 +00:00
dyoung
457345432a
Cosmetic: compare socket address family with AF_UNSPEC instead of
...
0.
2008-04-11 00:56:11 +00:00
dyoung
aeb69f8d9e
Cosmeticc: there's no use casting a uint16_t to a u_short, so don't
...
do that. Change indentation for readability.
2008-04-11 00:55:41 +00:00
degroote
9fe6472fc5
Add support for the command list scan in ifconfig (this command permits to scan
...
access point in the neighbourhood).
Complete list of channel attributes and list of management information element
payload.
While here, use estrlcpy instead of strncpy.
From FreeBSD ifconfig and net80211
2007-12-16 13:49:21 +00:00
mishka
d7d886db87
Our VLAN implementation (as it correctly expected) is not allowed
...
to modify the whole VLAN tags, but it is permitted to change 12-bit
VLAN identificators only. Reflect this fact on the appropriate man
pages.
Antti Kantee and Mihai Chelaru from #netbsd-code were helpful in
better understanding of VLAN stuff. Thank you!
2007-06-05 11:15:15 +00:00
dyoung
5630b5969e
Don't try to convert numbers to names for either endpoint of a
...
tunnel. In this way, ifconfig will avoid emitting something
abominable like this:
tunnel 192.168.1.1,mdns --> 192.168.1.2,kazaa
2007-03-26 05:02:44 +00:00
dyoung
3dfd6a1c5f
Print more 802.11 statistics when the operator runs 'ifconfig -v
...
ath0', for example. Fix the spelling of one statistic.
2007-01-09 09:25:56 +00:00
dyoung
dbf49243d9
Per discussion "ifconfig error handling" on tech-net@ in August
...
2006, if we fail to set any 802.11 parameter, exit immediately with
EXIT_FAILURE.
2007-01-09 09:24:14 +00:00
dyoung
d097d6a596
Let us adjust the 802.11 fragmentation threshold with ifconfig ath0
...
frag 256, for example.
2007-01-09 09:19:02 +00:00
wiz
856416cc4a
Punctuation nit, sort SEE ALSO.
2006-12-23 07:41:26 +00:00
wiz
11b2ef8137
Remove a troff command that added some empty lines to the man(1) output.
2006-12-03 11:35:07 +00:00
yamt
809ec70bcf
implement ipv6 TSO.
...
partly from Matthias Scheler. tested by him.
2006-11-23 19:41:58 +00:00
dyoung
a25eaede91
Add a source-address selection policy mechanism to the kernel.
...
Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses. Make ifconfig(8) set/display preference
numbers.
To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.
Miscellaneous changes in support of source-address selection:
1 Factor out some common code, producing rt_replace_ifa().
2 Abbreviate a for-loop with TAILQ_FOREACH().
3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
IN_PRIVATE(), that are true for link-local unicast
(169.254/16) and RFC1918 private addresses, respectively.
Add the predicate IN_ANY_LOCAL() that is true for link-local
unicast and multicast.
4 Add IPv4-specific interface attach/detach routines,
in_domifattach and in_domifdetach, which build #ifdef
IPSELSRC.
See in_getifa(9) for a more thorough description of source-address
selection policy.
2006-11-13 05:13:38 +00:00
christos
00ab1df137
- get rid of p_cfunc2
...
- add missing initializers
2006-10-16 02:52:43 +00:00
hubertf
8e46fd3f16
Fix typo, noted by Nino Dehne <ndehne@gmail.com>
2006-09-16 20:15:49 +00:00
dyoung
47be766fd3
Add a mode to gre(4) that sends GRE tunnel packets in UDP datagrams.
...
Fix MOBILE encapsulation. Add many debugging printfs (mainly
concerning UDP mode). Clean up the gre(4) code a bit. Add the
capability to setup UDP tunnels to ifconfig. Update documentation.
In UDP mode, gre(4) puts a GRE header onto transmitted packets,
and hands them to a UDP socket for transmission. That is, the
encapsulation looks like this: IP+UDP+GRE+encapsulated packet.
There are two ways to set up a UDP tunnel. One way is to tell the
source and destination IP+port to gre(4), and let gre(4) create
the socket. The other way to create a UDP tunnel is for userland
to "delegate" a UDP socket to the kernel.
2006-08-31 17:46:16 +00:00
christos
2a1607d040
Programs that use efun.
2006-08-26 18:14:28 +00:00
matt
cca9bcea2e
Nuke a leftover XNS fragment.
2006-08-26 16:59:27 +00:00
matt
bb735e0ef9
Remove XNS support.
2006-08-26 16:20:20 +00:00
martin
50edcae7de
Trying the old "ifconfig <name> x.x.x.x down" issue again:
...
if the kernel does not set the interface up after we set an address,
do it explicitly, unless we (previously) set it down on user request.
This will allow the network drivers to be "fixed" while keeping visible
behaviour the same. Part of fixing PR 30694.
2006-07-13 14:02:03 +00:00
drochner
c6b8e0a9fe
fix an Xref
2006-06-30 15:51:36 +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
tron
2ab5da17ce
Adapt ifconfig(8) to new return value from socket(2). This stops
...
ifconfig(8) from printing errors like "ifconfig: socket: Address
family not supported by protocol family" when examining the status
of a network interface.
2006-06-14 11:05:42 +00:00
liamjfoy
4876c304b1
Integrate Common Address Redundancy Procotol (CARP) from OpenBSD
...
'pseudo-device carp'
Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@
2006-05-18 09:05:49 +00:00
mrg
19b4ae1a8b
remove extern for unused ifr6.
2006-05-11 00:46:02 +00:00
wiz
4d1a166e8b
Remove trailing whitespace.
2006-05-06 07:01:22 +00:00
rpaulo
227effc121
Add two new options from FreeBSD:
...
hidessid | -hidessid: SSID broadcast control
apbridge | -apbridge: how to pass packets between wifi clients
2006-04-29 21:32:29 +00:00
christos
86b43a935f
PR/32628: Yves-Emmanuel JUTARD: Missing cast in sbin/ifconfig/ifconfig.c,
...
strcasecmp needs char * not u_int8_t *.
2006-01-25 16:08:49 +00:00
dyoung
b1725a3d60
Commit a straggler: use the new SIOCG80211STATS/SIOCG80211ZSTATS
...
ABI.
2005-09-15 23:35:15 +00:00
wiz
667d70cb77
Argument is address_family, not "address family". From YOMURA Masanori in private mail.
2005-09-11 23:37:14 +00:00
rpaulo
aaf548920f
Explained the '-h' option.
2005-08-11 20:56:57 +00:00
rpaulo
630caafc65
Added a new ifconfig flag, -h, allowing, in conjunction with -v, the display
...
of interface I/O bytes in human-format.
Reviewed by Christos Zoulas and Jason Thorpe.
2005-08-11 20:56:05 +00:00
christos
2c6eadc9ce
Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
...
programs that did not compile before.
2005-06-27 01:00:04 +00:00
dyoung
9063402978
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
...
from FreeBSD. Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]). Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.
2005-06-22 06:14:51 +00:00
yamt
b954935865
bump date for the previous.
2005-05-02 15:37:06 +00:00
yamt
330cc0a11e
split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx.
2005-05-02 15:34:31 +00:00
yamt
5e26e86d45
add a reminder comment for x_ifconfig.
2005-03-20 14:24:13 +00:00
thorpej
be8f682caf
IFFBITS and IFCAPBITS are now defined in <net/if.h>
2005-03-20 02:51:47 +00:00
thorpej
d14cc8f89c
Remove an #ifdef that is no longer necessary.
2005-03-20 02:44:50 +00:00
thorpej
f76f47a0df
Don't build af_inet6.c if USE_INET6 is no.
2005-03-20 02:44:25 +00:00
thorpej
e00adb14b6
Split the IPv4 support into its own file.
2005-03-20 02:43:50 +00:00
thorpej
20f1388354
Move a comment.
2005-03-20 01:10:51 +00:00
thorpej
26dbe00d59
Split IPv6 support out into its own file.
2005-03-20 01:09:16 +00:00
thorpej
4fd9a96b1d
Split OSI support off into its own file.
2005-03-20 00:02:58 +00:00
thorpej
e7c8ca2ae5
Split XNS support into its own file.
2005-03-19 23:46:03 +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
yamt
1ba14738a5
make this compilable with USE_INET6=no.
2005-03-19 18:16:06 +00:00
thorpej
e6d38785ff
Split tunnel support into its own file.
2005-03-19 17:32:26 +00:00
thorpej
21117c1aaf
name -> ifname (avoid shadow decl with global name[]).
2005-03-19 17:31:48 +00:00
thorpej
1054956d85
Move extern decls to extern.h
2005-03-19 03:56:06 +00:00
thorpej
0fded9bea2
Split VLAN configuration bits out into a separate file.
2005-03-19 03:53:55 +00:00
yamt
712c784484
update usage() for agr(4). pointed by Thomas Klausner.
2005-03-18 14:30:08 +00:00
wiz
f2636e2d3d
Link to vlan(4) too, suggested by yamt.
2005-03-18 14:18:06 +00:00
wiz
2fa6ad9b68
Bump date for agr; add agr(4) to SEE ALSO.
2005-03-18 12:43:56 +00:00
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