Commit Graph

54 Commits

Author SHA1 Message Date
joerg e240adbd0b Retire OSI network stack. OK core@ 2013-03-01 18:25:13 +00:00
christos 54abeff8fd don't define RUMP_ACTION if MKRUMP = no 2012-08-08 14:10:38 +00:00
christos f5bc231029 use memcpy to avoid strict aliasing warnings 2011-08-14 12:15:15 +00:00
mrg c111245a78 apply some -Wno-error and/or -fno-strict-aliasing.
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
pooka a415ef09e9 Convert from the .ifdef RUMP_ACTION stuff to RUMPPRG. 2010-12-13 17:35:08 +00:00
pooka 2ddc760fc7 Need getifaddrs() for the rump client since it executes sysctl(2) 2010-11-05 16:23:56 +00:00
pooka 23c2b7b527 Update RUMP_ACTION to use the newstyle rump client. 2010-11-04 23:31:12 +00:00
dyoung de51d12924 Apparently, -g belongs in the DBG variable, not in CFLAGS. Make it so
on a line that is commented-out in this makefile.
2010-07-01 16:28:21 +00:00
tsutsui aa68f4ed1a - no space needed between -I and dir per gcc(1)
- it's still better to use ${NETBSDSRCDIR} per other existing Makefiles
2009-09-16 15:08:29 +00:00
tsutsui d60368466f Add comments that Makefile.inc should have shared stuff with
src/distrib/utils/x_ifconfig for install media.
2009-09-16 14:59:45 +00:00
he ad8225c04b Move the addition of pfsync.c from Makefile.inc to Makefile,
so that this part doesn't get included in install media versions
of ifconfig, as per comments on source-changes@ from Izumi Tsutsui.
Also re-instate the use of ${.CURDIR} when setting up the include path.
2009-09-15 09:22:07 +00:00
pooka bd085b2b32 If RUMP_ACTION, treat close() as a rump syscall. 2009-06-02 23:41:35 +00:00
pooka 162ca8ac83 Add compile mode which executes rump system calls. This is useful
when figuring out Where In The Kernel Is Carmen Sandiego's ioctl
for an ifconfig command line, since we can simply single-step into
the kernel.

Activated by "make RUMP_ACTION=1".  No changes to normal case.
2009-05-26 16:03:24 +00:00
lukem ef685eeea9 Enable WARNS=4 by default except for:
dump  dump_lfs  fsck_ffs  fsck_lfs  fsdb  mount_smbfs
	newfs_ext2fs  newfs_lfs  resize_lfs  setkey
2009-04-11 07:58:11 +00:00
uebayasi a6533b8fed Comment out CFLAGS+=-g. 2009-02-13 16:02:05 +00:00
tsutsui 09275f2b8b Specify -fno-loop-optimize on m68000 as workaround for gcc -O1 codegen bug
mentioned in PR bin/40036 and PR toolchain/40066.
2008-11-29 15:28:49 +00:00
dyoung d75414adf5 Let us add/remove features from ifconfig, such as support for
various address families (inet, inet6, iso, atalk) and protocols
(802.11, 802.3ad, CARP), simply by trimming the list of sources in
the Makefile.  This helps one customize ifconfig for an embedded
device or for install media, and it eliminates a lot of grotty
#ifdef'age.  Now, the ifconfig syntax and semantics are finalized
at run-time using the constructor routines in each address-family/protocol
module.

(In principle, ifconfig could load virtually all of its syntax from
shared objects.)

Extract a lot of common code into subroutines, in order to shrink
the ifconfig binary a bit.  Make all of the address families share
code for address addition/replacement/removal, and delete "legacy"
code for manipulating addresses.  That may have broken atalk and
iso, despite my best efforts.

Extract an include file, Makefile.inc, containing the make-fu that
both ifconfig and x_ifconfig share.

Sprinkle static.  Change some int's to bool's.  Constify.

Add RCS Ids to carp.c and env.c.  Move media code to a new file,
media.c.  Delete several unneeded header files.

Set, reset, and display the IEEE 802.11 attribute, 'dot11RTSThreshold'.

Bug fix: do not require both a interface address and a destination
address for point-to-point interfaces, but accept a interface
address by itself.
2008-07-02 07:44:13 +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 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 db80154181 Remove CPPFLAGS that are redundant when WARNS=4. 2008-05-07 22:07:24 +00:00
dyoung 40b61e5050 Add WARNS=4 and a dependency on ${LIBPROP}. 2008-05-06 16:07:00 +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
matt bb735e0ef9 Remove XNS support. 2006-08-26 16:20:20 +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
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
yamt 5e26e86d45 add a reminder comment for x_ifconfig. 2005-03-20 14:24:13 +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 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 1a5470cfdd Split off 802.11 interface handling into its own file. 2005-03-19 23:13:42 +00:00
thorpej e6d38785ff Split tunnel support into its own file. 2005-03-19 17:32:26 +00:00
thorpej 0fded9bea2 Split VLAN configuration bits out into a separate file. 2005-03-19 03:53:55 +00:00
yamt 5240b887db add agr(4), a pseudo network device driver for link aggregation. 2005-03-18 11:11:50 +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
dsl 57030cf931 More isdigit() calls that need (unsigned char) cast 2004-10-28 20:10:29 +00:00
christos 5b90483a76 use snprintb() 2002-09-20 21:21:53 +00:00
itojun 7d54359fb0 assume the presense of getifaddrs(3). 2001-04-28 00:00:06 +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 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 9a6abc8c5d s/CFLAGS/CPPFLAGS/ for -D and -I. 1999-07-03 06:26:25 +00:00
itojun 25eb444e29 make ifconfig IPv6-ready.
TODO: update manpage for new options.
1999-07-01 13:19:20 +00:00
cgd 0114e805ce convert to new RCS Id conventions; reduce my headache 1995-03-18 14:54:19 +00:00
cgd 06e2955ff1 specify man pages the new way. 1994-12-22 10:44:04 +00:00
mycroft 3c78ef3311 Merge with 4.4-Lite version. 1994-09-23 01:38:45 +00:00