35 #include <sys/types.h>    46 #include "intel_i210.h"    47 #include "ee_x86_64_tsc.h"    70 #define RX_PRIM priMAC[1]    72 #define RX_SEC secMAC[1]    93         struct eth_device *dev;
    94         OSEE_PRINT(
"ecx_setupnic() searching %s...\n", ifname);
    97                 dev = eth_get_device(d);
   102                 if (!strncmp(dev->name, ifname, MAX_DEVICE_NAME)){
   106                         eth_setup_device(d, 1, 100);
   133         return (dev != NULL);
   221                 stack = &(port->
stack);
   227         eth_send_packet(port->
dev_id, (*stack->
txbuf)[idx], lp, 1);
   254                 datagramP->index = idx;
   277                 stack = &(port->
stack);
   281         bytesrx = eth_receive_packet(port->
dev_id, (*stack->
tempbuf), lp, 1, 0);
   284         return (bytesrx > 0);
   314                 stack = &(port->
stack);
   318         rxbuf = &(*stack->
rxbuf)[idx];
   321                 l = (*rxbuf)[0] + ((
uint16)((*rxbuf)[1] & 0x0f) << 8);
   323                 rval = ((*rxbuf)[l] + ((
uint16)(*rxbuf)[l + 1] << 8));
   338                                         l = 
etohs(ecp->elength) & 0x0fff;
   345                                                 rval = ((*rxbuf)[l] + ((
uint16)((*rxbuf)[l + 1]) << 8));
   352                                                 rxbuf = &(*stack->
rxbuf)[idxf];
   360                                                 OSEE_PRINT(
"ecx_inframe(): WARNING: strange things happened\n");
   364                                         OSEE_PRINT(
"ecx_inframe(): WARNING it is NOT an EtherCAT frame!\n");
   432                 if ( ((primrx == 0) && (secrx == 
RX_SEC)) ||
   547 int ec_inframe(
int idx, 
int stacknumber)
 
void ee_port_unlock(void)
int ec_outframe(int idx, int sock)
boolean osal_timer_is_expired(osal_timert *self)
int txbuflength[EC_MAXBUF]
int ec_setupnic(const char *ifname, int secondary)
int(* txbuflength)[EC_MAXBUF]
PACKED_BEGIN struct PACKED ec_etherheadert
static int ecx_recvpkt(ecx_portt *port, int stacknumber)
uint16 oshw_ntohs(uint16 network)
int ecx_closenic(ecx_portt *port)
static void ecx_clear_rxbufstat(int *rxbufstat)
uint16 oshw_htons(uint16 host)
static int ecx_waitinframe_red(ecx_portt *port, int idx, osal_timert *timer)
int ecx_getindex(ecx_portt *port)
int ecx_outframe(ecx_portt *port, int idx, int stacknumber)
ec_bufT(* rxbuf)[EC_MAXBUF]
int ec_srconfirm(int idx, int timeout)
ec_bufT(* txbuf)[EC_MAXBUF]
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
void ec_setbufstat(int idx, int bufstat)
PACKED_BEGIN struct PACKED ec_comt
Headerfile for ethercatbase.c. 
int ecx_outframe_red(ecx_portt *port, int idx)
int ec_outframe_red(int idx)
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
uint8 ec_bufT[EC_BUFSIZE]
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
int ec_waitinframe(int idx, int timeout)
void osal_timer_start(osal_timert *self, uint32 timeout_usec)
int(* rxbufstat)[EC_MAXBUF]
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
int ecx_inframe(ecx_portt *port, int idx, int stacknumber)
void ec_setupheader(void *p)