lwIP
2.1.2
Lightweight IP stack
|
#include "lwip/opt.h"
#include "lwip/ip_addr.h"
#include "lwip/netif.h"
#include "lwip/err.h"
#include "lwip/inet.h"
#include "lwip/errno.h"
#include <string.h>
Macros | |
#define | LWIP_TIMEVAL_PRIVATE 1 |
Functions | |
void | lwip_socket_thread_init (void) |
void | lwip_socket_thread_cleanup (void) |
int | lwip_shutdown (int s, int how) |
int | lwip_listen (int s, int backlog) |
int | lwip_fcntl (int s, int cmd, int val) |
Socket API (to be used from non-TCPIP threads)
#define LWIP_TIMEVAL_PRIVATE 1 |
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided by your system, set this to 0 and include <sys/time.h> in cc.h
int lwip_fcntl | ( | int | s, |
int | cmd, | ||
int | val | ||
) |
A minimal implementation of fcntl. Currently only the commands F_GETFL and F_SETFL are implemented. The flag O_NONBLOCK and access modes are supported for F_GETFL, only the flag O_NONBLOCK is implemented for F_SETFL.
int lwip_listen | ( | int | s, |
int | backlog | ||
) |
Set a socket into listen mode. The socket may not have been used for another connection previously.
s | the socket to set to listening mode |
backlog | (ATTENTION: needs TCP_LISTEN_BACKLOG=1) |
int lwip_shutdown | ( | int | s, |
int | how | ||
) |
Close one end of a full-duplex connection.
void lwip_socket_thread_cleanup | ( | void | ) |
LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore
void lwip_socket_thread_init | ( | void | ) |
LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore