History log of /freebsd-10.0-release/sys/net/ethernet.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 249925 26-Apr-2013 glebius

Add const qualifier to the dst parameter of the ifnet if_output method.


# 191148 16-Apr-2009 kmacy

Change if_output to take a struct route as its fourth argument in order
to allow passing a cached struct llentry * down to L2

Reviewed by: rwatson


# 182285 27-Aug-2008 emaste

Move CTASSERT of ether header sizes out of the header file and into
if_ethersubr.c. CTASSERT is implemented using a dummy typedef, which if
used in a header file may conflict with another CTASSERT in a source file
using that header.

I'll make a note of this in CTASSERT's man page.

Approved by: imp


# 179036 16-May-2008 scf

Spelling and capitalization fixes.

MFC after: 3 days


# 172777 18-Oct-2007 thompsa

Use a uint16_t type for the vlan tag rather an int.


# 172770 18-Oct-2007 thompsa

The bridging output function puts the mbuf directly on the interfaces send
queue so the output network card must support the same tagging mechanism as
how the frame was input (prepended Ethernet header tag or stripped HW mflag).

Now the vlan Ethernet header is _always_ stripped in ether_input and the mbuf
flagged, only only network cards with VLAN_HWTAGGING enabled would properly
re-tag any outgoing vlan frames.

If the outgoing interface does not support hardware tagging then readd the vlan
header to the front of the frame. Move the common vlan encapsulation in to
ether_vlanencap().

Reported by: Erik Osterholm, Jon Otterholm
MFC after: 1 week


# 170097 29-May-2007 yar

Sync ether_ioctl() with ioctl(2) and ifnet.if_ioctl
as to the type of the command argument: int -> u_long.
These types have different widths in the 64-bit world.

Add a note to UPDATING because the change breaks KBI
on 64-bit platforms.

Discussed on: -net, -current
Reviewed by: bms, ru


# 169529 13-May-2007 rwatson

Add prototypes for ether_aton_r() and ether_ntoa_r() missed in previous
commit.


# 167290 07-Mar-2007 bms

Add Ethertype for 802.3ad LACP.


# 165724 01-Jan-2007 csjp

style(9) nit. Prefer struct[space]name[space]{ to make grep searches more
in line with that we find in the rest of the tree.


# 164785 01-Dec-2006 imp

Use CTASSERT to make sure:
sizeof ether_header is 2 * ETHER_ADDR_LEN + 2 (14) bytes long
sizeof ether_addr is ETHER_ADDR_LEN bytes long

On arm, this shows that struct ether_addr needs to be __packed.

The first condition muts be true for the bridging code to not dump core.
The second one appears to be implicitly relied upon by wi (but many
of the rids it sends down likely need __packed too to be safe) and
maybe others. It appears to not hurt anything.


# 164398 18-Nov-2006 csjp

Fix typo in comment

Pointed out by: ru


# 164396 18-Nov-2006 csjp

Currently, drivers that support hardware offload of VLAN tag
processing are forced to toggle this functionality when the card
is put in and out of promiscuous mode. The main reason for this
is because the hardware strips the VLAN tag, making it impossible
for the tag information to show up in network diagnostic tools like
tcpdump(1).

This change introduces ether_vlan_mtap(), which is called if the
mbuf has M_VLANTAG set. VLAN information is extracted from the
mbuf and inserted into a stack allocated ether vlan header which
is then inserted through the bpf machinery via bpf_mtap2(). The
original mbuf's data pointer and lengths are temporarily adjusted
to eliminate the original Ethernet header for the duration of the
tap operation. This should have no long term effects on the mbuf.

Also, define a new macro, ETHER_BPF_MTAP which should be used
by drivers which support hardware offload of VLAN tag processing.

The fixes for the relevant drivers will follow shortly.

Discussed with: rwatson, andre, jhb (and others)
Much feedback from: sam, ru
MFC after: 1 month [1]

[1] The version that is eventually MFCed will be somewhat
different then this, as there has been significant work
done to the VLAN code in HEAD.


# 164381 18-Nov-2006 sam

mark struct ether_header packed so gcc honors alignment
constratins on arm; this fixes bridging when packets are
rx'd so ip headers are 32-bit aligned

Reviewed by: imp (and discussed elsewhere)
MFC after: 2 weeks


# 136154 05-Oct-2004 sam

add ETHERTYPE_PAE for EAPOL/802.1x


# 130015 02-Jun-2004 naddy

Add helper functions to calculate the standard ethernet CRC in
little/big endian fashion, so that network drivers can just reference
the standard implementation and don't have to bring their own.

As discussed on arch@.

Obtained from: NetBSD


# 106929 14-Nov-2002 sam

general cleanups mostly aimed at improving portability of drivers

o ETHER_* (ETHER_ALIGN, ETHER_MAX_FRAME, ETHER_CRC_LEN, etc.)
o M_HASFCS for drivers to indicate packets include FCS
o remove global declarations for ng_ether* and vlan_* since these
represent a private contract between the if_ethersubr.c code and
certain parts of the system that should not normally be abused
o add ether_* declarations that were elsewhere
o remove ETHER_BPF_* since they are no longer used with the parameter
no longer passed to ether_ifattach and ether_ifdetach

Reviewed by: many
Approved by: re


# 103024 06-Sep-2002 sobomax

Add more ethernet types and move AppleTalk types into proper location.

Obtained from: NetBSD (syssrc/sys/net/ethertypes.h, rev.1.13)


# 93748 04-Apr-2002 luigi

Fix a couple of incorrect m_free() vs. m_freem() usages and related issues.

Reviewed-by: brooks


# 92725 19-Mar-2002 alfred

Remove __P.


# 87276 03-Dec-2001 brooks

Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the
mbuf instead.

Suggested by: fenner


# 83115 05-Sep-2001 brooks

Make vlan(4) loadable, unloadable, and clonable. As a side effect,
interfaces must now always enable VLAN support.

Reviewed by: jlemon
MFC after: 3 weeks


# 63474 18-Jul-2000 archie

Const'ify parameters to ethers(3) routines as appropriate.


# 63090 13-Jul-2000 archie

Make all Ethernet drivers attach using ether_ifattach() and detach using
ether_ifdetach().

The former consolidates the operations of if_attach(), ng_ether_attach(),
and bpfattach(). The latter consolidates the corresponding detach operations.

Reviewed by: julian, freebsd-net


# 62267 29-Jun-2000 archie

Provide forward declarations for struct ifnet and struct mbuf
to avoid compiler warnings.


# 62143 26-Jun-2000 archie

Make the ng_ether(4) node type dynamically loadable like the rest.
This means 'options NETGRAPH' is no longer necessary in order to get
netgraph-enabled Ethernet interfaces. This supports loading/unloading
the ng_ether.ko and attaching/detaching the Ethernet interface in any
order.

Add two new hooks 'upper' and 'lower' to allow access to the protocol
demux engine and the raw device, respectively. This enables bridging
to be defined as a netgraph node, if so desired.

Reviewed by: freebsd-net@freebsd.org


# 55205 29-Dec-1999 peter

Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot). This is consistant with the other
BSD's who made this change quite some time ago. More commits to come.


# 52904 05-Nov-1999 shin

KAME related header files additions and merges.
(only those which don't affect c source files so much)

Reviewed by: cvs-committers
Obtained from: KAME project


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 34649 17-Mar-1998 wollman

Add preliminary support for IEEE 802.1Q VLAN tagging. It doesn't actually
work reliably yet (I've had panics), but it does seem to occasionally
be able to transmit and receive syntactically-correct packets.
Also fixes one of if_ethersubr.c's legion style bugs, and removes
the hostcache code from standard kernels---the code that depends on it
is not going to happen any time soon, I'm afraid.


# 22975 22-Feb-1997 peter

Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 21260 03-Jan-1997 wollman

Move the ethertypes from <netinet/if_ether.h> to <net/ethernet.h>.
Many programs need the numbers but don't need the internals of ARP.

More commits to follow...


# 20686 19-Dec-1996 bde

More cleanups to satisfy the following rules:
- C++ should be supported for application functions (use __BEGIN_DECLS,
etc.).
- prototypes should be sorted.
- comments on #endif's should spell identifiers the same as the code.
- comments on #endif's should have the same sense as the code (use `!'
to match ifndef, etc.).


# 20681 19-Dec-1996 wollman

Clean up Bill's additions.


# 20661 18-Dec-1996 wpaul

Add prototypes for ethers.3 functions as per wollman:

> wollman 96/12/10 09:19:15
>
> Modified: lib/libc/net ether_addr.c ethers.3
> Log:
> Get struct ether_addr directly from <net/ethernet.h> rather than pulling
> in lots of unrelated junk from <net/if.h> and <net/if_ether.h>. These
> functions still aren't prototyped anywhere (but should be in
> <net/ethernet.h>---got that, Bill?).

(Note that this file has no copyright header; one should probably
be added.)


# 17455 06-Aug-1996 phk

Megacommit to straigthen out ETHER_ mess.

I'm pretty convinced after looking at this that the majority of our
drivers are confused about the in/exclusion of ETHER_CRC_LEN :-(


# 17443 05-Aug-1996 phk

This file is the (intended) definitive source of the ETHER_ macros.