|
lwIP 2.2.1
Lightweight IP stack
|
Macros | |
| #define | netconn_new(t) |
| #define | netconn_set_ipv6only(conn, val) |
| #define | netconn_get_ipv6only(conn) |
Enumerations | |
| enum | netconn_type { } |
Functions | |
| err_t | netconn_prepare_delete (struct netconn *conn) |
| err_t | netconn_delete (struct netconn *conn) |
| err_t | netconn_bind (struct netconn *conn, const ip_addr_t *addr, u16_t port) |
| err_t | netconn_bind_if (struct netconn *conn, u8_t if_idx) |
| err_t | netconn_connect (struct netconn *conn, const ip_addr_t *addr, u16_t port) |
| err_t | netconn_recv (struct netconn *conn, struct netbuf **new_buf) |
| err_t | netconn_err (struct netconn *conn) |
For use with TCP and UDP
| #define netconn_get_ipv6only | ( | conn | ) |
TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY)
| #define netconn_new | ( | t | ) |
Create new netconn connection
| t | netconn_type |
| #define netconn_set_ipv6only | ( | conn, | |
| val ) |
TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY)
| enum netconn_type |
Protocol family and type of the netconn
| Enumerator | |
|---|---|
| NETCONN_TCP | TCP IPv4 |
| NETCONN_TCP_IPV6 | TCP IPv6 |
| NETCONN_UDP | UDP IPv4 |
| NETCONN_UDPLITE | UDP IPv4 lite |
| NETCONN_UDPNOCHKSUM | UDP IPv4 no checksum |
| NETCONN_UDP_IPV6 | UDP IPv6 (dual-stack by default, unless you call netconn_set_ipv6only) |
| NETCONN_UDPLITE_IPV6 | UDP IPv6 lite (dual-stack by default, unless you call netconn_set_ipv6only) |
| NETCONN_UDPNOCHKSUM_IPV6 | UDP IPv6 no checksum (dual-stack by default, unless you call netconn_set_ipv6only) |
| NETCONN_RAW | Raw connection IPv4 |
Bind a netconn to a specific local IP address and port. Binding one netconn twice might not always be checked correctly!
| conn | the netconn to bind |
| addr | the local IP address to bind the netconn to (use IP4_ADDR_ANY/IP6_ADDR_ANY to bind to all addresses) |
| port | the local port to bind the netconn to (not used for RAW) |
Bind a netconn to a specific interface and port. Binding one netconn twice might not always be checked correctly!
| conn | the netconn to bind |
| if_idx | the local interface index to bind the netconn to |
Connect a netconn to a specific remote IP address and port.
| conn | the netconn to connect |
| addr | the remote IP address to connect to |
| port | the remote port to connect to (no used for RAW) |
Close a netconn 'connection' and free its resources. UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate after this returns.
| conn | the netconn to delete |
Get and reset pending error on a netconn
| conn | the netconn to get the error from |
Close a netconn 'connection' and free all its resources but not the netconn itself. UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate after this returns.
| conn | the netconn to delete |
Receive data (in form of a netbuf containing a packet buffer) from a netconn
| conn | the netconn from which to receive data |
| new_buf | pointer where a new netbuf is stored when received data |