Defines | |
#define | uip_send(data, len) |
Send data on the current connection. | |
#define | uip_datalen() |
The length of any incoming data that is currently avaliable (if avaliable) in the uip_appdata buffer. | |
#define | uip_urgdatalen() |
The length of any out-of-band data (urgent data) that has arrived on the connection. | |
#define | uip_close() |
Close the current connection. | |
#define | uip_abort() |
Abort the current connection. | |
#define | uip_stop() |
Tell the sending host to stop sending data. | |
#define | uip_stopped(conn) |
Find out if the current connection has been previously stopped with uip_stop(). | |
#define | uip_restart() |
Restart the current connection, if is has previously been stopped with uip_stop(). | |
#define | uip_newdata() |
Is new incoming data available? | |
#define | uip_acked() |
Has previously sent data been acknowledged? | |
#define | uip_connected() |
Has the connection just been connected? | |
#define | uip_closed() |
Has the connection been closed by the other end? | |
#define | uip_aborted() |
Has the connection been aborted by the other end? | |
#define | uip_timedout() |
Has the connection timed out? | |
#define | uip_rexmit() |
Do we need to retransmit previously data? | |
#define | uip_poll() |
Is the connection being polled by uIP? | |
#define | uip_initialmss() |
Get the initial maxium segment size (MSS) of the current connection. | |
#define | uip_mss() |
Get the current maxium segment size that can be sent on the current connection. | |
#define | uip_udp_remove(conn) |
Removed a UDP connection. | |
#define | uip_udp_send(len) |
Send a UDP datagram of length len on the current connection. | |
Functions | |
void | uip_listen (u16_t port) |
Start listening to the specified port. | |
void | uip_unlisten (u16_t port) |
Stop listening to the specified port. | |
uip_conn * | uip_connect (u16_t *ripaddr, u16_t port) |
Connect to a remote host using TCP. | |
uip_udp_conn * | uip_udp_new (u16_t *ripaddr, u16_t rport) |
Set up a new UDP connection. |
|
Abort the current connection. This function will abort (reset) the current connection, and is usually used when an error has occured that prevents using the uip_close() function. |
|
Has the connection been aborted by the other end? Non-zero if the current connection has been aborted (reset) by the remote host. |
|
Has previously sent data been acknowledged? Will reduce to non-zero if the previously sent data has been acknowledged by the remote host. This means that the application can send new data. |
|
Close the current connection. This function will close the current connection in a nice way. |
|
Has the connection been closed by the other end? Is non-zero if the connection has been closed by the remote host. The application may then do the necessary clean-ups. |
|
Has the connection just been connected? Reduces to non-zero if the current connection has been connected to a remote host. This will happen both if the connection has been actively opened (with uip_connect()) or passively opened (with uip_listen()). |
|
The length of any incoming data that is currently avaliable (if avaliable) in the uip_appdata buffer. The test function uip_data() must first be used to check if there is any data available at all. |
|
Get the current maxium segment size that can be sent on the current connection. The current maxiumum segment size that can be sent on the connection is computed from the receiver's window and the MSS of the connection (which also is available by calling uip_initialmss()). |
|
Is new incoming data available? Will reduce to non-zero if there is new data for the application present at the uip_appdata pointer. The size of the data is avaliable through the uip_len variable. |
|
Is the connection being polled by uIP? Is non-zero if the reason the application is invoked is that the current connection has been idle for a while and should be polled. The polling event can be used for sending data without having to wait for the remote host to send data. |
|
Restart the current connection, if is has previously been stopped with uip_stop(). This function will open the receiver's window again so that we start receiving data for the current connection. |
|
Do we need to retransmit previously data? Reduces to non-zero if the previously sent data has been lost in the network, and the application should retransmit it. The application should send the exact same data as it did the last time, using the uip_send() function. |
|
Send data on the current connection. This function is used to send out a single segment of TCP data. Only applications that have been invoked by uIP for event processing can send data. The amount of data that actually is sent out after a call to this funcion is determined by the maximum amount of data TCP allows. uIP will automatically crop the data so that only the appropriate amount of data is sent. The function uip_mss() can be used to query uIP for the amount of data that actually will be sent.
|
|
Tell the sending host to stop sending data. This function will close our receiver's window so that we stop receiving data for the current connection. |
|
Has the connection timed out? Non-zero if the current connection has been aborted due to too many retransmissions. |
|
Removed a UDP connection.
|
|
Send a UDP datagram of length len on the current connection. This function can only be called in response to a UDP event (poll or newdata). The data must be present in the uip_buf buffer, at the place pointed to by the uip_appdata pointer.
|
|
The length of any out-of-band data (urgent data) that has arrived on the connection.
|
|
Connect to a remote host using TCP. This function is used to start a new connection to the specified port on the specied host. It allocates a new connection identifier, sets the connection to the SYN_SENT state and sets the retransmission timer to 0. This will cause a TCP SYN segment to be sent out the next time this connection is periodically processed, which usually is done within 0.5 seconds after the call to uip_connect().
u16_t ipaddr[2]; uip_ipaddr(ipaddr, 192,168,1,2); uip_connect(ipaddr, HTONS(80));
|
|
Start listening to the specified port.
uip_listen(HTONS(80));
|
|
Set up a new UDP connection.
|
|
Stop listening to the specified port.
uip_unlisten(HTONS(80));
|