Data Structures | |
struct | tcp_socket |
TCP socket information structure. More... | |
struct | udp_socket |
UDP socket information structure. More... | |
Defines | |
#define | SO_FIN |
\brief Send FIN after all data has been transmitted. | |
#define | SO_SYN |
\brief Send SYN first. | |
#define | SO_FORCE |
\brief Force sending ACK. | |
#define | SO_ACK |
\brief Send ACK. | |
Typedefs | |
typedef struct udp_socket | UDPSOCKET |
UDP socket type. | |
typedef struct tcp_socket | TCPSOCKET |
TCP socket type. | |
Functions | |
void | NutUdpInput (NETBUF *nb) |
Handle incoming UDP packets. More... | |
int | NutUdpOutput (UDPSOCKET *sock, u_long dest, u_short port, NETBUF *nb) |
Send an UDP packet. More... | |
int | NutTcpOutput (TCPSOCKET *sock, u_char flags) |
Initiate TCP segment transmission. More... | |
int | NutTcpReject (NETBUF *nb) |
Reject an incoming segment. More... |
|
Initiate TCP segment transmission.
Check the TCP socket status and send any segment waiting for transmission. Segments may be sent synchronously or asynchronously. If sent synchronously, the function will not return until the data has been stored in the network device hardware for transmission. If the device is not ready for transmitting a new packet, the calling thread will be suspended until the device becomes ready again. If the target host is connected through an Ethernet network and if the hardware address of that host is currently unknown, an ARP request is sent out and the function will block until a response is received or an ARP timeout occurs. This does not imply that the data has been successfully delivered, because flow control and retransmission is still handled in the background. If sent asynchronously, the function will not wait for hardware address resolution or until the network device becomes ready for transmission. In such cases the data will be buffered by underlying layers and tranmitted in the background.
|
|
Reject an incoming segment.
Send RST in response to an incoming segment, which should be rejected. The function avoids to send out a RST segment in response to an incoming RST segment.
|