Lines Matching +full:host +full:- +full:only

7 * low-level "core" / "callback" or "raw" API.
8 * higher-level "sequential" API.
9 * BSD-style socket API.
11 The raw API (sometimes called native API) is an event-driven API designed
12 to be used without an operating system that implements zero-copy send and
14 the various protocols. It is the only API available when running lwIP
19 model of execution is based on the blocking open-read-write-close
33 lwIP started targeting single-threaded environments. When adding multi-
34 threading support, instead of making the core thread-safe, another
37 environment, raw API functions MUST only be called from the core thread
39 from pbuf- and memory management functions). Application threads using
40 the sequential- or socket API communicate with this main thread through
44 other threads or an ISR is very limited! Only functions
45 from these API header files are thread-safe:
46 - api.h
47 - netbuf.h
48 - netdb.h
49 - netifapi.h
50 - pppapi.h
51 - sockets.h
52 - sys.h
54 Additionaly, memory (de-)allocation functions may be
67 an ISR (since only then, mem_free - for PBUF_RAM - may
68 be called from an ISR: otherwise, the HEAP is only
82 The raw TCP/IP interface is not only faster in terms of code execution
102 --- Callbacks
119 - void tcp_arg(struct tcp_pcb *pcb, void *arg)
127 --- TCP connection setup
131 identifier (i.e., a protocol control block - PCB) is created with the
133 incoming connections or be explicitly connected to another host.
135 - struct tcp_pcb *tcp_new(void)
140 - err_t tcp_bind(struct tcp_pcb *pcb, ip_addr_t *ipaddr,
150 - struct tcp_pcb *tcp_listen(struct tcp_pcb *pcb)
168 - struct tcp_pcb *tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog)
174 - void tcp_accept(struct tcp_pcb *pcb,
181 - err_t tcp_connect(struct tcp_pcb *pcb, ip_addr_t *ipaddr,
186 Sets up the pcb to connect to the remote host and sends the
193 properly established, either because the other host refused the
194 connection or because the other host didn't answer, the "err"
203 --- Sending TCP data
207 host, the application will be notified with a call to a specified
210 - err_t tcp_write(struct tcp_pcb *pcb, const void *dataptr, u16_t len,
215 - TCP_WRITE_FLAG_COPY: indicates whether the new memory should be allocated
217 should be allocated and the data should only be referenced by pointer. This
219 ACKed by the remote host
220 - TCP_WRITE_FLAG_MORE: indicates that more data follows. If this is omitted,
233 data has been successfully received by the other host and try again.
235 - void tcp_sent(struct tcp_pcb *pcb,
241 host. The len argument passed to the callback function gives the
245 --- Receiving TCP data
247 TCP data reception is callback based - an application specified
253 - void tcp_recv(struct tcp_pcb *pcb,
259 indicate that the remote host has closed the connection. If
264 - void tcp_recved(struct tcp_pcb *pcb, u16_t len)
270 --- Application polling
281 - void tcp_poll(struct tcp_pcb *pcb,
292 --- Closing and aborting connections
294 - err_t tcp_close(struct tcp_pcb *pcb)
304 - void tcp_abort(struct tcp_pcb *pcb)
307 host. The pcb is deallocated. This function never fails.
319 - void tcp_err(struct tcp_pcb *pcb, void (* err)(void *arg,
326 --- UDP interface
331 - struct udp_pcb *udp_new(void)
337 - void udp_remove(struct udp_pcb *pcb)
341 - err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr,
344 Binds the pcb to a local address. The IP-address argument "ipaddr"
348 - err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr,
352 network traffic, but only set the remote address of the pcb.
354 - err_t udp_disconnect(struct udp_pcb *pcb)
357 any network traffic, but only removes the remote address of the pcb.
359 - err_t udp_send(struct udp_pcb *pcb, struct pbuf *p)
363 - void udp_recv(struct udp_pcb *pcb,
374 --- System initalization
386 - lwip_init()
390 - netif_add(struct netif *netif, const ip4_addr_t *ipaddr,
407 netif->hwaddr[i] = some_eth_addr[i];
417 - netif_set_default(struct netif *netif)
421 - netif_set_link_up(struct netif *netif)
428 - netif_set_up(struct netif *netif)
433 - dhcp_start(struct netif *netif)
437 You can peek in the netif->dhcp struct for the actual DHCP status.
439 - sys_check_timeouts()
446 --- Optimalization hints
458 if you're using a little-endian architecture.
466 a higher speed than the maximum wire-speed. If the
482 --- Zero-copy MACs
484 To achieve zero-copy on transmit, the data passed to the raw API must
485 remain unchanged until sent. Because the send- (or write-)functions return
489 This implies that PBUF_RAM/PBUF_POOL pbufs passed to raw-API send functions
490 must *not* be reused by the application unless their ref-count is 1.
492 For no-copy pbufs (PBUF_ROM/PBUF_REF), data must be kept unchanged, too,
494 PBUF_ROM-pbufs are just enqueued (as ROM-data is expected to never change).
496 Also, data passed to tcp_write without the copy-flag must not be changed!