45 #define MAX(a,b) (((a) > (b)) ? (a) : (b)) 46 #define MIN(a,b) (((a) < (b)) ? (a) : (b)) 69 #define RX_PRIM priMAC[1] 71 #define RX_SEC secMAC[1] 258 stack = &(port->
stack);
294 datagramP->index = idx;
321 stack = &(port->
stack);
331 return (bytesrx > 0);
362 stack = &(port->
stack);
369 rxbuf = &(*stack->
rxbuf)[idx];
373 l = (*rxbuf)[0] + ((
uint16)((*rxbuf)[1] & 0x0f) << 8);
375 rval = ((*rxbuf)[l] + ((
uint16)(*rxbuf)[l + 1] << 8));
391 l =
etohs(ecp->elength) & 0x0fff;
399 rval = ((*rxbuf)[l] + ((
uint16)((*rxbuf)[l + 1]) << 8));
410 rxbuf = &(*stack->
rxbuf)[idxf];
478 primrx = port->
rxsa[idx];
496 if ( ((primrx == 0) && (secrx ==
RX_SEC)) ||
613 int ec_inframe(
int idx,
int stacknumber)
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 ecx_outframe_red(ecx_portt *port, int idx)
void ecx_setbufstat(ecx_portt *port, int idx, int bufstat)
int(* txbuflength)[EC_MAXBUF]
PACKED_BEGIN struct PACKED ec_etherheadert
void ec_setupheader(void *p)
uint16 oshw_ntohs(uint16 network)
static int ecx_recvpkt(ecx_portt *port, int stacknumber)
int ecx_outframe(ecx_portt *port, int idx, int stacknumber)
int ecx_inframe(ecx_portt *port, int idx, int stacknumber)
uint16 oshw_htons(uint16 host)
static void ecx_clear_rxbufstat(int *rxbufstat)
int bfin_EMAC_send(void *packet, int length)
ec_bufT(* rxbuf)[EC_MAXBUF]
int ec_srconfirm(int idx, int timeout)
int ecx_closenic(ecx_portt *port)
ec_bufT(* txbuf)[EC_MAXBUF]
void ec_setbufstat(int idx, int bufstat)
int bfin_EMAC_recv(uint8_t *packet, size_t size)
int ecx_srconfirm(ecx_portt *port, int idx, int timeout)
PACKED_BEGIN struct PACKED ec_comt
int bfin_EMAC_init(uint8_t *ethAddr)
int ecx_getindex(ecx_portt *port)
int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
pthread_mutex_t getindex_mutex
int ec_outframe_red(int idx)
uint8 ec_bufT[EC_BUFSIZE]
int ec_waitinframe(int idx, int timeout)
void osal_timer_start(osal_timert *self, uint32 timeout_usec)
int(* rxbufstat)[EC_MAXBUF]
int ecx_waitinframe(ecx_portt *port, int idx, int timeout)
static int ecx_waitinframe_red(ecx_portt *port, int idx, osal_timert timer)