37 #ifndef __EC_ETHERNET_H__ 38 #define __EC_ETHERNET_H__ 40 #include <linux/list.h> 41 #include <linux/netdevice.h> 43 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) 44 #include <linux/semaphore.h> 46 #include <asm/semaphore.h> 61 struct list_head queue;
83 struct net_device *
dev;
uint32_t tx_counter
octets transmitted during last second
void ec_eoe_clear(ec_eoe_t *)
EoE destructor.
struct sk_buff * skb
socket buffer
struct list_head tx_queue
queue for frames to send
uint8_t tx_fragment_number
number of the fragment
ec_slave_t * slave
pointer to the corresponding slave
unsigned int tx_queue_size
Transmit queue size.
size_t rx_skb_size
size of the allocated socket buffer memory
size_t tx_offset
number of octets sent
EtherCAT slave structure.
unsigned int tx_queue_active
kernel netif queue started
uint32_t tx_rate
transmit rate (bps)
Global definitions and macros.
uint8_t rx_expected_fragment
next expected fragment number
void ec_eoe_run(ec_eoe_t *)
Runs the EoE state machine.
int ec_eoe_is_open(const ec_eoe_t *)
Returns the state of the device.
unsigned long rate_jiffies
time of last rate output
void ec_eoe_queue(ec_eoe_t *)
Queues the datagram, if necessary.
EtherCAT datagram structure.
unsigned int opened
net_device is opened
struct list_head list
list item
int ec_eoe_is_idle(const ec_eoe_t *)
Returns the idle state.
int ec_eoe_init(ec_eoe_t *, ec_slave_t *)
EoE constructor.
off_t rx_skb_offset
current write pointer in the socket buffer
ec_datagram_t datagram
datagram
struct net_device_stats stats
device statistics
unsigned int tx_idle
Idle flag.
uint32_t rx_rate
receive rate (bps)
struct sk_buff * rx_skb
current rx socket buffer
void(* state)(ec_eoe_t *)
state function for the state machine
uint8_t tx_frame_number
number of the transmitted frame
uint32_t rx_counter
octets received during last second
struct semaphore tx_queue_sem
Semaphore for the send queue.
ec_eoe_frame_t * tx_frame
current TX frame
Ethernet over EtherCAT (EoE) handler.
unsigned int rx_idle
Idle flag.
struct net_device * dev
net_device for virtual ethernet device
unsigned int queue_datagram
the datagram is ready for queuing
unsigned int tx_queued_frames
number of frames in the queue