XINU
Data Structures | Macros | Typedefs | Variables
ether.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ethcblk
 
struct  etherPkt
 

Macros

#define ETH_ADDR_LEN   6 /* Length of Ethernet (MAC) address */
 
#define ETH_BUF_SIZE   1518 /* 1500 MTU + 14 ETH Header + 4 bytes optional VLAN Tagging */
 
#define ETH_CRC_LEN   4 /* Length of CRC on Ethernet */
 
#define ETH_CTRL_GET_MAC   1 /* Get the MAC for this device */
 
#define ETH_HDR_LEN   14 /* Length of Ethernet packet */
 
#define ETH_MAX_PKT_LEN   ( ETH_HDR_LEN + ETH_VLAN_LEN + ETH_MTU )
 
#define ETH_MTU   1500 /* Maximum transmission unit */
 
#define ETH_NUM_MCAST   32 /* Max number of multicast addresses*/
 
#define ETH_PHY_1000M   0x0040
 
#define ETH_PHY_100M   0x2000
 
#define ETH_PHY_10M   0x0000
 
#define ETH_PHY_CTLREG   0
 
#define ETH_PHY_CTLREG_FD   0x0100
 
#define ETH_PHY_CTLREG_RESET   0x8000
 
#define ETH_PHY_CTLREG_SM   0x2040 /* Speed Mask */
 
#define ETH_PHY_STATREG   1
 
#define ETH_PHY_STATREG_LINK   0x0004
 
#define ETH_STATE_DOWN   1 /* interface is currently */
 
#define ETH_STATE_FREE   0 /* control block is unused */
 
#define ETH_STATE_UP   2 /* interface is currently active*/
 
#define ETH_TYPE_3C905C   1
 
#define ETH_TYPE_E1000E   2
 
#define ETH_VLAN_LEN   4 /* Length of Ethernet vlan tag */
 

Typedefs

typedef unsigned char Eaddr[ETH_ADDR_LEN]
 

Variables

struct ethcblk ethertab []
 

Macro Definition Documentation

◆ ETH_ADDR_LEN

#define ETH_ADDR_LEN   6 /* Length of Ethernet (MAC) address */

◆ ETH_BUF_SIZE

#define ETH_BUF_SIZE   1518 /* 1500 MTU + 14 ETH Header + 4 bytes optional VLAN Tagging */

Definition at line 34 of file ether.h.

Referenced by ethinit(), and ethread().

◆ ETH_CRC_LEN

#define ETH_CRC_LEN   4 /* Length of CRC on Ethernet */

Definition at line 29 of file ether.h.

◆ ETH_CTRL_GET_MAC

#define ETH_CTRL_GET_MAC   1 /* Get the MAC for this device */

Definition at line 45 of file ether.h.

Referenced by ethcontrol(), and net_init().

◆ ETH_HDR_LEN

#define ETH_HDR_LEN   14 /* Length of Ethernet packet */

Definition at line 22 of file ether.h.

Referenced by ip_out(), pdump(), pdumph(), udp_send(), and udp_sendto().

◆ ETH_MAX_PKT_LEN

#define ETH_MAX_PKT_LEN   ( ETH_HDR_LEN + ETH_VLAN_LEN + ETH_MTU )

Definition at line 32 of file ether.h.

◆ ETH_MTU

#define ETH_MTU   1500 /* Maximum transmission unit */

Definition at line 27 of file ether.h.

◆ ETH_NUM_MCAST

#define ETH_NUM_MCAST   32 /* Max number of multicast addresses*/

Definition at line 49 of file ether.h.

◆ ETH_PHY_1000M

#define ETH_PHY_1000M   0x0040

Definition at line 63 of file ether.h.

Referenced by ethinit().

◆ ETH_PHY_100M

#define ETH_PHY_100M   0x2000

Definition at line 62 of file ether.h.

Referenced by ethinit().

◆ ETH_PHY_10M

#define ETH_PHY_10M   0x0000

Definition at line 61 of file ether.h.

Referenced by ethinit().

◆ ETH_PHY_CTLREG

#define ETH_PHY_CTLREG   0

Definition at line 56 of file ether.h.

Referenced by eth_phy_reset(), and ethinit().

◆ ETH_PHY_CTLREG_FD

#define ETH_PHY_CTLREG_FD   0x0100

Definition at line 64 of file ether.h.

Referenced by ethinit().

◆ ETH_PHY_CTLREG_RESET

#define ETH_PHY_CTLREG_RESET   0x8000

Definition at line 59 of file ether.h.

Referenced by eth_phy_reset().

◆ ETH_PHY_CTLREG_SM

#define ETH_PHY_CTLREG_SM   0x2040 /* Speed Mask */

Definition at line 60 of file ether.h.

Referenced by ethinit().

◆ ETH_PHY_STATREG

#define ETH_PHY_STATREG   1

Definition at line 57 of file ether.h.

Referenced by eth_phy_reset().

◆ ETH_PHY_STATREG_LINK

#define ETH_PHY_STATREG_LINK   0x0004

Definition at line 66 of file ether.h.

Referenced by eth_phy_reset().

◆ ETH_STATE_DOWN

#define ETH_STATE_DOWN   1 /* interface is currently */

Definition at line 39 of file ether.h.

◆ ETH_STATE_FREE

#define ETH_STATE_FREE   0 /* control block is unused */

Definition at line 38 of file ether.h.

◆ ETH_STATE_UP

#define ETH_STATE_UP   2 /* interface is currently active*/

Definition at line 41 of file ether.h.

◆ ETH_TYPE_3C905C

#define ETH_TYPE_3C905C   1

Definition at line 53 of file ether.h.

◆ ETH_TYPE_E1000E

#define ETH_TYPE_E1000E   2

Definition at line 54 of file ether.h.

◆ ETH_VLAN_LEN

#define ETH_VLAN_LEN   4 /* Length of Ethernet vlan tag */

Definition at line 28 of file ether.h.

Typedef Documentation

◆ Eaddr

typedef unsigned char Eaddr[ETH_ADDR_LEN]

Definition at line 11 of file ether.h.

Variable Documentation

◆ ethertab

struct ethcblk ethertab[]

Definition at line 7 of file ethinit.c.

Referenced by ethcontrol(), ethhandler(), ethinit(), ethread(), and ethwrite().