ethernet.c File Reference


Detailed Description

Ethernet-over-EtherCAT (EoE).

Definition in file ethernet.c.

Go to the source code of this file.

Defines

#define EOE_DEBUG_LEVEL   0
 Defines the debug level of EoE processing.

Functions

void ec_eoe_flush (ec_eoe_t *eoe)
 Empties the transmit queue.
void ec_eoe_state_rx_start (ec_eoe_t *eoe)
 State: RX_START.
void ec_eoe_state_rx_check (ec_eoe_t *eoe)
 State: RX_CHECK.
void ec_eoe_state_rx_fetch (ec_eoe_t *eoe)
 State: RX_FETCH.
void ec_eoe_state_tx_start (ec_eoe_t *eoe)
 State: TX START.
void ec_eoe_state_tx_sent (ec_eoe_t *eoe)
 State: TX SENT.
int ec_eoedev_open (struct net_device *dev)
 Opens the virtual network device.
int ec_eoedev_stop (struct net_device *dev)
 Stops the virtual network device.
int ec_eoedev_tx (struct sk_buff *skb,struct net_device *dev)
 Transmits data via the virtual network device.
net_device_stats * ec_eoedev_stats (struct net_device *dev)
 Gets statistics about the virtual network device.
int ec_eoe_init (ec_eoe_t *eoe)
 EoE constructor.
void ec_eoe_clear (ec_eoe_t *eoe)
 EoE destructor.
int ec_eoe_send (ec_eoe_t *eoe)
 Sends a frame or the next fragment.
void ec_eoe_run (ec_eoe_t *eoe)
 Runs the EoE state machine.
unsigned int ec_eoe_active (const ec_eoe_t *eoe)
 Returns the state of the device.
void ec_eoe_print (const ec_eoe_t *eoe)
 Prints EoE handler information.


Define Documentation

#define EOE_DEBUG_LEVEL   0
 

Defines the debug level of EoE processing.

0 = No debug messages. 1 = Output actions. 2 = Output actions and frame data.

Definition at line 59 of file ethernet.c.


Function Documentation

void ec_eoe_flush ec_eoe_t  ) 
 

Empties the transmit queue.

Parameters:
eoe  EoE handler

Definition at line 182 of file ethernet.c.

void ec_eoe_state_rx_start ec_eoe_t eoe  ) 
 

State: RX_START.

Starts a new receiving sequence by queueing a datagram that checks the slave's mailbox for a new EoE datagram.

Parameters:
eoe  EoE handler

Definition at line 321 of file ethernet.c.

void ec_eoe_state_rx_check ec_eoe_t eoe  ) 
 

State: RX_CHECK.

Processes the checking datagram sent in RX_START and issues a receive datagram, if new data is available.

Parameters:
eoe  EoE handler

Definition at line 339 of file ethernet.c.

void ec_eoe_state_rx_fetch ec_eoe_t eoe  ) 
 

State: RX_FETCH.

Checks if the requested data of RX_CHECK was received and processes the EoE datagram.

Parameters:
eoe  EoE handler

Definition at line 365 of file ethernet.c.

void ec_eoe_state_tx_start ec_eoe_t eoe  ) 
 

State: TX START.

Starts a new transmit sequence. If no data is available, a new receive sequence is started instead.

Parameters:
eoe  EoE handler

Definition at line 508 of file ethernet.c.

void ec_eoe_state_tx_sent ec_eoe_t eoe  ) 
 

State: TX SENT.

Checks is the previous transmit datagram succeded and sends the next fragment, if necessary.

Parameters:
eoe  EoE handler

Definition at line 571 of file ethernet.c.

int ec_eoedev_open struct net_device *   ) 
 

Opens the virtual network device.

Parameters:
dev  EoE net_device

Definition at line 613 of file ethernet.c.

int ec_eoedev_stop struct net_device *   ) 
 

Stops the virtual network device.

Parameters:
dev  EoE net_device

Definition at line 636 of file ethernet.c.

int ec_eoedev_tx struct sk_buff *  ,
struct net_device * 
 

Transmits data via the virtual network device.

Parameters:
skb  transmit socket buffer
dev  EoE net_device

Definition at line 659 of file ethernet.c.

struct net_device_stats * ec_eoedev_stats struct net_device *   ) 
 

Gets statistics about the virtual network device.

Parameters:
dev  EoE net_device

Definition at line 709 of file ethernet.c.

int ec_eoe_init ec_eoe_t eoe  ) 
 

EoE constructor.

Initializes the EoE handler, creates a net_device and registeres it.

Parameters:
eoe  EoE handler

Definition at line 85 of file ethernet.c.

void ec_eoe_clear ec_eoe_t eoe  ) 
 

EoE destructor.

Unregisteres the net_device and frees allocated memory.

Parameters:
eoe  EoE handler

Definition at line 156 of file ethernet.c.

int ec_eoe_send ec_eoe_t eoe  ) 
 

Sends a frame or the next fragment.

Parameters:
eoe  EoE handler

Definition at line 204 of file ethernet.c.

void ec_eoe_run ec_eoe_t eoe  ) 
 

Runs the EoE state machine.

Parameters:
eoe  EoE handler

Definition at line 275 of file ethernet.c.

unsigned int ec_eoe_active const ec_eoe_t eoe  ) 
 

Returns the state of the device.

Returns:
1 if the device is "up", 0 if it is "down"
Parameters:
eoe  EoE handler

Definition at line 290 of file ethernet.c.

void ec_eoe_print const ec_eoe_t eoe  ) 
 

Prints EoE handler information.

Parameters:
eoe  EoE handler

Definition at line 301 of file ethernet.c.


Generated on Wed Aug 2 18:41:43 2006 for IgH EtherCAT master by  doxygen 1.4.6