Commit Graph

808 Commits

Author SHA1 Message Date
itojun
63181d71c1 correct ecn consideration on tunnel encap/decap. sync with kame. 2001-05-10 01:37:42 +00:00
itojun
2c2ff2e32d one more indentation fix 2001-05-10 01:30:55 +00:00
itojun
b87cb9344b whitespace/indentation cleanup 2001-05-10 01:23:51 +00:00
itojun
dc452a48f6 no longer need to carry local version of inet_ntoa, we have it in libkern. 2001-05-10 01:04:08 +00:00
itojun
a262f7cc76 remove #ifdef for freebsd 2001-05-08 11:06:21 +00:00
itojun
1bec764d78 correct faith prefix determination. use sys/netinet/if_faith.c:faithprefix()
to determine.  sync with kame.
(without this change, non-faith socket may mistakenly accept for-faith traffic)
2001-05-08 10:15:13 +00:00
lukem
a4845ebfa1 delint to c89; use #define instead of static const int for an array size 2001-05-07 10:15:46 +00:00
martin
b5b75a7d19 Add an in-kernel PPPoE (ppp over ethernet, RFC 2516) implementation,
based on the existing net/if_spppsubr.c stuff.

While there are completely userland (bpf based) implementations available,
those have a vastly larger per packet overhead thus causing major CPU
overhead and higher latency. On an i386 base router, running a 486DX at 50MHz
my line (768kBit/s downstream) was limited to something (varying) between 10
and 20 kByte/s effective download rate. With this implementation I get full
bandwidth (~85kByte/s).

This is client side only. Arguably the right way to add full PPPoE support
(including server side) would be a variation of the ppp line discipline and
appropriate modifications to pppd. I promise every help I can give to anyone
doing that - but I needed this realy fast. Besids, on low memory NAT boxes
with typically a single PPPoE connection, this implementation is more
lightweight than a pppd based one, which nicely fits my needs.
2001-04-29 09:50:36 +00:00
itojun
fce23b0ae4 correct outbound outer IPv4 destination address selection.
IFF_LINK0 disables inbound path, removes security worries.
more examples in manpage.
2001-04-29 03:56:06 +00:00
marcus
9bcf84f72a STDC cleanup: label not allowed just before end of block. 2001-04-27 00:14:02 +00:00
augustss
81ece2d4bf Only dispatch slnetisr & co if we don't have generic soft interrupts. 2001-04-14 13:54:38 +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
d7333fb163 splimp -> splnet 2001-04-12 17:53:48 +00:00
itojun
e366844be7 need to declare NULL for inline function. 2001-04-11 14:44:55 +00:00
thorpej
8dc1d7cbac Add bridge netisr glue (only used if no __HAVE_GENERIC_SOFT_INTERRUPTS). 2001-04-11 03:55:16 +00:00
thorpej
f62e94272e Add hooks for bridging. 2001-04-11 03:47:24 +00:00
enami
fe247cae7a fix possible typo in comment. 2001-04-10 22:58:55 +00:00
thorpej
4702254396 Process pfil hooks for Ethernet input and output. 2001-04-10 21:47:36 +00:00
thorpej
4cbf0044c4 Add a PFIL_HOOKS filtering point to every network interface. 2001-04-10 21:45:39 +00:00
thorpej
f41aa15500 Add 802.1D (Spanning Tree) LSAP code. 2001-04-10 19:30:41 +00:00
martin
8f8dc65f89 Add another option for encapsulation: PP_NOFRAMING.
In this mode, the PPP packets start with the protocol identifier and don't
have any explicit framing (which may be added by the lower level driver).

Make input/output statistics a little bit more correct by adding a hardware
driver adjustable framing length for each packet (instead of the constant
value "3" used before).

While there, bump authentication name length from 32 to 48 (I have a
connection where I need more than 32). XXX - this should not be artificialy
limited at all.
2001-04-09 19:33:01 +00:00
thorpej
5cbdcc502b Add ALTQ support (both for the VLAN interface itself, as well as for
being a VLAN on a ALTQ'ified interface).
2001-04-07 18:41:42 +00:00
thorpej
c28f672aee Add altq_etherclassify(), a slight hack modified from the kame/freebsd4
tree, which allows a packet with Ethernet headers already present to
run through the ALTQ packet classifier.  This is needed in order to
suport ALTQ on VLAN and bridge devices.
2001-04-07 18:01:48 +00:00
thorpej
98c9d8b5c6 ether_*() functions belong in if_ether.h, not if.h. 2001-04-07 04:24:31 +00:00
enami
2ceebb6c0e Remove unnecessary test of tp->t_linesw against NULL; they are results
of confusion while correcting compilation error after t_line is
replaced with t_linesw.
2001-03-31 00:35:21 +00:00
martin
f7f12c9b64 Make the 'cmd' argument to ioctl an unsigned long, as it is everywhere
else.
2001-03-25 19:39:20 +00:00
enami
d189c89a19 - lineup comment.
- fix typo in comment.
2001-03-08 03:22:28 +00:00
thorpej
d0abf5db37 Add some missing ALTQ initialization, pointed out by
Kenjiro Cho <kjc@csl.sony.co.jp>.
2001-03-03 03:29:20 +00:00
wiz
1651c2430f Fix pasto reported in kern/12241 by Michael van Elst. 2001-02-28 14:08:35 +00:00
joda
7c1106ddf8 when changing to an unsupported media type, return EINVAL instead of
ENXIO
2001-02-26 09:42:00 +00:00
christos
d8dd082e78 change CCP maxlen to 64 to accomodate mschap-2. 2001-02-23 21:16:19 +00:00
itojun
e79a9123a3 use u_quad_t for rtstat.
not sure if it really matters, but short (32K) looks way too small given
recent fat pipes connecting *BSD boxes, and our great uptime :-).
2001-02-21 05:45:11 +00:00
itojun
45e2b8d54b remove necessary global variable for eon processing. from chopps,
sync with kame
2001-02-21 00:17:09 +00:00
itojun
1e48b7fbb5 add SIOC[SG]LIFPHYADDR ioctl. greatly simplify tunnel address settings.
sync with kame.  old ioctls are supplied but not recommended for new code.
2001-02-20 15:35:19 +00:00
itojun
9968ae668d comment on dispatches (clearify inner/outer) 2001-02-20 08:48:27 +00:00
itojun
56ad92fd11 use u_int32_t, not u_int, for DLT_NULL encapsulation. 2001-02-20 08:33:02 +00:00
itojun
ffc12ee678 explicitly use u_int32_t for DLT_NULL encapsulation.
correct gif address family.  from chopps, sync with kame.
2001-02-20 07:58:16 +00:00
itojun
cda5e3eb96 cosmetic; do not use register variable declaration. sync with kame 2001-02-20 07:53:31 +00:00
itojun
9df62246e7 update comment to meet 6to4 RFC. sync with kame 2001-02-17 04:29:59 +00:00
itojun
5e32defa9b sync comment with latest kame 2001-02-08 12:36:06 +00:00
chs
09cb38f22b expose the definitions of MIN() and MAX() in sys/param.h to the kernel
and use those in favor of a dozen copies scattered around the source tree.
2001-02-05 10:42:40 +00:00
thorpej
53c23f549a Start out with a link name that says "802.1Q VLAN", and inherit the
parent interface's as usual once we attach to the parent.  When we
detach from the parent, reset our link name to the "802.1Q VLAN" name.
2001-01-29 01:51:05 +00:00
thorpej
896cba1b56 if_alloc_sadl(): if the interface already has a link name, free
it before assigning a new one.  This is useful for interfaces
that may change their link names in the course of their existence.
2001-01-29 01:49:43 +00:00
itojun
32024e8a3d call if_alloc_sadl(). without it the following operation causes kernel panic:
# ifconfig vlan0 create
# ifconfig vlan0
2001-01-28 10:41:44 +00:00
itojun
f38fdf081e change non-intuitive function name. s/rtflushit/rtflushclone1/ 2001-01-27 11:07:59 +00:00
itojun
02adaaf197 cleanup cloned route when parent route (RTF_CLONING) goes away.
adds rt_parent to link parent from child (like NRL did, ours do refcnt
rt_refcnt properly).

bsdi rt_walkbranch would speedup the processing, but since the code will not
be visited too frequently, the current code (with rt_walktree) should be okay.
2001-01-27 10:39:33 +00:00
itojun
fee00b1a78 mark cloned routes with RTF_CLONED. present it with netstat -r by "c".
let static routes overwrite cloned routes, as cloned routes can come back again
if necessary.  behavior same as freebsd/bsdi, code partially from bsdi42.
(NRL rt->rt_parent was not added)
should fix PR 11916 and maybe some other PRs with ARP behavior.

recompilation of usr.sbin/route6d is suggested.
2001-01-27 04:49:31 +00:00
itojun
a836499e32 make it possible to turn off ingress filter on gif/stf tunnel egress,
by using IFF_LINK2.  (part of) PR 11163 from Ken Raeburn.
2001-01-22 07:51:01 +00:00
jdolecek
34c8ae80da constify 2001-01-18 20:28:15 +00:00
thorpej
8debdb1fee Correct last commit. 2001-01-17 19:08:59 +00:00