Commit Graph

1412 Commits

Author SHA1 Message Date
christos 333e176687 - sprinkle const
- remove unneeded casts
- use more mem*() instead of b*() funcs.
2005-05-29 21:22:52 +00:00
christos 48aa099255 PR/30285: Mile Nordin: incorrect permission check joining/leaving multicast
groups.
2005-05-20 16:23:05 +00:00
christos 362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
matt 56bbae8802 rate limit the printfs for oversized ethernet packets. 2005-05-02 21:20:27 +00:00
yamt 330cc0a11e split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx. 2005-05-02 15:34:31 +00:00
martin 3cde73812d Fix typo, from C. Plasschaert in PR kern/30069. 2005-04-27 07:48:02 +00:00
martin 691a804898 As noted by Christophe Plasschaert on tech-kern, g/c never used
idletimeout configuration ioctls.
2005-04-27 07:45:52 +00:00
christos 72ad9c4bc4 no point in assigning to ifq twice. 2005-03-31 21:19:35 +00:00
christos 200dc55908 fix compiling with -DALTQ 2005-03-31 21:14:52 +00:00
explorer fcc0a1f852 Fix error with ifq not being set before use. Explicitly set it to NULL just before it may be set to the fastq, since if this becomes a loop (and in one case already is) this will always work. ifq_enqueue2() is designed to handle this case. 2005-03-31 17:07:39 +00:00
christos d7ec95d370 factor out the interface queueing code into two functions. One used by
the non point-to-point interfaces that has one queue, and one used by
the point to point interfaces that has two queues. No functional changes.
XXX: The ALTQ stuff makes the code ugly.
XXX: More cleanup to come
2005-03-31 15:48:13 +00:00
is a0c9bc9616 Add IPv6 over GRE (contributed by Gert Doering in PR 29150). 2005-03-30 16:34:54 +00:00
cube bc5ea6f651 Set bit 0x2 of the first byte of the generated MAC address, to indicate it
is a locally administered address.  Pointed out by Ignatios Souvatzis.
2005-03-24 22:20:35 +00:00
agc dd93d335d3 Fix the spelling of Bill Studenmund's name - noticed from the licences
on the Sony PSP as found in:

	http://www.scei.co.jp/psp-license/pspnet.txt
2005-03-20 07:47:29 +00:00
thorpej 6f219f734d Define IFFBITS and IFCAPBITS here in <net/if.h>. Taken from ifconfig. 2005-03-20 02:51:33 +00:00
yamt 5240b887db add agr(4), a pseudo network device driver for link aggregation. 2005-03-18 11:11:50 +00:00
kleink 513c158344 A couple of <sys/select.h>-related changes:
* Factor out struct selinfo and its header dependencies into its own header,
  <sys/selinfo.h>, to avoid namespace pollution.
* Include <sys/selinfo.h> in user-visible headers where necessary.
2005-03-17 20:39:17 +00:00
yamt 0c03ee5404 vlan_input: add a missing EVL_VLANOFTAG in the case of hw offloading. 2005-03-17 10:33:28 +00:00
tron e561507a1f Add support for changing the MTU to stf(4). 2005-03-11 13:28:25 +00:00
matt 4acc1b7c25 Add beginning of TCP Segment Offload support. 2005-03-06 00:08:30 +00:00
jonathan fba9c4c1b9 Increase default value for IFQ_MAXLEN from 50 to 256.
The value of 50 dates back to 4.3BSD and 10Mbit interfaces.
Gigabit interfaces are 100x faster, and by observation, when heavy
interrupt mitigation is enabled, gigabit interfaces can enqueue 40 packets
or more in a single hardware interrupt.  So IFQ_MAXLEN of 256 is adequate
for at least four gigabit interfaces.

Increasing IFQ_MAXLEN discussed and approved, in priniciple, circa Apr 2004.
The value is sysctl'able, so the default is no longer so critical,
but (imho) best to tune for high-performane systems by default.
2005-02-28 18:44:45 +00:00
perry f07677dd81 nuke trailing whitespace 2005-02-26 22:45:09 +00:00
christos 24db4c5a14 Re-arrange code slightly to avoid code duplication and allow to bail
out faster without doing de-capsulation work. From FreeBSD.
2005-02-21 21:37:22 +00:00
jdolecek 4c60443769 expose the new VLAN macros only within kernel 2005-02-20 15:41:48 +00:00
jdolecek 8b0dfe8d52 add several VLAN tagging related macros, to reduce code duplication
in various ethernet adapter drivers and improve code consistency; mostly
FreeBSD-compatible, with exception of VLAN_OUTPUT_TAG(), which takes
(struct ethercom *) rather than (struct ifnet *) as first parameter
since the information cannot be extracted via (struct ifnet)

also add VLAN_ATTACHED(ec), which tests if any VLAN is attached to the
ethernet device
2005-02-20 15:29:03 +00:00
cube 55dc3e11f4 Add a couple of protocols (from ppp-2.4.3). 2005-02-20 10:23:13 +00:00
cube a8a27dce29 Add MPPE definitions (from ppp-2.4.3). 2005-02-20 10:22:26 +00:00
christos be3704c73f pass the flag to fdclone. 2005-02-12 23:14:03 +00:00
manu 5c217c1a67 Add support for IPsec Network Address Translator traversal (NAT-T), as
described by RFC 3947 and 3948.
2005-02-12 12:31:07 +00:00
he 2a8a7aabd7 Fix "unused local variable" warning/error if compiling without
bridge support by making variable declaration conditional.  Found
while compiling for shark.
2005-02-01 12:13:51 +00:00
kim c9f56c04dc Add RFC 3378 EtherIP support, ported from OpenBSD to NetBSD by
Hans Rosenfeld (rosenfeld at grumpf.hope-2000.org)

This change makes it possible to add gif interfaces to bridges, which
will then send and receive IP protocol 97 packets. Packets are Ethernet
frames with an EtherIP header prepended.
2005-01-31 23:49:36 +00:00
matt 53fdea69cb Switch to using ifa for ifaddr's instead of ia (which are traditionally
used for in_ifaddr's) which could lead to confusion.
2005-01-25 17:22:08 +00:00
tron ed9b5b2073 Fix cut and paste error in last commit. 2005-01-25 11:20:37 +00:00
ragge 9bb19bb2e0 Do not cast simple_lock() to (void). It may be a do { } while() macro,
and then compilation fails.  Found by Håvard Eidnes.
2005-01-25 09:57:15 +00:00
matt 027c11539b Add IFNET_FOREACH and IFADDR_FOREACH macros and start using them. 2005-01-24 21:25:09 +00:00
enami f1b6d58e81 To fix bad pointer dereference on start up when gif is used,
- Allow rn_init() to be called multiple times, but do nothing except the
  first call.
- Include opt_inet.h so that #ifdef INET works.
- Call rn_init() from encap_init() explicitly rather than depending on the
  order of initialization.
2005-01-24 04:46:49 +00:00
matt d341be30f4 Change initialzie of domains to use link sets. Switch to using STAILQ.
Add a convenience macro DOMAIN_FOREACH to interate through the domain.
2005-01-23 18:41:56 +00:00
cube d76d637295 s/PF_LINK/AF_LINK/ because that way it makes sense. 2005-01-22 07:33:56 +00:00
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