![]() |
EVE 1.0
|
![]() |
Macros | |
#define | uip_datalen() |
#define | uip_urgdatalen() |
#define | uip_close() |
#define | uip_abort() |
#define | uip_stop_rx() |
#define | uip_rx_stopped(conn) |
#define | uip_restart_rx() |
#define | uip_udpconnection() |
#define | uip_newdata() |
#define | uip_acked() |
#define | uip_connected() |
#define | uip_closed() |
#define | uip_aborted() |
#define | uip_timedout() |
#define | uip_rexmit() |
#define | uip_poll() |
#define | uip_initialmss() |
#define | uip_mss() |
#define | uip_udp_remove(conn) |
#define | uip_udp_bind(conn, port) |
#define | uip_udp_send(len) |
Functions | |
void | uip_listen (uint16_t port) |
void | uip_unlisten (uint16_t port) |
struct uip_conn * | uip_connect (uip_ipaddr_t *ripaddr, uint16_t port) |
CCIF void | uip_send (const void *data, int len) |
struct uip_udp_conn * | uip_udp_new (const uip_ipaddr_t *ripaddr, uint16_t rport) |
Functions used by an application running of top of uIP.
#define uip_datalen | ( | ) |
The length of any incoming data that is currently available (if available) in the uip_appdata buffer.
The test function uip_data() must first be used to check if there is any data available at all.
Definition at line 653 of file uip.h.
Referenced by simple_udp_deregister().
#define uip_urgdatalen | ( | ) |
#define uip_close | ( | ) |
#define uip_abort | ( | ) |
#define uip_stop_rx | ( | ) |
#define uip_rx_stopped | ( | conn | ) |
#define uip_restart_rx | ( | ) |
#define uip_udpconnection | ( | ) |
#define uip_newdata | ( | ) |
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 available through the uip_len variable.
Definition at line 745 of file uip.h.
Referenced by simple_udp_deregister().
#define uip_acked | ( | ) |
#define uip_connected | ( | ) |
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()).
Definition at line 768 of file uip.h.
Referenced by tcpip_input().
#define uip_closed | ( | ) |
#define uip_aborted | ( | ) |
#define uip_timedout | ( | ) |
#define uip_rexmit | ( | ) |
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.
#define uip_poll | ( | ) |
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.
#define uip_initialmss | ( | ) |
#define uip_mss | ( | ) |
Get the current maximum segment size that can be sent on the current connection.
The current maximum 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()).
#define uip_udp_remove | ( | conn | ) |
#define uip_udp_bind | ( | conn, | |
port | |||
) |
#define uip_udp_send | ( | len | ) |
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.
len | The length of the data in the uip_buf buffer. |
void uip_listen | ( | uint16_t | port | ) |
Start listening to the specified port.
port | A 16-bit port number in network byte order. |
Definition at line 553 of file uip.c.
References uip_conn::rcv_nxt, uip_acc32, uip_add32(), uip_ipchksum(), UIP_LISTENPORTS, and UIP_REASS_MAXAGE.
Referenced by tcpip_output().
void uip_unlisten | ( | uint16_t | port | ) |
Stop listening to the specified port.
port | A 16-bit port number in network byte order. |
Definition at line 542 of file uip.c.
References UIP_LISTENPORTS.
Referenced by tcpip_output().
struct uip_conn* uip_connect | ( | uip_ipaddr_t * | ripaddr, |
uint16_t | port | ||
) |
Connect to a remote host using TCP.
This function is used to start a new connection to the specified port on the specified 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().
ripaddr | The IP address of the remote host. |
port | A 16-bit port number in network byte order. |
Referenced by tcpip_output(), and uip_init().
CCIF void uip_send | ( | const void * | data, |
int | len | ||
) |
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 function 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.
data | A pointer to the data which is to be sent. |
len | The maximum amount of data bytes to be sent. |
Definition at line 2088 of file uip.c.
References uip_conn::len, uip_conn::mss, PRINTD, uip_conn::ripaddr, uip_udp_conn::ripaddr, UIP_BUFSIZE, UIP_LLH_LEN, and uip_conn::window.
struct uip_udp_conn* uip_udp_new | ( | const uip_ipaddr_t * | ripaddr, |
uint16_t | rport | ||
) |
Set up a new UDP connection.
This function sets up a new UDP connection. The function will automatically allocate an unused local port for the new connection. However, another port can be chosen by using the uip_udp_bind() call, after the uip_udp_new() function has been called.
Example:
ripaddr | The IP address of the remote host. |
rport | The remote port number in network byte order. |
Referenced by tcpip_output(), and uip_init().