Back to index

glibc  2.9
Classes | Defines | Functions | Variables
ethernet.h File Reference
#include <sys/cdefs.h>
#include <sys/types.h>
#include <linux/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_SPRITE   0x0500 /* Sprite */
#define ETHERTYPE_IP   0x0800 /* IP */
#define ETHERTYPE_ARP   0x0806 /* Address resolution */
#define ETHERTYPE_REVARP   0x8035 /* Reverse ARP */
#define ETHERTYPE_AT   0x809B /* AppleTalk protocol */
#define ETHERTYPE_AARP   0x80F3 /* AppleTalk ARP */
#define ETHERTYPE_VLAN   0x8100 /* IEEE 802.1Q VLAN tagging */
#define ETHERTYPE_IPX   0x8137 /* IPX */
#define ETHERTYPE_IPV6   0x86dd /* IP protocol version 6 */
#define ETHERTYPE_LOOPBACK   0x9000 /* used to test interfaces */
#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 + ETHER_CRC_LEN) /* min packet length */
#define ETHER_MAX_LEN   (ETH_FRAME_LEN + ETHER_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)

Functions

__BEGIN_DECLS struct ether_addr __attribute__ ((__packed__))

Variables

u_int8_t ether_addr_octet [ETH_ALEN]
u_int8_t ether_dhost [ETH_ALEN]
u_int8_t ether_shost [ETH_ALEN]
u_int16_t ether_type

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 60 of file ethernet.h.

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

Definition at line 62 of file ethernet.h.

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

Definition at line 63 of file ethernet.h.

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

Definition at line 68 of file ethernet.h.

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

Definition at line 65 of file ethernet.h.

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

Definition at line 64 of file ethernet.h.

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

Definition at line 61 of file ethernet.h.

Definition at line 80 of file ethernet.h.

#define ETHERMTU   ETH_DATA_LEN

Definition at line 79 of file ethernet.h.

#define ETHERTYPE_AARP   0x80F3 /* AppleTalk ARP */

Definition at line 53 of file ethernet.h.

#define ETHERTYPE_ARP   0x0806 /* Address resolution */

Definition at line 50 of file ethernet.h.

#define ETHERTYPE_AT   0x809B /* AppleTalk protocol */

Definition at line 52 of file ethernet.h.

#define ETHERTYPE_IP   0x0800 /* IP */

Definition at line 49 of file ethernet.h.

#define ETHERTYPE_IPV6   0x86dd /* IP protocol version 6 */

Definition at line 56 of file ethernet.h.

#define ETHERTYPE_IPX   0x8137 /* IPX */

Definition at line 55 of file ethernet.h.

#define ETHERTYPE_LOOPBACK   0x9000 /* used to test interfaces */

Definition at line 57 of file ethernet.h.

#define ETHERTYPE_NTRAILER   16

Definition at line 77 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 51 of file ethernet.h.

#define ETHERTYPE_SPRITE   0x0500 /* Sprite */

Definition at line 48 of file ethernet.h.

#define ETHERTYPE_TRAIL   0x1000 /* Trailer packet */

Definition at line 76 of file ethernet.h.

#define ETHERTYPE_VLAN   0x8100 /* IEEE 802.1Q VLAN tagging */

Definition at line 54 of file ethernet.h.


Function Documentation

__BEGIN_DECLS struct ether_addr __attribute__ ( (__packed__)  )

Variable Documentation

Definition at line 37 of file ethernet.h.

Definition at line 45 of file ethernet.h.

Definition at line 46 of file ethernet.h.

Definition at line 47 of file ethernet.h.