Commit Graph

117 Commits

Author SHA1 Message Date
thorpej 9c881e00cb Add a SIOCGIFCLONERS ioctl, which fetches a list of network
interface cloners from the kernel.
2000-07-20 18:40:26 +00:00
onoe 0ab524f389 moved the check priviledge for SIOCS80211NWID from each driver to ifioctl().
it also fixes the problem that non-priviledged user can change nwid
for wi and ray drivers.
2000-07-19 06:00:39 +00:00
thorpej 445487c8f3 Move ifpromimsc() to if.c 2000-07-04 18:46:49 +00:00
thorpej 464c773f27 Oops, restrict SIOCIF{CREATE,DESTROY} to super-user. 2000-07-04 01:51:22 +00:00
thorpej 1e58f22342 Add the notion of "cloning" of network pseudo-interface (e.g. `gif').
This allows them to be created and destroyed on the fly via ifconfig(8),
rather than specifying the count in the kernel configuration file.
2000-07-02 00:20:48 +00:00
bouyer 4e9473a1e7 ifa_ifwithnet(): for the netatalk case, don't blindly return the first match
but try to find a exact match first. Closes kern/9957.
2000-04-26 13:38:13 +00:00
augustss c1ebd1929a Kill some more register declarations. 2000-03-30 09:45:33 +00:00
simonb 76e291abe4 Delete redundant decls of if_slowtimo and if_null{output,input,start,
ioctl,reset,watchdog,drain} - they're in <net/if.h>.
2000-03-30 02:31:59 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
itojun c23a76689e remove if_withname, which was merged in by mistake during KAME merge. 2000-03-22 11:34:15 +00:00
thorpej 0f5c059d1f - Add link status to if_data, so that routing daemons and other interested
parties can easily know the state of a link.
- Define an interface announcement message for the routing socket so that
  routing daemons and other interested parties know when an interface
  is attached/detached.
2000-03-06 20:49:00 +00:00
thorpej 72ecabeb4d In if_detach(), call PRU_PURGEIF for *every* protocol within a domain
that has a usrreq entry point.  Each protocol may have its own PCB
tables that need to be purged of references to the interface.
2000-02-06 16:43:33 +00:00
itojun 1f8497dc18 fix route cleanup on interface removal. (not sure why -Wall did not catch it) 2000-02-05 07:58:54 +00:00
thorpej c1185c1020 PRU_PURGEADDR -> PRU_PURGEIF, per a discussion w/ itojun. In the IPv4
and IPv6 code, also use this to traverse PCB tables, looking for cached
routes referencing the dying ifnet, forcing them to be refreshed.
2000-02-02 23:28:08 +00:00
thorpej d844a3ac41 First-draft if_detach() implementation, originally from Bill Studnemund,
although this version has been changed somewhat:
- reference counting on ifaddrs isn't as complete as Bill's original
  work was.  This is hard to get right, and we should attack one
  protocol at a time.
- This doesn't do reference counting or dynamic allocation of ifnets yet.
- This version introduces a new PRU -- PRU_PURGEADDR, which is used to
  purge an ifaddr from a protocol.  The old method Bill used didn't work
  on all protocols, and it only worked on some because it was Very Lucky.

This mostly works ... i.e. works for my USB Ethernet, except for a dangling
ifaddr reference left by the IPv6 code; have not yet tracked this down.
2000-02-01 22:52:04 +00:00
thorpej 6f6f873945 const poison ifunit(). 1999-09-29 22:42:02 +00:00
bouyer 075ea2cfea Fix ifa_ifwithnet() for the netatalk case: netatalk uses blocks of addresses
which can't be handled by netmask, and ifa_ifwithnet() didn't find the
interface associated with an adress if it was in the same block but not with
the same prefix. This prevented 'route add' and atalkd to work properly
with some network configs.
This has been discussed on tech-net some weeks ago.
1999-08-24 16:02:27 +00:00
thorpej 267920eb1a defopt INET6, and put it in opt_inet.h (most places already include this
file, which is why the file list is so short).
1999-07-09 23:41:16 +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
christos bee9dafdf5 defopt COMPAT_43 1998-12-10 15:07:01 +00:00
thorpej 816e12eac2 defopt COMPAT_SVR4 1998-06-26 00:07:06 +00:00
thorpej c466f11939 defopt COMPAT_LINUX 1998-06-25 23:18:23 +00:00
kml e72782a137 Driver for Essential Communications' RoadRunner HIPPI (800 Mb/sec network)
card.  With some modification, this could probably also work for their
Gigabit Ethernet card based on the same chipset...
1998-05-14 00:04:57 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej 4c54445530 Use offsetof() from libkern.h 1998-01-28 02:35:10 +00:00
is fabb33431c Reimplement a test for broadcast addresses advertized, which was left out
when rewriting the ARP system.
1997-10-02 19:41:56 +00:00
thorpej ff970dc9c5 Garbage-collect. 1997-08-29 00:57:54 +00:00
thorpej 0eee106cc2 Bring changes from marc-pcmcia branch down to the trunk. 1997-08-29 00:57:28 +00:00
thorpej 1b1c7ef868 BSD/OS-style network interface media selection, implemented by
Jonathan Stone and myself.  Many thanks to Matt Thomas for providing
the information necessary to implement this interface, and for helping
to shake out the bugs.
1997-03-17 02:55:12 +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
cgd ba3b2a87a2 implement SIOCGIFMTU in a generic manner, by pulling the MTU out of
each netif's if_data structure.  There's no point in making each
driver implement this ioctl.
1996-06-13 21:49:43 +00:00
mycroft 49d52c9b1c Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.
1996-05-22 13:54:55 +00:00
thorpej 527565ac15 Kill a couple of unnecessary calls to strlen(). 1996-05-07 05:26:02 +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 8d33c5c8b4 - Fix fencepost error in ifconf() where if space = n * sizeof(struct ifreq),
only n - 1 interfaces would be obtained. This bug is present in the Lite2
  sources too.
- Support COMPAT_SVR4 in ifconf()
1996-04-22 01:20:34 +00:00
mrg d55f4dd0c3 oops; back out previous change and add comment describing what the weird goto does. 1996-03-12 13:07:52 +00:00
mrg c23a9d83e5 eliminate stupid use of "goto next;" where next was: "next: continue;" 1996-03-12 13:01:20 +00:00
mrg 5bc2fce9e1 test for null ifa_dstaddr before using it. (pr#2183 from chuck cranor) 1996-03-12 12:55:52 +00:00
thorpej 7b294ae934 Handle more than 10 interfaces of a given type (well, up to `if99', anyhow).
From Neil McRae, PR #1992.
1996-03-05 01:56:37 +00:00
mycroft 9fa7b98204 Emulate OSIOCGIFADDR, et al, if COMPAT_LINUX is defined. 1996-02-27 08:17:08 +00:00
mycroft a252a2e3b8 Handle OSIOCGIFCONF if COMPAT_LINUX is defined. 1996-02-27 07:28:38 +00:00
mrg 32cdb91fa3 two more local addr changes, all done differently now (idea from charles) 1996-02-26 23:16:42 +00:00
christos 17de1d7eae Close PR/2105: if.c does not compile without COMPAT_43 due to missing casts. 1996-02-21 14:28:33 +00:00
christos 206e75c6f1 Net prototypes 1996-02-13 21:59:53 +00:00
mycroft 5482957905 splnet --> splsoftnet 1995-08-12 23:59:09 +00:00
mycroft 4cabe662ac Make sure to initialize ifnet correctly. 1995-06-12 02:22:13 +00:00
mycroft 6897f39ae9 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 00:46:47 +00:00
cgd 92fad4a481 be more careful when rounding sockaddr_dl sizes. also, one u_short * ->
u_int16_t * conversion.
1995-04-22 13:07:12 +00:00
mycroft b880de68c5 ifconf() takes a u_long, not an int. 1995-03-09 09:47:25 +00:00
cgd 6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
cgd 04753d13bf kill vax code, at ragge's requeust. 1994-07-26 18:56:57 +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
mycroft d361acde18 Update to 4.4-Lite networking code, with a few local changes. 1994-05-13 06:01:27 +00:00
mycroft e593e490db Remove now-bogus cast. 1994-05-05 09:33:21 +00:00
cgd a0a7429482 lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.
1994-05-05 05:35:42 +00:00
cgd e0db92993a change timeout/untimeout/wakeup/sleep/tsleep args to void * 1994-04-29 23:15:51 +00:00
mycroft bf98a55f37 Deprecate af.h. 1994-02-10 17:25:03 +00:00
hpeyerl 1f2c9ecdae Multicast is no longer optional 1994-02-02 01:21:32 +00:00
mycroft f1a5c33098 Canonicalize all #includes. 1993-12-18 04:46:25 +00:00
mycroft 95b048b53a Canonicalize all #includes. 1993-12-18 00:40:47 +00:00
hpeyerl d1648996c9 multicast support.
From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.
1993-12-06 04:17:38 +00:00
mycroft bc2088820b + #if defined(INET) && NETHER > 0
+ #endif
Around the:
/* XXX -- Temporary fix before changing 10 ethernet drivers */
so you can compile a kernel with out INET and ETHERNET support.
1993-08-27 10:26:08 +00:00
deraadt 3604916e13 ppp from paul mackerras 1993-08-14 06:29:28 +00:00
andrew 0e6cb953ea ANSIfications - removed all implicit function return types and argument
definitions.  Ensured that all files include "systm.h" to gain access to
general prototypes.  Casts where necessary.
1993-06-27 06:01: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