Back to index

glibc  2.9
Classes | Defines
ethernet.h File Reference
#include <sys/cdefs.h>
#include <sys/types.h>
#include <net/if_ether.h>

Go to the source code of this file.

Classes

struct  ether_addr
struct  ether_header

Defines

#define ETHERTYPE_PUP   0x0200 /* Xerox PUP */
#define ETHERTYPE_IP   0x0800 /* IP */
#define ETHERTYPE_ARP   0x0806 /* Address resolution */
#define ETHERTYPE_REVARP   0x8035 /* Reverse ARP */
#define ETHER_ADDR_LEN   ETH_ALEN /* size of ethernet addr */
#define ETHER_TYPE_LEN   2 /* bytes in type field */
#define ETHER_CRC_LEN   4 /* bytes in CRC field */
#define ETHER_HDR_LEN   ETH_HLEN /* total octets in header */
#define ETHER_MIN_LEN   (ETH_ZLEN + ETH_CRC_LEN) /* min packet length */
#define ETHER_MAX_LEN   (ETH_FRAME_LEN + ETH_CRC_LEN) /* max packet length */
#define ETHER_IS_VALID_LEN(foo)   ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
#define ETHERTYPE_TRAIL   0x1000 /* Trailer packet */
#define ETHERTYPE_NTRAILER   16
#define ETHERMTU   ETH_DATA_LEN
#define ETHERMIN   (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)

Class Documentation

struct ether_addr

Definition at line 28 of file if_ether.h.

Class Members
u_int8_t ether_addr_octet
struct ether_header

Definition at line 39 of file ethernet.h.

Class Members
u_int8_t ether_dhost
u_int8_t ether_shost
u_int16_t ether_type

Define Documentation

#define ETHER_ADDR_LEN   ETH_ALEN /* size of ethernet addr */

Definition at line 52 of file ethernet.h.

#define ETHER_CRC_LEN   4 /* bytes in CRC field */

Definition at line 54 of file ethernet.h.

#define ETHER_HDR_LEN   ETH_HLEN /* total octets in header */

Definition at line 55 of file ethernet.h.

#define ETHER_IS_VALID_LEN (   foo)    ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)

Definition at line 60 of file ethernet.h.

#define ETHER_MAX_LEN   (ETH_FRAME_LEN + ETH_CRC_LEN) /* max packet length */

Definition at line 57 of file ethernet.h.

#define ETHER_MIN_LEN   (ETH_ZLEN + ETH_CRC_LEN) /* min packet length */

Definition at line 56 of file ethernet.h.

#define ETHER_TYPE_LEN   2 /* bytes in type field */

Definition at line 53 of file ethernet.h.

Definition at line 72 of file ethernet.h.

#define ETHERMTU   ETH_DATA_LEN

Definition at line 71 of file ethernet.h.

#define ETHERTYPE_ARP   0x0806 /* Address resolution */

Definition at line 49 of file ethernet.h.

#define ETHERTYPE_IP   0x0800 /* IP */

Definition at line 48 of file ethernet.h.

#define ETHERTYPE_NTRAILER   16

Definition at line 69 of file ethernet.h.

#define ETHERTYPE_PUP   0x0200 /* Xerox PUP */

Definition at line 47 of file ethernet.h.

#define ETHERTYPE_REVARP   0x8035 /* Reverse ARP */

Definition at line 50 of file ethernet.h.

#define ETHERTYPE_TRAIL   0x1000 /* Trailer packet */

Definition at line 68 of file ethernet.h.