#include <cfg/os.h>#include <sys/types.h>#include <string.h>#include <stdlib.h>#include <errno.h>#include <sys/atom.h>#include <sys/heap.h>#include <sys/thread.h>#include <sys/event.h>#include <sys/timer.h>#include <net/route.h>#include <netinet/in.h>#include <netinet/ip.h>#include <netinet/icmp.h>#include <netinet/ip_icmp.h>#include <netinet/ipcsum.h>#include <sys/socket.h>#include <netinet/tcp.h>#include <stdio.h>#include <io.h>#include <memdebug.h>#include <net/netdebug.h>
Go to the source code of this file.
Defines | |
| #define | TICK_RATE 1 |
Functions | |
| void | NutTcpDiscardBuffers (TCPSOCKET *sock) |
| void | NutTcpDestroySocket (TCPSOCKET *sock) |
| Destroy a previously allocated socket. | |
| TCPSOCKET * | NutTcpFindSocket (uint16_t lport, uint16_t rport, uint32_t raddr) |
| Find a matching socket. | |
| TCPSOCKET * | NutTcpCreateSocket (void) |
| Create a TCP socket. | |
| int | NutTcpSetSockOpt (TCPSOCKET *sock, int optname, CONST void *optval, int optlen) |
| Set value of a TCP socket option. | |
| int | NutTcpGetSockOpt (TCPSOCKET *sock, int optname, void *optval, int optlen) |
| Get a TCP socket option value. | |
| int | NutTcpConnect (TCPSOCKET *sock, uint32_t addr, uint16_t port) |
| Connect to a remote socket. | |
| int | NutTcpAccept (TCPSOCKET *sock, uint16_t port) |
| Wait for incoming connect from a remote socket. | |
| int | NutTcpSend (TCPSOCKET *sock, CONST void *data, int len) |
| Send data on a connected TCP socket. | |
| int | NutTcpReceive (TCPSOCKET *sock, void *data, int size) |
| Receive data on a connected TCP socket. | |
| int | NutTcpCloseSocket (TCPSOCKET *sock) |
| Close TCP socket. | |
| int | NutTcpError (TCPSOCKET *sock) |
| Return specific code of the last error. | |
| int | NutTcpDeviceRead (TCPSOCKET *sock, void *buffer, int size) |
| Read from virtual socket device. | |
| int | NutTcpDeviceWrite (TCPSOCKET *sock, CONST void *buf, int size) |
| Write to a socket. | |
| int | NutTcpDeviceWrite_P (TCPSOCKET *sock, PGM_P buffer, int size) |
| Write to device. | |
| int | NutTcpDeviceIOCtl (TCPSOCKET *sock, int cmd, void *param) |
| Driver control function. | |
Variables | |
| TCPSOCKET * | tcpSocketList = 0 |