Commit Graph

1374 Commits

Author SHA1 Message Date
martin
5e83f0d7e8 Remove deleted interfaces from the instance list (inspired by an OpenBSD
change). While there, fix a comment.
2005-01-19 15:05:55 +00:00
cube
755855a1f9 Make this LKM-friendly by using _KERNEL_OPT and having a prototype for the
sysctl setup function.
2005-01-19 10:18:40 +00:00
itojun
5377005da8 ESP AESCTR got an official protocol number
http://www.iana.org/assignments/isakmp-registry
2005-01-14 04:11:55 +00:00
yamt
d502f705e1 ifioctl: don't use super user priviledge unless it's needed. 2005-01-09 12:18:46 +00:00
cube
da24800d8c Install net/if_tap.h. 2005-01-08 22:28:51 +00:00
cube
0615d0207e Addition of tap(4).
NAME
     tap - virtual Ethernet device

SYNOPSIS
     pseudo-device tap

DESCRIPTION
     The tap driver allows the creation and use of virtual Ethernet devices.
     Those interfaces appear just as any real Ethernet NIC to the kernel, but
     can also be accessed by userland through a character device node in order
     to read frames being sent by the system or to inject frames.

     In that respect it is very similar to what tun(4) provides, but the added
     Ethernet layer allows easy integration with machine emulators or virtual
     Ethernet networks through the use of bridge(4) with tunneling.

``Qui tacet consentire videtur.''
2005-01-08 22:27:54 +00:00
yamt
6292485301 constify broadcastaddr. 2005-01-08 03:18:18 +00:00
yamt
d06c4aee84 remove an unused member, enm_ec from ether_multi. 2005-01-08 03:13:09 +00:00
yamt
f276045e22 add ETHERTYPE_SLOWPROTOCOLS. (0x8809) 2005-01-07 12:37:55 +00:00
reinoud
486e5e2819 Fixup of bad patch made by me; the #ifdef ought to be also including ISO
rather than being removed. Also fixed a small comment about the scope of
#if's.

This code is a but ugly IMHO but as long as we dont have to change it ....
2004-12-30 15:38:50 +00:00
reinoud
533a9f0186 Remove conditional around label. Its allways used in the code and thus not
explicitly only for the protocols indicated by the #if

Allthough its unlikely a kernel will be build without NET_INET, it will
fail compilation here when NET_INET is not defined.
2004-12-29 17:57:19 +00:00
itojun
b97cc48910 whitespace 2004-12-22 05:11:24 +00:00
dyoung
a8699ab9a4 As pointed out by Greg Troxel, ifmedia_entrys were allocated with
malloc_type M_IFADDR and freed with malloc_type M_DEVBUF.  This
causes a panic(9) in DIAGNOSTIC kernels.  Add malloc_type M_IFMEDIA
and use it for both malloc'ing and free'ing ifmedia_entrys.
2004-12-08 20:37:43 +00:00
martin
0a72984c77 Factor out softc cleanup after loss of session into pppoe_clear_softc.
Use this when loosing the ethernet interface (when it deataches).
Fixes PR kern/28375.
2004-12-08 07:43:29 +00:00
itojun
bc4b33d8be reqid (for unique policy) is u_int16_t quantity. from markus@openbsd 2004-12-06 08:05:26 +00:00
christos
64573a67d7 Sprinkle #ifdef INET to make a GENERIC kernel compile with INET undefined. 2004-12-06 02:59:23 +00:00
christos
6d413e70c4 pasto: simple_lock -> simple_unlock. 2004-12-05 15:03:13 +00:00
peter
42fc7edb33 Use ANSI function decls, change a few 0 to NULL. 2004-12-05 15:02:30 +00:00
peter
cf47c76c1b Don't forget to call bpfdetach in the clone destroy function.
While here, add a missing static and change some spaces to tabs.
2004-12-05 15:00:47 +00:00
he
8194ddc3a5 Fix what must have been an omission: missing brace and a leftover
use of `i', which is no longer defined.  Fixes build problem for ports
not defining __HAVE_GENERIC_SOFT_INTERRUPTS.
2004-12-05 14:56:50 +00:00
he
fdd8e7a3e5 Fix an obvious typo: scf -> sc. Discovered while compiling for x68k. 2004-12-05 13:32:03 +00:00
christos
d2773f76b5 fix compilation issues. my kernel did not have strip... 2004-12-05 06:53:33 +00:00
christos
f08ea58021 clonify strip and sl. 2004-12-05 05:43:04 +00:00
christos
7a05522334 void in arg prototype. 2004-12-05 05:42:19 +00:00
christos
f11e795a0f Make ppp a cloning device. Based on the work of Quentin Garnier. 2004-12-05 04:15:16 +00:00
peter
e3ceb08f8d Remove redundant conditional; NTUN is always 1 when this file is compiled.
Also remove tun.h include, since it's no longer needed.
2004-12-04 23:22:58 +00:00
peter
4f51481269 Fix a typo in Bill Studenmund's name. 2004-12-04 23:03:33 +00:00
peter
b9c49ebff1 Change ifc_destroy to return an int instead of void, so that it
can pass back errors to ifconfig.
2004-12-04 18:31:43 +00:00
peter
396b87b8c2 Convert lo(4) to a clonable device.
This also removes the loif array and changes all code to use the new
lo0ifp pointer which points to the lo0 ifnet structure.

Approved by christos.
2004-12-04 16:10:25 +00:00
christos
0146482549 Clonify bpf. I am not changing /dev/bpfX -> /dev/bpf until all userland
programs have been fixed.
2004-11-30 04:28:43 +00:00
skrll
4979a4d3be Re-order the inclusion of opt_pfil_hooks so PFIL_HOOKS gets set properly. 2004-11-28 17:16:10 +00:00
martin
e07d3f82e7 Add a pfil(9) hook to get notified when interfaces detach.
When the ethernet interface of a pppoe pseudo-interface detaches, remove
the association and mark the pppoe interface down.
This should fix PR kern/28375.
2004-11-28 11:44:36 +00:00
wiz
95f9af9926 Apply patch from PR 23990 by Greg Troxel (s/AF_DLI/AF_LINK/ in a comment):
<net/if_dl.h> defines struct sockaddr_dl.  On the line defining member
"sdl_family" (which overlaps "sa_family" in struct sockaddr), the
comment says AF_DLI.

But,
1) AF_DLI is said to be a DEC Direct data link interface
   (sys/socket.h)
2) The kernel actually sends sockaddr_dl structs with AF_LINK.
2004-11-20 00:53:13 +00:00
dsl
de3f63a902 Add prototypes for functions that convert media to/from strings.
In libutil/if_media.c (moved from ifconfig.c so that they can be shared
in crunched binaries)
2004-11-11 20:34:30 +00:00
christos
fbbeedbe63 PR/27286: Tom Ivar Helbekkmo: Allow RTM_GET to work with RTA_IFA|RTA_IFP set.
Quiting Tom: The problem is the special case of an RTM_GET message
that wants interface information included in the response, and
therefore include the RTA_IFA or RTA_IFP (or both) flags in the
bitmask that says what addresses are supplied in the message.  For
the RTM_GET message, it doesn't make sense to supply addresses
other than the one you're asking about, so those two other bits
are, in that specific case, overloaded with this meaning.

There is code in sys/net/rtsock.c to handle the case, but at some
time, extra sanity checking of the received message was added, that
failed to take this possibility into account.

The patch, is needed for the Asterisk software PBX to work properly
when it has multiple interfaces active: it needs to ask the kernel
for the IP address of the interface that will be used to communicate
with a given host.
2004-10-23 19:13:22 +00:00
dsl
43dde40d82 Put spaces either side of '|' for clarity ('|' looks too much like 'I' or 'l') 2004-10-16 11:11:04 +00:00
tron
8982fe0346 Backout last two revision:
1.) There is objection against this change by at least one developer.
2.) These changes cause repeatable system lockups and crashes for
    at least four people.
2004-10-07 20:06:58 +00:00
bad
2a256a96ac Interfaces that do checksum offloading indicate the checksum status of
received packets in csum_flags in the packet header.  Packets that are
forwarded over the bridge need to have csum_flags cleared before being
put on the output queue.  Do so in bridge_enqueue().

Discussed with Jason Thorpe.

Fixes PR kern/27007 and the first part of PR kern/21831.
2004-10-06 10:01:00 +00:00
itojun
6c66b599bb use ifunit() 2004-10-06 03:49:03 +00:00
itojun
dd505f6f10 call dom_ifattach[] at consistent state. before this commit, dom_ifattach[]
was called after interface attach is completely done for non-cloning interface,
and from within if_attach() for cloning interface (which was wrong).
2004-10-06 02:44:32 +00:00
christos
557877d024 Only enable BRIDGE_IPF code if PFIL_HOOKS is enabled. 2004-10-05 03:36:45 +00:00
christos
a9703830cd Fix problem in previous commit; we need to create a new sockaddr. 2004-09-30 00:14:05 +00:00
christos
efff5f0097 PR/22849: Sean Boudreau: rtrequest() w/ RTM_DELETE not honouring netmask
as it does w/ RTM_ADD.
2004-09-29 21:19:33 +00:00
dyoung
e2727a9d0b Add several new DLTs. From tcpdump.org. 2004-09-28 03:34:21 +00:00
yamt
0a9623de9c call PFIL_IFADDR hooks where appropriate. 2004-09-18 16:04:41 +00:00
tron
139c8b8dfc Pass correct "mbuf" pointer to BPF framework. 2004-08-20 07:46:21 +00:00
enami
9e4955fd5e Fix compilation error introduced by prevoius commit. 2004-08-20 00:37:07 +00:00
christos
0f7d471853 Factor out the hand-crafting of mbufs from the interface files. Reviewed by
gimpy. XXX: I could have used bpf_mtap2 on some of the new functions, but I
chose not to, because I just wanted to do what amounts to a code move.
2004-08-19 20:58:23 +00:00
christos
396c380971 - ansify
- remove unnecessary casts
- change caddr_t to void *
- no functional change.
2004-08-19 18:33:24 +00:00
itojun
682ddb0274 initialize max_keylen for ip_encap.c earlier 2004-08-17 07:05:34 +00:00