Modules | |
The uIP TCP/IP stack | |
The uIP TCP/IP stack provides Internet communication abilities to Contiki. | |
Protosockets library | |
The protosocket library provides an interface to the uIP stack that is similar to the traditional BSD socket interface. | |
The Contiki/uIP interface | |
TCP/IP support in Contiki is implemented using the uIP TCP/IP stack. | |
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. |
|
Attach a TCP connection to the current process. This function attaches the current process to a TCP connection. Each TCP connection must be attached to a process in order for the process to be able to receive and send data. Additionally, this function can add a pointer with connection state to the connection.
Definition at line 169 of file tcpip.c. References uip_conn::appstate, tcpip_uipstate::p, PROCESS_CURRENT, and tcpip_uipstate::state. |
|
Open a TCP connection to the specified IP address and port. This function opens a TCP connection to the specified port at the host specified with an IP address. Additionally, an opaque pointer can be attached to the connection. This pointer will be sent together with uIP events to the process.
Definition at line 115 of file tcpip.c. References uip_conn::appstate, NULL, tcpip_uipstate::p, PROCESS_CURRENT, tcpip_uipstate::state, tcpip_poll_tcp(), and uip_connect(). |
|
Open a TCP port. This function opens a TCP port for listening. When a TCP connection request occurs for the port, the process will be sent a tcpip_event with the new connection request.
Definition at line 151 of file tcpip.c. References PROCESS_CURRENT, uip_listen(), and UIP_LISTENPORTS. |
|
Close a listening TCP port. This function closes a listening TCP port.
Definition at line 133 of file tcpip.c. References PROCESS_CURRENT, UIP_LISTENPORTS, and uip_unlisten(). |
|
Cause a specified TCP connection to be polled. This function causes uIP to poll the specified TCP 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 346 of file tcpip.c. References process_post(). Referenced by tcp_connect(). |