Contiki-NG
|
Data Structures | |
union | uip_buf_t |
The uIP packet buffer. More... | |
Macros | |
#define | uip_input() |
Process an incoming packet. | |
#define | uip_periodic(conn) |
Periodic processing for a connection identified by its number. | |
#define | uip_conn_active(conn) (uip_conns[conn].tcpstateflags != UIP_CLOSED) |
Macro to determine whether a specific uIP connection is active. | |
#define | uip_periodic_conn(conn) |
Perform periodic processing for a connection identified by a pointer to its structure. | |
#define | uip_poll_conn(conn) |
Request that a particular connection should be polled. | |
#define | uip_udp_periodic(conn) |
Periodic processing for a UDP connection identified by its number. | |
#define | uip_udp_periodic_conn(conn) |
Periodic processing for a UDP connection identified by a pointer to its structure. | |
#define | uip_buf (uip_aligned_buf.u8) |
Macro to access uip_aligned_buf as an array of bytes. | |
Functions | |
void | uip_reass_over (void) |
Abandon the reassembly of the current packet. | |
Variables | |
uip_buf_t | uip_aligned_buf |
Packet buffer for incoming and outgoing packets. | |
These functions are used by a network device driver for interacting with uIP.
#define uip_conn_active | ( | conn | ) | (uip_conns[conn].tcpstateflags != UIP_CLOSED) |
#define uip_input | ( | ) |
Process an incoming packet.
This function should be called when the device driver has received a packet from the network. The packet from the device driver must be present in the uip_buf buffer, and the length of the packet should be placed in the uip_len variable.
When the function returns, there may be an outbound packet placed in the uip_buf packet buffer. If so, the uip_len variable is set to the length of the packet. If no packet is to be sent out, the uip_len variable is set to 0.
The usual way of calling the function is presented by the source code below.
#define uip_periodic | ( | conn | ) |
Periodic processing for a connection identified by its number.
This function does the necessary periodic processing (timers, polling) for a uIP TCP connection, and should be called when the periodic uIP timer goes off. It should be called for every connection, regardless of whether they are open of closed.
When the function returns, it may have an outbound packet waiting for service in the uIP packet buffer, and if so the uip_len variable is set to a value larger than zero. The device driver should be called to send out the packet.
The usual way of calling the function is through a for() loop like this:
conn | The number of the connection which is to be periodically polled. |
#define uip_periodic_conn | ( | conn | ) |
Perform periodic processing for a connection identified by a pointer to its structure.
Same as uip_periodic() but takes a pointer to the actual uip_conn struct instead of an integer as its argument. This function can be used to force periodic processing of a specific connection.
conn | A pointer to the uip_conn struct for the connection to be processed. |
#define uip_poll_conn | ( | conn | ) |
Request that a particular connection should be polled.
Similar to uip_periodic_conn() but does not perform any timer processing. The application is polled for new data.
conn | A pointer to the uip_conn struct for the connection to be processed. |
#define uip_udp_periodic | ( | conn | ) |
Periodic processing for a UDP connection identified by its number.
This function is essentially the same as uip_periodic(), but for UDP connections. It is called in a similar fashion as the uip_periodic() function:
conn | The number of the UDP connection to be processed. |
#define uip_udp_periodic_conn | ( | conn | ) |
Periodic processing for a UDP connection identified by a pointer to its structure.
Same as uip_udp_periodic() but takes a pointer to the actual uip_conn struct instead of an integer as its argument. This function can be used to force periodic processing of a specific connection.
conn | A pointer to the uip_udp_conn struct for the connection to be processed. |
void uip_reass_over | ( | void | ) |
Abandon the reassembly of the current packet.
Definition at line 773 of file uip6.c.
References etimer_stop(), ICMP6_TIME_EXCEED_REASSEMBLY, ICMP6_TIME_EXCEEDED, uip_icmp6_error_output(), UIP_IP_BUF, uip_reass_timer, and UIP_STAT.