The uIP packet buffer. More...
#include <core/net/uip.h>
The uIP packet buffer.
The uip_buf array is used to hold incoming and outgoing packets. The device driver should place incoming data into this buffer. When sending data, the device driver should read the link level headers and the TCP/IP headers from this buffer. The size of the link level headers is configured by the UIP_LLH_LEN define.
void devicedriver_send(void) { hwsend(&uip_buf[0], UIP_LLH_LEN); if(uip_len <= UIP_LLH_LEN + UIP_TCPIP_HLEN) { hwsend(&uip_buf[UIP_LLH_LEN], uip_len - UIP_LLH_LEN); } else { hwsend(&uip_buf[UIP_LLH_LEN], UIP_TCPIP_HLEN); hwsend(uip_appdata, uip_len - UIP_TCPIP_HLEN - UIP_LLH_LEN); } }