#include "lwip/opt.h"#include "lwip/api.h"#include "lwip/tcpip.h"#include "lwip/memp.h"#include "lwip/ip.h"#include "lwip/raw.h"#include "lwip/udp.h"#include "lwip/tcp.h"#include <string.h>Go to the source code of this file.
Functions | |
| struct netconn * | netconn_new_with_proto_and_callback (enum netconn_type t, u8_t proto, netconn_callback callback) |
| err_t | netconn_delete (struct netconn *conn) |
| err_t | netconn_getaddr (struct netconn *conn, struct ip_addr *addr, u16_t *port, u8_t local) |
| err_t | netconn_bind (struct netconn *conn, struct ip_addr *addr, u16_t port) |
| err_t | netconn_connect (struct netconn *conn, struct ip_addr *addr, u16_t port) |
| err_t | netconn_disconnect (struct netconn *conn) |
| err_t | netconn_listen_with_backlog (struct netconn *conn, u8_t backlog) |
| struct netconn * | netconn_accept (struct netconn *conn) |
| struct netbuf * | netconn_recv (struct netconn *conn) |
| err_t | netconn_sendto (struct netconn *conn, struct netbuf *buf, struct ip_addr *addr, u16_t port) |
| err_t | netconn_send (struct netconn *conn, struct netbuf *buf) |
| err_t | netconn_write (struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags) |
| err_t | netconn_close (struct netconn *conn) |
Sequential API External module
Definition in file api_lib.c.
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 IP_ADDR_ANY to bind to all addresses) | |
| port | the local port to bind the netconn to (not used for RAW) |
| err_t netconn_close | ( | struct netconn * | conn | ) |
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) |
Definition at line 186 of file api_lib.c.

| err_t netconn_delete | ( | struct netconn * | conn | ) |
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 |
Definition at line 103 of file api_lib.c.

| err_t netconn_disconnect | ( | struct netconn * | conn | ) |
Get the local or remote IP address and port of a netconn. For RAW netconns, this returns the protocol instead of a port!
| conn | the netconn to query | |
| addr | a pointer to which to save the IP address | |
| port | a pointer to which to save the port (or protocol for RAW) | |
| local | 1 to get the local IP address, 0 to get the remote one |
| struct netconn* netconn_new_with_proto_and_callback | ( | enum netconn_type | t, | |
| u8_t | proto, | |||
| netconn_callback | callback | |||
| ) | [read] |
Create a new netconn (of a specific type) that has a callback function. The corresponding pcb is also created.
| t | the type of 'connection' to create ( |
| proto | the IP protocol for RAW IP pcbs | |
| callback | a function to call on status changes (RX available, TX'ed) |
Definition at line 68 of file api_lib.c.

| err_t netconn_sendto | ( | struct netconn * | conn, | |
| struct netbuf * | buf, | |||
| struct ip_addr * | addr, | |||
| u16_t | port | |||
| ) |
Send data (in form of a netbuf) to a specific remote IP address and port. Only to be used for UDP and RAW netconns (not TCP).
| conn | the netconn over which to send data | |
| buf | a netbuf containing the data to send | |
| addr | the remote IP address to which to send the data | |
| port | the remote port to which to send the data |
Definition at line 406 of file api_lib.c.

Send data over a TCP netconn.
| conn | the TCP netconn over which to send data | |
| dataptr | pointer to the application buffer that contains the data to send | |
| size | size of the application data to send | |
| apiflags | combination of following flags :
|
1.7.1