Definition in file tcpip.h.
#include "contiki.h"
#include "net/uip.h"
Go to the source code of this file.
Data Structures | |
struct | tcpip_uipstate |
TCP functions | |
#define | tcp_markconn(conn, appstate) tcp_attach(conn, appstate) |
void | tcp_attach (struct uip_conn *conn, void *appstate) |
Attach a TCP connection to the current process. | |
void | tcp_listen (u16_t port) |
Open a TCP port. | |
void | tcp_unlisten (u16_t port) |
Close a listening TCP port. | |
uip_conn * | tcp_connect (u16_t *ripaddr, u16_t port, void *appstate) |
Open a TCP connection to the specified IP address and port. | |
void | tcpip_poll_tcp (struct uip_conn *conn) |
Cause a specified TCP connection to be polled. | |
UDP functions | |
#define | udp_markconn(conn, appstate) udp_attach(conn, appstate) |
#define | udp_bind(conn, port) uip_udp_bind(conn, port) |
Bind a UDP connection to a local port. | |
void | udp_attach (struct uip_udp_conn *conn, void *appstate) |
Attach the current process to a UDP connection. | |
uip_udp_conn * | udp_new (u16_t *ripaddr, u16_t port, void *appstate) |
Create a new UDP connection. | |
uip_udp_conn * | udp_broadcast_new (u16_t port, void *appstate) |
Create a new UDP broadcast connection. | |
void | tcpip_poll_udp (struct uip_udp_conn *conn) |
Cause a specified UDP connection to be polled. | |
TCP/IP packet processing | |
void | tcpip_input (void) |
Deliver an incoming packet to the TCP/IP stack. | |
void | tcpip_output (void) |
void | tcpip_set_forwarding (unsigned char f) |
Defines | |
#define | UIP_APPCALL tcpip_uipcall |
The name of the application function that uIP should call in response to TCP/IP events. | |
#define | UIP_UDP_APPCALL tcpip_uipcall |
Typedefs | |
typedef tcpip_uipstate | uip_udp_appstate_t |
The type of the application state that is to be stored in the uip_conn structure. | |
typedef tcpip_uipstate | uip_tcp_appstate_t |
The type of the application state that is to be stored in the uip_conn structure. | |
Functions | |
void | tcpip_uipcall (void) |
Variables | |
process_event_t | tcpip_event |
The uIP event. |
|
Bind a UDP connection to a local port. This function binds a UDP conncetion to a specified local port. When a connction is created with udp_new(), it gets a local port number assigned automatically. If the application needs to bind the connection to a specified local port, this function should be used.
Definition at line 259 of file tcpip.h. Referenced by udp_broadcast_new(). |
|
Deliver an incoming packet to the TCP/IP stack. This function is called by network device drivers to deliver an incoming packet to the TCP/IP stack. The incoming packet must be present in the uip_buf buffer, and the length of the packet must be in the global uip_len variable.
Definition at line 333 of file tcpip.c. References NULL, process_post_synch(), tcpip_input(), and uip_len. Referenced by tcpip_input(). |
|
Cause a specified UDP connection to be polled. This function causes uIP to poll the specified UDP connection. The function is used when the application has data that is to be sent immediately and do not wish to wait for the periodic uIP polling mechanism.
Definition at line 340 of file tcpip.c. References process_post(), and tcpip_poll_udp(). Referenced by resolv_query(), and tcpip_poll_udp(). |
|
Attach the current process to a UDP connection. This function attaches the current process to a UDP connection. Each UDP connection must have a process attached to it in order for the process to be able to receive and send data over the connection. Additionally, this function can add a pointer with connection state to the connection.
Definition at line 180 of file tcpip.c. References uip_udp_conn::appstate, tcpip_uipstate::p, PROCESS_CURRENT, tcpip_uipstate::state, and udp_attach(). Referenced by udp_attach(). |
|
Create a new UDP broadcast connection. This function creates a new (link-local) broadcast UDP connection to a specified port.
Definition at line 209 of file tcpip.c. References NULL, udp_bind, udp_broadcast_new(), udp_new(), and uip_ipaddr. Referenced by udp_broadcast_new(). |
|
Create a new UDP connection. This function creates a new UDP connection with the specified remote endpoint.
Definition at line 191 of file tcpip.c. References uip_udp_conn::appstate, NULL, tcpip_uipstate::p, PROCESS_CURRENT, tcpip_uipstate::state, udp_new(), and uip_udp_new(). Referenced by PROCESS_THREAD(), udp_broadcast_new(), and udp_new(). |
|
The uIP event. This event is posted to a process whenever a uIP event has occured.
Definition at line 44 of file tcpip.c. Referenced by PROCESS_THREAD(), and tcpip_uipcall(). |