Commit Graph

896 Commits

Author SHA1 Message Date
matt b26f63f404 Fix pr#14481 2001-11-06 06:26:34 +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
martin 4e61daf35e In preparation for further changes: remove big parts of the ifdef mess
for OSes we no longer share this file with.
2001-10-29 19:15:48 +00:00
simonb 5f717f7c33 Don't need to include <uvm/uvm_extern.h> just to include <sys/sysctl.h>
anymore.
2001-10-29 07:02:30 +00:00
martin d1f0e4f6e4 Don't call if_alloc_sadl when creating the pppoe interface, it's called
from sppp_attach.
When destroying the interface, call sppp_detach for proper cleanup.
This avoids a crash from the slow timeout handler for no longer existing
interfaces (spotted by Rémi Zara).
2001-10-28 09:48:20 +00:00
matt 1ebf8505b2 Add ETHERTYPEs for MPLS (Unicast & Multicast). 2001-10-18 21:29:19 +00:00
itojun dfb1429789 unifdef OLDIP6OUTPUT 2001-10-17 08:23:05 +00:00
itojun 3594efccf6 on RTM_DELETE, reduce refcnt on rt->rt_parent, to avoid leaks.
from IIJ seil team
2001-10-16 02:42:36 +00:00
simonb 0fbef69268 Put the storage class first in an array declaration. 2001-10-14 00:39:09 +00:00
thorpej 5b01f60e5b The bridge driver does all forwarding at interrupt level, and
does not use software interrupts; remove these bridge netisr
hooks left over from a previous incarnation of the bridge code.

Noted by Andrew Brown <atatat@atatdot.net>.
2001-10-06 15:46:33 +00:00
bjh21 25d06cf184 Install net/ieee1394.h the same way we install all the other
link-layer-specific headers.
2001-10-05 12:37:39 +00:00
itojun 6374da40e1 don't softintr_disestablish twice.
previous code panic'ed with the following command sequence:
# ifconfig gif0 create tunnel A B
# ifconfig gif0 deletetunnel
# ifconfig gif0 destroy
2001-09-26 07:54:19 +00:00
onoe b7c46d6199 use ALIGNED_POINTER() instead of ALIGN().
The type of ALIGN() is vary on architecture and casting pointer to u_int
is incorrect for MI code.
Since the code is to make sure aligned access to IP header and requires
bcopy if the test fails.  So the performance implication is not necessary
and we can use ALIGNED_POINTER() here.
pointed out by nathanw.
2001-09-25 01:07:53 +00:00
reinoud 78b6ed208e Change the caddr_t to uintptr_t and remove the cast ... it gave problems
compiling on an LP64 ... discussed with Gimpy, atatat and bleeh
2001-09-24 21:47:57 +00:00
onoe b698d56d3c Move IBSS creation stuff from awi to ieee80211. 2001-09-20 13:54:43 +00:00
onoe aebd449baa Fix for FH infrastructure mode.
XXX: FH chanset should be calculated by FH hop pattern, but BayStack 650 AP
     always specify chanset to fixed value 1.  The previous code try to this
     hack into awi driver, but it is insufficient because the chanset value
     in awi driver may change while scan and it may be different from the
     value in receiving beacon/probe-response.  So we save encoded FH chanset
     into channel in 802.11 common bss information for now.
2001-09-19 04:09:54 +00:00
onoe 6a617566bc Move IEEE 802.11 MAC management functions from awi driver to
if_ieee80211subr.c, which can be shared between any IEEE 802.11
drivers.
However, most of current working IEEE 802.11b wireless LAN cards
have rich firmware and we cannot have a control to management frames
for such cards.

IBSS creation is now supported for the awi driver.
2001-09-18 09:09:57 +00:00
bjh21 5ddc1e1310 Add retry mechanisms for Econet, so that if a four-way handshake doesn't
complete for some reason, we defer it for a bit and then try again.  This
gets ping down to 0% packet loss.

Of course, ping _should_ have been at 0% packet loss anyway, and that's the
next thing to deal with.
2001-09-17 22:41:59 +00:00
thorpej d679590033 Split the pre-computed ifnet checksum flags into Tx and Rx directions.
Add capabilities bits that indicate an interface can only perform
in-bound TCPv4 or UDPv4 checksums.  There is at least one Gig-E chip
for which this is true (Level One LXT-1001), and this is also the
case for the Intel i82559 10/100 Ethernet chips.
2001-09-17 17:26:59 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
bjh21 33d596bef8 Add support for incoming IP broadcast packets. The protocol for this is
worked out by observing RISC iX's behaviour, so it may be technically
wrong.  The only implementations of IP-over-Econet for which I've got
sources don't support broadcasts.

Tested using broadcast ping from RISC iX to NetBSD, and using rwhod.
2001-09-16 15:08:39 +00:00
bjh21 0f810d8948 eco_input():
Use m_copydata() to preserve the Econet header, so we don't depend on
  notionally-unused areas of an mbuf remaining untouched.
  Check that ARP-over-Econet requests are exactly eight bytes long.
  Use m_pullup() before trusting mtod().

Between them, these make reception of unicast ARP responses work properly.
2001-09-16 12:16:50 +00:00
bjh21 56536d5190 econet_inputframe: Check the header of each frame, and its length, to ensure
it looks like what we expect.  This should help detect frames garbled by the
interface driver.
2001-09-15 23:03:11 +00:00
bjh21 91dae8ca83 Add minimal IP-over-Econet support and a load of bug-fixes. I can ping,
unreliably, between my RISC iX and NetBSD boxes with this.  There's a lot
of work to go before it's solid, though.
2001-09-15 17:27:24 +00:00
bjh21 2aa509fcfb Remember to call eco_input() for incoming broadcasts. 2001-09-13 19:19:21 +00:00
bjh21 3f063023fa Add routing boilerplate to eco_output, verbatim from ether_output.
Update copyright notice to include UCB in consequence.
2001-09-13 18:01:34 +00:00
onoe a939e73e00 Add definition of mask/shift for seqence/fragment in sequence control field. 2001-09-11 12:25:18 +00:00
bjh21 52b3d56b11 Add MI Econet support. This is lacking any interfaces to higher-layer
protocols, and lacking any timeouts, but it basically works, doing four-way
handshakes in both directions and incoming Machine Peek operations.

Oh, and Econet is Acorn's ancient, proprietary 500kbit/s networking
technology.
2001-09-10 23:11:05 +00:00
martin 308d03266a Make this interface cloning. 2001-09-04 20:41:32 +00:00
bjh21 d400c78e55 Update location of IANA smi-numbers file, since the old one doesn't work any
more.

While I'm here, add IANA assignments 0xbe--0xc5.
2001-08-23 14:52:21 +00:00
itojun 2697773fb1 IFQ_PURGE cannot be used against ifqueue. use IF_PURGE. 2001-08-23 00:56:03 +00:00
itojun e556ec903d fix ALTQ support. less diff with kame. kjc@csl.sony.co.jp. 2001-08-20 02:18:58 +00:00
augustss 317073f06f Install if_bridgevar.h. 2001-08-17 23:16:14 +00:00
thorpej 9b50223a16 Only report expire time for DYNAMIC forwarding table entries. 2001-08-17 22:10:20 +00:00
thorpej 460da35f85 Add support for building Ethernet bridges, based on Jason Wright's
bridge driver from OpenBSD, although the bridge code has been *heavily*
modified by me (the 802.1D code remains mostly unchanged from the
original).
2001-08-17 21:37:27 +00:00
itojun 74ad87bc53 gif interface now uses generic software interrupt
(on archs that support it).  also, make gif ALTQ-capable on outgoing.
sync with kame, comments from thorpej.
2001-08-16 17:45:25 +00:00
jdolecek 74954dadf9 use unsigned variable types as appropriate 2001-08-05 18:07:51 +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
itojun ce781443e0 pass replay sequence number on sadb_x_sa2 (it's outside of PF_KEY standard
anyways).
2001-08-02 12:10:14 +00:00
itojun 32c36b5e14 fix logic to free up ifqueue on if_detach(). prev pointer was incorrectly set. 2001-08-02 01:42:38 +00:00
itojun 39bc63e6b3 raise IFF_UP on SIOCSIFADDR. commented by tv@netbsd, sync with kame 2001-07-30 11:12:58 +00:00
itojun cad488d032 sync gif interface code with latest kame.
IFF_RUNNING is clearified.  attach/detach logic is more clearner.
the old code mistakenly set IFF_UP by itself, now the behavior is gone.
2001-07-29 05:08:32 +00:00
itojun c4a687384b make sure to cleanup software interrupt queues (like ipintrq)
on interface detach, otherwise we will have a dangling pointer
from m->m_pkthdr.rcvif.
2001-07-29 03:28:30 +00:00
itojun 888b31fb38 indent fix 2001-07-28 01:13:56 +00:00
itojun dc1d7df811 do not initialize rmx_mtu on RTM_ADD.
on gateway change, copy rmx_mtu from gateway only under the following condition:
- current MTU is not locked
- current MTU was discovered via PMTUD

XXX if gateway has MTU == 0, current MTU is set to 0 and we are going to
rediscover PMTU again.  is it good or bad?
2001-07-26 05:47:37 +00:00
itojun efe956a93f do not copy rmx_mtu on RTM_ADD/RESOLVE. the fragment was mistakenly
introduced on 1.25, from other *bsd via kame.  from thorpej
2001-07-25 07:13:44 +00:00
thorpej a20e50f72a Duh, braino in last -- only kick the interface if we actually set
the MTU.
2001-07-25 03:18:46 +00:00
thorpej c7edeb2b4f If we change the MTU, kick the interface; it may have to reprogram
registers for the new MTU.
2001-07-25 03:05:33 +00:00