Commit Graph

4868 Commits

Author SHA1 Message Date
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
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
tsutsui
34dd728d42 There is only one more file which requires HACKS for m68000,
so handle it in each Makefile rather than sys.mk.

These ICEs might be related with GCC Bugzilla Bug 32424
which is not resolved yet even in the upstream.
2008-05-04 15:37:19 +00:00
martin
cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin
3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
tsutsui
c007028e0b Enable gcc optimization on m68000 (sun2) again with minimum hacks.
gcc -O0 generates a bit fat binaries.
2008-04-27 03:06:46 +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
christos
ab3d20195f PR/28627: Andreas Gustafsson: Try 5 times to calibrate before failing. Should
fix issues with CPU's that don't produce consistent timing output due to code
morphing or power-savings.
2008-04-21 15:23:35 +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
ad
76f153e120 sync() a couple of times to benefit diagnosis of sloppy kernel code that
crashes during boot to multiuser.
2008-04-20 23:40:31 +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