Go to the documentation of this file.
27 #ifndef POLARSSL_NET_H
28 #define POLARSSL_NET_H
32 #define POLARSSL_ERR_NET_UNKNOWN_HOST -0x0040
33 #define POLARSSL_ERR_NET_SOCKET_FAILED -0x0042
34 #define POLARSSL_ERR_NET_CONNECT_FAILED -0x0044
35 #define POLARSSL_ERR_NET_BIND_FAILED -0x0046
36 #define POLARSSL_ERR_NET_LISTEN_FAILED -0x0048
37 #define POLARSSL_ERR_NET_ACCEPT_FAILED -0x004A
38 #define POLARSSL_ERR_NET_RECV_FAILED -0x004C
39 #define POLARSSL_ERR_NET_SEND_FAILED -0x004E
40 #define POLARSSL_ERR_NET_CONN_RESET -0x0050
41 #define POLARSSL_ERR_NET_WANT_READ -0x0052
42 #define POLARSSL_ERR_NET_WANT_WRITE -0x0054
44 #define POLARSSL_NET_LISTEN_BACKLOG 10
62 int net_connect(
int *fd,
const char *host,
int port );
77 int net_bind(
int *fd,
const char *bind_ip,
int port );
90 int net_accept(
int bind_fd,
int *client_fd,
void *client_ip );
132 int net_recv(
void *ctx,
unsigned char *buf,
size_t len );
146 int net_send(
void *ctx,
const unsigned char *buf,
size_t len );