Commit Graph

721 Commits

Author SHA1 Message Date
thorpej 8a56f72a7c Oops, make this build without ALTQ again. 2000-12-18 21:13:14 +00:00
thorpej 831d5b8d43 Add SIOCGIFDLT, which will fetch the data link type (DLT_* constant)
for a given network interface.
2000-12-18 21:05:03 +00:00
thorpej 0b541534c5 Add an "ifr_dlt" alias for the union in struct ifreq. 2000-12-18 21:03:34 +00:00
thorpej 192e2774b3 Always pull in DLT_* constants. 2000-12-18 20:58:41 +00:00
thorpej 023adb3093 Use IFQ_PURGE(). 2000-12-18 20:50:36 +00:00
thorpej 5363e5eed4 ALTQ'ify. 2000-12-18 20:47:10 +00:00
thorpej 541812a992 ALTQ'ify. 2000-12-18 20:41:44 +00:00
thorpej ed7695a765 Fill in if_dlt. 2000-12-18 19:44:33 +00:00
thorpej 23df92e38d Small cosmetic change. 2000-12-18 19:36:41 +00:00
thorpej 6484f81abc We now support hw vlan tag support in network interfaces, so remote it
from the TODO list.
2000-12-18 19:32:20 +00:00
thorpej 00d64bedbc Add a if_dlt member, used so that userland can query the DLT_* of an
interface without having to first attach it to a bpfdesc.
2000-12-18 19:25:57 +00:00
thorpej db9fd3e536 Add ALTQ support. This is used for testing/debugging ALTQ only. It
is triggered only on loopback interfaces, and not simplex interfaces
(which also use looutput()).
2000-12-18 19:18:33 +00:00
thorpej 66539b9373 Add ALTQ support. 2000-12-18 18:57:21 +00:00
thorpej 2663dfcf85 Commit to the ALTQ glue. 2000-12-18 18:54:47 +00:00
thorpej 721139924d Add a version of the 802.11 frame header that includes the 4th address. 2000-12-18 18:00:23 +00:00
itojun 60fa2b29af fix typo in function name (rn_satsifies_leaf -> satisfies). indent.
split rn_inithead() into two function - i'm putting some hook around here.
2000-12-17 10:23:19 +00:00
thorpej e961c654a8 Change an if_qflush() to an IFQ_PURGE() to deal with ALTQ correctly. 2000-12-14 17:47:26 +00:00
thorpej fb2688c12f Fix braino in IF_PURGE(). 2000-12-14 00:19:42 +00:00
thorpej dce7e1a85b Oops, forgot IFQ_POLL() in the ALTQ case. 2000-12-14 00:07:35 +00:00
thorpej 3dc1664f57 Add ALTQ glue. 2000-12-13 22:07:50 +00:00
thorpej cdcd4fad5e In if_qflush(), use IFQ_PURGE() rathen than an open-coded version. 2000-12-13 22:06:05 +00:00
thorpej df303090c2 First step at integrating ALTQ -- IFQ_*() glue macros that select
old-style queueing or ALTQ based on a compile time option.
2000-12-13 22:05:12 +00:00
thorpej 173c0bb9d7 Include BPF headers as necessary (feh, too many changes to try and
merge...)
2000-12-12 18:22:39 +00:00
thorpej bb1175954d Use <net/dlt.h> 2000-12-12 18:03:25 +00:00
thorpej c5293456da Adapt to bpfattach() changes, and further centralize the bpfattach()
and bpfdetach() calls into link-type subroutines where possible.
2000-12-12 18:00:22 +00:00
thorpej bfaf37d464 Use <net/dlt.h> to get the DLT_* constants. Also change bpfattach()
and bpf_change_type() to take just a pointer to the ifnet, rather than
a pointer to the ifnet and a pointer to a member of the ifnet (the bpf
pointer).

We'll let this ride on the Dec 12 1.5N version bump.
2000-12-12 17:55:21 +00:00
thorpej 00052cdc53 Put the BPF DLT_* constants into their own header file so that things
that reference them don't have to slurp in all of the BPF headers.

Define a new generic RAWAF type that is like DLT_RAW, but isn't specific
to IP (the macro takes an AF_* constant as an argument to generate the
actual type).
2000-12-12 17:53:00 +00:00
thorpej 2a6413983b Only allow superuser to change 802.11 power params. 2000-12-12 17:48:29 +00:00
thorpej 589bc762b7 Add a way to manipulate the power management parameters specified in
802.11.
2000-12-12 04:03:38 +00:00
itojun 93292b8aaa do not touch region after free 2000-12-11 07:52:48 +00:00
itojun 5eae50d991 update icmp6 too big validation. the change is necessary since pmtud is
mandatory for IPv6 (so we can't just validate by using connected pcb - we need
to allow traffic from unconnected pcb to do pmtud).
- if the traffic is validated by xx_ctlinput, allow up to "hiwat" pmtud
  route entries.
- if the traffic was not validated by xx_ctlinput, allow up to "lowat" pmtud
  route entries (there's upper limit, so bad guys cannot blow up our routing
  table).
sync with kame

XXX need to think again about default hiwat/lowat value.
XXX victim selection to help starvation case
2000-12-09 01:29:45 +00:00
onoe 2819c7b688 Use DMA from mbuf instead of copy in transmit.
Still use memcpy in receiving because we must use buffer fill mode
	and many packets may share single receive buffer.

XXX: Workaround(?) for CXD3222: it fails to DMA for selfid packet according
to code placement. I'm not sure about the reason (cache? timing? bug?).

Fixed the bug: transmitter sometimes stop and OACTIVE bit of if_fw
never be cleared.
Fixed the bug: freeing free buffer.

Enable ieee1394_drain and ieee1394_watchdog for loss of fragment.
2000-11-20 12:12:18 +00:00
martin 4a0283d9f0 Allow changing of settings via ioctl only for the superuser.
Fixes PR security/11524.
2000-11-19 18:48:44 +00:00
bouyer 6e08061c2a Supports hardware 802.1q VLAN tagging, per discussion on tech-net. The tag is
stored in a m_aux mbuf defined by AF_LINK, ETHERTYPE_VLAN.
Thanks to Jason & Itojun for the feedback.
2000-11-17 19:21:53 +00:00
bouyer 0d0fd7718e Per discussion with Jason, change flags filter to
(IFF_UP | IFF_BROADCAST | IFF_RUNNING | IFF_ALLMULTI | IFF_SIMPLEX)
Also, put the ifp->if_opackets++ at the rigth place so that the counter is
incremented even when the parent is OACTIVE.
Fix a bug in vlan_input where the ethernet src and dst addrs would not be
correct because we only memmove() only ifv->ifv_encaplen instead of
sizeof(struct ether_header).
2000-11-15 18:15:11 +00:00
thorpej b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
onoe f1c77e81db Add support for link fragmentation and reassemble for IEEE-1394.
XXX: drain is still not yet implemented, thus memory leak will occur
    in case of any of fragment lost.
2000-11-14 11:14:55 +00:00
bouyer 3659b305e5 In vlan_config(), filter flags inherited from parent interface to
(IFF_UP | IFF_BROADCAST | IFF_RUNNING | IFF_ALLMULTI | IFF_SIMPLEX)
Without this, if the parent is OACTIVE of PROMISC at config time, we
loose.
2000-11-12 19:39:42 +00:00
thorpej 65fd25ea82 Restructure the PFIL_HOOKS mechanism a bit:
- All packets are passed to PFIL_HOOKS as they come off the wire, i.e.
  fields in protocol headers in network order, etc.
- Allow for multiple hooks to be registered, using a "key" and a "dlt".
  The "dlt" is a BPF data link type, indicating what type of header is
  present.
- INET and INET6 register with key == AF_INET or AF_INET6, and
  dlt == DLT_RAW.
- PFIL_HOOKS now take an argument for the filter hook, and mbuf **,
  an ifnet *, and a direction (PFIL_IN or PFIL_OUT), thus making them
  less IP (really, IP Filter) centric.

Maintain compatibility with IP Filter by adding wrapper functions for
IP Filter.
2000-11-11 00:52:36 +00:00
thorpej ecf191df62 Pull in <sys/time.h>, since we use timevals here. 2000-11-11 00:11:04 +00:00
enami 7d3b20fb20 Don't require the size of sockaddr to be rounded up if it was the last one
and was netmask.
2000-11-10 03:37:42 +00:00
enami d93a3cbc40 Don't return uninitialized value. 2000-11-10 02:31:53 +00:00
enami f52dd5bd61 Don't unlink and deallocate ether_multi here. ether_ifdetach will do it. 2000-11-10 02:29:44 +00:00
enami 17707b76db Define struct member correctly. This fixes a panic due to overwrite of stack. 2000-11-10 02:27:19 +00:00
thorpej c1e8f10429 Implement promiscuous mode. 2000-11-09 05:57:38 +00:00
itojun ad037eb274 avoid namespace pollution by radix.h. the #ifndef _KERNEL portion was to
use radix.c in userland compilation, however, noone is using it.
(routed has its own radix.c)
2000-11-06 11:07:37 +00:00
onoe e83458422f First Prototype implementation of network interface part for IEEE1394 (if_fw).
Current status:
	Only OHCI chip is supported (fwohci).
	ping (IPv4) works with Sony's implementation (SmartConnect) on Win98.
	sometimes works but not stable.
Not implemented yet:
	IRM (Isochronous Resource Manager) functionality.
	Link layer fragmentation.
	Topology map.
More to do:
	clean ups
	MCAP
	charactor device part
	dhcp

There is no entry in GENERIC config file yet.
Follow sys/dev/ieee1394/IMPLEMENTATION to enable if_fw.
2000-11-05 17:17:12 +00:00
eeh 16bbba0a23 Fix bug w/previous. 2000-11-02 16:50:17 +00:00
eeh 746166e492 Fix sparc64 LP64 issues. 2000-11-02 16:14:05 +00:00
itojun d36abffc92 sync with struct tty change (does it look correct?) 2000-11-02 15:51:18 +00:00