dyoung
76766729c4
Use an AF_LINK socket to add/delete/get link-layer addresses.
2008-05-13 18:10:17 +00:00
wiz
3f812bdc84
Bump date for previous.
2008-05-13 09:31:06 +00:00
dyoung
3361a66d0a
Per discussion at
...
<http://mail-index.netbsd.org/tech-net/2008/04/08/msg000371.html >,
let us add, delete, and activate link-layer addresses with ifconfig:
# ifconfig sip0 link 02:00:00:00:00:01 [add address]
# ifconfig sip0 link 02:00:00:00:00:02 [add address]
# ifconfig sip0 link 02:00:00:00:00:02 active [activate address]
# ifconfig sip0 link 02:00:00:00:00:01 delete [remove address]
2008-05-12 22:06:13 +00:00
dyoung
af8202a3c2
Apply the right copyright notice.
2008-05-12 22:01:32 +00:00
dyoung
85a29f7ecc
Fix link-layer address parsing. Add debug statements.
...
Cosmetic: fix copyright whitespace.
2008-05-12 21:54:51 +00:00
dyoung
8c56a7ef60
Cosmetic: fix copyright whitespace.
2008-05-12 21:53:32 +00:00
dyoung
cd86d94cd8
We cannot create an AF_LINK socket. If AF_LINK is requested, create
...
an AF_INET socket, instead.
2008-05-12 21:52:29 +00:00
dyoung
47bfdf8c0e
Make prototype and definition of in_alias() agree: it's static.
2008-05-12 20:59:13 +00:00
dyoung
b312223d4e
Retire in6_addreq and in6_ridreq, which we do not use in the
...
commit_address() regime.
2008-05-12 20:58:16 +00:00
dyoung
3f2ce08bf8
Initialize IPv6 addresses and ifreqs with more rigor. Fixes this
...
bug reported by Matthias Scheler,
# ifconfig sip0 inet6 fdb4:542d:dc11:ec20::1
ifconfig: SIOCAIFADDR_IN6: Invalid argument
# ifconfig sip0 inet6 fdb4:542d:dc11:ec20::1 prefixlen 64
2008-05-12 15:35:50 +00:00
dyoung
0f6386183c
setifipdst() is gone, so delete the prototype. #include nothing
...
(XXX).
2008-05-12 00:40:40 +00:00
dyoung
4279a83897
Add code for parsing link-layer addresses of the form xx:xx:...:xx.
2008-05-12 00:39:18 +00:00
dyoung
d3c42f50ae
Start to adapt the AppleTalk module to use commit_address().
2008-05-11 23:28:40 +00:00
dyoung
ed29145620
Get rid of sec2str() altogether.
2008-05-11 23:27:32 +00:00
dyoung
50a22265be
Don't export in_alias(). Pass in_alias() a more useful template.
...
Misc. cosmetic changes. Delete dead code. Treat the address
preference as int16_t, since that is its real type.
2008-05-11 23:25:46 +00:00
dyoung
42c94b7768
In in6_alias(), instead of repeating the memset()/estrlcpy()/sockaddr_in6
...
assignment-dance, copy creq to ifr6 before each ioctl().
2008-05-11 22:30:07 +00:00
dyoung
16f748ab9d
Delete unused array sin6tab[]. Delete unnecessary casts.
2008-05-11 22:18:20 +00:00
dyoung
3df1d7792b
Delete dead code in sec2str().
2008-05-11 22:16:29 +00:00
dyoung
8ae5a779c6
Retire some code that in6_commit_address() replaces.
2008-05-11 22:12:04 +00:00
dyoung
503d41a97f
Let the address family modules zero initialize their own ifreqs,
...
instead of zeroing them in commit_address().
Switch to in6_commit_address() from in6_getprefix() and in6_getaddr().
Temporarily add some debugging code to setia6eui64_impl().
2008-05-11 22:07:23 +00:00
elric
98059cd502
Add a new keygen method which will execute an external command and
...
take its output as the key. I've been meaning to do this for quite
a while...
2008-05-11 03:15:21 +00:00
elric
ba6026f365
Add -p flag to retrieve passphrases from stdin. This is mainly aimed
...
at programatic use where the caller wants to be able to use PKCS#5.
Disable looping on invalid verifications unless both a passphrase method
is in use and the -p flag is not specified.
Update man page to document -p flag.
2008-05-10 21:38:40 +00:00
dyoung
a00439c7f3
In address, integer, string parsers, gracefully handle a missing
...
token.
2008-05-09 20:48:59 +00:00
dyoung
19f3f9a2f3
Repair agr(4) syntax. Should fix PR bin/38600.
2008-05-09 20:45:09 +00:00
dyoung
de7ae11c56
Use the correct key. Spotted by NONAKA Kimihiro.
2008-05-09 04:46:50 +00:00
dyoung
44e2875450
Move IPv4/IPv6-specific code from commit_address() to in_commit_address()
...
and in6_commit_address(). Fixes the USE_INET6=no build.
2008-05-08 07:13:20 +00:00
dyoung
cbb2531719
Delete #if 0'd code.
2008-05-08 07:11:03 +00:00
dyoung
43545a233c
Don't use -pedantic, it stops af_atalk.c and af_iso.c from building
...
if INET_ONLY is #defined.
2008-05-08 07:09:18 +00:00
dyoung
8c460289fe
Factor out common code, creating direct_ioctl() and indirect_ioctl()
...
for the two most prevalent styles of ioctl(2) calls in ifconfig(8).
2008-05-07 23:55:06 +00:00
dyoung
db80154181
Remove CPPFLAGS that are redundant when WARNS=4.
2008-05-07 22:07:24 +00:00
dyoung
71b48a4b36
Move IPv6 syntax to af_inet6.c from ifconfig.c. Move IFKW() macro
...
from ifconfig.c to parse.h for reuse.
2008-05-07 21:29:27 +00:00
dyoung
8a08b505d5
Move ISO, AppleTalk, carp(4) syntax from ifconfig.c to af_iso.c,
...
af_atalk.c, carp.c, respectively.
2008-05-07 20:45:01 +00:00
dyoung
e3cf2a1157
Sprinkle 'static const' on keyword objects.
2008-05-07 20:12:31 +00:00
dyoung
48fa574a64
Move vlan(4) syntax from ifconfig.c into vlan.c.
2008-05-07 20:11:15 +00:00
dyoung
8bc06077c3
Move tunnel syntax into tunnel.c. Move net80211 'list' command
...
syntax into ieee80211.c.
2008-05-07 20:03:27 +00:00
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
xtraeme
eab7dadfb7
Xref mount_tmpfs(8).
2008-05-06 17:21:56 +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