Classes | Macros | Functions | Variables
win32/nicdrv.h File Reference

Headerfile for nicdrv.c. More...

#include <pcap.h>
#include <Packet32.h>
Include dependency graph for win32/nicdrv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ec_stackT
 
struct  ecx_portt
 
struct  ecx_redportt
 

Macros

#define HAVE_REMOTE
 

Functions

void ec_setupheader (void *p)
 
int ecx_closenic (ecx_portt *port)
 
int ecx_getindex (ecx_portt *port)
 
int ecx_outframe (ecx_portt *port, int idx, int sock)
 
int ecx_outframe_red (ecx_portt *port, int idx)
 
void ecx_setbufstat (ecx_portt *port, int idx, int bufstat)
 
int ecx_setupnic (ecx_portt *port, const char *ifname, int secondary)
 
int ecx_srconfirm (ecx_portt *port, int idx, int timeout)
 
int ecx_waitinframe (ecx_portt *port, int idx, int timeout)
 

Variables

const uint16 priMAC [3]
 
const uint16 secMAC [3]
 

Detailed Description

Headerfile for nicdrv.c.

Definition in file win32/nicdrv.h.

Macro Definition Documentation

#define HAVE_REMOTE

Definition at line 54 of file win32/nicdrv.h.

Function Documentation

void ec_setupheader ( void *  p)

Fill buffer with ethernet header structure. Destination MAC is allways broadcast. Ethertype is allways ETH_P_ECAT.

Parameters
[out]p= buffer

Definition at line 222 of file linux/nicdrv.c.

int ecx_closenic ( ecx_portt port)

Close sockets used

Parameters
[in]port= port context struct
Returns
0

Definition at line 207 of file linux/nicdrv.c.

int ecx_getindex ( ecx_portt port)

Get new frame identifier index and allocate corresponding rx buffer.

Parameters
[in]port= port context struct
Returns
new index.

Definition at line 239 of file linux/nicdrv.c.

int ecx_outframe ( ecx_portt port,
int  idx,
int  stacknumber 
)

Transmit buffer over socket (non blocking).

Parameters
[in]port= port context struct
[in]idx= index in tx buffer array
[in]stacknumber= 0=Primary 1=Secondary stack
Returns
socket send result

Definition at line 291 of file linux/nicdrv.c.

int ecx_outframe_red ( ecx_portt port,
int  idx 
)

Transmit buffer over socket (non blocking).

Parameters
[in]port= port context struct
[in]idx= index in tx buffer array
Returns
socket send result

Definition at line 316 of file linux/nicdrv.c.

void ecx_setbufstat ( ecx_portt port,
int  idx,
int  bufstat 
)

Set rx buffer status.

Parameters
[in]port= port context struct
[in]idx= index in buffer array
[in]bufstat= status to set

Definition at line 278 of file linux/nicdrv.c.

int ecx_setupnic ( ecx_portt port,
const char *  ifname,
int  secondary 
)

Basic setup to connect NIC to socket.

Parameters
[in]port= port context struct
[in]ifname= Name of NIC device, f.e. "eth0"
[in]secondary= if >0 then use secondary stack instead of primary
Returns
>0 if succeeded

Definition at line 116 of file linux/nicdrv.c.

int ecx_srconfirm ( ecx_portt port,
int  idx,
int  timeout 
)

Blocking send and recieve frame function. Used for non processdata frames. A datagram is build into a frame and transmitted via this function. It waits for an answer and returns the workcounter. The function retries if time is left and the result is WKC=0 or no frame received.

The function calls ec_outframe_red() and ec_waitinframe_red().

Parameters
[in]port= port context struct
[in]idx= index of frame
[in]timeout= timeout in us
Returns
Workcounter or EC_NOFRAME

Definition at line 592 of file linux/nicdrv.c.

int ecx_waitinframe ( ecx_portt port,
int  idx,
int  timeout 
)

Blocking receive frame function. Calls ec_waitinframe_red().

Parameters
[in]port= port context struct
[in]idx= requested index of frame
[in]timeout= timeout in us
Returns
Workcounter if a frame is found with corresponding index, otherwise EC_NOFRAME.

Definition at line 564 of file linux/nicdrv.c.

Variable Documentation

const uint16 priMAC[3]

Primary source MAC address used for EtherCAT. This address is not the MAC address used from the NIC. EtherCAT does not care about MAC addressing, but it is used here to differentiate the route the packet traverses through the EtherCAT segment. This is needed to find out the packet flow in redundant configurations.

Primary source MAC address used for EtherCAT. This address is not the MAC address used from the NIC. EtherCAT does not care about MAC addressing, but it is used here to differentiate the route the packet traverses through the EtherCAT segment. This is needed to fund out the packet flow in redundant confihurations.

Definition at line 101 of file linux/nicdrv.c.

const uint16 secMAC[3]

Secondary source MAC address used for EtherCAT.

Definition at line 103 of file linux/nicdrv.c.



youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:26