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
M_PROMISC. In ether_input(), flag packets comming from an interface in
promiscous mode which are not for us M_PROMISC instead of droping them.
Drop M_PROMISC packets which are not passed to vlan_input(). M_PROMISC
packets passed to vlan_input() will be looped back to ether_input()
the M_PROMISC flag will be handled appropriately.
Clear M_PROMISC before giving the packet to bridge, as bridge has its own
checks for local MAC addresses.
This also makes bridges on vlan working.
Do a little mbuf rework while here. Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *). These are not performance critical and making them
call m_get saves considerable space. Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
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.
- Add a macro to compute the max frame length based on Ethertype
and presence of FCS, and use it to validate the packet size
in ether_input().
- Add capabilites to struct ethercom, and allow hardware drivers
to specify that they can handle the larger hardware MTU that
VLANs require in order to strictly conform to 802.1Q.
- Make ether_ifdetach() clear out the link address and free all of
the Ethernet multicast structures.
Also, rearrange the VLAN driver itself in preparation to supporting
other hardware types, including FDDI (which has 802.1Q VLAN capability).
attached.
- Add ether_crc32_be() and ether_crc_le(), common functions for computing
the Ethernet CRC on arbitrary length buffers. Nothing uses them yet,
and these should be double-checked and probably re-implemented as
table-driven functions.
(Sorry for a big commit, I can't separate this into several pieces...)
Pls check sys/netinet6/TODO and sys/netinet6/IMPLEMENTATION for details.
- sys/kern: do not assume single mbuf, accept chained mbuf on passing
data from userland to kernel (or other way round).
- "midway" ATM card: ATM PVC pseudo device support, like those done in ALTQ
package (ftp://ftp.csl.sony.co.jp/pub/kjc/).
- sys/netinet/tcp*: IPv4/v6 dual stack tcp support.
- sys/netinet/{ip6,icmp6}.h, sys/net/pfkeyv2.h: IETF document assumes those
file to be there so we patch it up.
- sys/netinet: IPsec additions are here and there.
- sys/netinet6/*: most of IPv6 code sits here.
- sys/netkey: IPsec key management code
- dev/pci/pcidevs: regen
In my understanding no code here is subject to export control so it
should be safe.
- ETHER_ADDR_LEN: length of Ethernet address (actually, we already defined
this).
- ETHER_TYPE_LEN: length of the Ethernet header `type' field.
- ETHER_CRC_LEN: length of the Ethernet CRC (explorer got this already, mostly
because I forgot to commit these changes earlier).
- ETHER_HDR_LEN: total length of the Ethernet header
- ETHER_MAX_LEN: maximum length of an Ethernet frame, including header and CRC
- ETHER_MIN_LEN: minimum length of an Ethernet frame, including header and CRC
Define ETHERMTU and ETHERMIN (payload sizes) in terms of the above constants.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.
For the detailed change history, look at the commit log entries for
the is-newarp branch.