Multithreaded-software/external/soem/oshw/linux/nicdrv.c
int ecx_outframe(ecx_portt *port, int idx, int stacknumber)
{
   int lp, rval;
   ec_stackT *stack;

   if (!stacknumber)
   {
      stack = &(port->stack);
   }
   else
   {
      stack = &(port->redport->stack);
   }
   lp = (*stack->txbuflength)[idx];
   (*stack->rxbufstat)[idx] = EC_BUF_TX;
   rval = send(*stack->sock, (*stack->txbuf)[idx], lp, 0);
   if (rval == -1)
   {
      (*stack->rxbufstat)[idx] = EC_BUF_EMPTY;
   }

   return rval;
}
/** Transmit buffer over socket (non blocking).
 * @param[in] port        = port context struct
 * @param[in] idx         = index in tx buffer array
 * @param[in] stacknumber  = 0=Primary 1=Secondary stack
 * @return socket send result
 */
Transmit buffer over socket (non blocking).
Transmit buffer over socket ( non blocking ) .
int ecx_outframe(ecx_portt *port, int idx, int stacknumber)
{
   int lp, rval;
   ec_stackT *stack;
   if (!stacknumber)
   {
      stack = &(port->stack);
   }
   else
   {
      stack = &(port->redport->stack);
   }
   lp = (*stack->txbuflength)[idx];
   (*stack->rxbufstat)[idx] = EC_BUF_TX;
   rval = send(*stack->sock, (*stack->txbuf)[idx], lp, 0);
   if (rval == -1)
   {
      (*stack->rxbufstat)[idx] = EC_BUF_EMPTY;
   }
   return rval;
}
int ecx_outframe ( ecx_portt * port , int idx , int stacknumber ) { int lp , rval ; ec_stackT * stack ; if ( ! stacknumber ) { stack = & ( port -> stack ) ; } else { stack = & ( port -> redport -> stack ) ; } lp = ( * stack -> txbuflength ) [ idx ] ; ( * stack -> rxbufstat ) [ idx ] = EC_BUF_TX ; rval = send ( * stack -> sock , ( * stack -> txbuf ) [ idx ] , lp , 0 ) ; if ( rval == -1 ) { ( * stack -> rxbufstat ) [ idx ] = EC_BUF_EMPTY ; } return rval ; }
Transmit buffer over socket (non blocking).
Transmit buffer over socket ( non blocking ) .