Deleted Added
full compact
ethernet.h (164785) ethernet.h (165724)
1/*
2 * Fundamental constants relating to ethernet.
3 *
1/*
2 * Fundamental constants relating to ethernet.
3 *
4 * $FreeBSD: head/sys/net/ethernet.h 164785 2006-12-01 07:06:35Z imp $
4 * $FreeBSD: head/sys/net/ethernet.h 165724 2007-01-01 21:49:39Z csjp $
5 *
6 */
7
8#ifndef _NET_ETHERNET_H_
9#define _NET_ETHERNET_H_
10
11/*
12 * Somce basic Ethernet constants.

--- 39 unchanged lines hidden (view full) ---

52 * A macro to validate a length with
53 */
54#define ETHER_IS_VALID_LEN(foo) \
55 ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
56
57/*
58 * Structure of a 10Mb/s Ethernet header.
59 */
5 *
6 */
7
8#ifndef _NET_ETHERNET_H_
9#define _NET_ETHERNET_H_
10
11/*
12 * Somce basic Ethernet constants.

--- 39 unchanged lines hidden (view full) ---

52 * A macro to validate a length with
53 */
54#define ETHER_IS_VALID_LEN(foo) \
55 ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
56
57/*
58 * Structure of a 10Mb/s Ethernet header.
59 */
60struct ether_header {
60struct ether_header {
61 u_char ether_dhost[ETHER_ADDR_LEN];
62 u_char ether_shost[ETHER_ADDR_LEN];
63 u_short ether_type;
64} __packed;
65
66/*
67 * Structure of a 48-bit Ethernet address.
68 */
61 u_char ether_dhost[ETHER_ADDR_LEN];
62 u_char ether_shost[ETHER_ADDR_LEN];
63 u_short ether_type;
64} __packed;
65
66/*
67 * Structure of a 48-bit Ethernet address.
68 */
69struct ether_addr {
69struct ether_addr {
70 u_char octet[ETHER_ADDR_LEN];
71} __packed;
72
73#ifdef CTASSERT
74CTASSERT(sizeof (struct ether_header) == ETHER_ADDR_LEN * 2 + 2);
75CTASSERT(sizeof (struct ether_addr) == ETHER_ADDR_LEN);
76#endif
77

--- 329 unchanged lines hidden ---
70 u_char octet[ETHER_ADDR_LEN];
71} __packed;
72
73#ifdef CTASSERT
74CTASSERT(sizeof (struct ether_header) == ETHER_ADDR_LEN * 2 + 2);
75CTASSERT(sizeof (struct ether_addr) == ETHER_ADDR_LEN);
76#endif
77

--- 329 unchanged lines hidden ---