Ethernet (IEEE 802.3) network interface layer Service
[Network interface layer]

Collaboration diagram for Ethernet (IEEE 802.3) network interface layer Service:

Data Structures

struct  eth_device
 Ethernet device map. More...
struct  eth_proto
 Ethernet protocol specific data. More...
struct  eth_globals
 Ethernet global data. More...
struct  eth_ieee_lsap
 Ethernet header Link Service Access Point extension. More...
struct  eth_snap
 Ethernet header SNAP extension. More...
struct  eth_preamble
 Ethernet header preamble. More...
struct  eth_header
 Ethernet header. More...
struct  eth_header_lsap
 Ethernet header IEEE 802.3 + 802.2 extension. More...
struct  eth_header_snap
 Ethernet header IEEE 802.3 + 802.2 + SNAP extensions. More...

Files

file  ethernet_lsap.h
 

Link service access point identifiers.


file  ethernet_protocols.h
 

Ethernet protocol numbers according to the on-line IANA - Ethernet numbers - <http://www.iana.org/assignments/ethernet-numbers>, cited January 17 2009.


file  eth.c
 

Ethernet module implementation.


file  eth.h
 

Ethernet module.


file  eth_header.h
 

Ethernet protocol header definitions.


file  eth_module.c
 

Ethernet module stub.


Defines

#define ETH_PREFIX   (sizeof(eth_header_t) + sizeof(eth_header_lsap_t) + sizeof(eth_header_snap_t))
 Reserved packet prefix length.
#define ETH_SUFFIX   sizeof(eth_fcs_t)
 Reserved packet suffix length.
#define ETH_MAX_CONTENT   1500u
 Maximum packet content length.
#define ETH_MIN_CONTENT   46u
 Minimum packet content length.
#define ETH_MAX_TAGGED_CONTENT(flags)   (ETH_MAX_CONTENT - ((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? sizeof(eth_header_lsap_t) : 0) - (IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
 Maximum tagged packet content length.
#define ETH_MIN_TAGGED_CONTENT(flags)   (ETH_MIN_CONTENT - ((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? sizeof(eth_header_lsap_t) : 0) - (IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))
 Minimum tagged packet content length.
#define ETH_DUMMY_SHIFT   0
 Dummy flag shift value.
#define ETH_MODE_SHIFT   1
 Mode flag shift value.
#define ETH_DUMMY   (1 << ETH_DUMMY_SHIFT)
 Dummy device flag.
#define IS_DUMMY(flags)   ((flags) &ETH_DUMMY)
 Returns the dummy flag.
#define ETH_MODE_MASK   (3 << ETH_MODE_SHIFT)
 Device mode flags.
#define ETH_DIX   (1 << ETH_MODE_SHIFT)
 DIX Ethernet mode flag.
#define IS_DIX(flags)   (((flags) &ETH_MODE_MASK) == ETH_DIX)
 Returns whether the DIX Ethernet mode flag is set.
#define ETH_8023_2_LSAP   (2 << ETH_MODE_SHIFT)
 802.3 + 802.2 + LSAP mode flag.
#define IS_8023_2_LSAP(flags)   (((flags) &ETH_MODE_MASK) == ETH_8023_2_LSAP)
 Returns whether the 802.3 + 802.2 + LSAP mode flag is set.
#define ETH_8023_2_SNAP   (3 << ETH_MODE_SHIFT)
 802.3 + 802.2 + LSAP + SNAP mode flag.
#define IS_8023_2_SNAP(flags)   (((flags) &ETH_MODE_MASK) == ETH_8023_2_SNAP)
 Returns whether the 802.3 + 802.2 + LSAP + SNAP mode flag is set.
#define ETH_ADDR   6
 Ethernet address length.
#define ETH_PREAMBLE   0x55
 Ethernet header preamble value.
#define ETH_SFD   0xD5
 Ethernet header start of frame value.
#define IEEE_8023_2_UI   0x03
 IEEE 802.2 unordered information control field.
#define NAME   "Ethernet protocol"
 The module name.

Typedefs

typedef uint8_t eth_lsap_t
 Ethernet LSAP type definition.
typedef uint16_t eth_type_t
 Ethernet protocol type definition.
typedef enum eth_addr_type eth_addr_type_t
 Type definition of the ethernet address type.
typedef eth_addr_type_teth_addr_type_ref
 Type definition of the ethernet address type pointer.
typedef struct eth_globals eth_globals_t
 Type definition of the Ethernet global data.
typedef struct eth_device eth_device_t
 Type definition of the Ethernet device specific data.
typedef eth_device_teth_device_ref
 Type definition of the Ethernet device specific data pointer.
typedef struct eth_proto eth_proto_t
 Type definition of the Ethernet protocol specific data.
typedef eth_proto_teth_proto_ref
 Type definition of the Ethernet protocol specific data pointer.
typedef struct eth_header_snap eth_header_snap_t
 Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
typedef eth_header_snap_teth_header_snap_ref
 Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions pointer.
typedef struct eth_header_lsap eth_header_lsap_t
 Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.
typedef eth_header_lsap_teth_header_lsap_ref
 Type definition of the Ethernet header IEEE 802.3 + 802.2 extension pointer.
typedef struct eth_ieee_lsap eth_ieee_lsap_t
 Type definition of the Ethernet header LSAP extension.
typedef eth_ieee_lsap_teth_ieee_lsap_ref
 Type definition of the Ethernet header LSAP extension pointer.
typedef struct eth_snap eth_snap_t
 Type definition of the Ethernet header SNAP extension.
typedef eth_snap_teth_snap_ref
 Type definition of the Ethernet header SNAP extension pointer.
typedef struct eth_preamble eth_preamble_t
 Type definition of the Ethernet header preamble.
typedef eth_preamble_teth_preamble_ref
 Type definition of the Ethernet header preamble pointer.
typedef struct eth_header eth_header_t
 Type definition of the Ethernet header.
typedef eth_header_teth_header_ref
 Type definition of the Ethernet header pointer.
typedef uint32_t eth_fcs_t
 Ethernet Frame Check Sequence.
typedef eth_fcs_teth_fcs_ref
 Ethernet Frame Check Sequence pointer.

Enumerations

enum  eth_addr_type { ETH_LOCAL_ADDR, ETH_BROADCAST_ADDR }
 

Ethernet address type.

More...

Functions

eth_proto_ref eth_process_packet (int flags, packet_t packet)
 Processes the received packet and chooses the target registered module.
int eth_prepare_packet (int flags, packet_t packet, uint8_t *src_addr, int ethertype, size_t mtu)
 Prepares the packet for sending.
int nil_device_state_msg (int nil_phone, device_id_t device_id, int state)
int nil_initialize (int net_phone)
 Module initialization.
int nil_received_msg (int nil_phone, device_id_t device_id, packet_t packet, services_t target)
int nil_message (ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer, int *answer_count)
 Message processing function.
void module_print_name (void)
 Prints the module name.
int module_start (async_client_conn_t client_connection)
 Starts the Ethernet module.
int module_message (ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer, int *answer_count)
 Passes the parameters to the module specific nil_message() function.

Variables

eth_globals_t eth_globals
 Ethernet module global data.

Message processing functions



void eth_receiver (ipc_callid_t iid, ipc_call_t *icall)
 Processes IPC messages from the registered device driver modules in an infinite loop.
int eth_device_message (device_id_t device_id, services_t service, size_t mtu)
 Registers new device or updates the MTU of an existing one.
int eth_register_message (services_t service, int phone)
 Registers receiving module service.
int eth_packet_space_message (device_id_t device_id, size_t *addr_len, size_t *prefix, size_t *content, size_t *suffix)
 Returns the device packet dimensions for sending.
int eth_addr_message (device_id_t device_id, eth_addr_type_t type, measured_string_ref *address)
 Returns the device hardware address.
int eth_send_message (device_id_t device_id, packet_t packet, services_t sender)
 Sends the packet queue.

Ethernet LSAP values definitions



#define ETH_LSAP_NULL   0x00
 Null LSAP LSAP identifier.
#define ETH_LSAP_ISLMF   0x02
 Individual LLC Sublayer Management Function LSAP identifier.
#define ETH_LSAP_GSLMI   0x03
 Group LLC Sublayer Management Function LSAP identifier.
#define ETH_LSAP_ISNA   0x04
 IBM SNA Path Control (individual) LSAP identifier.
#define ETH_LSAP_GSNA   0x05
 IBM SNA Path Control (group) LSAP identifier.
#define ETH_LSAP_IP   0x06
 ARPANET Internet Protocol (IP) LSAP identifier.
#define ETH_LSAP_SNA   0x08
 SNA LSAP identifier.
#define ETH_LSAP_SNA2   0x0C
 SNA LSAP identifier.
#define ETH_LSAP_PROWAY_NMI   0x0E
 PROWAY (IEC955) Network Management &Initialization LSAP identifier.
#define ETH_LSAP_TI   0x18
 Texas Instruments LSAP identifier.
#define ETH_LSAP_BRIDGE   0x42
 IEEE 802.1 Bridge Spanning Tree Protocol LSAP identifier.
#define ETH_LSAP_EIS   0x4E
 EIA RS-511 Manufacturing Message Service LSAP identifier.
#define ETH_LSAP_ISO8208   0x7E
 ISO 8208 (X.25 over IEEE 802.2 Type 2 LLC) LSAP identifier.
#define ETH_LSAP_XNS   0x80
 Xerox Network Systems (XNS) LSAP identifier.
#define ETH_LSAP_NESTAR   0x86
 Nestar LSAP identifier.
#define ETH_LSAP_PROWAY_ASLM   0x8E
 PROWAY (IEC 955) Active Station List Maintenance LSAP identifier.
#define ETH_LSAP_ARP   0x98
 ARPANET Address Resolution Protocol (ARP) LSAP identifier.
#define ETH_LSAP_VINES   0xBC
 Banyan VINES LSAP identifier.
#define ETH_LSAP_SNAP   0xAA
 SubNetwork Access Protocol (SNAP) LSAP identifier.
#define ETH_LSAP_NETWARE   0xE0
 Novell NetWare LSAP identifier.
#define ETH_LSAP_NETBIOS   0xF0
 IBM NetBIOS LSAP identifier.
#define ETH_LSAP_ILAN   0xF4
 IBM LAN Management (individual) LSAP identifier.
#define ETH_LSAP_GLAN   0xF5
 IBM LAN Management (group) LSAP identifier.
#define ETH_LSAP_RPL   0xF8
 IBM Remote Program Load (RPL) LSAP identifier.
#define ETH_LSAP_UB   0xFA
 Ungermann-Bass LSAP identifier.
#define ETH_LSAP_ISONLP   0xFE
 ISO Network Layer Protocol LSAP identifier.
#define ETH_LSAP_GLSAP   0xFF
 Global LSAP LSAP identifier.

Ethernet protocols definitions



#define ETH_MIN_PROTO   0x0600
 Ethernet minimal protocol number.
#define ETH_P_LOOP   0x0060
 Ethernet loopback packet protocol type.
#define ETH_P_PUP   0x0200
 XEROX PUP (see 0A00) ethernet protocol type.
#define ETH_P_PUPAT   0x0201
 PUP Addr Trans (see 0A01) ethernet protocol type.
#define ETH_P_Nixdorf   0x0400
 Nixdorf ethernet protocol type.
#define ETH_P_XEROX_NS_IDP   0x0600
 XEROX NS IDP ethernet protocol type.
#define ETH_P_DLOG   0x0660
 DLOG ethernet protocol type.
#define ETH_P_DLOG2   0x0661
 DLOG ethernet protocol type.
#define ETH_P_IP   0x0800
 Internet IP (IPv4) ethernet protocol type.
#define ETH_P_X_75   0x0801
 X.75 Internet ethernet protocol type.
#define ETH_P_NBS   0x0802
 NBS Internet ethernet protocol type.
#define ETH_P_ECMA   0x0803
 ECMA Internet ethernet protocol type.
#define ETH_P_Chaosnet   0x0804
 Chaosnet ethernet protocol type.
#define ETH_P_X25   0x0805
 X.25 Level 3 ethernet protocol type.
#define ETH_P_ARP   0x0806
 ARP ethernet protocol type.
#define ETH_P_XNS_Compatability   0x0807
 XNS Compatability ethernet protocol type.
#define ETH_P_Frame_Relay_ARP   0x0808
 Frame Relay ARP ethernet protocol type.
#define ETH_P_Symbolics_Private   0x081C
 Symbolics Private ethernet protocol type.
#define ETH_P_Xyplex_MIN   0x0888
 Xyplex ethernet protocol type.
#define ETH_P_Xyplex_MAX   0x088A
 Xyplex ethernet protocol type.
#define ETH_P_Ungermann_Bass_net_debugr   0x0900
 Ungermann-Bass net debugr ethernet protocol type.
#define ETH_P_IEEEPUP   0x0A00
 Xerox IEEE802.3 PUP ethernet protocol type.
#define ETH_P_IEEEPUPAT   0x0A01
 PUP Addr Trans ethernet protocol type.
#define ETH_P_Banyan_VINES   0x0BAD
 Banyan VINES ethernet protocol type.
#define ETH_P_VINES_Loopback   0x0BAE
 VINES Loopback ethernet protocol type.
#define ETH_P_VINES_Echo   0x0BAF
 VINES Echo ethernet protocol type.
#define ETH_P_Berkeley_Trailer_nego   0x1000
 Berkeley Trailer nego ethernet protocol type.
#define ETH_P_Berkeley_Trailer_encapIP_MIN   0x1001
 Berkeley Trailer encap/IP ethernet protocol type.
#define ETH_P_Berkeley_Trailer_encapIP_MAX   0x100F
 Berkeley Trailer encap/IP ethernet protocol type.
#define ETH_P_Valid_Systems   0x1600
 Valid Systems ethernet protocol type.
#define ETH_P_PCS_Basic_Block_Protocol   0x4242
 PCS Basic Block Protocol ethernet protocol type.
#define ETH_P_BBN_Simnet   0x5208
 BBN Simnet ethernet protocol type.
#define ETH_P_DEC   0x6000
 DEC Unassigned (Exp.
#define ETH_P_DNA_DL   0x6001
 DEC MOP Dump/Load ethernet protocol type.
#define ETH_P_DNA_RC   0x6002
 DEC MOP Remote Console ethernet protocol type.
#define ETH_P_DNA_RT   0x6003
 DEC DECNET Phase IV Route ethernet protocol type.
#define ETH_P_LAT   0x6004
 DEC LAT ethernet protocol type.
#define ETH_P_DIAG   0x6005
 DEC Diagnostic Protocol ethernet protocol type.
#define ETH_P_CUST   0x6006
 DEC Customer Protocol ethernet protocol type.
#define ETH_P_SCA   0x6007
 DEC LAVC, SCA ethernet protocol type.
#define ETH_P_DEC_Unassigned_MIN   0x6008
 DEC Unassigned ethernet protocol type.
#define ETH_P_DEC_Unassigned_MAX   0x6009
 DEC Unassigned ethernet protocol type.
#define ETH_P_Com_Corporation_MIN   0x6010
 Com Corporation ethernet protocol type.
#define ETH_P_Com_Corporation_MAX   0x6014
 Com Corporation ethernet protocol type.
#define ETH_P_Trans_Ether_Bridging   0x6558
 Trans Ether Bridging ethernet protocol type.
#define ETH_P_Raw_Frame_Relay   0x6559
 Raw Frame Relay ethernet protocol type.
#define ETH_P_Ungermann_Bass_download   0x7000
 Ungermann-Bass download ethernet protocol type.
#define ETH_P_Ungermann_Bass_dialoop   0x7002
 Ungermann-Bass dia/loop ethernet protocol type.
#define ETH_P_LRT_MIN   0x7020
 LRT ethernet protocol type.
#define ETH_P_LRT_MAX   0x7029
 LRT ethernet protocol type.
#define ETH_P_Proteon   0x7030
 Proteon ethernet protocol type.
#define ETH_P_Cabletron   0x7034
 Cabletron ethernet protocol type.
#define ETH_P_Cronus_VLN   0x8003
 Cronus VLN ethernet protocol type.
#define ETH_P_Cronus_Direct   0x8004
 Cronus Direct ethernet protocol type.
#define ETH_P_HP_Probe   0x8005
 HP Probe ethernet protocol type.
#define ETH_P_Nestar   0x8006
 Nestar ethernet protocol type.
#define ETH_P_AT_T   0x8008
 AT&T ethernet protocol type.
#define ETH_P_Excelan   0x8010
 Excelan ethernet protocol type.
#define ETH_P_SGI_diagnostics   0x8013
 SGI diagnostics ethernet protocol type.
#define ETH_P_SGI_network_games   0x8014
 SGI network games ethernet protocol type.
#define ETH_P_SGI_reserved   0x8015
 SGI reserved ethernet protocol type.
#define ETH_P_SGI_bounce_server   0x8016
 SGI bounce server ethernet protocol type.
#define ETH_P_Apollo_Domain   0x8019
 Apollo Domain ethernet protocol type.
#define ETH_P_Tymshare   0x802E
 Tymshare ethernet protocol type.
#define ETH_P_Tigan   0x802F
 Tigan, Inc.
#define ETH_P_RARP   0x8035
 Reverse ARP ethernet protocol type.
#define ETH_P_Aeonic_Systems   0x8036
 Aeonic Systems ethernet protocol type.
#define ETH_P_DEC_LANBridge   0x8038
 DEC LANBridge ethernet protocol type.
#define ETH_P_DEC_Unassigned_MIN1   0x8039
 DEC Unassigned ethernet protocol type.
#define ETH_P_DEC_Unassigned_MAX2   0x803C
 DEC Unassigned ethernet protocol type.
#define ETH_P_DEC_Ethernet_Encryption   0x803D
 DEC Ethernet Encryption ethernet protocol type.
#define ETH_P_DEC_Unassigned   0x803E
 DEC Unassigned ethernet protocol type.
#define ETH_P_DEC_LAN_Traffic_Monitor   0x803F
 DEC LAN Traffic Monitor ethernet protocol type.
#define ETH_P_DEC_Unassigned_MIN3   0x8040
 DEC Unassigned ethernet protocol type.
#define ETH_P_DEC_Unassigned_MAX3   0x8042
 DEC Unassigned ethernet protocol type.
#define ETH_P_Planning_Research_Corp   0x8044
 Planning Research Corp.
#define ETH_P_AT_T2   0x8046
 AT&T ethernet protocol type.
#define ETH_P_AT_T3   0x8047
 AT&T ethernet protocol type.
#define ETH_P_ExperData   0x8049
 ExperData ethernet protocol type.
#define ETH_P_Stanford_V_Kernel_exp   0x805B
 Stanford V Kernel exp.
#define ETH_P_Stanford_V_Kernel_prod   0x805C
 Stanford V Kernel prod.
#define ETH_P_Evans_Sutherland   0x805D
 Evans &Sutherland ethernet protocol type.
#define ETH_P_Little_Machines   0x8060
 Little Machines ethernet protocol type.
#define ETH_P_Counterpoint_Computers   0x8062
 Counterpoint Computers ethernet protocol type.
#define ETH_P_Univ_of_Mass   0x8065
 Univ.
#define ETH_P_Univ_of_Mass2   0x8066
 Univ.
#define ETH_P_Veeco_Integrated_Auto   0x8067
 Veeco Integrated Auto.
#define ETH_P_General_Dynamics   0x8068
 General Dynamics ethernet protocol type.
#define ETH_P_AT_T4   0x8069
 AT&T ethernet protocol type.
#define ETH_P_Autophon   0x806A
 Autophon ethernet protocol type.
#define ETH_P_ComDesign   0x806C
 ComDesign ethernet protocol type.
#define ETH_P_Computgraphic_Corp   0x806D
 Computgraphic Corp.
#define ETH_P_Landmark_Graphics_Corp_MIN   0x806E
 Landmark Graphics Corp.
#define ETH_P_Landmark_Graphics_Corp_MAX   0x8077
 Landmark Graphics Corp.
#define ETH_P_Matra   0x807A
 Matra ethernet protocol type.
#define ETH_P_Dansk_Data_Elektronik   0x807B
 Dansk Data Elektronik ethernet protocol type.
#define ETH_P_Merit_Internodal   0x807C
 Merit Internodal ethernet protocol type.
#define ETH_P_Vitalink_Communications_MIN   0x807D
 Vitalink Communications ethernet protocol type.
#define ETH_P_Vitalink_Communications_MAX   0x807F
 Vitalink Communications ethernet protocol type.
#define ETH_P_Vitalink_TransLAN_III   0x8080
 Vitalink TransLAN III ethernet protocol type.
#define ETH_P_Counterpoint_Computers_MIN   0x8081
 Counterpoint Computers ethernet protocol type.
#define ETH_P_Counterpoint_Computers_MAX   0x8083
 Counterpoint Computers ethernet protocol type.
#define ETH_P_ATALK   0x809B
 Appletalk ethernet protocol type.
#define ETH_P_Datability_MIN   0x809C
 Datability ethernet protocol type.
#define ETH_P_Datability_MAX   0x809E
 Datability ethernet protocol type.
#define ETH_P_Spider_Systems_Ltd   0x809F
 Spider Systems Ltd.
#define ETH_P_Nixdorf_Computers   0x80A3
 Nixdorf Computers ethernet protocol type.
#define ETH_P_Siemens_Gammasonics_Inc_MIN   0x80A4
 Siemens Gammasonics Inc.
#define ETH_P_Siemens_Gammasonics_Inc_MAX   0x80B3
 Siemens Gammasonics Inc.
#define ETH_P_DCA_Data_Exchange_Cluster_MIN   0x80C0
 DCA Data Exchange Cluster ethernet protocol type.
#define ETH_P_DCA_Data_Exchange_Cluster_MAX   0x80C3
 DCA Data Exchange Cluster ethernet protocol type.
#define ETH_P_Banyan_Systems   0x80C4
 Banyan Systems ethernet protocol type.
#define ETH_P_Banyan_Systems2   0x80C5
 Banyan Systems ethernet protocol type.
#define ETH_P_Pacer_Software   0x80C6
 Pacer Software ethernet protocol type.
#define ETH_P_Applitek_Corporation   0x80C7
 Applitek Corporation ethernet protocol type.
#define ETH_P_Intergraph_Corporation_MIN   0x80C8
 Intergraph Corporation ethernet protocol type.
#define ETH_P_Intergraph_Corporation_MAX   0x80CC
 Intergraph Corporation ethernet protocol type.
#define ETH_P_Harris_Corporation_MIN   0x80CD
 Harris Corporation ethernet protocol type.
#define ETH_P_Harris_Corporation_MAX   0x80CE
 Harris Corporation ethernet protocol type.
#define ETH_P_Taylor_Instrument_MIN   0x80CF
 Taylor Instrument ethernet protocol type.
#define ETH_P_Taylor_Instrument_MAX   0x80D2
 Taylor Instrument ethernet protocol type.
#define ETH_P_Rosemount_Corporation_MIN   0x80D3
 Rosemount Corporation ethernet protocol type.
#define ETH_P_Rosemount_Corporation_MAX   0x80D4
 Rosemount Corporation ethernet protocol type.
#define ETH_P_IBM_SNA_Service_on_Ether   0x80D5
 IBM SNA Service on Ether ethernet protocol type.
#define ETH_P_Varian_Associates   0x80DD
 Varian Associates ethernet protocol type.
#define ETH_P_Integrated_Solutions_TRFS_MIN   0x80DE
 Integrated Solutions TRFS ethernet protocol type.
#define ETH_P_Integrated_Solutions_TRFS_MAX   0x80DF
 Integrated Solutions TRFS ethernet protocol type.
#define ETH_P_Allen_Bradley_MIN   0x80E0
 Allen-Bradley ethernet protocol type.
#define ETH_P_Allen_Bradley_MAX   0x80E3
 Allen-Bradley ethernet protocol type.
#define ETH_P_Datability_MIN2   0x80E4
 Datability ethernet protocol type.
#define ETH_P_Datability_MAX2   0x80F0
 Datability ethernet protocol type.
#define ETH_P_Retix   0x80F2
 Retix ethernet protocol type.
#define ETH_P_AARP   0x80F3
 AppleTalk AARP (Kinetics) ethernet protocol type.
#define ETH_P_Kinetics_MIN   0x80F4
 Kinetics ethernet protocol type.
#define ETH_P_Kinetics_MAX   0x80F5
 Kinetics ethernet protocol type.
#define ETH_P_Apollo_Computer   0x80F7
 Apollo Computer ethernet protocol type.
#define ETH_P_Wellfleet_Communications   0x80FF
 Wellfleet Communications ethernet protocol type.
#define ETH_P_8021Q   0x8100
 IEEE 802.1Q VLAN-tagged frames (initially Wellfleet) ethernet protocol type.
#define ETH_P_Wellfleet_Communications_MIN   0x8101
 Wellfleet Communications ethernet protocol type.
#define ETH_P_Wellfleet_Communications_MAX   0x8103
 Wellfleet Communications ethernet protocol type.
#define ETH_P_Symbolics_Private_MIN   0x8107
 Symbolics Private ethernet protocol type.
#define ETH_P_Symbolics_Private_MAX   0x8109
 Symbolics Private ethernet protocol type.
#define ETH_P_Hayes_Microcomputers   0x8130
 Hayes Microcomputers ethernet protocol type.
#define ETH_P_VG_Laboratory_Systems   0x8131
 VG Laboratory Systems ethernet protocol type.
#define ETH_P_Bridge_Communications_MIN   0x8132
 Bridge Communications ethernet protocol type.
#define ETH_P_Bridge_Communications_MAX   0x8136
 Bridge Communications ethernet protocol type.
#define ETH_P_Novell_Inc_MIN   0x8137
 Novell, Inc.
#define ETH_P_Novell_Inc_MAX   0x8138
 Novell, Inc.
#define ETH_P_KTI_MIN   0x8139
 KTI ethernet protocol type.
#define ETH_P_KTI_MAX   0x813D
 KTI ethernet protocol type.
#define ETH_P_Logicraft   0x8148
 Logicraft ethernet protocol type.
#define ETH_P_Network_Computing_Devices   0x8149
 Network Computing Devices ethernet protocol type.
#define ETH_P_Alpha_Micro   0x814A
 Alpha Micro ethernet protocol type.
#define ETH_P_SNMP   0x814C
 SNMP ethernet protocol type.
#define ETH_P_BIIN   0x814D
 BIIN ethernet protocol type.
#define ETH_P_BIIN2   0x814E
 BIIN ethernet protocol type.
#define ETH_P_Technically_Elite_Concept   0x814F
 Technically Elite Concept ethernet protocol type.
#define ETH_P_Rational_Corp   0x8150
 Rational Corp ethernet protocol type.
#define ETH_P_Qualcomm_MIN   0x8151
 Qualcomm ethernet protocol type.
#define ETH_P_Qualcomm_MAX   0x8153
 Qualcomm ethernet protocol type.
#define ETH_P_Computer_Protocol_Pty_Ltd_MIN   0x815C
 Computer Protocol Pty Ltd ethernet protocol type.
#define ETH_P_Computer_Protocol_Pty_Ltd_MAX   0x815E
 Computer Protocol Pty Ltd ethernet protocol type.
#define ETH_P_Charles_River_Data_System_MIN   0x8164
 Charles River Data System ethernet protocol type.
#define ETH_P_Charles_River_Data_System_MAX   0x8166
 Charles River Data System ethernet protocol type.
#define ETH_P_XTP   0x817D
 XTP ethernet protocol type.
#define ETH_P_SGITime_Warner_prop   0x817E
 SGI/Time Warner prop.
#define ETH_P_HIPPI_FP_encapsulation   0x8180
 HIPPI-FP encapsulation ethernet protocol type.
#define ETH_P_STP_HIPPI_ST   0x8181
 STP, HIPPI-ST ethernet protocol type.
#define ETH_P_Reserved_for_HIPPI_6400   0x8182
 Reserved for HIPPI-6400 ethernet protocol type.
#define ETH_P_Reserved_for_HIPPI_64002   0x8183
 Reserved for HIPPI-6400 ethernet protocol type.
#define ETH_P_Silicon_Graphics_prop_MIN   0x8184
 Silicon Graphics prop.
#define ETH_P_Silicon_Graphics_prop_MAX   0x818C
 Silicon Graphics prop.
#define ETH_P_Motorola_Computer   0x818D
 Motorola Computer ethernet protocol type.
#define ETH_P_Qualcomm_MIN2   0x819A
 Qualcomm ethernet protocol type.
#define ETH_P_Qualcomm_MAX2   0x81A3
 Qualcomm ethernet protocol type.
#define ETH_P_ARAI_Bunkichi   0x81A4
 ARAI Bunkichi ethernet protocol type.
#define ETH_P_RAD_Network_Devices_MIN   0x81A5
 RAD Network Devices ethernet protocol type.
#define ETH_P_RAD_Network_Devices_MAX   0x81AE
 RAD Network Devices ethernet protocol type.
#define ETH_P_Xyplex_MIN2   0x81B7
 Xyplex ethernet protocol type.
#define ETH_P_Xyplex_MAX2   0x81B9
 Xyplex ethernet protocol type.
#define ETH_P_Apricot_Computers_MIN   0x81CC
 Apricot Computers ethernet protocol type.
#define ETH_P_Apricot_Computers_MAX   0x81D5
 Apricot Computers ethernet protocol type.
#define ETH_P_Artisoft_MIN   0x81D6
 Artisoft ethernet protocol type.
#define ETH_P_Artisoft_MAX   0x81DD
 Artisoft ethernet protocol type.
#define ETH_P_Polygon_MIN   0x81E6
 Polygon ethernet protocol type.
#define ETH_P_Polygon_MAX   0x81EF
 Polygon ethernet protocol type.
#define ETH_P_Comsat_Labs_MIN   0x81F0
 Comsat Labs ethernet protocol type.
#define ETH_P_Comsat_Labs_MAX   0x81F2
 Comsat Labs ethernet protocol type.
#define ETH_P_SAIC_MIN   0x81F3
 SAIC ethernet protocol type.
#define ETH_P_SAIC_MAX   0x81F5
 SAIC ethernet protocol type.
#define ETH_P_VG_Analytical_MIN   0x81F6
 VG Analytical ethernet protocol type.
#define ETH_P_VG_Analytical_MAX   0x81F8
 VG Analytical ethernet protocol type.
#define ETH_P_Quantum_Software_MIN   0x8203
 Quantum Software ethernet protocol type.
#define ETH_P_Quantum_Software_MAX   0x8205
 Quantum Software ethernet protocol type.
#define ETH_P_Ascom_Banking_Systems_MIN   0x8221
 Ascom Banking Systems ethernet protocol type.
#define ETH_P_Ascom_Banking_Systems_MAX   0x8222
 Ascom Banking Systems ethernet protocol type.
#define ETH_P_Advanced_Encryption_Syste_MIN   0x823E
 Advanced Encryption Syste ethernet protocol type.
#define ETH_P_Advanced_Encryption_Syste_MAX   0x8240
 Advanced Encryption Syste ethernet protocol type.
#define ETH_P_Athena_Programming_MIN   0x827F
 Athena Programming ethernet protocol type.
#define ETH_P_Athena_Programming_MAX   0x8282
 Athena Programming ethernet protocol type.
#define ETH_P_Charles_River_Data_System_MIN2   0x8263
 Charles River Data System ethernet protocol type.
#define ETH_P_Charles_River_Data_System_MAX2   0x826A
 Charles River Data System ethernet protocol type.
#define ETH_P_Inst_Ind_Info_Tech_MIN   0x829A
 Inst Ind Info Tech ethernet protocol type.
#define ETH_P_Inst_Ind_Info_Tech_MAX   0x829B
 Inst Ind Info Tech ethernet protocol type.
#define ETH_P_Taurus_Controls_MIN   0x829C
 Taurus Controls ethernet protocol type.
#define ETH_P_Taurus_Controls_MAX   0x82AB
 Taurus Controls ethernet protocol type.
#define ETH_P_Walker_Richer_Quinn_MIN   0x82AC
 Walker Richer &Quinn ethernet protocol type.
#define ETH_P_Walker_Richer_Quinn_MAX   0x8693
 Walker Richer &Quinn ethernet protocol type.
#define ETH_P_Idea_Courier_MIN   0x8694
 Idea Courier ethernet protocol type.
#define ETH_P_Idea_Courier_MAX   0x869D
 Idea Courier ethernet protocol type.
#define ETH_P_Computer_Network_Tech_MIN   0x869E
 Computer Network Tech ethernet protocol type.
#define ETH_P_Computer_Network_Tech_MAX   0x86A1
 Computer Network Tech ethernet protocol type.
#define ETH_P_Gateway_Communications_MIN   0x86A3
 Gateway Communications ethernet protocol type.
#define ETH_P_Gateway_Communications_MAX   0x86AC
 Gateway Communications ethernet protocol type.
#define ETH_P_SECTRA   0x86DB
 SECTRA ethernet protocol type.
#define ETH_P_Delta_Controls   0x86DE
 Delta Controls ethernet protocol type.
#define ETH_P_IPV6   0x86DD
 IPv6 ethernet protocol type.
#define ETH_P_ATOMIC   0x86DF
 ATOMIC ethernet protocol type.
#define ETH_P_Landis_Gyr_Powers_MIN   0x86E0
 Landis &Gyr Powers ethernet protocol type.
#define ETH_P_Landis_Gyr_Powers_MAX   0x86EF
 Landis &Gyr Powers ethernet protocol type.
#define ETH_P_Motorola_MIN   0x8700
 Motorola ethernet protocol type.
#define ETH_P_Motorola_MAX   0x8710
 Motorola ethernet protocol type.
#define ETH_P_TCPIP_Compression   0x876B
 TCP/IP Compression ethernet protocol type.
#define ETH_P_IP_Autonomous_Systems   0x876C
 IP Autonomous Systems ethernet protocol type.
#define ETH_P_Secure_Data   0x876D
 Secure Data ethernet protocol type.
#define ETH_P_PPP   0x880B
 PPP ethernet protocol type.
#define ETH_P_MPLS_UC   0x8847
 MPLS ethernet protocol type.
#define ETH_P_MPLS_MC   0x8848
 MPLS with upstream-assigned label ethernet protocol type.
#define ETH_P_Invisible_Software_MIN   0x8A96
 Invisible Software ethernet protocol type.
#define ETH_P_Invisible_Software_MAX   0x8A97
 Invisible Software ethernet protocol type.
#define ETH_P_PPP_DISC   0x8863
 PPPoE Discovery Stage ethernet protocol type.
#define ETH_P_PPP_SES   0x8864
 PPPoE Session Stage ethernet protocol type.
#define ETH_P_Loopback   0x9000
 Loopback ethernet protocol type.
#define ETH_P_Com_XNS_Sys_Mgmt   0x9001
 Com(Bridge) XNS Sys Mgmt ethernet protocol type.
#define ETH_P_Com_TCP_IP_Sys   0x9002
 Com(Bridge) TCP-IP Sys ethernet protocol type.
#define ETH_P_Com_loop_detect   0x9003
 Com(Bridge) loop detect ethernet protocol type.
#define ETH_P_BBN_VITAL_LanBridge_cache   0xFF00
 BBN VITAL-LanBridge cache ethernet protocol type.
#define ETH_P_ISC_Bunker_Ramo_MIN   0xFF00
 ISC Bunker Ramo ethernet protocol type.
#define ETH_P_ISC_Bunker_Ramo_MAX   0xFF0F
 ISC Bunker Ramo ethernet protocol type.

Define Documentation

#define ETH_8023_2_LSAP   (2 << ETH_MODE_SHIFT)

802.3 + 802.2 + LSAP mode flag.

Referenced by eth_device_message().

#define ETH_8023_2_SNAP   (3 << ETH_MODE_SHIFT)

802.3 + 802.2 + LSAP + SNAP mode flag.

Referenced by eth_device_message().

#define ETH_ADDR   6
#define ETH_DIX   (1 << ETH_MODE_SHIFT)

DIX Ethernet mode flag.

Referenced by eth_device_message().

#define ETH_DUMMY   (1 << ETH_DUMMY_SHIFT)

Dummy device flag.

Preamble and FCS are mandatory part of the packets.

Referenced by eth_device_message().

#define ETH_DUMMY_SHIFT   0

Dummy flag shift value.

#define ETH_LSAP_ARP   0x98

ARPANET Address Resolution Protocol (ARP) LSAP identifier.

Referenced by lsap_map(), and lsap_unmap().

#define ETH_LSAP_BRIDGE   0x42

IEEE 802.1 Bridge Spanning Tree Protocol LSAP identifier.

#define ETH_LSAP_EIS   0x4E

EIA RS-511 Manufacturing Message Service LSAP identifier.

#define ETH_LSAP_GLAN   0xF5

IBM LAN Management (group) LSAP identifier.

#define ETH_LSAP_GLSAP   0xFF

Global LSAP LSAP identifier.

Referenced by eth_process_packet().

#define ETH_LSAP_GSLMI   0x03

Group LLC Sublayer Management Function LSAP identifier.

#define ETH_LSAP_GSNA   0x05

IBM SNA Path Control (group) LSAP identifier.

#define ETH_LSAP_ILAN   0xF4

IBM LAN Management (individual) LSAP identifier.

#define ETH_LSAP_IP   0x06

ARPANET Internet Protocol (IP) LSAP identifier.

Referenced by lsap_map(), and lsap_unmap().

#define ETH_LSAP_ISLMF   0x02

Individual LLC Sublayer Management Function LSAP identifier.

#define ETH_LSAP_ISNA   0x04

IBM SNA Path Control (individual) LSAP identifier.

#define ETH_LSAP_ISO8208   0x7E

ISO 8208 (X.25 over IEEE 802.2 Type 2 LLC) LSAP identifier.

#define ETH_LSAP_ISONLP   0xFE

ISO Network Layer Protocol LSAP identifier.

#define ETH_LSAP_NESTAR   0x86

Nestar LSAP identifier.

#define ETH_LSAP_NETBIOS   0xF0

IBM NetBIOS LSAP identifier.

#define ETH_LSAP_NETWARE   0xE0

Novell NetWare LSAP identifier.

#define ETH_LSAP_NULL   0x00

Null LSAP LSAP identifier.

Referenced by lsap_map().

#define ETH_LSAP_PROWAY_ASLM   0x8E

PROWAY (IEC 955) Active Station List Maintenance LSAP identifier.

#define ETH_LSAP_PROWAY_NMI   0x0E

PROWAY (IEC955) Network Management &Initialization LSAP identifier.

#define ETH_LSAP_RPL   0xF8

IBM Remote Program Load (RPL) LSAP identifier.

#define ETH_LSAP_SNA   0x08

SNA LSAP identifier.

#define ETH_LSAP_SNA2   0x0C

SNA LSAP identifier.

#define ETH_LSAP_SNAP   0xAA

SubNetwork Access Protocol (SNAP) LSAP identifier.

Referenced by eth_prepare_packet(), and eth_process_packet().

#define ETH_LSAP_TI   0x18

Texas Instruments LSAP identifier.

#define ETH_LSAP_UB   0xFA

Ungermann-Bass LSAP identifier.

#define ETH_LSAP_VINES   0xBC

Banyan VINES LSAP identifier.

#define ETH_LSAP_XNS   0x80

Xerox Network Systems (XNS) LSAP identifier.

#define ETH_MAX_CONTENT   1500u

Maximum packet content length.

Referenced by eth_process_packet().

#define ETH_MAX_TAGGED_CONTENT ( flags   )     (ETH_MAX_CONTENT - ((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? sizeof(eth_header_lsap_t) : 0) - (IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))

Maximum tagged packet content length.

Referenced by eth_device_message().

#define ETH_MIN_CONTENT   46u

Minimum packet content length.

Referenced by eth_packet_space_message(), and eth_process_packet().

#define ETH_MIN_PROTO   0x0600

Ethernet minimal protocol number.

According to the IEEE 802.3 specification.

Referenced by eth_process_packet().

#define ETH_MIN_TAGGED_CONTENT ( flags   )     (ETH_MIN_CONTENT - ((IS_8023_2_LSAP(flags) || IS_8023_2_SNAP(flags)) ? sizeof(eth_header_lsap_t) : 0) - (IS_8023_2_SNAP(flags) ? sizeof(eth_header_snap_t) : 0))

Minimum tagged packet content length.

Referenced by eth_prepare_packet().

#define ETH_MODE_MASK   (3 << ETH_MODE_SHIFT)

Device mode flags.

See also:
ETH_DIX
ETH_8023_2_LSAP
ETH_8023_2_SNAP
#define ETH_MODE_SHIFT   1

Mode flag shift value.

#define ETH_P_8021Q   0x8100

IEEE 802.1Q VLAN-tagged frames (initially Wellfleet) ethernet protocol type.

#define ETH_P_AARP   0x80F3

AppleTalk AARP (Kinetics) ethernet protocol type.

#define ETH_P_Advanced_Encryption_Syste_MAX   0x8240

Advanced Encryption Syste ethernet protocol type.

#define ETH_P_Advanced_Encryption_Syste_MIN   0x823E

Advanced Encryption Syste ethernet protocol type.

#define ETH_P_Aeonic_Systems   0x8036

Aeonic Systems ethernet protocol type.

#define ETH_P_Allen_Bradley_MAX   0x80E3

Allen-Bradley ethernet protocol type.

#define ETH_P_Allen_Bradley_MIN   0x80E0

Allen-Bradley ethernet protocol type.

#define ETH_P_Alpha_Micro   0x814A

Alpha Micro ethernet protocol type.

#define ETH_P_Apollo_Computer   0x80F7

Apollo Computer ethernet protocol type.

#define ETH_P_Apollo_Domain   0x8019

Apollo Domain ethernet protocol type.

#define ETH_P_Applitek_Corporation   0x80C7

Applitek Corporation ethernet protocol type.

#define ETH_P_Apricot_Computers_MAX   0x81D5

Apricot Computers ethernet protocol type.

#define ETH_P_Apricot_Computers_MIN   0x81CC

Apricot Computers ethernet protocol type.

#define ETH_P_ARAI_Bunkichi   0x81A4

ARAI Bunkichi ethernet protocol type.

#define ETH_P_ARP   0x0806

ARP ethernet protocol type.

Referenced by lsap_map(), lsap_unmap(), protocol_map(), and protocol_unmap().

#define ETH_P_Artisoft_MAX   0x81DD

Artisoft ethernet protocol type.

#define ETH_P_Artisoft_MIN   0x81D6

Artisoft ethernet protocol type.

#define ETH_P_Ascom_Banking_Systems_MAX   0x8222

Ascom Banking Systems ethernet protocol type.

#define ETH_P_Ascom_Banking_Systems_MIN   0x8221

Ascom Banking Systems ethernet protocol type.

#define ETH_P_AT_T   0x8008

AT&T ethernet protocol type.

#define ETH_P_AT_T2   0x8046

AT&T ethernet protocol type.

#define ETH_P_AT_T3   0x8047

AT&T ethernet protocol type.

#define ETH_P_AT_T4   0x8069

AT&T ethernet protocol type.

#define ETH_P_ATALK   0x809B

Appletalk ethernet protocol type.

#define ETH_P_Athena_Programming_MAX   0x8282

Athena Programming ethernet protocol type.

#define ETH_P_Athena_Programming_MIN   0x827F

Athena Programming ethernet protocol type.

#define ETH_P_ATOMIC   0x86DF

ATOMIC ethernet protocol type.

#define ETH_P_Autophon   0x806A

Autophon ethernet protocol type.

#define ETH_P_Banyan_Systems   0x80C4

Banyan Systems ethernet protocol type.

#define ETH_P_Banyan_Systems2   0x80C5

Banyan Systems ethernet protocol type.

#define ETH_P_Banyan_VINES   0x0BAD

Banyan VINES ethernet protocol type.

#define ETH_P_BBN_Simnet   0x5208

BBN Simnet ethernet protocol type.

#define ETH_P_BBN_VITAL_LanBridge_cache   0xFF00

BBN VITAL-LanBridge cache ethernet protocol type.

#define ETH_P_Berkeley_Trailer_encapIP_MAX   0x100F

Berkeley Trailer encap/IP ethernet protocol type.

#define ETH_P_Berkeley_Trailer_encapIP_MIN   0x1001

Berkeley Trailer encap/IP ethernet protocol type.

#define ETH_P_Berkeley_Trailer_nego   0x1000

Berkeley Trailer nego ethernet protocol type.

#define ETH_P_BIIN   0x814D

BIIN ethernet protocol type.

#define ETH_P_BIIN2   0x814E

BIIN ethernet protocol type.

#define ETH_P_Bridge_Communications_MAX   0x8136

Bridge Communications ethernet protocol type.

#define ETH_P_Bridge_Communications_MIN   0x8132

Bridge Communications ethernet protocol type.

#define ETH_P_Cabletron   0x7034

Cabletron ethernet protocol type.

#define ETH_P_Chaosnet   0x0804

Chaosnet ethernet protocol type.

#define ETH_P_Charles_River_Data_System_MAX   0x8166

Charles River Data System ethernet protocol type.

#define ETH_P_Charles_River_Data_System_MAX2   0x826A

Charles River Data System ethernet protocol type.

#define ETH_P_Charles_River_Data_System_MIN   0x8164

Charles River Data System ethernet protocol type.

#define ETH_P_Charles_River_Data_System_MIN2   0x8263

Charles River Data System ethernet protocol type.

#define ETH_P_Com_Corporation_MAX   0x6014

Com Corporation ethernet protocol type.

#define ETH_P_Com_Corporation_MIN   0x6010

Com Corporation ethernet protocol type.

#define ETH_P_Com_loop_detect   0x9003

Com(Bridge) loop detect ethernet protocol type.

#define ETH_P_Com_TCP_IP_Sys   0x9002

Com(Bridge) TCP-IP Sys ethernet protocol type.

#define ETH_P_Com_XNS_Sys_Mgmt   0x9001

Com(Bridge) XNS Sys Mgmt ethernet protocol type.

#define ETH_P_ComDesign   0x806C

ComDesign ethernet protocol type.

#define ETH_P_Computer_Network_Tech_MAX   0x86A1

Computer Network Tech ethernet protocol type.

#define ETH_P_Computer_Network_Tech_MIN   0x869E

Computer Network Tech ethernet protocol type.

#define ETH_P_Computer_Protocol_Pty_Ltd_MAX   0x815E

Computer Protocol Pty Ltd ethernet protocol type.

#define ETH_P_Computer_Protocol_Pty_Ltd_MIN   0x815C

Computer Protocol Pty Ltd ethernet protocol type.

#define ETH_P_Computgraphic_Corp   0x806D

Computgraphic Corp.

ethernet protocol type.

#define ETH_P_Comsat_Labs_MAX   0x81F2

Comsat Labs ethernet protocol type.

#define ETH_P_Comsat_Labs_MIN   0x81F0

Comsat Labs ethernet protocol type.

#define ETH_P_Counterpoint_Computers   0x8062

Counterpoint Computers ethernet protocol type.

#define ETH_P_Counterpoint_Computers_MAX   0x8083

Counterpoint Computers ethernet protocol type.

#define ETH_P_Counterpoint_Computers_MIN   0x8081

Counterpoint Computers ethernet protocol type.

#define ETH_P_Cronus_Direct   0x8004

Cronus Direct ethernet protocol type.

#define ETH_P_Cronus_VLN   0x8003

Cronus VLN ethernet protocol type.

#define ETH_P_CUST   0x6006

DEC Customer Protocol ethernet protocol type.

#define ETH_P_Dansk_Data_Elektronik   0x807B

Dansk Data Elektronik ethernet protocol type.

#define ETH_P_Datability_MAX   0x809E

Datability ethernet protocol type.

#define ETH_P_Datability_MAX2   0x80F0

Datability ethernet protocol type.

#define ETH_P_Datability_MIN   0x809C

Datability ethernet protocol type.

#define ETH_P_Datability_MIN2   0x80E4

Datability ethernet protocol type.

#define ETH_P_DCA_Data_Exchange_Cluster_MAX   0x80C3

DCA Data Exchange Cluster ethernet protocol type.

#define ETH_P_DCA_Data_Exchange_Cluster_MIN   0x80C0

DCA Data Exchange Cluster ethernet protocol type.

#define ETH_P_DEC   0x6000

DEC Unassigned (Exp.

) ethernet protocol type.

#define ETH_P_DEC_Ethernet_Encryption   0x803D

DEC Ethernet Encryption ethernet protocol type.

#define ETH_P_DEC_LAN_Traffic_Monitor   0x803F

DEC LAN Traffic Monitor ethernet protocol type.

#define ETH_P_DEC_LANBridge   0x8038

DEC LANBridge ethernet protocol type.

#define ETH_P_DEC_Unassigned   0x803E

DEC Unassigned ethernet protocol type.

#define ETH_P_DEC_Unassigned_MAX   0x6009

DEC Unassigned ethernet protocol type.

#define ETH_P_DEC_Unassigned_MAX2   0x803C

DEC Unassigned ethernet protocol type.

#define ETH_P_DEC_Unassigned_MAX3   0x8042

DEC Unassigned ethernet protocol type.

#define ETH_P_DEC_Unassigned_MIN   0x6008

DEC Unassigned ethernet protocol type.

#define ETH_P_DEC_Unassigned_MIN1   0x8039

DEC Unassigned ethernet protocol type.

#define ETH_P_DEC_Unassigned_MIN3   0x8040

DEC Unassigned ethernet protocol type.

#define ETH_P_Delta_Controls   0x86DE

Delta Controls ethernet protocol type.

#define ETH_P_DIAG   0x6005

DEC Diagnostic Protocol ethernet protocol type.

#define ETH_P_DLOG   0x0660

DLOG ethernet protocol type.

#define ETH_P_DLOG2   0x0661

DLOG ethernet protocol type.

#define ETH_P_DNA_DL   0x6001

DEC MOP Dump/Load ethernet protocol type.

#define ETH_P_DNA_RC   0x6002

DEC MOP Remote Console ethernet protocol type.

#define ETH_P_DNA_RT   0x6003

DEC DECNET Phase IV Route ethernet protocol type.

#define ETH_P_ECMA   0x0803

ECMA Internet ethernet protocol type.

#define ETH_P_Evans_Sutherland   0x805D

Evans &Sutherland ethernet protocol type.

#define ETH_P_Excelan   0x8010

Excelan ethernet protocol type.

#define ETH_P_ExperData   0x8049

ExperData ethernet protocol type.

#define ETH_P_Frame_Relay_ARP   0x0808

Frame Relay ARP ethernet protocol type.

#define ETH_P_Gateway_Communications_MAX   0x86AC

Gateway Communications ethernet protocol type.

#define ETH_P_Gateway_Communications_MIN   0x86A3

Gateway Communications ethernet protocol type.

#define ETH_P_General_Dynamics   0x8068

General Dynamics ethernet protocol type.

#define ETH_P_Harris_Corporation_MAX   0x80CE

Harris Corporation ethernet protocol type.

#define ETH_P_Harris_Corporation_MIN   0x80CD

Harris Corporation ethernet protocol type.

#define ETH_P_Hayes_Microcomputers   0x8130

Hayes Microcomputers ethernet protocol type.

#define ETH_P_HIPPI_FP_encapsulation   0x8180

HIPPI-FP encapsulation ethernet protocol type.

#define ETH_P_HP_Probe   0x8005

HP Probe ethernet protocol type.

#define ETH_P_IBM_SNA_Service_on_Ether   0x80D5

IBM SNA Service on Ether ethernet protocol type.

#define ETH_P_Idea_Courier_MAX   0x869D

Idea Courier ethernet protocol type.

#define ETH_P_Idea_Courier_MIN   0x8694

Idea Courier ethernet protocol type.

#define ETH_P_IEEEPUP   0x0A00

Xerox IEEE802.3 PUP ethernet protocol type.

#define ETH_P_IEEEPUPAT   0x0A01

PUP Addr Trans ethernet protocol type.

#define ETH_P_Inst_Ind_Info_Tech_MAX   0x829B

Inst Ind Info Tech ethernet protocol type.

#define ETH_P_Inst_Ind_Info_Tech_MIN   0x829A

Inst Ind Info Tech ethernet protocol type.

#define ETH_P_Integrated_Solutions_TRFS_MAX   0x80DF

Integrated Solutions TRFS ethernet protocol type.

#define ETH_P_Integrated_Solutions_TRFS_MIN   0x80DE

Integrated Solutions TRFS ethernet protocol type.

#define ETH_P_Intergraph_Corporation_MAX   0x80CC

Intergraph Corporation ethernet protocol type.

#define ETH_P_Intergraph_Corporation_MIN   0x80C8

Intergraph Corporation ethernet protocol type.

#define ETH_P_Invisible_Software_MAX   0x8A97

Invisible Software ethernet protocol type.

#define ETH_P_Invisible_Software_MIN   0x8A96

Invisible Software ethernet protocol type.

#define ETH_P_IP   0x0800

Internet IP (IPv4) ethernet protocol type.

Referenced by lsap_map(), lsap_unmap(), protocol_map(), and protocol_unmap().

#define ETH_P_IP_Autonomous_Systems   0x876C

IP Autonomous Systems ethernet protocol type.

#define ETH_P_IPV6   0x86DD

IPv6 ethernet protocol type.

#define ETH_P_ISC_Bunker_Ramo_MAX   0xFF0F

ISC Bunker Ramo ethernet protocol type.

#define ETH_P_ISC_Bunker_Ramo_MIN   0xFF00

ISC Bunker Ramo ethernet protocol type.

#define ETH_P_Kinetics_MAX   0x80F5

Kinetics ethernet protocol type.

#define ETH_P_Kinetics_MIN   0x80F4

Kinetics ethernet protocol type.

#define ETH_P_KTI_MAX   0x813D

KTI ethernet protocol type.

#define ETH_P_KTI_MIN   0x8139

KTI ethernet protocol type.

#define ETH_P_Landis_Gyr_Powers_MAX   0x86EF

Landis &Gyr Powers ethernet protocol type.

#define ETH_P_Landis_Gyr_Powers_MIN   0x86E0

Landis &Gyr Powers ethernet protocol type.

#define ETH_P_Landmark_Graphics_Corp_MAX   0x8077

Landmark Graphics Corp.

ethernet protocol type.

#define ETH_P_Landmark_Graphics_Corp_MIN   0x806E

Landmark Graphics Corp.

ethernet protocol type.

#define ETH_P_LAT   0x6004

DEC LAT ethernet protocol type.

#define ETH_P_Little_Machines   0x8060

Little Machines ethernet protocol type.

#define ETH_P_Logicraft   0x8148

Logicraft ethernet protocol type.

#define ETH_P_LOOP   0x0060

Ethernet loopback packet protocol type.

#define ETH_P_Loopback   0x9000

Loopback ethernet protocol type.

#define ETH_P_LRT_MAX   0x7029

LRT ethernet protocol type.

#define ETH_P_LRT_MIN   0x7020

LRT ethernet protocol type.

#define ETH_P_Matra   0x807A

Matra ethernet protocol type.

#define ETH_P_Merit_Internodal   0x807C

Merit Internodal ethernet protocol type.

#define ETH_P_Motorola_Computer   0x818D

Motorola Computer ethernet protocol type.

#define ETH_P_Motorola_MAX   0x8710

Motorola ethernet protocol type.

#define ETH_P_Motorola_MIN   0x8700

Motorola ethernet protocol type.

#define ETH_P_MPLS_MC   0x8848

MPLS with upstream-assigned label ethernet protocol type.

#define ETH_P_MPLS_UC   0x8847

MPLS ethernet protocol type.

#define ETH_P_NBS   0x0802

NBS Internet ethernet protocol type.

#define ETH_P_Nestar   0x8006

Nestar ethernet protocol type.

#define ETH_P_Network_Computing_Devices   0x8149

Network Computing Devices ethernet protocol type.

#define ETH_P_Nixdorf   0x0400

Nixdorf ethernet protocol type.

#define ETH_P_Nixdorf_Computers   0x80A3

Nixdorf Computers ethernet protocol type.

#define ETH_P_Novell_Inc_MAX   0x8138

Novell, Inc.

ethernet protocol type.

#define ETH_P_Novell_Inc_MIN   0x8137

Novell, Inc.

ethernet protocol type.

#define ETH_P_Pacer_Software   0x80C6

Pacer Software ethernet protocol type.

#define ETH_P_PCS_Basic_Block_Protocol   0x4242

PCS Basic Block Protocol ethernet protocol type.

#define ETH_P_Planning_Research_Corp   0x8044

Planning Research Corp.

ethernet protocol type.

#define ETH_P_Polygon_MAX   0x81EF

Polygon ethernet protocol type.

#define ETH_P_Polygon_MIN   0x81E6

Polygon ethernet protocol type.

#define ETH_P_PPP   0x880B

PPP ethernet protocol type.

#define ETH_P_PPP_DISC   0x8863

PPPoE Discovery Stage ethernet protocol type.

#define ETH_P_PPP_SES   0x8864

PPPoE Session Stage ethernet protocol type.

#define ETH_P_Proteon   0x7030

Proteon ethernet protocol type.

#define ETH_P_PUP   0x0200

XEROX PUP (see 0A00) ethernet protocol type.

#define ETH_P_PUPAT   0x0201

PUP Addr Trans (see 0A01) ethernet protocol type.

#define ETH_P_Qualcomm_MAX   0x8153

Qualcomm ethernet protocol type.

#define ETH_P_Qualcomm_MAX2   0x81A3

Qualcomm ethernet protocol type.

#define ETH_P_Qualcomm_MIN   0x8151

Qualcomm ethernet protocol type.

#define ETH_P_Qualcomm_MIN2   0x819A

Qualcomm ethernet protocol type.

#define ETH_P_Quantum_Software_MAX   0x8205

Quantum Software ethernet protocol type.

#define ETH_P_Quantum_Software_MIN   0x8203

Quantum Software ethernet protocol type.

#define ETH_P_RAD_Network_Devices_MAX   0x81AE

RAD Network Devices ethernet protocol type.

#define ETH_P_RAD_Network_Devices_MIN   0x81A5

RAD Network Devices ethernet protocol type.

#define ETH_P_RARP   0x8035

Reverse ARP ethernet protocol type.

#define ETH_P_Rational_Corp   0x8150

Rational Corp ethernet protocol type.

#define ETH_P_Raw_Frame_Relay   0x6559

Raw Frame Relay ethernet protocol type.

#define ETH_P_Reserved_for_HIPPI_6400   0x8182

Reserved for HIPPI-6400 ethernet protocol type.

#define ETH_P_Reserved_for_HIPPI_64002   0x8183

Reserved for HIPPI-6400 ethernet protocol type.

#define ETH_P_Retix   0x80F2

Retix ethernet protocol type.

#define ETH_P_Rosemount_Corporation_MAX   0x80D4

Rosemount Corporation ethernet protocol type.

#define ETH_P_Rosemount_Corporation_MIN   0x80D3

Rosemount Corporation ethernet protocol type.

#define ETH_P_SAIC_MAX   0x81F5

SAIC ethernet protocol type.

#define ETH_P_SAIC_MIN   0x81F3

SAIC ethernet protocol type.

#define ETH_P_SCA   0x6007

DEC LAVC, SCA ethernet protocol type.

#define ETH_P_SECTRA   0x86DB

SECTRA ethernet protocol type.

#define ETH_P_Secure_Data   0x876D

Secure Data ethernet protocol type.

#define ETH_P_SGI_bounce_server   0x8016

SGI bounce server ethernet protocol type.

#define ETH_P_SGI_diagnostics   0x8013

SGI diagnostics ethernet protocol type.

#define ETH_P_SGI_network_games   0x8014

SGI network games ethernet protocol type.

#define ETH_P_SGI_reserved   0x8015

SGI reserved ethernet protocol type.

#define ETH_P_SGITime_Warner_prop   0x817E

SGI/Time Warner prop.

ethernet protocol type.

#define ETH_P_Siemens_Gammasonics_Inc_MAX   0x80B3

Siemens Gammasonics Inc.

ethernet protocol type.

#define ETH_P_Siemens_Gammasonics_Inc_MIN   0x80A4

Siemens Gammasonics Inc.

ethernet protocol type.

#define ETH_P_Silicon_Graphics_prop_MAX   0x818C

Silicon Graphics prop.

ethernet protocol type.

#define ETH_P_Silicon_Graphics_prop_MIN   0x8184

Silicon Graphics prop.

ethernet protocol type.

#define ETH_P_SNMP   0x814C

SNMP ethernet protocol type.

#define ETH_P_Spider_Systems_Ltd   0x809F

Spider Systems Ltd.

ethernet protocol type.

#define ETH_P_Stanford_V_Kernel_exp   0x805B

Stanford V Kernel exp.

ethernet protocol type.

#define ETH_P_Stanford_V_Kernel_prod   0x805C

Stanford V Kernel prod.

ethernet protocol type.

#define ETH_P_STP_HIPPI_ST   0x8181

STP, HIPPI-ST ethernet protocol type.

#define ETH_P_Symbolics_Private   0x081C

Symbolics Private ethernet protocol type.

#define ETH_P_Symbolics_Private_MAX   0x8109

Symbolics Private ethernet protocol type.

#define ETH_P_Symbolics_Private_MIN   0x8107

Symbolics Private ethernet protocol type.

#define ETH_P_Taurus_Controls_MAX   0x82AB

Taurus Controls ethernet protocol type.

#define ETH_P_Taurus_Controls_MIN   0x829C

Taurus Controls ethernet protocol type.

#define ETH_P_Taylor_Instrument_MAX   0x80D2

Taylor Instrument ethernet protocol type.

#define ETH_P_Taylor_Instrument_MIN   0x80CF

Taylor Instrument ethernet protocol type.

#define ETH_P_TCPIP_Compression   0x876B

TCP/IP Compression ethernet protocol type.

#define ETH_P_Technically_Elite_Concept   0x814F

Technically Elite Concept ethernet protocol type.

#define ETH_P_Tigan   0x802F

Tigan, Inc.

ethernet protocol type.

#define ETH_P_Trans_Ether_Bridging   0x6558

Trans Ether Bridging ethernet protocol type.

#define ETH_P_Tymshare   0x802E

Tymshare ethernet protocol type.

#define ETH_P_Ungermann_Bass_dialoop   0x7002

Ungermann-Bass dia/loop ethernet protocol type.

#define ETH_P_Ungermann_Bass_download   0x7000

Ungermann-Bass download ethernet protocol type.

#define ETH_P_Ungermann_Bass_net_debugr   0x0900

Ungermann-Bass net debugr ethernet protocol type.

#define ETH_P_Univ_of_Mass   0x8065

Univ.

of Mass. @ Amherst ethernet protocol type.

#define ETH_P_Univ_of_Mass2   0x8066

Univ.

of Mass. @ Amherst ethernet protocol type.

#define ETH_P_Valid_Systems   0x1600

Valid Systems ethernet protocol type.

#define ETH_P_Varian_Associates   0x80DD

Varian Associates ethernet protocol type.

#define ETH_P_Veeco_Integrated_Auto   0x8067

Veeco Integrated Auto.

ethernet protocol type.

#define ETH_P_VG_Analytical_MAX   0x81F8

VG Analytical ethernet protocol type.

#define ETH_P_VG_Analytical_MIN   0x81F6

VG Analytical ethernet protocol type.

#define ETH_P_VG_Laboratory_Systems   0x8131

VG Laboratory Systems ethernet protocol type.

#define ETH_P_VINES_Echo   0x0BAF

VINES Echo ethernet protocol type.

#define ETH_P_VINES_Loopback   0x0BAE

VINES Loopback ethernet protocol type.

#define ETH_P_Vitalink_Communications_MAX   0x807F

Vitalink Communications ethernet protocol type.

#define ETH_P_Vitalink_Communications_MIN   0x807D

Vitalink Communications ethernet protocol type.

#define ETH_P_Vitalink_TransLAN_III   0x8080

Vitalink TransLAN III ethernet protocol type.

#define ETH_P_Walker_Richer_Quinn_MAX   0x8693

Walker Richer &Quinn ethernet protocol type.

#define ETH_P_Walker_Richer_Quinn_MIN   0x82AC

Walker Richer &Quinn ethernet protocol type.

#define ETH_P_Wellfleet_Communications   0x80FF

Wellfleet Communications ethernet protocol type.

#define ETH_P_Wellfleet_Communications_MAX   0x8103

Wellfleet Communications ethernet protocol type.

#define ETH_P_Wellfleet_Communications_MIN   0x8101

Wellfleet Communications ethernet protocol type.

#define ETH_P_X25   0x0805

X.25 Level 3 ethernet protocol type.

#define ETH_P_X_75   0x0801

X.75 Internet ethernet protocol type.

#define ETH_P_XEROX_NS_IDP   0x0600

XEROX NS IDP ethernet protocol type.

#define ETH_P_XNS_Compatability   0x0807

XNS Compatability ethernet protocol type.

#define ETH_P_XTP   0x817D

XTP ethernet protocol type.

#define ETH_P_Xyplex_MAX   0x088A

Xyplex ethernet protocol type.

#define ETH_P_Xyplex_MAX2   0x81B9

Xyplex ethernet protocol type.

#define ETH_P_Xyplex_MIN   0x0888

Xyplex ethernet protocol type.

#define ETH_P_Xyplex_MIN2   0x81B7

Xyplex ethernet protocol type.

#define ETH_PREAMBLE   0x55

Ethernet header preamble value.

Referenced by eth_prepare_packet().

#define ETH_PREFIX   (sizeof(eth_header_t) + sizeof(eth_header_lsap_t) + sizeof(eth_header_snap_t))

Reserved packet prefix length.

Referenced by eth_packet_space_message().

#define ETH_SFD   0xD5

Ethernet header start of frame value.

Referenced by eth_prepare_packet().

#define ETH_SUFFIX   sizeof(eth_fcs_t)

Reserved packet suffix length.

Referenced by eth_packet_space_message(), and eth_process_packet().

#define IEEE_8023_2_UI   0x03

IEEE 802.2 unordered information control field.

Referenced by eth_prepare_packet().

#define IS_8023_2_LSAP ( flags   )     (((flags) &ETH_MODE_MASK) == ETH_8023_2_LSAP)

Returns whether the 802.3 + 802.2 + LSAP mode flag is set.

Parameters:
[in] flags The ethernet flags.
See also:
ETH_8023_2_LSAP

Referenced by eth_prepare_packet().

#define IS_8023_2_SNAP ( flags   )     (((flags) &ETH_MODE_MASK) == ETH_8023_2_SNAP)

Returns whether the 802.3 + 802.2 + LSAP + SNAP mode flag is set.

Parameters:
[in] flags The ethernet flags.
See also:
ETH_8023_2_SNAP

Referenced by eth_prepare_packet().

#define IS_DIX ( flags   )     (((flags) &ETH_MODE_MASK) == ETH_DIX)

Returns whether the DIX Ethernet mode flag is set.

Parameters:
[in] flags The ethernet flags.
See also:
ETH_DIX

Referenced by eth_prepare_packet().

#define IS_DUMMY ( flags   )     ((flags) &ETH_DUMMY)

Returns the dummy flag.

See also:
ETH_DUMMY

Referenced by eth_prepare_packet(), and eth_process_packet().

#define NAME   "Ethernet protocol"

The module name.


Typedef Documentation

Type definition of the ethernet address type pointer.

See also:
eth_addr_type

Type definition of the ethernet address type.

See also:
eth_addr_type

Type definition of the Ethernet device specific data pointer.

See also:
eth_device
typedef struct eth_device eth_device_t

Type definition of the Ethernet device specific data.

See also:
eth_device

Ethernet Frame Check Sequence pointer.

typedef uint32_t eth_fcs_t

Ethernet Frame Check Sequence.

typedef struct eth_globals eth_globals_t

Type definition of the Ethernet global data.

See also:
eth_globals

Type definition of the Ethernet header IEEE 802.3 + 802.2 extension pointer.

See also:
eth_header_lsap

Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.

See also:
eth_header_lsap

Type definition of the Ethernet header pointer.

See also:
eth_header

Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions pointer.

See also:
eth_header_snap

Type definition of the Ethernet header IEEE 802.3 + 802.2 + SNAP extensions.

See also:
eth_header_snap
typedef struct eth_header eth_header_t

Type definition of the Ethernet header.

See also:
eth_header

Type definition of the Ethernet header LSAP extension pointer.

See also:
eth_ieee_lsap

Type definition of the Ethernet header LSAP extension.

See also:
eth_ieee_lsap
typedef uint8_t eth_lsap_t

Ethernet LSAP type definition.

Type definition of the Ethernet header preamble pointer.

See also:
eth_preamble
typedef struct eth_preamble eth_preamble_t

Type definition of the Ethernet header preamble.

See also:
preamble

Type definition of the Ethernet protocol specific data pointer.

See also:
eth_proto
typedef struct eth_proto eth_proto_t

Type definition of the Ethernet protocol specific data.

See also:
eth_proto

Type definition of the Ethernet header SNAP extension pointer.

See also:
eth_snap
typedef struct eth_snap eth_snap_t

Type definition of the Ethernet header SNAP extension.

See also:
eth_snap
typedef uint16_t eth_type_t

Ethernet protocol type definition.


Enumeration Type Documentation

Ethernet address type.

Enumerator:
ETH_LOCAL_ADDR 

Local address.

ETH_BROADCAST_ADDR 

Broadcast address.


Function Documentation

int eth_addr_message ( device_id_t  device_id,
eth_addr_type_t  type,
measured_string_ref address 
)

Returns the device hardware address.

Parameters:
[in] device_id The device identifier.
[in] type Type of the desired address.
[out] address The device hardware address.
Returns:
EOK on success.
EBADMEM if the address parameter is NULL.
ENOENT if there no such device.

References eth_device::addr, eth_globals::broadcast_addr, eth_globals::devices, eth_globals::devices_lock, and ETH_BROADCAST_ADDR.

Referenced by nil_message().

Here is the caller graph for this function:

int eth_device_message ( device_id_t  device_id,
services_t  service,
size_t  mtu 
)

Registers new device or updates the MTU of an existing one.

Determines the device local hardware address.

Parameters:
[in] device_id The new device identifier.
[in] service The device driver service.
[in] mtu The device maximum transmission unit.
Returns:
EOK on success.
EEXIST if the device with the different service exists.
ENOMEM if there is not enough memory left.
Other error codes as defined for the net_get_device_conf_req() function.
Other error codes as defined for the netif_bind_service() function.
Other error codes as defined for the netif_get_addr_req() function.

References eth_device::addr, eth_device::addr_data, count, eth_device::device_id, eth_globals::devices, eth_globals::devices_lock, ERROR_CODE, ERROR_DECLARE, ERROR_OCCURRED, ETH_8023_2_LSAP, ETH_8023_2_SNAP, ETH_DIX, ETH_DUMMY, ETH_MAX_TAGGED_CONTENT, eth_receiver(), eth_device::flags, free, il_mtu_changed_msg(), eth_device::mtu, net_free_settings(), net_get_device_conf_req(), eth_globals::net_phone, netif_bind_service(), netif_get_addr_req(), eth_device::phone, eth_proto::phone, eth_globals::protos, eth_globals::protos_lock, eth_proto::service, and eth_device::service.

Referenced by nil_message().

Here is the call graph for this function:

Here is the caller graph for this function:

int eth_packet_space_message ( device_id_t  device_id,
size_t *  addr_len,
size_t *  prefix,
size_t *  content,
size_t *  suffix 
)

Returns the device packet dimensions for sending.

Parameters:
[in] device_id The device identifier.
[out] addr_len The minimum reserved address length.
[out] prefix The minimum reserved prefix size.
[out] content The maximum content size.
[out] suffix The minimum reserved suffix size.
Returns:
EOK on success.
EBADMEM if either one of the parameters is NULL.
ENOENT if there is no such device.

References eth_globals::devices, eth_globals::devices_lock, ETH_ADDR, ETH_MIN_CONTENT, ETH_PREFIX, ETH_SUFFIX, and eth_device::mtu.

Referenced by nil_message().

Here is the caller graph for this function:

int eth_prepare_packet ( int  flags,
packet_t  packet,
uint8_t *  src_addr,
int  ethertype,
size_t  mtu 
)

Prepares the packet for sending.

Parameters:
[in] flags The device flags.
[in] packet The packet.
[in] src_addr The source hardware address.
[in] ethertype The ethernet protocol type.
[in] mtu The device maximum transmission unit.
Returns:
EOK on success.
EINVAL if the packet addresses length is not long enough.
EINVAL if the packet is bigger than the device MTU.
ENOMEM if there is not enough memory in the packet.

References compute_crc32, eth_ieee_lsap::ctrl, eth_header::destination_address, eth_ieee_lsap::dsap, ETH_ADDR, ETH_LSAP_SNAP, ETH_MIN_TAGGED_CONTENT, ETH_PREAMBLE, ETH_SFD, eth_snap::ethertype, eth_header::ethertype, eth_header_snap::header, eth_header_lsap::header, htonl, htons, IEEE_8023_2_UI, IS_8023_2_LSAP, IS_8023_2_SNAP, IS_DIX, IS_DUMMY, eth_header_snap::lsap, eth_header_lsap::lsap, lsap_unmap(), ntohs, packet_get_addr(), packet_get_data_length(), PACKET_PREFIX, PACKET_SUFFIX, packet_suffix(), eth_preamble::preamble, eth_snap::protocol, eth_preamble::sfd, eth_header_snap::snap, eth_header::source_address, and eth_ieee_lsap::ssap.

Referenced by eth_send_message().

Here is the call graph for this function:

Here is the caller graph for this function:

eth_proto_ref eth_process_packet ( int  flags,
packet_t  packet 
)

Processes the received packet and chooses the target registered module.

Parameters:
[in] flags The device flags.
[in] packet The packet.
Returns:
The target registered module.
NULL if the packet is not long enough.
NULL if the packet is too long.
NULL if the raw ethernet protocol is used.
NULL if the dummy device FCS checksum is invalid.
NULL if the packet address length is not big enough.

References compute_crc32, eth_header::destination_address, eth_ieee_lsap::dsap, ERROR_DECLARE, ERROR_OCCURRED, ETH_ADDR, ETH_LSAP_GLSAP, ETH_LSAP_SNAP, ETH_MAX_CONTENT, ETH_MIN_CONTENT, ETH_MIN_PROTO, ETH_SUFFIX, eth_snap::ethertype, eth_header::ethertype, eth_header_snap::header, IS_DUMMY, eth_header_snap::lsap, lsap_map(), ntohl, ntohs, packet_get_data(), packet_get_data_length(), packet_set_addr(), packet_trim(), eth_globals::protos, eth_header_snap::snap, eth_header::source_address, and eth_ieee_lsap::ssap.

Referenced by nil_received_msg().

Here is the call graph for this function:

Here is the caller graph for this function:

void eth_receiver ( ipc_callid_t  iid,
ipc_call_t *  icall 
)

Processes IPC messages from the registered device driver modules in an infinite loop.

Parameters:
[in] iid The message identifier.
[in,out] icall The message parameters.

References ERROR_CODE, ERROR_DECLARE, ERROR_OCCURRED, IPC_GET_DEVICE, IPC_GET_PACKET, IPC_GET_STATE, NET_NIL_DEVICE_STATE, NET_NIL_RECEIVED, eth_globals::net_phone, nil_device_state_msg(), nil_received_msg(), and packet_translate().

Referenced by eth_device_message().

Here is the call graph for this function:

Here is the caller graph for this function:

int eth_register_message ( services_t  service,
int  phone 
)

Registers receiving module service.

Passes received packets for this service.

Parameters:
[in] service The module service.
[in] phone The service phone.
Returns:
EOK on success.
ENOENT if the service is not known.
ENOMEM if there is not enough memory left.

References free, eth_proto::phone, eth_proto::protocol, protocol_map(), eth_globals::protos, eth_globals::protos_lock, and eth_proto::service.

Referenced by nil_message().

Here is the call graph for this function:

Here is the caller graph for this function:

int eth_send_message ( device_id_t  device_id,
packet_t  packet,
services_t  sender 
)

Sends the packet queue.

Sends only packet successfully processed by the eth_prepare_packet() function.

Parameters:
[in] device_id The device identifier.
[in] packet The packet queue.
[in] sender The sending module service.
Returns:
EOK on success.
ENOENT if there no such device.
EINVAL if the service parameter is not known.

References eth_device::addr, eth_globals::devices, eth_globals::devices_lock, ERROR_DECLARE, ERROR_OCCURRED, eth_prepare_packet(), eth_device::flags, htons, eth_device::mtu, eth_globals::net_phone, netif_send_msg(), packet_get_id(), eth_device::phone, pq_detach(), pq_next(), pq_release(), protocol_map(), and measured_string::value.

Referenced by nil_message().

Here is the call graph for this function:

Here is the caller graph for this function:

int module_message ( ipc_callid_t  callid,
ipc_call_t *  call,
ipc_call_t *  answer,
int *  answer_count 
)

Passes the parameters to the module specific nil_message() function.

Parameters:
[in] callid The message identifier.
[in] call The message parameters.
[out] answer The message answer parameters.
[out] answer_count The last parameter for the actual answer in the answer parameter.
Returns:
EOK on success.
ENOTSUP if the message is not known.
Other error codes as defined for each specific module message function.

References nil_message().

Here is the call graph for this function:

void module_print_name ( void   ) 

Prints the module name.

References NAME.

int module_start ( async_client_conn_t  client_connection  ) 

Starts the Ethernet module.

Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.

Parameters:
[in] client_connection The client connection processing function. The module skeleton propagates its own one.
Returns:
EOK on success.
Other error codes as defined for the pm_init() function.
Other error codes as defined for the nil_initialize() function.
Other error codes as defined for the REGISTER_ME() macro function.

References ERROR_CODE, ERROR_DECLARE, ERROR_OCCURRED, ERROR_PROPAGATE, net_connect_module(), nil_initialize(), pm_destroy(), pm_init(), and REGISTER_ME.

Here is the call graph for this function:

int nil_device_state_msg ( int  nil_phone,
device_id_t  device_id,
int  state 
)

References il_device_state_msg(), eth_proto::phone, eth_globals::protos, eth_globals::protos_lock, and eth_proto::service.

Here is the call graph for this function:

int nil_initialize ( int  net_phone  ) 

Module initialization.

Is called by the module_start() function.

Parameters:
[in] net_phone The networking moduel phone.
Returns:
EOK on success.
Other error codes as defined for each specific module initialize function.

Referenced by module_start().

Here is the caller graph for this function:

int nil_message ( ipc_callid_t  callid,
ipc_call_t *  call,
ipc_call_t *  answer,
int *  answer_count 
)

Message processing function.

Parameters:
[in] callid The message identifier.
[in] call The message parameters.
[out] answer The message answer parameters.
[out] answer_count The last parameter for the actual answer in the answer parameter.
Returns:
EOK on success.
ENOTSUP if the message is not known.
Other error codes as defined for each specific module message function.
See also:
nil_interface.h
IS_NET_NIL_MESSAGE()

Referenced by module_message().

Here is the caller graph for this function:

int nil_received_msg ( int  nil_phone,
device_id_t  device_id,
packet_t  packet,
services_t  target 
)

Variable Documentation

Ethernet module global data.


Generated on Thu Mar 11 20:46:40 2010 for Networking and TCP/IP stack for HelenOS system by  doxygen 1.6.1