41 #ifndef LWIP_HDR_ALTCP_PRIV_H 42 #define LWIP_HDR_ALTCP_PRIV_H 55 struct altcp_pcb *altcp_alloc(
void);
56 void altcp_free(
struct altcp_pcb *conn);
59 typedef void (*altcp_set_poll_fn)(
struct altcp_pcb *conn, u8_t interval);
60 typedef void (*altcp_recved_fn)(
struct altcp_pcb *conn, u16_t len);
61 typedef err_t (*altcp_bind_fn)(
struct altcp_pcb *conn,
const ip_addr_t *ipaddr, u16_t port);
62 typedef err_t (*altcp_connect_fn)(
struct altcp_pcb *conn,
const ip_addr_t *ipaddr, u16_t port, altcp_connected_fn connected);
64 typedef struct altcp_pcb *(*altcp_listen_fn)(
struct altcp_pcb *conn, u8_t backlog, err_t *err);
66 typedef void (*altcp_abort_fn)(
struct altcp_pcb *conn);
67 typedef err_t (*altcp_close_fn)(
struct altcp_pcb *conn);
68 typedef err_t (*altcp_shutdown_fn)(
struct altcp_pcb *conn,
int shut_rx,
int shut_tx);
70 typedef err_t (*altcp_write_fn)(
struct altcp_pcb *conn,
const void *dataptr, u16_t len, u8_t apiflags);
71 typedef err_t (*altcp_output_fn)(
struct altcp_pcb *conn);
73 typedef u16_t (*altcp_mss_fn)(
struct altcp_pcb *conn);
74 typedef u16_t (*altcp_sndbuf_fn)(
struct altcp_pcb *conn);
75 typedef u16_t (*altcp_sndqueuelen_fn)(
struct altcp_pcb *conn);
76 typedef void (*altcp_nagle_disable_fn)(
struct altcp_pcb *conn);
77 typedef void (*altcp_nagle_enable_fn)(
struct altcp_pcb *conn);
78 typedef int (*altcp_nagle_disabled_fn)(
struct altcp_pcb *conn);
80 typedef void (*altcp_setprio_fn)(
struct altcp_pcb *conn, u8_t prio);
82 typedef void (*altcp_dealloc_fn)(
struct altcp_pcb *conn);
84 typedef err_t (*altcp_get_tcp_addrinfo_fn)(
struct altcp_pcb *conn,
int local,
ip_addr_t *addr, u16_t *port);
85 typedef ip_addr_t *(*altcp_get_ip_fn)(
struct altcp_pcb *conn,
int local);
86 typedef u16_t (*altcp_get_port_fn)(
struct altcp_pcb *conn,
int local);
89 typedef enum tcp_state (*altcp_dbg_get_tcp_state_fn)(
struct altcp_pcb *conn);
92 struct altcp_functions {
93 altcp_set_poll_fn set_poll;
94 altcp_recved_fn recved;
96 altcp_connect_fn connect;
97 altcp_listen_fn listen;
100 altcp_shutdown_fn shutdown;
101 altcp_write_fn write;
102 altcp_output_fn output;
104 altcp_sndbuf_fn sndbuf;
105 altcp_sndqueuelen_fn sndqueuelen;
106 altcp_nagle_disable_fn nagle_disable;
107 altcp_nagle_enable_fn nagle_enable;
108 altcp_nagle_disabled_fn nagle_disabled;
109 altcp_setprio_fn setprio;
110 altcp_dealloc_fn dealloc;
112 altcp_get_ip_fn getip;
113 altcp_get_port_fn getport;
115 altcp_dbg_get_tcp_state_fn dbg_get_tcp_state;
119 void altcp_default_set_poll(
struct altcp_pcb *conn, u8_t interval);
120 void altcp_default_recved(
struct altcp_pcb *conn, u16_t len);
121 err_t altcp_default_bind(
struct altcp_pcb *conn,
const ip_addr_t *ipaddr, u16_t port);
122 err_t altcp_default_shutdown(
struct altcp_pcb *conn,
int shut_rx,
int shut_tx);
123 err_t altcp_default_write(
struct altcp_pcb *conn,
const void *dataptr, u16_t len, u8_t apiflags);
124 err_t altcp_default_output(
struct altcp_pcb *conn);
125 u16_t altcp_default_mss(
struct altcp_pcb *conn);
126 u16_t altcp_default_sndbuf(
struct altcp_pcb *conn);
127 u16_t altcp_default_sndqueuelen(
struct altcp_pcb *conn);
128 void altcp_default_nagle_disable(
struct altcp_pcb *conn);
129 void altcp_default_nagle_enable(
struct altcp_pcb *conn);
130 int altcp_default_nagle_disabled(
struct altcp_pcb *conn);
131 void altcp_default_setprio(
struct altcp_pcb *conn, u8_t prio);
132 void altcp_default_dealloc(
struct altcp_pcb *conn);
133 err_t altcp_default_get_tcp_addrinfo(
struct altcp_pcb *conn,
int local,
ip_addr_t *addr, u16_t *port);
134 ip_addr_t *altcp_default_get_ip(
struct altcp_pcb *conn,
int local);
135 u16_t altcp_default_get_port(
struct altcp_pcb *conn,
int local);
137 enum tcp_state altcp_default_dbg_get_tcp_state(
struct altcp_pcb *conn);
lwIP Options Configuration
s8_t err_t
Define LWIP_ERR_T in cc.h if you want to use a different type for your platform (must be signed)...
Application layered TCP connection API (to be used from TCPIP thread) .
IP address structure for passing IP addresses by value.
IP address API (common IPv4 and IPv6)