Commit Graph

49 Commits

Author SHA1 Message Date
lukem 64a432d965 remove unnecessary #if NFOO > 0 .... #endif wrappers 2001-11-13 00:49:35 +00:00
lukem 34d65a3414 add RCSIDs 2001-11-12 23:49:33 +00:00
matt b5e785f38d Switch to using queue access macros instead of refering to the member
fields explicitly.
2001-11-05 18:02:15 +00:00
atatat 6e885d365a Turn the tun device/network interface into a cloning device. 2001-10-31 20:08:17 +00:00
itojun 43383b1e36 simplify previous fix (0-length mbuf in mbuf chain). from freebsd 2001-08-03 21:11:57 +00:00
itojun 47133068ba do not break from loop even if m_len == 0. it's valid to have
mbuf with m_len == 0 in mbuf chain.
2001-08-02 13:37:51 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
thorpej fc5dafc79b Fix a rather annoying problem where the sockaddr_dl which holds
the link level name for the interface (ifp->if_sadl) is allocated
before ifp->if_addrlen is initialized, which could lead to allocating
too little space for the link level address.

Do this by splitting allocation of the link level name out of
if_attach() and into if_alloc_sadl(), which is normally called
by functions like ether_ifattach().  Network interfaces which
don't have a link-specific attach routine must call if_alloc_sadl()
themselves (example: gif).

Link level names are freed by if_free_sadl(), which can be called
from e.g. ether_ifdetach().  Drivers never need call if_free_sadl()
themselves as if_detach() will do it if it is not already done.

While here, add the ability to pass an AF_LINK address to
SIOCSIFADDR in ether_ioctl() (this is what caused me to notice
the problem that the above fixes).
2001-01-17 00:30:49 +00:00
thorpej ed7695a765 Fill in if_dlt. 2000-12-18 19:44:33 +00:00
thorpej c5293456da Adapt to bpfattach() changes, and further centralize the bpfattach()
and bpfdetach() calls into link-type subroutines where possible.
2000-12-12 18:00:22 +00:00
augustss c1ebd1929a Kill some more register declarations. 2000-03-30 09:45:33 +00:00
itojun 118d2b1d4f IPv6 kernel code, based on KAME/NetBSD 1.4, SNAP kit 19990628.
(Sorry for a big commit, I can't separate this into several pieces...)
Pls check sys/netinet6/TODO and sys/netinet6/IMPLEMENTATION for details.

- sys/kern: do not assume single mbuf, accept chained mbuf on passing
  data from userland to kernel (or other way round).
- "midway" ATM card: ATM PVC pseudo device support, like those done in ALTQ
  package (ftp://ftp.csl.sony.co.jp/pub/kjc/).
- sys/netinet/tcp*: IPv4/v6 dual stack tcp support.
- sys/netinet/{ip6,icmp6}.h, sys/net/pfkeyv2.h: IETF document assumes those
  file to be there so we patch it up.
- sys/netinet: IPsec additions are here and there.
- sys/netinet6/*: most of IPv6 code sits here.
- sys/netkey: IPsec key management code
- dev/pci/pcidevs: regen

In my understanding no code here is subject to export control so it
should be safe.
1999-07-01 08:12:45 +00:00
mjacob d7e48cb804 adjust format args for compiler changes 1999-03-04 02:38:31 +00:00
sommerfe 14dc6ddfe6 Fix PR6473: allow sends to tun* devices using bpf. 1998-11-30 21:43:11 +00:00
veego ff2c3adddc Add some braces to stop the new egcs warnings. 1998-08-20 19:55:06 +00:00
jonathan 011f2bda08 defopt NS, NSIP. 1998-07-05 06:49:00 +00:00
jonathan 3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
matt fe94e79c57 Add SIOC{ADD|DEL}MULTI ioctl to support (for IFF_MULTICAST). 1997-09-25 13:11:58 +00:00
matt 27b993ed37 Add support of SIOCIFMTU to vary mtu of interface. Also allow IFF_MULTICAST
on TUNSIFMODE (sometimes you'd like to do IP multicast on tunnel devices).
1997-09-24 19:45:11 +00:00
is 07b064e02e New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:09:08 +00:00
christos a1dcf4b026 backout previous kprintf change 1996-10-13 02:10:01 +00:00
christos 10191279fb - printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:59:41 +00:00
mycroft 2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
pk 1a04146533 A couple of emulation enhancements from der mouse's PR#2411:
- ability to be either a BROADCAST or POINTTOPOINT interface.
	- a humble beginning of link-layer addressing (differs from PR
	  by using a `struct sockaddr' instead of single byte).
1996-06-25 22:15:13 +00:00
mycroft 12e6d35d62 Removing a completely unneeded reference to curproc. 1996-05-22 13:42:57 +00:00
thorpej 4edabe2501 Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 02:40:22 +00:00
christos 7af5cc8190 Eliminate need for and remove net_conf.h 1996-03-30 21:57:30 +00:00
christos 206e75c6f1 Net prototypes 1996-02-13 21:59:53 +00:00
scottr 5517c6a36f Grammar police; noted by Peter Seebach <seebs@solon.com>. Closes PR #1982. 1996-02-05 17:39:25 +00:00
mycroft 1107479eaa Rename tunioctl() and tuncioctl() so that cdevsw points to the right one.
From der Mouse, PR 2005.
1996-02-01 07:28:18 +00:00
pk 7e6c169434 Return actual packet length in FIONREAD (noted by Bob Smart). 1995-12-13 23:47:40 +00:00
mycroft d2307f3ecb Update to match data structure changes. 1995-06-13 05:52:42 +00:00
mycroft e0d6716b6a Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.
1995-06-12 01:09:20 +00:00
cgd e363664703 fixed sized types, where appropriate. when casting pointers to
integers to do math on them, cast to long.  ioctl commands are
u_longs.
1995-03-08 02:56:49 +00:00
cgd 6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
deraadt 043657b599 MIN -> min 1994-05-26 00:47:19 +00:00
deraadt b9753772a1 repair protos and functions 1994-05-15 19:20:02 +00:00
deraadt 946453260a fixes from <brad@fcr.com> who claims it now works correctly 1994-05-03 23:02:07 +00:00
andrew bc72e3a892 Fixed a bug with TUN_OPEN flag handling during tunclose(), as noted by
Mark Delany <markd@bushwire.apana.org.au>.
1994-02-28 07:16:10 +00:00
deraadt 8c75649495 must pull in machine-cpu.h 1993-12-24 03:20:59 +00:00
deraadt 65824a7d8b tunnel driver cleanup done by Brad Parker <brad@fcr.com> and myself 1993-12-13 05:06:33 +00:00
deraadt 04c059f13c use one stop shopping selwakeup/selrecord 1993-11-14 20:33:26 +00:00
deraadt d19b5e0673 cleaned up version of the tunnel driver 1993-11-14 20:07:20 +00:00
deraadt 13b002b9d3 suser() was being called in the old 4.3 way 1993-08-09 01:19:38 +00:00
cgd cd56dd1638 merge in changes from netbsd-0-9-ALPHA2 1993-08-07 07:53:27 +00:00
cgd fe1802950b add include of select.h if necessary for protos, or delete if extraneous 1993-05-22 11:40:42 +00:00
cgd 8d6c77881c make kernel select interface be one-stop shopping & clean it all up. 1993-05-18 18:18:40 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00