Symbols
loading...
Files
loading...

lwIP library

lwIP is a library defining the following symbols:

Most used functions

Name
Location
Summary
Dereference a pbuf chain or queue and deallocate any no-longer-used pbufs at the head of this chain or queue. Decrements the pbuf reference count. If it reaches zero, the pbuf is deallocated. For a pbuf chain, this is repeated for each pbuf in the chain, up to the first pbuf which has a non-zero reference count after decrementing. So, when all reference counts are one, the whole chain is free'd. @internal examples: Assuming existing chains a->b->c with the following reference counts, calling pbuf_free(a) results in: 1->2->3 becomes ...1->3 3->3->3 becomes 2->3->3 1->1->2 becomes ......1 2->1->1 becomes 1->1->1 1->1->1 becomes .......
Convert an u16_t from host- to network byte order.
Convert an u32_t from host- to network byte order.
Check whether "cp" is a valid ascii representation of an IPv6 address and convert to a binary address. Returns 1 if the address is valid, 0 if not.
Unprotect critical region
Get runtime profile of ping session
Allocates a pbuf of the given type (possibly a chain for PBUF_POOL type). The actual memory allocated for the pbuf is determined by the layer at which the pbuf is allocated and the requested size (from the size parameter). - PBUF_RAM: buffer memory for pbuf is allocated as one large chunk. This includes protocol headers as well. - PBUF_ROM: no buffer memory is allocated for the pbuf, even for protocol headers. Additional headers must be prepended by allocating another pbuf and chain in to the front of the ROM pbuf. It is assumed that the memory used is really similar to ROM in that it is immutable and will not be changed. Memory which is dynamic should generally not be attached to PBUF_ROM pbufs. Use PBUF_REF instead. - PBUF_REF: no buffer memory is allocated for the pbuf, even for protocol headers. It is assumed that the pbuf is only being used in a single thread. If the pbuf gets queued, then pbuf_take should be called to copy the buffer. - PBUF_POOL: the pbuf is allocated as a pbuf chain, with pbufs from the pbuf pool that is allocated during pbuf_init().
Protect critical region
Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used.
Signals a semaphore
Put an element back into its pool.
Get an element from a specific pool.
Convert numeric IPv6 address into ASCII representation. returns ptr to static buffer; not reentrant!
Same as ip4addr_ntoa, but reentrant since a user-supplied buffer is used.
Adjusts the payload pointer to hide headers in the payload. Adjusts the ->payload pointer so that space for a header disappears in the pbuf payload. The ->payload, ->tot_len and ->len fields are adjusted.
Map a externally used socket index to the internal socket representation.
Go through timeout list (for this task only) and remove the first matching entry (subsequent entries remain untouched), even though the timeout has not triggered yet.
Removes and deallocates the pcb. @see udp_new()
Synchronously calls function in TCPIP thread and waits for its completion. It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or LWIP_NETCONN_SEM_PER_THREAD. If not, a semaphore is created and destroyed on every call which is usually an expensive/slow operation.
Convert numeric IP address into decimal dotted ASCII representation. returns ptr to static buffer; not reentrant!
Set a receive callback for a UDP PCB. This callback will be called when receiving a datagram for the pcb.
Copy (part of) the contents of a packet buffer to an application supplied buffer.
Get current time, in milliseconds
Bind an UDP PCB. ipaddr & port are expected to be in the same byte order as in the pcb. @see udp_disconnect()
Check whether "cp" is a valid ascii representation of an Internet address and convert to a binary address. Returns 1 if the address is valid, 0 if not. This replaces inet_addr, the return value from which cannot distinguish between failure and a local broadcast address.
Finds the appropriate network interface for a given IPv6 address. It tries to select a netif following a sequence of heuristics: 1) if there is only 1 netif, return it 2) if the destination is a zoned address, match its zone to a netif 3) if the either the source or destination address is a scoped address, match the source address's zone (if set) or address (if not) to a netif 4) tries to match the destination subnet to a configured address 5) tries to find a router-announced route 6) tries to match the (unscoped) source address to the netif 7) returns the default netif, if configured Note that each of the two given addresses may or may not be properly zoned.
Join a group on a network interface.
Leave a group on a network interface.
Ascii internet address interpretation routine. The value returned is in network order.
Find out what we can send and send it
Call the lower part of a netconn_* function This function is then running in the thread context of tcpip_thread and has exclusive access to lwIP core code.
Return the interface for the netif index
Adjusts the payload pointer to reveal headers in the payload. Adjusts the ->payload pointer so that space for a header appears in the pbuf payload. The ->payload, ->tot_len and ->len fields are adjusted. PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so the call will fail. A check is made that the increase in header size does not move the payload pointer in front of the start of the buffer.
Try to post a message to mailbox
Change the state of an IPv6 address of a network interface (INVALID, TEMPTATIVE, PREFERRED, DEPRECATED, where TEMPTATIVE includes the number of checks done, see ip6_addr.h)
Send data to a specified address using UDP. The netif used for sending can be specified. This function exists mainly for DHCP, to be able to send UDP packets on a netif that is still down. dst_ip & dst_port are expected to be in the same byte order as in the pcb. @see udp_disconnect() udp_send()
Shrink a pbuf chain to a desired length. Depending on the desired length, the first few pbufs in a chain might be skipped and left unchanged. The new last pbuf in the chain will be resized, and any remaining pbufs will be freed.
Invoke extended netif status event
Call a specific function in the thread context of tcpip_thread for easy access synchronization. A function called in that way may access lwIP core code without fearing concurrent access. Blocks until the request is posted. Must not be called from interrupt context! @see tcpip_try_callback
Determine if an address is a broadcast address on a network interface
Sends an IPv6 packet on a network interface. This function constructs the IPv6 header. If the source IPv6 address is NULL, the IPv6 "ANY" address is used as source (usually during network startup). If the source IPv6 address it IP6_ADDR_ANY, the most appropriate IPv6 address of the outgoing network interface is filled in as source address. If the destination IPv6 address is LWIP_IP_HDRINCL, p is assumed to already include an IPv6 header and p->payload points to it instead of the data.
Wait for a semaphore to be signaled
Creates a new UDP pcb which can be used for UDP communication. The pcb is not active until it has either been bound to a local address or connected to a remote address. @see MEMP_NUM_UDP_PCB @see udp_remove()
Source based IPv4 routing must be fully implemented in LWIP_HOOK_IP4_ROUTE_SRC(). This function only provides the parameters.
Free a tcp pcb
Deallocates a list of TCP segments (tcp_seg structures).
Send out an sntp request.
Send data to a specified address using UDP. dst_ip & dst_port are expected to be in the same byte order as in the pcb. If the PCB already has a remote address association, it will be restored after the data is sent. @see udp_disconnect() udp_send()
Put memory back on the heap
Send an icmpv6 'parameter problem' packet. This function must be used only in direct response to a packet that is being received right now. Otherwise, address zones would be lost and the calculated offset would be wrong (calculated against ip6_current_header()).
Frees a TCP segment (tcp_seg structure).
Calculates the checksum with IPv6 pseudo header used by TCP and UDP for a pbuf chain. IPv6 addresses are expected to be in network byte order.
Will free any resources associated with a neighbor cache entry, and will mark it as unused.
Count number of pbufs in a chain
Sends an IP packet on a network interface. This function constructs the IP header and calculates the IP header checksum. If the source IP address is NULL, the IP address of the outgoing network interface is filled in as source address. If the destination IP address is LWIP_IP_HDRINCL, p is assumed to already include an IP header and p->payload points to it instead of the data.
Aborts the connection by sending a RST (reset) segment to the remote host. The pcb is deallocated. This function never fails. ATTENTION: When calling this from one of the TCP callbacks, make sure you always return ERR_ABRT (and never return ERR_ABRT otherwise or you will risk accessing deallocated memory or memory leaks!
Retry: send a new request (and increase retry timeout).
Create a DHCP request, fill in common headers
Add a DHCP message trailer Adds the END option to the DHCP message, and if necessary, up to three padding bytes.
Change IP address configuration for a network interface (including netmask and default gateway).
Remove the remote end of the pcb. This function does not generate any network traffic, but only removes the remote address of the pcb.
Join a group on one network interface.
Leave a group on one network interface.
Get one byte from the specified position in a pbuf
Select the best IPv6 source address for a given destination IPv6 address. This implementation follows RFC 6724 Sec. 5 to the following extent: - Rules 1, 2, 3: fully implemented - Rules 4, 5, 5.5: not applicable - Rule 6: not implemented - Rule 7: not applicable - Rule 8: limited to "prefer /64 subnet match over non-match" For Rule 2, we deliberately deviate from RFC 6724 Sec. 3.1 by considering ULAs to be of smaller scope than global addresses, to avoid that a preferred ULA is picked over a deprecated global address when given a global address as destination, as that would likely result in broken two-way communication. As long as temporary addresses are not supported (as used in Rule 7), a proper implementation of Rule 8 would obviate the need to implement Rule 6.
Send an ethernet packet on the network using netif->linkoutput(). The ethernet header is filled in before sending. @see LWIP_HOOK_VLAN_SET
Get and reset pending error on a netconn
Purges a TCP PCB. Removes any buffered data and frees the buffer memory (pcb->ooseq, pcb->unsent and pcb->unacked are freed).
Called from TCP_REG when registering a new PCB: the reason is to have the TCP timer only running when there are active (or time-wait) PCBs.
Search for a neighbor cache entry
If Kiss-of-Death is received (or another packet parsing error), try the next server or retry the current server and increase the retry timeout if only one server is available. (implicitly, SNTP_MAX_SERVERS > 1)
Allocate a block of memory with a minimum of 'size' bytes. Note that the returned value must always be aligned (as defined by MEM_ALIGNMENT).
Copy the contents of one packet buffer into another.
Convert numeric IP address (both versions) into ASCII representation. returns ptr to static buffer; not reentrant!
Concatenate two pbufs (each may be a pbuf chain) and take over the caller's reference of the tail pbuf. This function explicitly does not check for tot_len overflow to prevent failing to queue too long pbufs. This can produce invalid pbufs, so handle with care! @see pbuf_chain()
Allocates a new pbuf of same length (via pbuf_alloc()) and copies the source pbuf into this new pbuf (using pbuf_copy()).
Send an IP packet to be received on the same netif (loopif-like). The pbuf is copied and added to an internal queue which is fed to netif->input by netif_poll(). In multithreaded mode, the call to netif_poll() is queued to be done on the TCP/IP thread. In callback mode, the user has the responsibility to call netif_poll() in the main loop of their application.
Get PING function option
Send an icmp 'destination unreachable' packet, called from ip_input() if the transport layer protocol is unknown and from udp_input() if the local port is not bound.
Set status of time sync
Send an ACK without data.
Purges the PCB and removes it from a PCB list. Any delayed ACKs are sent first.
Send a TCP RESET packet (empty segment with RST flag set) to abort a connection. Called by tcp_abort() (to abort a local connection), tcp_closen() (if not all data has been received by the application), tcp_timewait_input() (if a SYN is received) and tcp_process() (received segment in the wrong state). Since a RST segment is in most cases not sent for an active connection, tcp_rst() has a number of arguments that are taken from a tcp_pcb for most other segment output functions.
Called by tcp_process. Checks if the given segment is an ACK for outstanding data, and if so frees the memory of the buffered data. Next, it places the segment on any of the receive queues (pcb->recved or pcb->ooseq). If the segment is buffered, the pbuf is referenced by pbuf_ref so that it will not be freed until it has been removed from the buffer. If the incoming segment constitutes an ACK for a segment that was used for RTT estimation, the RTT is estimated here as well. Called from tcp_process().
Sends a single character to the serial device.
Checks if a specific local address is present on the netif and returns its index. Depending on its state, it may or may not be assigned to the interface (as per RFC terminology). The given address may or may not be zoned (i.e., have a zone index other than IP6_NO_ZONE). If the address is zoned, it must have the correct zone for the given netif, or no match will be found.
Convert IP address string (both versions) to numeric. The version is auto-detected from the string.
This function is called by the network interface device driver when an IPv6 packet is received. The function does the basic checks of the IP header such as packet size being at least larger than the header size etc. If the packet was not destined for us, the packet is forwarded (using ip6_forward). Finally, the packet is sent to the upper layer protocol input function.
Specifies the program specific state that should be passed to all other callback functions. The "pcb" argument is the current TCP connection control block, and the "arg" argument is the argument that will be passed to the callbacks.
A delayed-accept a connection is accepted (or closed/aborted): decreases the number of outstanding connections after calling tcp_backlog_delayed(). ATTENTION: the caller is responsible for calling tcp_backlog_accepted() or else the backlog feature will get out of sync!
Release a DHCP lease and stop DHCP statemachine (and AUTOIP if LWIP_DHCP_AUTOIP_COOP).
Search for a group that is joined on a netif
Deallocate a netbuf allocated by netbuf_new().
Search for a group in the netif's igmp group list
Returns a copy of the given TCP segment. The pbuf and data are not copied, only the pointers
dns_call_found() - call the found callback and check if there are duplicate entries for the given hostname. If there are any, their found callback will be called and they will be removed.
Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change
Start the DHCP process, discover a DHCP server.
Search for a destination cache entry
Increment the reference count of the pbuf.
Same as udp_sendto_if, but with source address
lwIP default implementation for strnicmp() non-standard function. This can be \#defined to strnicmp() depending on your platform port.
Add a network interface to the list of lwIP netifs.
Initialize one of the DNS servers.
Start the ping session
Get one byte from the specified position in a pbuf WARNING: returns zero for offset >= p->tot_len
Specifies the callback function that should be called when data has successfully been received (i.e., acknowledged) by the remote host. The len argument passed to the callback function gives the amount bytes that was acknowledged by the last acknowledgment.
Used to specify the function that should be called when a fatal error has occurred on the connection. If a connection is aborted because of an error, the application is alerted of this event by the err callback. Errors that might abort a connection are when there is a shortage of memory. The callback function to be called is set using the tcp_err() function.
Specifies the polling interval and the callback function that should be called to poll the application. The interval is specified in number of TCP coarse grained timer shots, which typically occurs twice a second. An interval of 10 means that the application would be polled every 5 seconds. When a connection is idle (i.e., no data is either transmitted or received), lwIP will repeatedly poll the application by calling a specified callback function. This can be used either as a watchdog timer for killing connections that have stayed idle for too long, or as a method of waiting for memory to become available. For instance, if a call to tcp_write() has failed because memory wasn't available, the application may use the polling functionality to call tcp_write() again when the connection has been idle for a while.
Add a new static entry to the ARP table. If an entry exists for the specified IP address, this entry is overwritten. If packets are queued for the specified IP address, they are sent out.
Fetch message from mailbox
try to fetch message from mailbox
Send message to mailbox
Call a specific function in the thread context of tcpip_thread for easy access synchronization. A function called in that way may access lwIP core code without fearing concurrent access. Does NOT block when the request cannot be posted because the tcpip_mbox is full, but returns ERR_MEM instead. Can be called from interrupt context. @see tcpip_callback
Create a UDP PCB for specific IP type. The pcb is not active until it has either been bound to a local address or connected to a remote address. @see MEMP_NUM_UDP_PCB @see udp_remove()
Calculates the effective send mss that can be used for a specific IP address by calculating the minimum of TCP_MSS and the mtu (if set) of the target netif (if not NULL).
Internal helper function to close a TCP netconn: since this sometimes doesn't work at the first attempt, this function is called from multiple places.
Send a raw ARP packet (opcode and all addresses can be modified)
Send an ICMPv6 packet in response to an incoming packet. The packet is sent *to* ip_current_src_addr() on ip_current_netif().
Schedule a delayed membership report for a group
Send a neighbor solicitation message for a specific neighbor cache entry
Create a new neighbor cache entry. If no unused entry is found, will try to recycle an old entry according to ad-hoc "age" heuristic.
Send an ARP request packet asking for ipaddr.
Sends a message to TCPIP thread to call a function. Caller thread blocks on on a provided semaphore, which ist NOT automatically signalled by TCPIP thread, this has to be done by the user. It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way with least runtime overhead.
Bind an UDP PCB to a specific netif. After calling this function, all packets received via this PCB are guaranteed to have come in via the specified netif, and all outgoing packets will go out via the specified netif. @see udp_disconnect()
Pass a received packet to tcpip_thread for input processing with ethernet_input or ip_input. Don't call directly, pass to netif_add() and call netif->input().
Initialize this module. Send out request instantly or after SNTP_STARTUP_DELAY(_FUNC).
Stop this module.
Bring an interface down, disabling any traffic processing.
Called by a driver when its link goes up
Creates a new semaphore
Copy part or all of one packet buffer into another, to a specified offset.
Find a network interface by searching for its name
Get PING function result action
Finds the appropriate network interface for a given IP address. It searches the list of network interfaces linearly. A match is found if the masked IP address of the network interface equals the masked IP address given to the function.
If both IP versions are enabled, this function can dispatch packets to the correct one. Don't call directly, pass to netif_add() and call netif->input().
Sets the callback function that will be called when new data arrives. The callback function will be passed a NULL pbuf to indicate that the remote host has closed the connection. If the callback function returns ERR_OK or ERR_ABRT it must have freed the pbuf, otherwise it must not have freed it.
Used for specifying the function that should be called when a LISTENing connection has been connected to another host. @see MEMP_NUM_TCP_PCB_LISTEN and MEMP_NUM_TCP_PCB
This function should be called by the application when it has processed the data. The purpose is to advertise a larger window when the data has been processed.
Remove a static entry from the ARP table previously added with a call to etharp_add_static_entry.
Get the Path MTU for a destination.
Netif was added, set up, or reconnected (link up)
Create an empty mailbox.
Pass a received packet to tcpip_thread for input processing
Close or shutdown a TCP netconn (doesn't delete it).
Execute a DNS query, only one IP address is returned
Send data over a UDP or RAW netconn (that is already connected).
Create a new netconn (of a specific type) that has a callback function. The corresponding pcb is also created.
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.
Get the local or remote IP address and port of a netconn. For RAW netconns, this returns the protocol instead of a port!
Receive data: actual implementation that doesn't care whether pbuf or netbuf is received (this is internal, it's just here for describing common errors)
Free the packet buffer included in a netbuf
Delete a netconn and all its resources. The pcb is NOT freed (since we might not be in the right thread context do this).
Allocate a new tcp_pcb structure.
Abandons a connection and optionally sends a RST to the remote host. Deletes the local protocol control block. This is done when a connection is killed because of shortage of memory.
Update the state that tracks the available window space to advertise. Returns how much extra window would be advertised if we sent an update now.
Called by tcp_close() to send a segment including FIN flag but not data. This FIN may be added to an existing segment or a new, otherwise empty segment is enqueued.
Enqueue SYN or FIN for transmission. Called by tcp_connect, tcp_listen_input, and tcp_close (via tcp_send_fin)
Default receive callback that is called if the user didn't register a recv callback for the pcb.
See if more data needs to be written from a previous call to netconn_write. Called initially from lwip_netconn_do_write. If the first call can't send all data (because of low memory or empty send-buffer), this function is called again from sent_tcp() or poll_tcp() to send more data. If all data is sent, the blocking application thread (waiting in netconn_write) is released.
Setup a tcp_pcb with the correct callback function pointers and their arguments.
Callback registered in the netconn layer for each socket-netconn. Processes recvevent (data available) and wakes up tasks waiting for select.
dns_check_entry() - see if entry has not yet been queried and, if so, sends out a query. Check an entry in the dns_table: - send out query for new entries - retry old pending entries on timeout (also with different servers) - remove completed entries from the table if their TTL has expired
Output a control segment pbuf to IP. Called from tcp_rst, tcp_send_empty_ack, tcp_keepalive and tcp_zero_window_probe, this function combines selecting a netif for transmission, generating the tcp header checksum and calling ip_output_if while handling netif hints and stats.
Check if a segment's pbufs are used by someone else than TCP. This can happen on retransmission if the pbuf of this segment is still referenced by the netif driver due to deferred transmission. This is the case (only!) if someone down the TX call path called pbuf_ref() on one of the pbufs! @arg seg the tcp segment to check
Timer callback function that calls cyclic->handler() and reschedules itself.
Bind the interface to the offered IP address.
Search the ARP table for a matching or new entry. If an IP address is given, return a pending or stable ARP entry that matches the address. If no match is found, create a new entry with this address set, but in state ETHARP_EMPTY. The caller must check and possibly change the state of the returned entry. If ipaddr is NULL, return a initialized new entry in state ETHARP_EMPTY. In all cases, attempt to create new entries from an empty entry. If no empty entries are available and ETHARP_FLAG_TRY_HARD flag is set, recycle old entries. Heuristic choose the least important entry for recycling.
Clean up ARP table entries
Delaying membership report for a group if necessary
Send an igmp packet to a specific group.
Send a MLD message (report or done). An IPv6 hop-by-hop options header with a router alert option is prepended.
Send a neighbor advertisement message
FunctionName : node_delete_from_list Description : remove the node from list Parameters : phead -- the head node of the list pdelete -- the remove node of the list Returns : none
FunctionName : dhcps_coarse_tmr Description : the lease time count Parameters : none Returns : none
Kills the oldest connection that is in specific state. Called from tcp_alloc() for LAST_ACK and CLOSING if no more connections are available.
Start DHCP negotiation for a network interface. If no DHCP client instance was attached to this interface, a new client is created first. If a DHCP client instance was already present, it restarts negotiation.
Get enabled state.
Sets the remote end of the pcb. This function does not generate any network traffic, but only sets the remote address of the pcb. ipaddr & port are expected to be in the same byte order as in the pcb. The udp pcb is bound to a random local port if not already bound. @see udp_disconnect()
Like dns_gethostbyname, but returned address type can be controlled:
Bring an interface up, available for processing traffic.
Resolve and fill-in Ethernet address header for outgoing IP packet. For IP multicast and broadcast, corresponding Ethernet addresses are selected and the packet is transmitted on the link. For unicast addresses, the packet is submitted to etharp_query(). In case the IP address is outside the local network, the IP address of the gateway is used.
Initialize one of the NTP servers by name
Resolve and fill-in Ethernet address header for outgoing IPv6 packet. For IPv6 multicast, corresponding Ethernet addresses are selected and the packet is transmitted on the link. For unicast addresses, ask the ND6 module what to do. It will either let us send the the packet right away, or queue the packet for later itself, unless an error occurs. @todo anycast addresses
This function calls dhcp_release_and_stop() internally. @deprecated Use dhcp_release_and_stop() instead.
Sets the DHCP server option info
Enable/Disable NAPT for a specified interface.
Get the sync interval of SNTP operation
Same as pbuf_header but does not check if 'header_size > 0' is allowed. This is used internally only, to allow PBUF_REF for RX.
Same as pbuf_add_header but does not check if 'header_size > 0' is allowed. This is used internally only, to allow PBUF_REF for RX.
Chain two pbufs (or pbuf chains) together. The caller MUST call pbuf_free(t) once it has stopped using it. Use pbuf_cat() instead if you no longer use t. The ->tot_len fields of all pbufs of the head chain are adjusted. The ->next field of the last pbuf of the head chain is adjusted. The ->ref field of the first pbuf of the tail chain is adjusted.
Copy application supplied data into a pbuf. This function can only be used to copy the equivalent of buf->tot_len data.
Same as pbuf_take() but puts data at an offset
Skip a number of bytes at the start of a pbuf
Put one byte to the specified position in a pbuf WARNING: silently ignores offset >= p->tot_len
Frees one or more addrinfo structures returned by getaddrinfo(), along with any additional storage associated with those structures. If the ai_next field of the structure is not null, the entire list of structures is freed.
This function is called by the network interface device driver when an IP packet is received. The function does the basic checks of the IP header such as packet size being at least larger than the header size etc. If the packet was not destined for us, the packet is forwarded (using ip_forward). The IP checksum is always checked. Finally, the packet is sent to the upper layer protocol input function.
Same as ip_output_if() but with the possibility to include IP options: @ param ip_options pointer to the IP options, copied into the IP header @ param optlen length of ip_options
Same as ip_output_if_opt() but 'src' address is not replaced by netif address when it is 'any'.
Same as ip6_output_if() but 'src' address is not replaced by netif address when it is 'any'.
Send an icmpv6 'destination unreachable' packet. This function must be used only in direct response to a packet that is being received right now. Otherwise, address zones would be lost.
Binds the connection to a netif and IP address. After calling this function, all packets received via this PCB are guaranteed to have come in via the specified netif, and all outgoing packets will go out via the specified netif.
Set the state of the connection to be LISTEN, which means that it is able to accept incoming connections. The protocol control block is reallocated in order to consume less memory. Setting the connection to LISTEN is an irreversible process.
Closes the connection held by the PCB. Listening pcbs are freed and may not be referenced any more. Connection pcbs are freed if not yet connected and may not be referenced any more. If a connection is established (at least SYN received or in a closing state), the connection is closed, and put in a closing state. The pcb is then automatically freed in tcp_slowtmr(). It is therefore unsafe to reference it (unless an error is returned). The function may return ERR_MEM if no memory was available for closing the connection. If so, the application should wait and try again either by using the acknowledgment callback or the polling functionality. If the close succeeds, the function returns ERR_OK.
Causes all or part of a full-duplex connection of this PCB to be shut down. This doesn't deallocate the PCB unless shutting down both sides! Shutting down both sides is the same as calling tcp_close, so if it succeeds (i.e. returns ER_OK), the PCB must not be referenced any more!
Source based IPv4 routing hook function.
Send an ARP request for the given IP address and/or queue a packet. If the IP address was not yet in the cache, a pending ARP cache entry is added and an ARP request is sent for the given address. The packet is queued on this entry. If the IP address was already pending in the cache, a new ARP request is sent for the given address. The packet is queued on this entry. If the IP address was already stable in the cache, and a packet is given, it is directly sent and no ARP request is sent out. If the IP address was already stable in the cache, and no packet is given, an ARP request is sent out.
Provide the Neighbor discovery process with a hint that a destination is reachable. Called by tcp_receive when ACKs are received or sent (as per RFC). This is useful to avoid sending NS messages every 30 seconds.
Create a new thread
Create a new mutex
Handle timeouts for NO_SYS==1 (i.e. without using tcpip_thread/sys_timeouts_mbox_fetch(). Uses sys_now() to call timeout handler functions when timeouts expire. Must be called periodically from your main loop.
Process an incoming UDP datagram. Given an incoming UDP datagram (as a chain of pbufs) this function finds a corresponding UDP PCB and hands over the pbuf to the pcbs recv function. If no pcb is found or the datagram is incorrect, the pbuf is freed.
Process received ethernet frames. Using this function instead of directly calling ip_input and passing ARP frames through etharp in ethernetif_input, the ARP cache is protected from concurrent access. Don't call directly, pass to netif_add() and call netif->input(). @see LWIP_HOOK_UNKNOWN_ETH_PROTOCOL @see ETHARP_SUPPORT_VLAN @see LWIP_HOOK_VLAN_CHECK
Send vectorized data atomically over a TCP netconn.
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.
Allocate memory for a packet buffer for a given netbuf.
Send the raw IP packet to the given address. An IP header will be prepended to the packet, unless the RAW_FLAGS_HDRINCL flag is set on the PCB. In that case, the packet must include an IP header, which will then be sent as is.
Bind an RAW PCB to a specific netif. After calling this function, all packets received via this PCB are guaranteed to have come in via the specified netif, and all outgoing packets will go out via the specified netif. @see raw_disconnect()
Join a group on one network interface.
Leave a group on one network interface.
Execute a DNS query Called from netconn_gethostbyname
Create a new netconn (of a specific type) that has a callback function. The corresponding pcb is NOT created!
Called periodically to dispatch TCP timers.
The initial input processing of TCP. It verifies the TCP header, demultiplexes the segment between the PCBs and passes it on to tcp_process(), which implements the TCP finite state machine. This function is called by the IP layer (in ip_input()).
Requeue the first unacked segment for retransmission Called by tcp_receive() for fast retransmit.
Requeue all unacked segments for retransmission Called by tcp_slowtmr() for slow retransmission.
Requeue all unacked segments for retransmission Called by tcp_slowtmr() for slow retransmission.
Pass pcb->refused_data to the recv callback
Send a TCP RESET packet (empty segment with RST flag set) to show that there is no matching local connection for a received segment. Called by tcp_input() (if no matching local pcb was found) and tcp_listen_input() (if incoming segment has ACK flag set). Since a RST segment is in most cases not sent for an active connection, tcp_rst() has a number of arguments that are taken from a tcp_pcb for most other segment output functions.
Calculates a new initial sequence number for new connections.
Translate an error to a unique void* passed via an mbox
Delete rcvmbox and acceptmbox of a netconn and free the left-over data in these mboxes
Same as get_socket but doesn't set errno
Free a socket (under lock)
Free a socket's leftover members.
Go through the readset and writeset lists and see which socket of the sockets set in the sets has events. On return, readset, writeset and exceptset have the sockets enabled that had events.
Update revents in each struct pollfd. Optionally update select_waiting in struct lwip_sock.
Wrapper function with matching prototype which calls the actual callback
Fragment an IP datagram if too large for the netif. Chop the datagram in MTU sized chunks and send them in order by pointing PBUF_REFs into p.
Determine if in incoming IP packet is covered by a RAW PCB and if so, pass it to a user-provided receive callback function. Given an incoming IP datagram (as a chain of pbufs) this function finds a corresponding RAW PCB and calls the corresponding receive callback function.
Adjusts the payload pointer to reveal headers in the payload. @see pbuf_add_header.
Parses the options contained in the incoming segment. Called from tcp_listen_input() and tcp_process(). Currently, only the MSS option is supported!
Called from tcp_input to check for TF_CLOSED flag. This results in closing and deallocating a pcb at the correct place to ensure no one references it any more.
Insert segment into the list (segments covered with new one will be deleted) Called from tcp_receive()
Create a TCP segment with prefilled header. Called by tcp_write, tcp_enqueue_flags and tcp_split_unsent_seg
Allocate a pbuf and create a tcphdr at p->payload, used for output functions other than the default tcp_output -> tcp_output_segment (e.g. tcp_send_empty_ack, etc.)
Output a control segment pbuf to IP. Called instead of tcp_output_control_segment when we don't have a pcb but we do know the interface to send to.
Free DHCP PCB if the last netif stops using it
Select a DHCP server offer out of all offers. Simply select the first offer received.
Enter REBOOTING state to verify an existing lease
Send an ARP request packet asking for ipaddr to a specific eth address. Used to send unicast request to refresh the ARP table just before an entry times out
Send an icmp packet in response to an incoming packet.
Search for a specific igmp group and create a new one if not found-
Wrapper function with matching prototype which calls the actual callback
Start a timer for an igmp group
Send an ICMPv6 packet (with srd/dst address and netif given).
Wrapper function with matching prototype which calls the actual callback
Send a neighbor solicitation message
Free a complete queue of nd6 q entries
Send queued packets for a neighbor
Select a default router for a destination. This function is used both for routing and for finding a next-hop target for a packet. In the former case, the given netif is NULL, and the returned router entry must be for a netif suitable for sending packets (up, link up). In the latter case, the given netif is not NULL and restricts router choice.
Send a router solicitation message
FunctionName : add_end Description : add end option of DHCP message Parameters : optptr -- the addr of DHCP message option Returns : the addr of DHCP message option
FunctionName : create_msg Description : create response message Parameters : m -- DHCP message info Returns : none
FunctionName : add_msg_type Description : add TYPE option of DHCP message Parameters : optptr -- the addr of DHCP message option Returns : the addr of DHCP message option
Closes the TX side of a connection held by the PCB. For tcp_close(), a RST is sent if the application didn't receive all data (tcp_recved() not called for all data passed to recv callback). Listening pcbs are freed and may not be referenced any more. Connection pcbs are freed if not yet connected and may not be referenced any more. If a connection is established (at least SYN received or in a closing state), the connection is closed, and put in a closing state. The pcb is then automatically freed in tcp_slowtmr(). It is therefore unsafe to reference it.
Allocate a new local TCP port.
Deallocates the NAPT tables.
Allocates and initializes the NAPT tables.
Get the forwarding port(s) (as bit mask) for the specified destination mac address
Helper function to pass a pbuf to all ports marked in 'dstports'
Set a network interface as the default network interface (used to output all packets for which no specific route is found)
Return the interface name for the netif matching index or NULL if not found/on error
Report MLD memberships for this interface
Delete a semaphore
Sets the operating mode.
Gets the server reachability shift register as described in RFC 5905.
Allocate an index to store data in client_data member of struct netif. Returned value is an index in mentioned array. @see LWIP_NUM_NETIF_CLIENT_DATA
Stop the ping session
Removes a struct dhcp from a netif. ATTENTION: Only use this when not using dhcp_set_struct() to allocate the struct dhcp since the memory is passed back to the heap.
Sets callback on assigning an IP to the connected client
Starts the DHCP server on the specified network interface
Stops the DHCP server on the specified netif
Get status of time sync After the update is completed, the status will be returned as SNTP_SYNC_STATUS_COMPLETED. After that, the status will be reset to SNTP_SYNC_STATUS_RESET. If the update operation is not completed yet, the status will be SNTP_SYNC_STATUS_RESET. If a smooth mode was chosen and the synchronization is still continuing (adjtime works), then it will be SNTP_SYNC_STATUS_IN_PROGRESS.
Set a callback function for time synchronization notification
system time setter used in the sntp module
lwIP default implementation for itoa() non-standard function. This can be \#defined to itoa() or snprintf(result, bufsize, "%d", number) depending on your platform port.
Allocates a pbuf for referenced data. Referenced data can be volatile (PBUF_REF) or long-lived (PBUF_ROM). The actual memory allocated for the pbuf is determined by the layer at which the pbuf is allocated and the requested size (from the size parameter). - PBUF_ROM: It is assumed that the memory used is really similar to ROM in that it is immutable and will not be changed. Memory which is dynamic should generally not be attached to PBUF_ROM pbufs. Use PBUF_REF instead. - PBUF_REF: It is assumed that the pbuf is only being used in a single thread. If the pbuf gets queued, then pbuf_take should be called to copy the buffer.
Similar to pbuf_header(-size) but de-refs header pbufs for (size >= p->len)
Compare pbuf contents at specified offset with memory s2, both of length n
Find occurrence of mem (with length mem_len) in pbuf p, starting at offset start_offset.
mem_init is not used when using pools instead of a heap or using C library malloc().
mem_trim is not used when using pools instead of a heap or using C library malloc(): we can't free part of a pool element and the stack support mem_trim() to return a different pointer
Initialize custom memory pool. Related functions: memp_malloc_pool, memp_free_pool
Initializes lwIP built-in pools. Related functions: memp_malloc, memp_free Carves out memp_memory into linked lists for each pool-type.
Call netif_poll() in the main loop of your application. This is to prevent reentering non-reentrant functions like tcp_input(). Packets passed to netif_loop_output() are put on a list that is passed to netif->input() by netif_poll().
Set a socket into listen mode. The socket may not have been used for another connection previously.
A minimal implementation of fcntl. Currently only the commands F_GETFL and F_SETFL are implemented. The flag O_NONBLOCK and access modes are supported for F_GETFL, only the flag O_NONBLOCK is implemented for F_SETFL.
Close one end of a full-duplex connection.
Returns an entry containing addresses of address family AF_INET for the host with name name. dns_gethostbyname can return as many address as configured in DNS_MAX_HOST_IP.
Thread-safe variant of lwip_gethostbyname: instead of using a static buffer, this function takes buffer and errno pointers as arguments and uses these for the result.
Translates the name of a service location (for example, a host name) and/or a service name and returns a set of socket addresses and associated information to be used in creating a socket with which to address the specified service. Memory for the result is allocated internally and must be freed by calling lwip_freeaddrinfo()! dns_gethostbyname can return as many address as configured in DNS_MAX_HOST_IP. Also, service names are not supported (only port numbers)! @todo: implement AI_V4MAPPED, AI_ADDRCONFIG
Same as ip_output_if() but 'src' address is not replaced by netif address when it is 'any'.
Add a hop-by-hop options header with a router alert option and padding. Used by MLD when sending a Multicast listener report/done message.
Send an icmpv6 'packet too big' packet. This function must be used only in direct response to a packet that is being received right now. Otherwise, address zones would be lost.
Send an icmpv6 'time exceeded' packet. This function must be used only in direct response to a packet that is being received right now. Otherwise, address zones would be lost.
Processes ICMP input packets, called from ip_input(). Currently only processes icmp echo requests and sends out the echo response.
Send a 'time exceeded' packet, called from ip_forward() if TTL is 0.
Process an input ICMPv6 message. Called by ip6_input. Will generate a reply for echo requests. Other messages are forwarded to nd6_input, or mld6_input.
Creates a new TCP protocol control block but doesn't place it on any of the TCP PCB lists. The pcb is not put on any list until binding using tcp_bind(). @see MEMP_NUM_TCP_PCB_LISTEN and MEMP_NUM_TCP_PCB
Delay accepting a connection in respect to the listen backlog: the number of outstanding connections is increased until tcp_backlog_accepted() is called. ATTENTION: the caller is responsible for calling tcp_backlog_accepted() or else the backlog feature will get out of sync!
Binds the connection to a local port number and IP address. If the IP address is not given (i.e., ipaddr == IP_ANY_TYPE), the connection is bound to all local IP addresses. If another connection is bound to the same port, the function will return ERR_USE, otherwise ERR_OK is returned. @see MEMP_NUM_TCP_PCB_LISTEN and MEMP_NUM_TCP_PCB
Connects to another host. The function given as the "connected" argument will be called when the connection has been established. Sets up the pcb to connect to the remote host and sends the initial SYN segment which opens the connection. The tcp_connect() function returns immediately; it does not wait for the connection to be properly setup. Instead, it will call the function specified as the fourth argument (the "connected" argument) when the connection is established. If the connection could not be properly established, either because the other host refused the connection or because the other host didn't answer, the "err" callback function of this pcb (registered with tcp_err, see below) will be called. The tcp_connect() function can return ERR_MEM if no memory is available for enqueueing the SYN segment. If the SYN indeed was enqueued successfully, the tcp_connect() function returns ERR_OK.
Write data for sending (but does not send it immediately). It waits in the expectation of more data being sent soon (as it can send them more efficiently by combining them together). To prompt the system to send data now, call tcp_output() after calling tcp_write(). This function enqueues the data pointed to by the argument dataptr. The length of the data is passed as the len parameter. The apiflags can be one or more of: - TCP_WRITE_FLAG_COPY: indicates whether the new memory should be allocated for the data to be copied into. If this flag is not given, no new memory should be allocated and the data should only be referenced by pointer. This also means that the memory behind dataptr must not change until the data is ACKed by the remote host - TCP_WRITE_FLAG_MORE: indicates that more data follows. If this is omitted, the PSH flag is set in the last segment created by this call to tcp_write. If this flag is given, the PSH flag is not set. The tcp_write() function will fail and return ERR_MEM if the length of the data exceeds the current send buffer size or if the length of the queue of outgoing segment is larger than the upper limit defined in lwipopts.h. The number of bytes available in the output queue can be retrieved with the tcp_sndbuf() function. The proper way to use this function is to call the function with at most tcp_sndbuf() bytes of data. If the function returns ERR_MEM, the application should wait until some of the currently enqueued data has been successfully received by the other host and try again.
Hook to generate an Initial Sequence Number (ISN) for a new TCP connection.
The default IPv6 input hook checks if we already have an IPv6 address (netif->ip6_addr[0] is link local), so we drop all incoming IPv6 packets if the input netif has no LL address. LWIP accepts IPv6 multicast packets even if the ip6_addr[] for the given address wasn't set, this may cause trouble if we enable IPv6 SLAAC (LWIP_IPV6_AUTOCONFIG), but have not created any LL address. If the router sends a packet to all nodes 0xff01::1 with RDNSS servers, it would be accepted and rewrite DNS server info with IPv6 values (which won't be routable without any IPv6 address assigned)
Remove all ARP table entries of the specified netif.
Responds to ARP requests to us. Upon ARP replies to us, add entry to cache send out queued IP packets. Updates cache with snooped address pairs. Should be called for incoming ARP packets. The pbuf in the argument is freed by this function. @see pbuf_free()
Renew an existing DHCP lease at the involved DHCP server.
Handle a possible change in the network configuration. This enters the REBOOTING state to verify that the currently bound address is still valid.
check if DHCP supplied netif->ip_addr
The DHCP timer that checks for lease renewal/rebind timeouts. Must be called once a minute (see ).
DHCP transaction timeout handling (this function must be called every 500ms, see ). A DHCP server is expected to respond within a short period of time. This timer checks whether an outstanding DHCP request is timed out.
Stop MLD processing on interface
Periodic timer for mld processing. Must be called every MLD6_TMR_INTERVAL milliseconds (100). When a delaying member expires, a membership report is sent.
Process an input MLD message. Called by icmp6_input.
Join a group on one or all network interfaces. If the group is to be joined on all interfaces, the given group address must not have a zone set (i.e., it must have its zone index set to IP6_NO_ZONE). If the group is to be joined on one particular interface, the given group address may or may not have a zone set.
Leave a group on a network interface. Zoning of address follows the same rules as mld6_joingroup.
Periodic timer for Neighbor discovery functions: - Update neighbor reachability states - Update destination cache entries age - Update invalidation timers of default routers and on-link prefixes - Update lifetimes of our addresses - Perform duplicate address detection (DAD) for our addresses - Send router solicitations
Process an incoming neighbor discovery message
Clear the destination cache. This operation may be necessary for consistency in the light of changing local addresses and/or use of the gateway hook.
Find a router-announced route to the given destination. This route may be based on an on-link prefix or a default router. If a suitable route is found, the returned netif is guaranteed to be in a suitable state (up, link up) to be used for packet transmission.
A packet is to be transmitted to a specific IPv6 destination on a specific interface. Check if we can find the hardware address of the next hop to use for the packet. If so, give the hardware address to the caller, which should use it to send the packet right away. Otherwise, enqueue the packet for later transmission while looking up the hardware address, if possible. As such, this function returns one of three different possible results: - ERR_OK with a non-NULL 'hwaddrp': the caller should send the packet now. - ERR_OK with a NULL 'hwaddrp': the packet has been enqueued for later. - not ERR_OK: something went wrong; forward the error upward in the stack.
Remove all prefix, neighbor_cache and router entries of the specified netif.
The state of a local IPv6 address entry is about to change. If needed, join or leave the solicited-node multicast group for the address.
Initialize the resolver: set up the UDP pcb and configure the default server (if DNS_SERVER_ADDRESS is set).
The DNS resolver client timer - handle retries and timeouts and should be called every DNS_TMR_INTERVAL milliseconds (every second by default).
Resolve a hostname (string) into an IP address. NON-BLOCKING callback version for use with raw API!!! Returns immediately with one of err_t return codes: - ERR_OK if hostname is a valid IP address string or the host name is already in the local names table. - ERR_INPROGRESS enqueue a request to be sent to the DNS server for resolution if no errors are present. - ERR_ARG: dns client not initialized or invalid hostname
Initialize the sys_arch layer
Try to post a message to mailbox from ISR
Initialize this module
Return the time left before the next timeout is due. If no timeouts are enqueued, returns 0xffffffff
Sends the pbuf p using UDP. The pbuf is not deallocated. The datagram will be sent to the current remote_ip & remote_port stored in pcb. If the pcb is not bound to a port, it will automatically be bound to a random port. @see udp_disconnect() udp_sendto()
Initialize this module.
This function is called from netif.c when address is changed
Clears expired entries in the ARP table. This function should be called every ARP_TMR_INTERVAL milliseconds (1 second), in order to expire entries in the ARP table.
This function updates the system time. This is a weak-linked function. It is possible to replace all SNTP update functionality by placing a sntp_sync_time() function in the app firmware source. If the default implementation is used, calling sntp_set_sync_mode() allows the time synchronization mode to be changed to instant or smooth. If a callback function is registered via sntp_set_time_sync_notification_cb(), it will be called following time synchronization.
Sets SNTP operating mode. The mode has to be set before init.
Init and start SNTP service
Gets the server reachability shift register as described in RFC 5905.
Get the configured operating mode
Gets the operating mode.
Initialize one of the NTP servers by IP address
Obtain one of the currently configured by IP address (or DHCP) NTP servers
Obtain one of the currently configured by name NTP servers.
Send data over a TCP netconn.
Shut down one or both sides of a TCP netconn (doesn't delete it).
Join multicast groups for UDP netconns.
Join multicast groups for UDP netconns.
Receive data (in form of a pbuf) from a TCP netconn
Receive data (in form of a netbuf) from a UDP or RAW netconn
Accept a new connection on a TCP listening netconn.
Bind a netconn to a specific local IP address and port. Binding one netconn twice might not always be checked correctly!
Connect a netconn to a specific remote IP address and port.
Disconnect a netconn from its current peer (only valid for UDP netconns).
Set a TCP netconn into listen mode
Send the raw IP packet to the given address, using a particular outgoing netif and source IP address. An IP header will be prepended to the packet, unless the RAW_FLAGS_HDRINCL flag is set on the PCB. In that case, the packet must include an IP header, which will then be sent as is.
Send the raw IP packet to the address given by raw_connect()
Set the callback function for received packets that match the raw PCB's protocol and binding. The callback function MUST either - eat the packet by calling pbuf_free() and returning non-zero. The packet will not be passed to other raw PCBs or other protocol layers. - not free the packet, and return zero. The packet will be matched against further PCBs and/or forwarded to another protocol layers.
Create a RAW PCB. @see raw_remove()
Create a RAW PCB for specific IP type. @see raw_remove()
Remove an RAW PCB. @see raw_new()
Bind a RAW PCB. @see raw_disconnect()
Connect an RAW PCB. This function is required by upper layers of lwip. Using the raw api you could use raw_sendto() instead This will associate the RAW PCB with the remote address. @see raw_disconnect() and raw_sendto()
Initialize the IGMP module
Start IGMP processing on interface
Stop IGMP processing on interface
Report IGMP memberships for this interface
Called from ip_input() if a new IGMP packet is received.
The igmp timer function (both for NO_SYS=1 and =0) Should be called every IGMP_TMR_INTERVAL milliseconds (100 ms is default).
Send some data on a RAW or UDP pcb contained in a netconn Called from netconn_send
Indicate data has been received from a TCP pcb contained in a netconn Called from netconn_recv
Indicate that a TCP pcb has been accepted Called from netconn_accept
Send some data on a TCP pcb contained in a netconn Called from netconn_write
Return a connection's local or remote address Called from netconn_getaddr
Close or half-shutdown a TCP pcb contained in a netconn Called from netconn_close In contrast to closing sockets, the netconn is not deallocated.
Join multicast groups for UDP netconns. Called from netconn_join_leave_group
Join multicast groups for UDP netconns. Called from netconn_join_leave_group_netif
Create a new pcb of a specific type inside a netconn. Called from netconn_new_with_proto_and_callback.
Delete the pcb inside a netconn. Called from netconn_delete.
Bind a pcb contained in a netconn Called from netconn_bind.
Bind a pcb contained in a netconn to an interface Called from netconn_bind_if.
Connect a pcb contained inside a netconn Called from netconn_connect.
Disconnect a pcb contained inside a netconn Only used for UDP netconns. Called from netconn_disconnect.
Set a TCP pcb contained in a netconn into listen mode Called from netconn_listen.
Initialize this module.
Called every 500 ms and implements the retransmission timer and the timer that removes PCBs that have been in TIME-WAIT for enough time. It also increments various timers such as the inactivity timer in each PCB. Automatically called from tcp_tmr().
Is called every TCP_FAST_INTERVAL (250 ms) and process data previously "refused" by upper layer (application) and sends delayed ACKs or pending FINs. Automatically called from tcp_tmr().
Requeue all unacked segments for retransmission Called by tcp_process() only, tcp_slowtmr() needs to do some things between "prepare" and "commit".
Handle retransmission after three dupacks received
Send keepalive packets to keep a connection active although no data is sent over it. Called by tcp_slowtmr()
Split segment on the head of the unsent queue. If return is not ERR_OK, existing head remains intact The split is accomplished by creating a new TCP segment and pbuf which holds the remainder payload after the split. The original pbuf is trimmed to new length. This allows splitting of read-only pbufs
Send persist timer zero-window probes to keep a connection active when a window update is lost. Called by tcp_slowtmr()
This function is called from netif.c when address is changed or netif is removed
Poll callback function for TCP netconns. Wakes up an application thread that waits for a connection to close or data to be sent. The application thread then takes the appropriate action to go on. Signals the conn->sem. netconn_close waits for conn->sem if closing failed. @see tcp.h (struct tcp_pcb.poll) for parameters and return value
Sent callback function for TCP netconns. Signals the conn->sem and calls API_EVENT. netconn_write waits for conn->sem if send buffer is low. @see tcp.h (struct tcp_pcb.sent) for parameters and return value
Error callback function for TCP netconns. Signals conn->sem, posts to all conn mboxes and calls API_EVENT. The application thread has then to decide what to do. @see tcp.h (struct tcp_pcb.err) for parameters
Creates a new address information (addrinfo) structure based on the provided parameters.
Allocate a new socket for a given netconn.
Free a socket. The socket's netconn must have been delete before!
Unregister a previously registered membership. This prevents dropping the membership on socket close. ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK).
Drop all memberships of a socket that were not dropped explicitly via setsockopt. ATTENTION: this function is NOT called from tcpip_thread (or under CORE_LOCK).
Register a new MLD6 membership. On socket close, the membership is dropped automatically. ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK).
Unregister a previously registered MLD6 membership. This prevents dropping the membership on socket close. ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK).
Drop all MLD6 memberships of a socket that were not dropped explicitly via setsockopt. ATTENTION: this function is NOT called from tcpip_thread (or under CORE_LOCK).
Check if any select waiters are waiting on this socket and its events
lwip_getsockopt_callback: only used without CORE_LOCKING to get into the tcpip_thread
lwip_getsockopt_impl: the actual implementation of getsockopt: same argument as lwip_getsockopt, either called directly or through callback
lwip_setsockopt_callback: only used without CORE_LOCKING to get into the tcpip_thread
lwip_setsockopt_impl: the actual implementation of setsockopt: same argument as lwip_setsockopt, either called directly or through callback
Register a new IGMP membership. On socket close, the membership is dropped automatically. ATTENTION: this function is called from tcpip_thread (or under CORE_LOCK).
Initialize all modules. Use this in NO_SYS mode. Use tcpip_init() otherwise.
Actually send an sntp request to a server.
Receive input function for DNS response packets arriving for the dns UDP pcb.
Send a DNS query packet.
Look up a hostname in the array of known hostnames.
Check whether there are other backup DNS servers available to try
Call dns_check_entry for each entry in dns_table - check all entries.
Parts of the pseudo checksum which are common to IPv4 and IPv6
Parts of the pseudo checksum which are common to IPv4 and IPv6
Calculates the checksum with IPv6 pseudo header used by TCP and UDP for a pbuf chain. IPv6 addresses are expected to be in network byte order. Will only compute for a portion of the payload.
Calculate a checksum over a chain of pbufs (without pseudo-header, much like inet_chksum only pbufs are used).
Fragment an IPv6 datagram if too large for the netif or path MTU. Chop the datagram in MTU sized chunks and send them in order by pointing PBUF_REFs into p
Dummy IPv6 output function for netifs not supporting IPv6
Dummy IPv4 output function for netifs not supporting IPv4
This function is called from netif.c when address is changed
Called by tcp_input() when a segment arrives for a connection in TIME_WAIT.
Implements the TCP state machine. Called by tcp_input. In some states tcp_receive() is called to receive data. The tcp_seg argument will be freed by the caller (tcp_input()) unless the recv_data pointer in the pcb is set.
Called by tcp_input() when a segment arrives for a listening connection (from tcp_input()).
Remove segments from a list if the incoming ACK acknowledges them
Called by tcp_output() to actually send a TCP segment over IP.
Timer callback function that calls tcp_tmr() and reschedules itself.
Common code to see if the current input packet matches the pcb (current input packet is accessed via ip(4/6)_current_* macros)
Ensure DHCP PCB is allocated and bound
A DHCP negotiation transaction, or ARP request, has timed out. The timer that was started with the DHCP or ARP request has timed out, indicating no response was received in time.
The renewal period has timed out.
The rebind period has timed out.
Handle a DHCP ACK packet
If an incoming DHCP message is in response to us, then trigger the state machine
Decline an offered lease. Tell the DHCP server we do not accept the offered address. One reason to decline the lease is when we find out the address is already in use by another host (through ARP).
Rebind with a DHCP server for an existing DHCP lease.
Update (or insert) a IP/MAC address pair in the ARP cache. If a pending entry is resolved, any queued packets will be sent at this point. @see pbuf_free()
Just a small helper function that sends a pbuf to an ethernet address in the arp_table specified by the index 'arp_idx'.
Remove a group from netif's igmp group list, but don't free it yet
Called if a timeout for one group is reached. Sends a report for this group.
Sends an IP packet on a network interface. This function constructs the IP header and calculates the IP header checksum. If the source IP address is NULL, the IP address of the outgoing network interface is filled in as source address.
Return true if the current input packet should be accepted on this netif
Send an ICMPv6 packet in response to an incoming packet. Call this function if the packet is NOT sent as a direct response to an incoming packet, but rather sometime later (e.g. for a fragment reassembly timeout). The caller must provide the zoned source and destination addresses from the original packet with the src_addr and dest_addr parameters. The reason for this approach is that while the addresses themselves are part of the original packet, their zone information is not, thus possibly resulting in a link-local response being sent over the wrong link.
Return true if the current input packet should be accepted on this netif
Remove a group from the mld_group_list, but do not free it yet
create a new group
A local address has been determined to be a duplicate. Take the appropriate action(s) on the address and the interface as a whole.
Queue a packet for a neighbor.
Create a new destination cache entry. If no unused entry is found, will recycle oldest entry.
Determine whether an address matches an on-link prefix or the subnet of a statically assigned address.
Find an entry for a default router.
Create a new entry for a default router.
Find the cached entry for an on-link prefix.
Creates a new entry for an on-link prefix.
Determine the next hop for a destination. Will determine if the destination is on-link, else a suitable on-link router is selected. The last entry index is cached for fast entry search.
A real simple and slow implementation of an auto-learning forwarding database that remembers known src mac addresses to know which port to send frames destined for that mac address. ATTENTION: This is meant as an example only, in real-world use, you should provide a better implementation :-)
Walk our list of auto-learnt fdb entries and return a port to forward or BR_FLOOD if unknown
Init our simple fdb list
Timer callback for fdb aging, called once per second
Send a pbuf doing the necessary SLIP encapsulation Uses the serial layer's sio_send()
Like slipif_rxbyte, but passes completed packets to netif->input
This function is implemented only in FreeRTOS port (ingroup sys_sem) and has no official API counterpart in lwip's sys.h declarations Signals a semaphore from ISR
FunctionName : add_offer_options Description : add OFFER option of DHCP message Parameters : optptr -- the addr of DHCP message option Returns : the addr of DHCP message option
FunctionName : dhcps_response_ip_set Description : set the ip address for sending to the DHCP client Parameters : m -- DHCP message info ip4_out -- ip address for sending Returns : none
Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list
NAPT for a forwarded packet. It checks weather we need NAPT and modify the packet source address and port if needed.
NAPT for an input packet. It checks weather the destination is on NAPT table and modify the packet destination address and port if needed.
Initialize a custom pbuf (already allocated). Example of custom pbuf usage: zerocopyrx
Remove a network interface from the list of lwIP netifs.
Called by a driver when its link goes down
Change an IPv6 address of a network interface
Create a link-local IPv6 address on a netif (stored in slot 0)
This function allows for the easy addition of a new IPv6 address to an interface. It takes care of finding an empty slot and then sets the address tentative (to make sure that all the subsequent processing happens).
Add extended netif events listener
Remove extended netif events listener
Initialize the TCP ISN module, with the boot time and a secret.
This function calls dhcp_release_and_stop() internally. @deprecated Use dhcp_release_and_stop() instead.
Obtain one of the currently configured DNS server.
Gets DNS server associated with this DHCP server
Creates new DHCP server object
Deletes supplied DHPC server object @warning This may not delete the handle immediately if the server wasn't stopped properly, but mark for deleting once the timer callback occurs
Gets the DHCP server option info
Tries to find IP address corresponding to the supplied MAC
Sets DNS server address for the DHCP server
Initialize this module: - initialize all sub modules - start the tcpip_thread
Set the sync mode Modes allowed: SNTP_SYNC_MODE_IMMED and SNTP_SYNC_MODE_SMOOTH.
Initialization function passed to netif_add(). ATTENTION: A pointer to a must be passed as 'state' to netif_add when adding the bridge. I supplies MAC address and controls memory allocation (number of ports, FDB size).
Add a port to the bridge
Add a static entry to the forwarding database. A static entry marks where frames to a specific eth address (unicast or group address) are forwarded. bits [0..(BRIDGEIF_MAX_PORTS-1)]: hw ports bit [BRIDGEIF_MAX_PORTS]: cpu port 0: drop
Remove a static entry from the forwarding database
Same as ipaddr_ntoa, but reentrant since a user-supplied buffer is used.
Set netbios name. ATTENTION: the hostname must be less than 15 characters! the NetBIOS name spec says the name MUST be upper case, so incoming name is forced into uppercase :-)
Init netbios responder
Enable/Disable NAPT for a specified interface.
system time getter used in the sntp module
lwIP default implementation for stricmp() non-standard function. This can be \#defined to stricmp() depending on your platform port.
lwIP default implementation for strnstr() non-standard function. This can be \#defined to strnstr() depending on your platform port.
lwIP default implementation for strnistr() non-standard function. This can be \#defined to strnistr() depending on your platform port.
Checks if a netmask is valid (starting with ones, then only zeros)
Adjusts the payload pointer to hide or reveal headers in the payload. Adjusts the ->payload pointer so that space for a header (dis)appears in the pbuf payload. The ->payload, ->tot_len and ->len fields are adjusted. PBUF_ROM and PBUF_REF type buffers cannot have their sizes increased, so the call will fail. A check is made that the increase in header size does not move the payload pointer in front of the start of the buffer.
Dechains the first pbuf from its succeeding pbufs in the chain. Makes p->tot_len field equal to p->len.
Get part of a pbuf's payload as contiguous memory. The returned memory is either a pointer into the pbuf's payload or, if split over multiple pbufs, a copy into the user-supplied buffer.
Creates a single pbuf out of a queue of pbufs. @remark: Either the source pbuf 'p' is freed by this function or the original pbuf 'p' is returned, therefore the caller has to check the result!
Find occurrence of substr with length substr_len in pbuf p, start at offset start_offset WARNING: in contrast to strstr(), this one does not stop at the first \0 in the pbuf/source string!
Get an element from a custom pool.
Put a custom pool element back into its pool.
Add a network interface to the list of lwIP netifs. Same as netif_add but without IPv4 addresses
Change the IP address of a network interface
Change the netmask of a network interface
Change the default gateway for a network interface
Forwards a received packet for input processing with ethernet_input() or ip_input() depending on netif flags. Don't call directly, pass to netif_add() and call netif->input(). Only works if the netif driver correctly sets NETIF_FLAG_ETHARP and/or NETIF_FLAG_ETHERNET flag!
Return the interface index for the netif with name or NETIF_NO_INDEX if not found/on error
LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore
LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore
Maps an interface index to its corresponding name.
Returns the interface index corresponding to name ifname.
Set PING function option
Simple interface to ip_output_if. It finds the outgoing network interface and calls upon ip_output_if to do the actual work.
Set a default netif for IPv4 multicast.
Simple interface to ip6_output_if. It finds the outgoing network interface and calls upon ip6_output_if to do the actual work.
Send an icmpv6 'time exceeded' packet, with explicit source and destination addresses. This function may be used to send a response sometime after receiving the packet for which this response is meant. The provided source and destination addresses are used primarily to retain their zone information.
Creates a new TCP protocol control block but doesn't place it on any of the TCP PCB lists. The pcb is not put on any list until binding using tcp_bind(). If memory is not available for creating the new pcb, NULL is returned. @see MEMP_NUM_TCP_PCB_LISTEN and MEMP_NUM_TCP_PCB @internal: Maybe there should be a idle TCP PCB list where these PCBs are put on. Port reservation using tcp_bind() is implemented but allocated pcbs that are not bound can't be killed automatically if wanting to allocate a pcb with higher prio (@see tcp_kill_prio())
Set the state of the connection to be LISTEN, which means that it is able to accept incoming connections. The protocol control block is reallocated in order to consume less memory. Setting the connection to LISTEN is an irreversible process. When an incoming connection is accepted, the function specified with the tcp_accept() function will be called. The pcb has to be bound to a local port with the tcp_bind() function. The tcp_listen() function returns a new connection identifier, and the one passed as an argument to the function will be deallocated. The reason for this behavior is that less memory is needed for a connection that is listening, so tcp_listen() will reclaim the memory needed for the original connection and allocate a new smaller memory block for the listening connection. tcp_listen() may return NULL if no memory was available for the listening connection. If so, the memory associated with the pcb passed as an argument to tcp_listen() will not be deallocated. The backlog limits the number of outstanding connections in the listen queue to the value specified by the backlog argument. To use it, your need to set TCP_LISTEN_BACKLOG=1 in your lwipopts.h.
Sets the priority of a connection.
Send an ARP request packet probing for an ipaddr. Used to send probe messages for address conflict detection.
Send an ARP request packet announcing an ipaddr. Used to send announce messages for address conflict detection.
Set a statically allocated struct dhcp to work with. Using this prevents dhcp_start to allocate it using mem_malloc.
Inform a DHCP server of our manual configuration. This informs DHCP servers of our fixed IP address configuration by sending an INFORM message. It does not involve DHCP address configuration, it is just here to be nice to the network.
Clears the DNS cache
Deinitialize this module
Rebase the timeout times to the current time. This is necessary if sys_check_timeouts() hasn't been called for a long time (e.g. while saving energy) to prevent all timer functions of that period being called.
Sends a message to TCPIP thread to call a function. Caller thread blocks until the function returns. It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or LWIP_NETCONN_SEM_PER_THREAD. If not, a semaphore is created and destroyed on every call which is usually an expensive/slow operation.
Allocate a structure for a static callback message and initialize it. The message has a special type such that lwIP never frees it. This is intended to be used to send "static" messages from interrupt context, e.g. the message is allocated once and posted several times from an IRQ using tcpip_callbackmsg_trycallback(). Example usage: Trigger execution of an ethernet IRQ DPC routine in lwIP thread context. @see tcpip_callbackmsg_trycallback() @see tcpip_callbackmsg_delete()
Free a callback message allocated by tcpip_callbackmsg_new(). @see tcpip_callbackmsg_new()
Try to post a callback-message to the tcpip_thread tcpip_mbox. @see tcpip_callbackmsg_new()
Try to post a callback-message to the tcpip_thread mbox. Same as tcpip_callbackmsg_trycallback but calls sys_mbox_trypost_fromisr(), mainly to help FreeRTOS, where calls differ between task level and ISR level. @see tcpip_callbackmsg_new()
A simple wrapper function that allows you to free a pbuf from interrupt context.
A simple wrapper function that allows you to free heap memory from interrupt context.
Finds (stable) ethernet/IP address pair from ARP table using interface and IP address index.
Possibility to iterate over stable ARP table entries
Set the sync interval of SNTP operation Note: SNTPv4 RFC 4330 enforces a minimum sync interval of 15 seconds. This sync interval will be used in the next attempt update time throught SNTP. To apply the new sync interval call the sntp_restart() function, otherwise, it will be applied after the last interval expired.
Stops SNTP service
Sets SNTP server address
Checks if sntp is enabled
Check if a Kiss-of-Death has been received from this server (only valid for SNTP_MAX_SERVERS > 1).
Close a TCP netconn (doesn't delete it).
Receive data (in form of a pbuf) from a TCP netconn
Receive data (in form of a netbuf) from a UDP or RAW netconn
Receive data (in form of a netbuf containing a packet buffer) from a netconn
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).
Bind a netconn to a specific interface and port. Binding one netconn twice might not always be checked correctly!
Create (allocate) and initialize a new netbuf. The netbuf doesn't yet contain a packet buffer!
Let a netbuf reference existing (non-volatile) data.
Chain one netbuf to another (@see pbuf_chain)
Get the data pointer and length of the data inside a netbuf.
Move the current data pointer of a packet buffer contained in a netbuf to the next part. The packet buffer itself is not modified.
Move the current data pointer of a packet buffer contained in a netbuf to the beginning of the packet. The packet buffer itself is not modified.
Disconnect a RAW PCB.
Call tcp_output for all active pcbs that have TF_NAGLEMEMERR set
Accept callback function for TCP netconns. Allocates a new netconn and posts that to conn->acceptmbox. @see tcp.h (struct tcp_pcb_listen.accept) for parameters and return value
Create a new pcb of a specific type. Called from lwip_netconn_do_newconn().
TCP callback function if a connection (opened by tcp_connect/lwip_netconn_do_connect) has been established (or reset by the remote host). @see tcp.h (struct tcp_pcb.connected) for parameters and return values
Callback function that is called when DNS name is resolved (or on timeout). A waiting application thread is waked up by signaling the semaphore.
Receive callback function for UDP netconns. Posts the packet to conn->recvmbox or deletes it on memory error. @see udp.h (struct udp_pcb.recv) for parameters
Receive callback function for RAW netconns. Doesn't 'eat' the packet, only copies it and sends it to conn->recvmbox @see raw.h (struct raw_pcb.recv) for parameters and return value
Receive callback function for TCP netconns. Posts the packet to conn->recvmbox, but doesn't delete it on errors. @see tcp.h (struct tcp_pcb.recv) for parameters and return value
Check whether event_callback should wake up a thread waiting in lwip_poll.
Wait (forever) for a message to arrive in an mbox. While waiting, timeouts are processed.
The main lwIP thread. This thread has exclusive access to lwIP core functions (unless access to them is not locked). Other threads communicate with this thread using message boxes. It also starts all the timers to make sure they are running in the right thread context.
Simple callback function used with tcpip_callback to free a pbuf (pbuf_free has a wrong signature for tcpip_callback)
SNTP processing of received timestamp
Initialize request struct to be sent to server.
DNS found callback when using DNS names as server address.
UDP recv callback for the sntp pcb
Decode a NetBIOS name (from packet to string)
NetBIOS Name service recv callback
Stop netbios responder
Walk through a compact encoded DNS name and return the end of the name.
Compare the "dotted" name "query" with the encoded name "response" to make sure an answer from the DNS server matches the current dns_table entry (otherwise, answers might arrive late for hostname not on the list any more). For now, this function compares case-insensitive to cope with all kinds of servers. This also means that "dns 0x20 bit encoding" must be checked externally, if we want to implement it. Currently, the request is sent exactly as passed in by he user request.
dns_alloc_pcb() - allocates a new pcb (or reuses an existing one) to be used for sending a request
Call dns_call_found for correct response.
Queues a new hostname to resolve and sends out a DNS query for that hostname
Initialize a lwip network interface structure for a loopback interface
Attempt to reclaim some memory from queued out-of-sequence TCP segments if we run out of pool pbufs. It's better to give priority to new packets if we're running out. This must be done in the correct thread context therefore this function can only be used with NO_SYS=0 and through tcpip_callback.
Just a callback function for tcpip_callback() that calls pbuf_free_ooseq().
Queue a call to pbuf_free_ooseq if not already queued.
Allocate a PBUF_RAM pbuf, perhaps with extra space at the end. This function is like pbuf_alloc(layer, length, PBUF_RAM) except there may be extra bytes available at the end. Called by tcp_write
Checks if tcp_write is allowed or not (checks state, snd_buf and snd_queuelen).
Allocate a new local UDP port.
Checks if the offered IP address is already in use. It does this according to the address conflict detection method described in RFC5227.
Remember the configuration offered by a DHCP server.
Back-off the DHCP client (because of a received NAK response). Back-off the DHCP client because of a received NAK. Receiving a NAK means the client asked for something non-sensible, for example when it tries to renew a lease obtained on another network. We clear any existing set IP address and restart DHCP negotiation afresh (as per RFC2131 3.2.3).
Handle conflict information from ACD module
Extract the DHCP message and the DHCP options. Extract the DHCP message and the DHCP options, each into a contiguous piece of memory. As a DHCP message is variable sized by its options, and also allows overriding some fields for options, the easy approach is to first unfold the options into a contiguous piece of memory, and use that further on.
Free a complete queue of etharp entries
We received a router advertisement that contains a prefix with the autoconfiguration flag set. Add or update an associated autogenerated address.
Aging implementation of our simple fdb
Send a pbuf doing the necessary SLIP encapsulation Uses the serial layer's sio_send()
Send a pbuf doing the necessary SLIP encapsulation Uses the serial layer's sio_send()
Handle the incoming SLIP stream character by character
The SLIP input thread. Feed the IP layer with incoming packets
SLIP netif initialization Call the arch specific sio_open and remember the opened device in the state field of the netif.
Polls the serial device and feeds the IP layer with incoming packets.
Opens a serial device for communication.
Reads from the serial device.
Tries to read from the serial device. Same as sio_read but returns immediately if no data is available and never blocks.
Re-implement ping_init and ping_deinit with the APIs from ping_sock.h for back-ward compatibility sake. It's highly recommended that users should use the new APIs from ping_sock.h. ToDo: ping.h and esp_ping.h are deprecated now and should be removed in idf v5.x.
FunctionName : node_insert_to_list Description : insert the node to the list Parameters : phead -- the head node of the list pinsert -- the insert node of the list Returns : none
FunctionName : handle_dhcp Description : If an incoming DHCP message is in response to us, then trigger the state machine Parameters : arg -- arg user supplied argument (udp_pcb.recv_arg) pcb -- the udp_pcb which received data p -- the packet buffer that was received addr -- the remote IP address from which the packet was received port -- the remote port from which the packet was received Returns : none
FunctionName : dhcps_poll_set Description : set ip poll from start to end for station Parameters : ip -- The current ip addr Returns : none
FunctionName : kill_oldest_dhcps_pool Description : remove the oldest node from list Parameters : none Returns : none
FunctionName : send_offer Description : DHCP message OFFER Response Parameters : m -- DHCP message info Returns : none
FunctionName : send_ack Description : DHCP message ACK Response Parameters : m -- DHCP message info Returns : none
FunctionName : send_nak Description : DHCP message NACK Response Parameters : m -- DHCP message info Returns : none
FunctionName : parse_options Description : parse DHCP message options Parameters : optptr -- DHCP message option info len -- DHCP message option length Returns : none
FunctionName : parse_msg Description : parse DHCP message from netif Parameters : m -- DHCP message info len -- DHCP message length Returns : DHCP message type
Free a tcp listen pcb
Called when a listen pcb is closed. Iterates one pcb list and removes the closed listener pcb from pcb->listener if matching.
Called when a listen pcb is closed. Iterates all pcb lists and removes the closed listener pcb from pcb->listener if matching.
Default accept callback if no accept callback is specified by the user.
Kills the oldest active connection that has a lower priority than 'prio'.
Kills the oldest connection that is in TIME_WAIT state. Called from tcp_alloc() if no more connections are available.
Enable/Disable NAPT for a specified interface.
Register port mapping on the external interface to internal interface. When the same port mapping is registered again, the old mapping is overwritten. In this implementation, only 1 unique port mapping can be defined for each target address/port.
Unregister port mapping on the external interface to internal interface.
Determine whether an IP address is in a reserved set of addresses that may not be forwarded, or whether datagrams to that destination may be forwarded.
Forwards an IP packet. It finds an appropriate route for the packet, decrements the TTL value of the packet, adjusts the checksum and outputs the packet on the appropriate interface.
Output function of the application port of the bridge (the one with an ip address). The forwarding port(s) where this pbuf is sent on is/are automatically selected from the FDB.
The actual bridge input function. Port netif's input is changed to call here. This function decides where the frame is forwarded.
Helper function to see if a destination mac belongs to the bridge (bridge netif or one of the port netifs), in which case the frame is sent to the cpu only.
Input function for port netifs used to synchronize into tcpip_thread.
Set callback to be called when interface is brought up/down or address is changed while up
Forwards an IPv6 packet. It finds an appropriate route for the packet, decrements the HL value of the packet, and outputs the packet on the appropriate interface.
Receives a single character from the serial device.
Writes to the serial device.
Aborts a blocking sio_read() call.
if not build within lwip, provide translating inlines, that will warn about thread safety

Other commonly used symbols

Name
Location
Summary
This is the aligned version of ip6_addr_t, used as local variable, on the stack, etc.
Generic data structure used for all lwIP network interfaces. The following fields should be filled in by the initialization function for the device driver: hwaddr_len, hwaddr[], mtu, flags
A union struct for both IP version's addresses. ATTENTION: watch out for its size when adding IPv6 address scope!
This is the aligned version of ip4_addr_t, used as local variable, on the stack, etc.
No error, everything OK.
the TCP protocol control block
LWIP_IPV6==1: Enable IPv6
LWIP_IPV4==1: Enable IPv4
the lwIP internal protocol control block
pointer to the actual data in the buffer
Convert generic ip address to specific protocol version
Global data for both IPv4 and IPv6
sockets currently are built on netconns, each socket has one netconn
The netconn which to process - always needed: it includes the semaphore which is used to block the application thread until the function finished.
Convert generic ip address to specific protocol version
length of this buffer
sockets currently are built on netconns, each socket has one netconn
the UDP protocol control block
total length of this buffer and all next buffers in chain belonging to the same packet. For non-queue packet chains this is the invariant: p->tot_len == p->len + (p->next? p->next->tot_len: 0)
An Ethernet MAC address
Eliminates compiler warning about unused arguments (GCC -Wextra -Wunused).
Depending on the executed function, one of these union members is used
flags (@see netif_flags)
Contains all internal pointers and states used for a socket
Illegal argument.
Illegal value.
Macro/function to check whether lwIP's threading/locking requirements are satisfied during current function call. This macro usually calls a function that is implemented in the OS-dependent sys layer and performs the following checks: - Not in ISR (this should be checked for NO_SYS==1, too!) - If = 1: TCPIP core lock is held - If = 0: function is called from TCPIP thread @see multithreading
This struct includes everything that is necessary to execute a function for a netconn in another thread context (mainly used to process netconns in the tcpip_thread context to be thread safe).
protocol specific PCB members
LWIP_TCP==1: Turn on TCP.
Out of memory error.
Packed structs support. Wraps u8_t members, where some compilers warn that packing is not necessary. For examples of packed struct declarations, see include/lwip/prot/ subfolder. A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here.
next pbuf in singly linked pbuf chain
Destination IP address of current_header
type of the netconn (TCP, UDP or RAW)
"Network buffer" - contains data and addressing info
A callback function that is informed about events for this netconn
IP address configuration in network byte order
TCP: when data passed to netconn_write doesn't fit into the send buffer, this temporarily stores the message. Also used during connect and close.
flags holding more netconn-internal state, see NETCONN_FLAG_* defines
number of this interface. Used for if_api and netifapi_netif, as well as for IPv6 zones
protocol specific PCB members
Array of IPv6 addresses for this netif.
Not connected.
the RAW protocol control block
igmp group structure - there is a list of groups for each interface these should really be linked from the interface, but if we keep them separate we will not affect the lwip original code too much There will be a group for the all systems group address but this will not run the state machine as it is used to kick off reports from all the other groups
Source IP address of current_header
LWIP_UDP==1: Turn on UDP.
Buffer error.
minimum set of fields of any DHCP message
Ask if an interface is up
The state of each IPv6 address (Tentative, Preferred, etc). @see ip6_addr.h
descriptive abbreviation
The return value of the function executed in tcpip_thread.
pbuf data is stored in RAM, used for TX mostly, struct pbuf and its payload are allocated in one piece of contiguous memory (so the first payload byte can be calculated from struct pbuf). pbuf_alloc() allocates PBUF_RAM pbufs as unchained pbufs (although that might change in future versions). This should be used for all OUTGOING packets (TX).
The list of network interfaces.
SYS_ARCH_UNPROTECT Perform a "fast" set of the protection level to "lev". This could be implemented by setting the interrupt level to "lev" within the MACRO or by using a semaphore or mutex. This macro will default to calling the sys_arch_unprotect() function which should be implemented in sys_arch.c. If a particular port needs a different implementation, then this macro may be defined in sys_arch.h
Common members of all PCB types
LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
Argument supplied to netif_ext_callback_fn.
Type of "ping" session handle
common PCB members
pointer to next in linked list
Memory pool descriptor
current DHCP state machine state
used for lwip_netconn_do_write
LWIP_IGMP==1: Turn on IGMP module.
LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. If LWIP_IPV6 is enabled but this setting is disabled, the MAC layer must indiscriminately pass all inbound IPv6 multicast traffic to lwIP.
LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif.
link level hardware address of this interface
Low-level netif error
TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. Define to 0 if your device is low on memory.
common PCB members
LWIP_NETCONN_SEM_PER_THREAD==1: Use one (thread-local) semaphore per thread calling socket/netconn functions instead of allocating one semaphore per netconn (and per select etc.) ATTENTION: a thread-local semaphore for API calls is needed: - LWIP_NETCONN_THREAD_SEM_GET() returning a sys_sem_t* - LWIP_NETCONN_THREAD_SEM_ALLOC() creating the semaphore - LWIP_NETCONN_THREAD_SEM_FREE() freeing the semaphore The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup(). Ports may call these for threads created with sys_thread_new().
LWIP_NETCONN_FULLDUPLEX==1: Enable code that allows reading from one thread, writing from a 2nd thread and closing from a 3rd thread at the same time. ATTENTION: This is currently really alpha! Some requirements: - LWIP_NETCONN_SEM_PER_THREAD==1 is required to use one socket/netconn from multiple threads at once - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox and prevent a task pending on this during/after deletion
SYS_ARCH_PROTECT Perform a "fast" protect. This could be implemented by disabling interrupts for an embedded system or by using a semaphore or mutex. The implementation should allow calling SYS_ARCH_PROTECT when already protected. The old protection level is returned in the variable "lev". This macro will default to calling the sys_arch_protect() function which should be implemented in sys_arch.c. If a particular port needs a different implementation, then this macro may be defined in sys_arch.h
IPv4+IPv6 ("dual-stack")
retries of current request
the TCP protocol control block for listening pcbs
List of all TCP PCBs that are in a state in which they accept or send data.
number of bytes used in hwaddr
maximum transfer unit (in bytes)
Common members of all PCB types
Connection closed.
LWIP_IPV6_SCOPES==1: Enable support for IPv6 address scopes, ensuring that e.g. link-local addresses are really treated as link-local. Disable this setting only for single-interface configurations. All addresses that have a scope according to the default policy (link-local unicast addresses, interface-local and link-local multicast addresses) should now have a zone set on them before being passed to the core API, although lwIP will currently attempt to select a zone on the caller's behalf when necessary. Applications that directly assign IPv6 addresses to interfaces (which is NOT recommended) must now ensure that link-local addresses carry the netif's zone. See the new ip6_zone.h header file for more information and relevant macros. For now it is still possible to turn off scopes support through the new LWIP_IPV6_SCOPES option. When upgrading an implementation that uses the core API directly, it is highly recommended to enable LWIP_IPV6_SCOPES_DEBUG at least for a while, to ensure e.g. proper address initialization.
protocol specific PCB members
current state of the netconn
mbox where received packets are stored until they are fetched by the netconn application thread (can grow quite big)
MEMCPY: override this if you have a faster implementation at hand than the one included in your C library
Assign a zone index to an IPv6 address, based on a network interface. If the given address has a scope, the assigned zone index is that scope's zone of the given netif; otherwise, the assigned zone index is "no zone". This default implementation follows the default model of RFC 4007, where only interface-local and link-local scopes are defined, and the zone index of both of those scopes always equals the index of the network interface. As such, this default implementation need not distinguish between different constrained scopes when assigning the zone.
SYS_LIGHTWEIGHT_PROT define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection for certain critical regions during buffer allocation, deallocation and memory allocation and deallocation. SYS_ARCH_DECL_PROTECT declare a protection variable. This macro will default to defining a variable of type sys_prot_t. If a particular port needs a different implementation, then this macro may be defined in sys_arch.h.
Connection aborted.
Can be used as a fixed/const ip4_addr_t for the wildcard and the broadcast address
Operation in progress
Packed structs support. Wraps members that are packed structs themselves, where some compilers warn that packing is not necessary. For examples of packed struct declarations, see include/lwip/prot/ subfolder. A port to GCC/clang is included in lwIP, if you use these compilers there is nothing to do here.
LWIP_NETIF_EXT_STATUS_CALLBACK==1: Support an extended callback function for several netif related event that supports multiple subscribers. This ext-callback is used by ESP-NETIF with lwip-orig (upstream version) to provide netif related events on IP4/IP6 address/status changes
NO_SYS==1: Use lwIP without OS-awareness (no thread, semaphores, mutexes or mboxes). This means threaded APIs cannot be used (socket, netconn, i.e. everything in the 'api' folder), only the callback-style raw API is available (and you have to watch out for yourself that you don't access lwIP functions/structures from more than one context at a time!)
Routing problem.
used for lwip_netconn_do_join_leave_group
This field can be set by the device driver and could point to state information for the device.
SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a call to memcpy() if the length is known at compile time and is small.
TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb.
LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from application buffers to pbufs.
This function is called by the IPv6 module when it wants to send a packet on the interface. This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually ethip6_output()
LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP, as well as (currently only) core support for the corresponding IPv6 options.
This function is called by the IP module when it wants to send a packet on the interface. This function typically first resolves the hardware address, then sends the packet. For ethernet physical layer, this is usually etharp_output()
Includes spare room for transport layer header, e.g. UDP header. Use this if you intend to pass the pbuf to functions like udp_send().
Macro representing the 'any' address.
Type of "ping" callback functions
Type of "ping" configuration
MEMP_OVERFLOW_CHECK: memp overflow protection reserves a configurable amount of bytes before and after each memp element in every pool and fills it with a prominent default value. MEMP_OVERFLOW_CHECK == 0 no checking MEMP_OVERFLOW_CHECK == 1 checks each element when it is freed MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time memp_malloc() or memp_free() is called (useful but slow!)
ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached.
Determine if two IPv6 addresses are the same. In particular, the address part of both must be the same, and the zone must be compatible.
ACD state information per netif
LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS transport.
LWIP_DHCP==1: Enable DHCP module.
LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
LWIP_MPU_COMPATIBLE: enables special memory management mechanism which makes lwip able to work on MPU (Memory Protection Unit) system by not passing stack-pointers to other threads (this decreases performance as memory is allocated from pools instead of keeping it on the stack)
mbox where new connections are stored until processed by the application thread
Description for a task waiting in select
MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator. Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution speed and usage from interrupts!
TCP_OVERSIZE: The maximum number of bytes that tcp_write may allocate ahead of time
used for lwip_netconn_do_bind and lwip_netconn_do_connect
LWIP_SOCKET_OFFSET==n: Increases the file descriptor number created by LwIP with n. FD_SETSIZE from sys/types.h is the maximum number of supported file descriptors and CONFIG_LWIP_MAX_SOCKETS defines the number of sockets; LWIP_SOCKET_OFFSET is configured to use the largest numbers of file descriptors for sockets. File descriptors from 0 to LWIP_SOCKET_OFFSET-1 are non-socket descriptors and from LWIP_SOCKET_OFFSET to FD_SETSIZE are socket descriptors.
DNS maximum number of entries to maintain locally.
IP_NAPT==1: Enables IPv4 Network Address and Port Translation. Note that CONFIG_LWIP_IP_FORWARD option need to be enabled in system configuration for the NAPT to work on ESP platform
This function is called by the network device driver to pass a packet up the TCP/IP stack.
The interface that received the packet for the current callback invocation.
TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default, you might want to increase this.) For the receive side, this MSS is advertised to the remote side when opening a connection. For the transmit size, this MSS sets an upper limit on the MSS advertised by the remote host.
C++ const_cast(val) equivalent to remove constness from a value (GCC -Wcast-qual)
LWIP_ARP==1: Enable ARP functionality.
LWIP_DNS_SECURE: controls the security level of the DNS implementation Use all DNS security features by default. This is overridable but should only be needed by very small targets or when using against non standard DNS servers.
Split an u32_t in two u16_ts and add them up
The one and only timeout list
The currently used server (initialized to 0)
Target IP address, either IPv4 or IPv6
LWIP_ICMP==1: Enable ICMP module inside the IP stack. Be careful, disable that make your product non-compliant to RFC1122
LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and SO_SNDTIMEO processing.
LWIP_ND6==1: Enable ND6 protocol in IPv6
LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache
LWIP_AUTOIP==1: Enable AUTOIP module.
Can be used as a fixed/const ip_addr_t for the IPv4 wildcard and the broadcast address
protocol specific PCB members
List of all TCP PCBs in TIME-WAIT state
Pointer to queue of pending outgoing packets on this entry.
The maximum of DNS servers
Remaining valid and preferred lifetime of each IPv6 address, in seconds. For valid lifetimes, the special value of IP6_ADDR_LIFE_STATIC (0) indicates the address is static and has no lifetimes.
Function prototype for functions passed to tcpip_callback()
SO_REUSE==1: Enable SO_REUSEADDR option. This option is set via menuconfig.
LWIP_DHCP_GETS_NTP==1: Request NTP servers with discover/select. For each response packet, an callback is called, which has to be provided by the port: void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs);
misc flags
LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP *tries* to put all data to be sent into one single pbuf. This is for compatibility with DMA-enabled MACs that do not support scatter-gather. Beware that this might involve CPU-memcpy before transmitting that would not be needed without this flag! Use this only if you need to! ATTENTION: a driver should *NOT* rely on getting single pbufs but check TX pbufs for being in one piece. If not, pbuf_clone can be used to get a single pbuf: if (p->next != NULL) { struct pbuf *q = pbuf_clone(PBUF_RAW, PBUF_RAM, p); if (q == NULL) { return ERR_MEM; } p = q; ATTENTION: do NOT free the old 'p' as the ref belongs to the caller! }
LWIP_ACD==1: Enable ACD module. ACD module is needed when using AUTOIP.
next link
counter of how many threads are waiting for this socket using select
DNS table entry
struct for queueing outgoing packets for unknown address defined here to be accessed by memp.h
This function could be called to add or delete an entry in the IPv6 multicast filter table of the ethernet MAC.
ports are in host byte order
Max number of SNTP servers handled (default equal to LWIP_DHCP_MAX_NTP_SERVERS)
LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname field. LWIP_DHCP_DISCOVER_ADD_HOSTNAME==1: include hostname opt in discover packets. If the hostname is not set in the DISCOVER packet, then some servers might issue an OFFER with hostname configured and consequently reject the REQUEST with any other hostname.
Ethernet header
ESP_DHCPS==1: Enable the DHCP server
the reference count always equals the number of pointers that refer to this pbuf. This can be pointers from an application, the stack itself, or pbuf->next pointers from a chain.
LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1). This is only needed when no real netifs are available. If at least one other
LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option. The timestamp option is currently only used to help remote hosts, it is not really used locally. Therefore, it is only enabled when a TS option is received in the initial SYN packet from a remote host.
The default network interface.
struct for queueing outgoing packets for unknown address defined here to be accessed by memp.h
Raw connection IPv4
used for lwip_netconn_do_getaddr
data that was left from the previous read
Holds a flag which option was received and is contained in dhcp_rx_options_val, only valid while in dhcp_recv. @todo: move this into struct dhcp?
Header of the input IPv6 packet currently being processed.
next link
MEM_ALIGNMENT: should be set to the alignment of the CPU 4 byte alignment -> #define MEM_ALIGNMENT 4 2 byte alignment -> #define MEM_ALIGNMENT 2
CONFIG_LWIP_DHCP_OPTIONS_LEN: The total length of outgoing DHCP option msg. If you have many options and options value is too long, you can configure the length according to your requirements
LWIP_ND6_NUM_ROUTERS: Maximum number of entries in IPv6 default routers cache
Calculate memory size for an aligned buffer - returns the next highest multiple of MEM_ALIGNMENT (e.g. LWIP_MEM_ALIGN_SIZE(3) and LWIP_MEM_ALIGN_SIZE(4) will both yield 4 for MEM_ALIGNMENT == 4).
Includes spare room for IP header. Use this if you intend to pass the pbuf to functions like raw_send().
This function could be called to add or delete an entry in the multicast filter table of the ethernet MAC.
used for lwip_netconn_do_send
The global array of available sockets
The UDP pcb used by the SNTP client
Set client data. Obtain ID from netif_alloc_client_data_id().
IP address of replied target
LWIP_DHCP_DOES_ACD_CHECK==1: Perform address conflict detection on the dhcp address.
The maximum number of IP addresses per host
LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
LWIP_ND6_NUM_DESTINATIONS: Maximum number of entries in IPv6 destinations cache
LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP)
LWIP_SINGLE_NETIF==1: use a single netif only. This is the common case for small real-life targets. Some code like routing etc. can be left out.
LWIP_SOCKET_SELECT==1 (default): enable select() for sockets (uses a netconn callback to keep track of events). This saves RAM (counters per socket) and code (netconn event callback), which should improve performance a bit).
LWIP_SOCKET_POLL==1 (default): enable poll() for sockets (including struct pollfd, nfds_t, and constants)
common PCB members
Protocol family and type of the netconn
As lwip_netconn_do_gethostbyname requires more arguments but doesn't require a netconn, it has its own struct (to avoid struct api_msg getting bigger than necessary). lwip_netconn_do_gethostbyname must be called using tcpip_callback instead of tcpip_apimsg (see netconn_gethostbyname).
This struct is used to pass data to the set/getsockopt_impl functions running in tcpip_thread context (only a void* is allowed)
This function is called when the netif state is set to up or down
IP6_ADDR_ANY6 can be used as a fixed ip6_addr_t for the IPv6 wildcard address
Get client data. Obtain ID from netif_alloc_client_data_id().
ports are in host byte order
TTL for outgoing multicast packets
Must be the maximum of all used hardware address lengths across all types of interfaces in use. This does not have to be changed, normally.
TCP_WND: The size of a TCP window. This must be at least (2 * TCP_MSS) for things to work well. ATTENTION: when using TCP_RCV_SCALE, TCP_WND is the total size with scaling applied. Maximum window value in the TCP header will be TCP_WND >> TCP_RCV_SCALE
LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC)
IGMP_DEBUG: Enable debugging in igmp.c.
current state of the group
Holds the decoded option values, only valid while in dhcp_recv. @todo: move this into struct dhcp?
Pointer to queue of pending outgoing packets on this ARP entry.
The interface that accepted the packet for the current callback invocation.
If set, the netif is an ethernet device using ARP. Set by the netif driver in its init function.
If set, the netif has IGMP capability.
multicast address
Get list head of MLD6 groups for netif. Note: The allnodes group IP is NOT in the list, since it must always be received for correct IPv6 operation. @see ()
This function is called by ethernet_output() when it wants to send a packet on the interface. This function outputs the pbuf as-is on the link medium.
Common members of all PCB types
VLAN header inserted between ethernet header and payload if 'type' in ethernet header is ETHTYPE_VLAN. See IEEE802.Q
Netif index, interface=0 means NETIF_NO_INDEX
Invoked by internal ping thread when received ICMP echo reply packet
Invoked by internal ping thread when receive ICMP echo reply packet timeout
Invoked by internal ping thread when a ping session is finished
Size of the data next to ICMP packet header
LWIP_DNS_SUPPORT_MDNS_QUERIES==1: Enable mDNS queries in hostname resolution. This option is set via menuconfig.
PBUF_LINK_HLEN: the number of bytes that should be allocated for a link level header. The default is 14, the standard value for Ethernet.
PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated for an additional encapsulation header before ethernet headers (e.g. 802.11)
LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address is being resolved.
maximum transfer unit (in bytes), updated by RA
Common members of all PCB types
Common members of all PCB types
Current state of the netconn. Non-TCP netconns are always in state NETCONN_NONE!
number of threads waiting on an mbox. This is required to unblock all threads when closing while threads are waiting.
timer for reporting, negative is OFF
offset into total length/output of bytes written when err == ERR_OK
used for lwip_netconn_do_close (/shutdown)
List of all TCP PCBs bound but not yet (connected || listening)
List of all TCP PCBs in LISTEN state
The list of RAW PCBs
BRIDGEIF_MAX_PORTS: this is used to create a typedef used for forwarding bit-fields: the number of bits required is this + 1 (for the internal/cpu port)
DNS maximum host name length supported in the name table.
Operation would block.
Timeout value (in milliseconds) of each ping procedure
Type of Service, a field specified in the IP header
@deprecated Renamed to ip4_addr_eq
A "ping" session contains count procedures
Milliseconds between each ping procedure
IP_FRAG==1: Fragment outgoing IP4 packets if their size exceeds MTU. Note that this option does not affect incoming packet sizes, which can be controlled via IP_REASSEMBLY.
IP_FORWARD==1: Enables the ability to forward IP packets across network interfaces. If you are going to run lwIP on a device with only one network interface, define this to 0.
TCP_SND_BUF: TCP sender buffer space (bytes). To achieve good performance, this should be at least 2 * TCP_MSS.
LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback sending for each netif (0 = disabled)
LWIP_ND6_NUM_PREFIXES: Maximum number of entries in IPv6 on-link prefixes cache
TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work.
LWIP_TCP_PCB_NUM_EXT_ARGS: When this is > 0, every tcp pcb (including listen pcb) includes a number of additional argument entries in an array (see tcp_ext_arg_alloc_id)
LWIP_NETIF_LOOPBACK_MULTITHREADING: Indicates whether threading is enabled in the system, as netifs must change how they behave depending on this setting for the LWIP_NETIF_LOOPBACK option to work. Setting this is needed to avoid reentering non-reentrant functions like tcp_input(). LWIP_NETIF_LOOPBACK_MULTITHREADING==1: Indicates that the user is using a multithreaded environment like tcpip.c. In this case, netif->input() is called directly. LWIP_NETIF_LOOPBACK_MULTITHREADING==0: Indicates a polling (or NO_SYS) setup. The packets are put on a list and netif_poll() must be called in the main application loop.
CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
Does the given IPv6 address have a scope, and as such should also have a
Function prototype for netif->input functions. This function is saved as 'input' callback function in the netif struct. Call it when a packet has been received.
common PCB members
Define DHCP_TIMEOUT_SIZE_T in opt.h if you want use a different integer than u16_t. Especially useful if DHCP_COARSE_TIMER_SECS is in smaller units, so timeouts easily reach UINT16_MAX and more
the ARP message, see RFC 826 ("Packet format")
Same as sys_mbox_valid() but taking a value, not a pointer
timeout to wait for sending data (which means enqueueing data for sending in internal buffers) in milliseconds
This vector type is passed to netconn_write_vectors_partly to send multiple buffers at once. ATTENTION: This type has to directly map struct iovec since one is casted into the other!
Used for netconn_join_leave_group()
semaphore to wake up a task waiting for select
A struct sockaddr replacement that has the same alignment as sockaddr_in/ sockaddr_in6 if instantiated.
Callback which is invoked when a hostname is found. A function of this type must be implemented by the application using the DNS resolver.
Sequence number of a ping procedure
LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and SO_RCVTIMEO processing.
Set this to 1 to support DNS names (or IP address strings) to set sntp servers One server address/name can be defined as default if SNTP_SERVER_DNS == 1: \#define SNTP_SERVER_ADDRESS "pool.ntp.org"
LWIP_ETHERNET==1: enable ethernet support even though ARP might be disabled
LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name.
DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled, you have to define an initializer: \#define DNS_LOCAL_HOSTLIST_INIT {DNS_LOCAL_HOSTLIST_ELEM("host_ip4", IPADDR4_INIT_BYTES(1,2,3,4)), \ DNS_LOCAL_HOSTLIST_ELEM("host_ip6", IPADDR6_INIT_HOST(123, 234, 345, 456)} Instead, you can also use an external function: \#define DNS_LOOKUP_LOCAL_EXTERN(name, namelen, addr, dns_addrtype) my_lookup_function(name, namelen, addr, dns_addrtype) with function signature: extern err_t my_lookup_function(const char *name, size_t namelen, ip_addr_t *addr, u8_t dns_addrtype) that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype).
ICMP time exceeded codes
callback function -> let's the acd user know if the address is good or if a conflict is detected
acd struct
current state of the group
timer for reporting
receive callback function
Sanity check: Define this to - 0 to turn off sanity checks (default; smaller code) - >= 1 to check address and port of the response packet to ensure the response comes from the server we sent the request to. - >= 2 to check returned Originate Timestamp against Transmit Timestamp sent to the server (to ensure response to older request). - >= 3 @todo: discard reply if any of the VN, Stratum, or Transmit Timestamp fields is 0 or the Mode field is not 4 (unicast) or 5 (broadcast). - >= 4 @todo: to check that the Root Delay and Root Dispersion fields are each greater than or equal to 0 and less than infinity, where infinity is currently a cozy number like one second. This check avoids using a server whose synchronization source has expired for a very long time.
This semaphore is posted when the name is resolved, the application thread should wait on it.
number of times data was received, set by event_callback(), tested by the receive and select functions
number of times data was ACKed (free send buffer), set by event_callback(), tested by select
The operating mode
Retry time, initialized with SNTP_RETRY_TIMEOUT and doubled with each retry.
A custom pbuf: like a pbuf, but following a function pointer to free it.
Includes spare room for link layer header (ethernet header). Use this if you intend to pass the pbuf to functions like ethernet_output(). @see PBUF_LINK_HLEN
Get the IPv6 header of the current packet. This function must only be called from a receive callback (udp_recv,
@deprecated Renamed to
Extended netif status callback (NSC) reasons flags. May be extended in the future!
Initialisation data for bridgeif_init. An instance of this type must be passed as parameter 'state' to netif_add when the bridge is added.
Time to Live,a field specified in the IP header
a bit field indicating pbuf type and allocation sources (see PBUF_TYPE_FLAG_*, PBUF_ALLOC_FLAG_* and PBUF_TYPE_ALLOC_SRC_MASK)
MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library instead of the lwip internal allocator. Can save code size if you already use it.
ARP_QUEUEING==1: Multiple outgoing packets are queued during hardware address resolution. By default, only the most recent packet is queued per IP address. This is sufficient for most protocols and mainly reduces TCP connection startup time. Set this to 1 if you know your application sends more than one packet in a row to an IP address that is not in the ARP cache.
LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1. LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all events (accept, sent, etc) that happen in the system. LWIP_CALLBACK_API==1: The PCB callback function is called directly for the event. This is the default.
LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface changes its up/down status (i.e., due to DHCP IP acquisition)
LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP address equal to the netif IP address, looping them back up the stack.
LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines. LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created. While this helps code completion, it might conflict with existing libraries. (only used if you use sockets.c)
TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
ESP_LWIP_IGMP_TIMERS_ONDEMAND==1: Start IGMP timers only if used ESP_LWIP_MLD6_TIMERS_ONDEMAND==1: Start MLD6 timers only if used Timers will only be activated when joining groups/receiving queries
LWIP_NETIF_HWADDRHINT==1: Cache link-layer-address hints (e.g. table indices) in struct netif. TCP and UDP can make use of this to prevent scanning the ARP table for every sent packet. While this is faster for big ARP tables or many concurrent connections, it might be counterproductive if you have a tiny ARP table or if there never are concurrent connections.
Determine if two IPv6 address are on the same network.
Can be used as a fixed/const ip_addr_t for the IP wildcard. Defined to when IPv4 is enabled. Defined to in IPv6 only systems. Use this if you can handle IPv4 _AND_ IPv6 addresses. Use or when the IP type matters.
Address in use.
Args to LWIP_NSC_IPV4_ADDRESS_CHANGED|LWIP_NSC_IPV4_GATEWAY_CHANGED|LWIP_NSC_IPV4_NETMASK_CHANGED|LWIP_NSC_IPV4_SETTINGS_CHANGED callback
If set, the interface has an active link (set by the network interface driver). Either set by the netif driver in its init function (if the link is up at that time) or at a later point once the link comes up
Protocol specific PCB members
protocol specific PCB members
Function prototype for a timeout callback function. Register such a function using sys_timeout().
Internet protocol v4
This array contains all stack-internal cyclic timers. To get the number of timers, use LWIP_ARRAYSIZE()
Keep a reachability shift register per server Default is on to conform to RFC.
multicast address
offset into current vector
Get list head of IGMP groups for netif. Note: The allsystems group IP is contained in the list as first entry. @see ()
Pointer to the next waiting task
The global list of tasks waiting for select
DNS query message structure. No packing needed: only used locally on the stack.
Swap the bytes in an u16_t: much like lwip_htons() for little-endian
IP6_ADDR_ANY can be used as a fixed ip_addr_t for the IPv6 wildcard address
Size of received packet
Elapsed time between request and reply packet
Stack size of internal ping task
Get the interface that received the current packet. This function must only be called from a receive callback (udp_recv,
For incoming packets, this contains the input netif's index
IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers.
LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only)
LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set in seconds. (does not require sockets.c, and will affect tcp.c)
MEM_USE_POOLS==1: Use an alternative to malloc() by allocating from a set of memory pools of various sizes. When mem_malloc is called, an element of the smallest pool that can provide the length needed is returned. To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled.
LWIP_VLAN_PCP==1: Enable outgoing VLAN taggning of frames on a per-PCB basis for QoS purposes. With this feature enabled, each PCB has a new variable: "netif_hints.tci" (Tag Control Identifier). The TCI contains three fields: VID, CFI and PCP. - VID is the VLAN ID, which should be set to zero. - The "CFI" bit is used to enable or disable VLAN tags for the PCB. - PCP (Priority Code Point) is a 3 bit field used for Ethernet level QoS. See pcb_tci_*() functions to get/set/clear this.
TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which reflects the available reassembly buffer size at the remote host) and the largest size permitted by the IP layer" (RFC 1122) Setting this to 1 enables code that checks TCP_MSS against the MTU of the netif used for a connection and limits the MSS if it would be too big otherwise.
PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is designed to accommodate single full size TCP frame in one pbuf, including TCP_MSS, IP header, and link header.
LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled per netif. ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled!
CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets.
LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during network startup.
LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862.
LWIP_IPV6_ADDRESS_LIFETIMES==1: Keep valid and preferred lifetimes for each IPv6 address. Required for LWIP_IPV6_AUTOCONFIG. May still be enabled otherwise, in which case the application may assign address lifetimes with the appropriate macros. Addresses with no lifetime are assumed to be static. If this option is disabled, all addresses are assumed to be static.
LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update Reachable time and retransmission timers, and netif MTU.
Number of Router Solicitation messages that remain to be sent.
Whether the network interface is 'up'. This is a software flag used to control whether this network interface is enabled and processes traffic. It must be set by the startup code before this netif can be used (also for dhcp/autoip).
Get netif for address combination. See ip6_route and ip4_route
This struct contains information about a stack-internal timer function that has to be called at a defined interval
size of the application data to send
counter of simultaneous uses
Errors are given back here
current vector to write
An array with all (non-temporary) PCB lists, mainly used for smaller code size
error happened for this socket, set by event_callback(), tested by select
if an error occurs, it is temporarily stored here
semaphore to wake up the calling task
Pointer to the previous waiting task
the socket
the socket
Timestamps to be extracted from the NTP header.
DNS message header
Get the interface that accepted the current packet. This may or may not be the receiving netif, depending on your netif/network setup. This function must only be called from a receive callback (udp_recv,
If set, the netif is an ethernet device. It might not use ARP or TCP/IP if it is used for PPPoE only.
If set, the netif has broadcast capability.
Priority of internal ping task
TCP_TMR_INTERVAL: TCP timer interval
LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs
LWIP_IPV6_FRAG==1: Fragment outgoing IP6 packets if their size exceeds MTU. Note that this option does not affect incoming packet sizes, which can be controlled via IP6_REASSEMBLY.
Align a memory pointer to the alignment defined by MEM_ALIGNMENT so that ADDR % MEM_ALIGNMENT == 0
IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast filter on recv operations.
TCP_SNDLOWAT: TCP writable space (bytes). This must be less than TCP_SND_BUF. It is the amount of space which must be available in the TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT).
LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface whenever the link changes (i.e., link down)
LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create timers running in tcpip_thread from another thread.
LWIP_ICMP6_DATASIZE: bytes from original packet to send back in ICMPv6 error messages (0 = default of IP6_MIN_MTU_LENGTH) ATTENTION: RFC4443 section 2.4 says IP6_MIN_MTU_LENGTH is a MUST, so override this only if you absolutely have to!
LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation message is sent, during neighbor reachability detection.
LWIP_ND6_TCP_REACHABILITY_HINTS==1: Allow TCP to provide Neighbor Discovery with reachability hints for connected destinations. This helps avoid sending unicast neighbor solicitation messages.
LWIP_TESTMODE: Changes to make unit test possible
Determine if two address are on the same network. @arg addr1 IP address 1 @arg addr2 IP address 2 @arg mask network identifier mask
Determine whether an IPv6 address has a constrained scope, and as such is meaningful only if accompanied by a zone index to identify the scope's zone. The given address type may be used to eliminate at compile time certain checks that will evaluate to false at run time anyway. This default implementation follows the default model of RFC 4007, where only interface-local and link-local scopes are defined. Even though the unicast loopback address does have an implied link-local scope, in this implementation it does not have an explicitly assigned zone index. As such it should not be tested for in this macro.
Test whether an IPv6 address is "zone-compatible" with a network interface. That is, test whether the network interface is part of the zone associated with the address. For efficiency, this macro is only ever called if the given address is either scoped or zoned, and thus, it need not test this. If an address is scoped but not zoned, or zoned and not scoped, it is considered not zone-compatible with any netif. This default implementation follows the default model of RFC 4007, where only interface-local and link-local scopes are defined, and the zone index of both of those scopes always equals the index of the network interface. As such, there is always only one matching netif for a specific zone index, but all call sites of this macro currently support multiple matching netifs as well (at no additional expense in the common case).
Try to select a zone for a scoped address that does not yet have a zone. Called from PCB bind and connect routines, for two reasons: 1) to save on this (relatively expensive) selection for every individual packet route operation and 2) to allow the application to obtain the selected zone from the PCB as is customary for e.g. getsockname/getpeername BSD socket calls. Ideally, callers would always supply a properly zoned address, in which case this function would not be needed. It exists both for compatibility with the BSD socket API (which accepts zoneless destination addresses) and for backward compatibility with pre-scoping lwIP code. It may be impossible to select a zone, e.g. if there are no netifs. In that case, the address's zone field will be left as is.
Connection reset.
Function prototype for netif init functions. Set up flags and output/linkoutput callback functions in this function.
Total header length of current_ip4/6_header (i.e. after this, the UDP/TCP header starts)
Multicast listener report
Function prototype for tcp error callback functions. Called when the pcb receives a RST or is unexpectedly closed for any other reason.
Protocol specific PCB members
common PCB members
This is the common part of all PCB types. It needs to be at the beginning of a PCB type definition. It is located here so that changes to this common part are made in one location instead of
track PCB allocation state
see DHCP_FLAG_*
outgoing network interface for multicast packets, by IPv4 address (if not 'any')
user-supplied argument for the recv callback
sys_mbox_tryfetch() returns SYS_MBOX_EMPTY if appropriate. For now we use the same magic value, but we allow this to change in future.
timeout in milliseconds to wait for new data to be received (or connections to arrive for listening netconns)
Used to inform the callback function about changes Event explanation: In the netconn implementation, there are three ways to block a client: - accept mbox (sys_arch_mbox_fetch(&conn->acceptmbox, &accept_ptr, 0); in netconn_accept()) - receive mbox (sys_arch_mbox_fetch(&conn->recvmbox, &buf, 0); in netconn_recv_data()) - send queue is full (sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); in lwip_netconn_do_write()) The events have to be seen as events signaling the state of these mboxes/semaphores. For non-blocking connections, you need to know in advance whether a call to a netconn function call would block or not, and these events tell you about that. RCVPLUS events say: Safe to perform a potentially blocking call call once more. They are counted in sockets - three RCVPLUS events for accept mbox means you are safe to call netconn_accept 3 times without being blocked. Same thing for receive mbox. RCVMINUS events say: Your call to to a possibly blocking function is "acknowledged". Socket implementation decrements the counter. For TX, there is no need to count, its merely a flag. SENDPLUS means you may send something. SENDPLUS occurs when enough data was delivered to peer so netconn_send() can be called again. A SENDMINUS event occurs when the next call to a netconn_send() would be blocking.
A callback prototype to inform about events for a netconn
the last asynchronous unreported error this netconn had
total length across vectors
number of unwritten vectors
If this flag is set then only IPv6 communication is allowed on the netconn. As per RFC#3493 this features defaults to OFF allowing
size of *optval
helper struct for gethostbyname_r to access the char* buffer
the interface address
the group address
the interface index
the group address
This counter is increased from lwip_select when the list is changed and checked in select_check_waiters to see if it has changed.
PPPOE_SUPPORT==1: Enable PPP Over Ethernet
DHCP_OPTION_MAX_MSG_SIZE is set to the MTU
pbuf comes from the pbuf pool. Much like PBUF_ROM but payload might change so it has to be duplicated when queued before transmitting, depending on who has a 'ref' to it.
Maximum number of ports in the bridge (ports are stored in an array, this influences memory allocated for netif->state of the bridge netif).
This function is called when pbuf_free deallocates this pbuf(_custom)
Args to LWIP_NSC_IPV6_ADDR_STATE_CHANGED callback
Common members of all PCB types
MAC Filter Actions, these are passed to a netif's igmp_mac_filter or mld_mac_filter callback function.
arguments for callback functions
Time to live of a ping procedure
Number of request packets sent out
Number of reply packets received
Elapsed time of the whole ping session
Default ping configuration
MEMP_NUM_NETCONN: the number of struct netconns. (only needed if you use the sequential API, like api_lib.c)
TCP_MAXRTX: Maximum number of retransmissions of data segments.
TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments.
TCP_MSL: The maximum segment lifetime in milliseconds
LWIP_ND6_RDNSS_MAX_DNS_SERVERS > 0: Use IPv6 Router Advertisement Recursive DNS Server Option (as per RFC 6106) to copy a defined maximum number of DNS servers to the DNS module.
PBUF_POOL_SIZE: the number of buffers in the pbuf pool.
ETHARP_SUPPORT_VLAN==1: support receiving and sending ethernet packets with VLAN header. See the description of LWIP_HOOK_VLAN_CHECK and LWIP_HOOK_VLAN_SET hooks to check/set VLAN headers. Additionally, you can define ETHARP_VLAN_CHECK to an u16_t VLAN ID to check. If ETHARP_VLAN_CHECK is defined, only VLAN-traffic for this VLAN is accepted. If ETHARP_VLAN_CHECK is not defined, all traffic is accepted. Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan) that returns 1 to accept a packet or 0 to drop a packet.
ETH_PAD_SIZE: number of bytes added before the ethernet header to ensure alignment of payload after that header. Since the header is 14 bytes long, without this padding e.g. addresses in the IP header will not be aligned on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms.
ETHARP_TABLE_MATCH_NETIF==1: Match netif for ARP table entries. If disabled, duplicate IP address on multiple netifs are not supported (but this should only occur for AutoIP).
ICMP_TTL: Default value for Time-To-Live used by ICMP packets.
TCP_SNDQUEUELOWAT: TCP writable bufs (pbuf count). This must be less than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below this number, select returns writable (combined with TCP_SNDLOWAT).
TCP_OOSEQ_PBUFS_LIMIT(pcb): Return the maximum number of pbufs to be queued on ooseq per pcb, given the pcb. Only valid for TCP_QUEUE_OOSEQ==1 && TCP_OOSEQ_MAX_PBUFS==1. Use this to override TCP_OOSEQ_MAX_PBUFS to a dynamic value per pcb.
LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called when a netif has been removed
CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
LWIP_IPV6_DUP_DETECT_ATTEMPTS=[0..7]: Number of duplicate address detection attempts.
LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send (neighbor solicit and router solicit)
Determine if two address are on the same network. @deprecated Renamed to
Delete a filter entry
ICMP destination unreachable codes
port unreachable
ICMP time exceeded codes
ICMP destination unreachable codes
ICMP parameter code
Unrecognized IPv6 option encountered
Common members of all PCB types
common PCB members
pbufs passed to IP must have a ref-count of 1 as their payload pointer gets altered as the packet is passed down the stack
Output IP packet to specified interface
current ACD state machine state
signifies we were the last person to report
counter of simultaneous uses
outgoing network interface for multicast packets, by interface index (if nonzero)
Set this to 1 to implement the callback function called by dhcp when NTP servers are received.
Set this to 1 to implement the callback function called by dhcpv6 when NTP servers are received.
Enable round-trip delay compensation. Compensate for the round-trip delay by calculating the clock offset from the originate, receive, transmit and destination timestamps, as per RFC. The calculation requires compiler support for 64-bit integers. Also, either SNTP_SET_SYSTEM_TIME_US or SNTP_SET_SYSTEM_TIME_NTP has to be implemented for setting the system clock with sub-second precision. Likewise, either SNTP_GET_SYSTEM_TIME or SNTP_GET_SYSTEM_TIME_NTP needs to be implemented with sub-second precision. Although not strictly required, it makes sense to combine this option with SNTP_CHECK_RESPONSE >= 2 for sanity-checking of the received timestamps. Also, in order for the round-trip calculation to work, the difference between the local clock and the NTP server clock must not be larger than about 34 years. If that limit is exceeded, the implementation will fall back to setting the clock without compensation. In order to ensure that the local clock is always within the permitted range for compensation, even at first try, it may be necessary to store at least the current year in non-volatile memory.
Default retry timeout (in milliseconds) if the response received is invalid. This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached.
receive callback function
signifies we were the last person to report
The resolved address is stored here
If a nonblocking write has been rejected before, poll_tcp needs to
TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY)
socket index for which to change options
level of the option to process
name of the option to process
don't signal the same semaphore twice: set to 1 when signalled
Reachability shift register as described in RFC 5905
DNS answer message structure. No packing needed: only used locally on the stack.
DNS request table entry: used when dns_gehostbyname cannot answer the request from the DNS table
DNS resource record max. TTL (one week as default)
Try hard to create a new entry - we want the IP address to appear in
BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT==1: set port netif's 'input' function to call directly into bridgeif code and on top of that, directly call into the selected forwarding port's 'linkoutput' function. This means that the bridgeif input/output path is protected from concurrent access but as well, *all* bridge port netif's drivers must correctly handle concurrent access! == 0: get into tcpip_thread for every input packet (no multithreading) ATTENTION: as ==0 relies on tcpip.h, the default depends on NO_SYS setting
Set this to 1 to enable functions to pass in RX bytes from ISR context. If enabled, slipif_received_byte[s]() process incoming bytes and put assembled packets on a queue, which is fed into lwIP from slipif_poll(). If disabled, slipif_poll() polls the serial line (using sio_tryread()).
PING_USE_SOCKETS: Set to 1 to use sockets, otherwise the raw api is used
pbuf payload refers to RAM. This one comes from a pool and should be used for RX. Payload can be chained (scatter-gather RX) but like PBUF_RAM, struct pbuf and its payload are allocated in one piece of contiguous memory (so the first payload byte can be calculated from struct pbuf). Don't use this for TX, if the pool becomes empty e.g. because of TCP queuing, you are unable to receive TCP acks!
Header of the input packet currently being processed.
Get the IPv4 header of the current packet. This function must only be called from a receive callback (udp_recv,
Use this for input packets in a netif driver when calling netif->input() in the most common case - ethernet-layer netif driver.
If set, the netif has MLD6 capability.
UDP_TTL: Default Time-To-Live value.
Smooth time updating. Time error is gradually reduced using adjtime function. If the difference between SNTP response time and system time is large (more than 35 minutes) then update immediately.
LWIP_PBUF_REF_T: Refcount type in pbuf. Default width of u8_t can be increased if 255 refs are not enough for you.
IP address types for use in ip_addr_t.type member. @see tcp_new_ip_type(), udp_new_ip_type(), raw_new_ip_type().
TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb
ESP specific option only applicable if ESP_LWIP=1 LWIP_TCP_RTO_TIME: TCP rto time. Default is 3 second.
LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names. Disable this option if you use a POSIX operating system that uses the same names (read, write & close). (only used if you use sockets.c) POSIX I/O functions are mapped to LWIP via the VFS layer (see port/vfs_lwip.c)
MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution.
TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
@name Debug message types (LWIP_DBG_TYPES_ON)
MEM_OVERFLOW_CHECK: mem overflow protection reserves a configurable amount of bytes before and after each heap allocation chunk and fills it with a prominent default value. MEM_OVERFLOW_CHECK == 0 no checking MEM_OVERFLOW_CHECK == 1 checks each element when it is freed MEM_OVERFLOW_CHECK >= 2 checks all heap elements every time mem_malloc() or mem_free() is called (useful but slow!)
MEMP_USE_CUSTOM_POOLS==1: whether to include a user file lwippools.h that defines additional pools beyond the "standard" ones required by lwIP. If you set this to 1, you must have lwippools.h in your include path somewhere.
the time an ARP entry stays valid after its last update, for ARP_TMR_INTERVAL = 1000, this is (60 * 5) seconds = 5 minutes.
IP_SOF_BROADCAST=1: Use the SOF_BROADCAST field to enable broadcast filter per pcb on udp and raw send operations. To enable broadcast filter on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1.
LWIP_ALTCP==1: enable the altcp API. altcp is an abstraction layer that prevents applications linking against the tcp.h functions but provides the same functionality. It is used to e.g. add SSL/TLS or proxy-connect support to an application written for the tcp callback API without that application knowing the protocol details. With LWIP_ALTCP==0, applications written against the altcp API can still be compiled but are directly linked against the tcp.h callback API and then cannot use layered protocols. See altcp_api
CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets.
IPV6_CUSTOM_SCOPES: together, the following three macro definitions, , , and , completely define the lwIP scoping policy. The definitions below implement the default policy from RFC 4007 Sec. 6. Should an implementation desire to implement a different policy, it can define IPV6_CUSTOM_SCOPES to 1 and supply its own definitions for the three macros instead.
Set a full IPv6 address by passing the 4 u32_t indices in network byte order
pbuf data is stored in ROM, i.e. struct pbuf and its payload are located in totally different memory areas. Since it points to ROM, payload does not have to be copied when queued for transmission.
Function prototype for netif status- or link-callback functions.
Old IPv4 address
Function used for extended netif status callbacks Note: When parsing reason argument, keep in mind that more reasons may be added in the future!
Indicates that the payload directly follows the struct pbuf.
indicates this is a custom pbuf: pbuf_free calls pbuf_custom->custom_free_function()
target IP address total counter
receive timeout in milliseconds
delay time in milliseconds
Packet too big
Multicast listener done
Neighbor solicitation
Function prototype for tcp accept callback functions. Called when a new connection can be accepted on a listening pcb.
Neighbor advertisement
Erroneous header field encountered
Function prototype for tcp receive callback functions. Called when data has been received.
Function prototype for tcp sent callback functions. Called when sent data has been acknowledged by the remote side. Use it to free corresponding resources. This also means that the pcb has now space available to send new data.
Function prototype for tcp poll callback functions. Called periodically as specified by @see tcp_poll.
Function prototype for tcp connected callback functions. Called when a pcb is connected to the remote side after initiating a connection attempt by calling tcp_connect().
Protocol specific PCB members
Callback function: Handle conflict information from ACD module
transaction identifier of last sent request
Function prototype for the init_done function passed to tcpip_init
Function prototype for udp pcb receive callback functions addr and port are in same byte order as in the pcb The callback is responsible for freeing the pbuf if it's not used any more. ATTENTION: Be aware that 'addr' might point into the pbuf 'p' so freeing this pbuf can make 'addr' invalid, too.
Internet protocol v6
MEMCPY-like copying of IP addresses where addresses are known to be 16-bit-aligned if the port is correctly configured (so a port could define this to copying 2 u16_t's) - no NULL-pointer-checking needed.
SNTP callback function for notifying about time sync event
Function prototype for raw pcb receive callback functions.
readset passed to select
writeset passed to select
unimplemented: exceptset passed to select
fds passed to poll; NULL if select
Options for the lwip_pollscan function.
LWIP_PPP_API==1: Enable PPP API (in pppapi.c)
global variable that shows if the tcp timer is currently scheduled or not
The default netif used for multicast
Maximum number of dynamic/learning entries in the bridge's forwarding database. In the default implementation, this controls memory consumption only.
Maximum number of static forwarding entries. Influences memory consumption!
is this netif enabled for IPv6 autoconfiguration
Virtual local area network
LWIP_DHCP_DISABLE_VENDOR_CLASS_ID==1: Do not add option 60 (Vendor Class Identifier) to DHCP packets
ESP_GRATUITOUS_ARP==1: This option allows to send gratuitous ARP periodically.
This macro can be used to initialize a variable of type struct in6_addr
ESP_MLDV6_REPORT==1: This option allows to send mldv6 report periodically.
Includes spare room for additional encapsulation header before ethernet headers (e.g. 802.11). Use this if you intend to pass the pbuf to functions like netif->linkoutput(). @see PBUF_LINK_ENCAPSULATION_HLEN
SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain critical regions during buffer allocation, deallocation and memory allocation and deallocation.
MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. (requires the LWIP_TCP option)
LWIP_DHCP_CHECKS_OFFERED_ADDRESS: - Using Address Conflict Detection (ACD) module assures that the offered IP address is properly probed and announced before binding in DHCP. This conforms to RFC5227, but takes several seconds. - Using ARP check, we only send two ARP requests to check for replies. This process lasts 1 - 2 seconds. - No conflict detection: We directly bind the offered address.
The maximum of NTP servers requested
TCP_OOSEQ_TIMEOUT: Timeout for each pbuf queued in TCP OOSEQ, in RTOs.
TCP_FIN_WAIT_TIMEOUT: The maximum FIN segment lifetime in milliseconds
TCPIP_THREAD_NAME: The name assigned to the main tcpip thread.
TCPIP_THREAD_STACKSIZE: The stack size used by the main tcpip thread. The stack size value itself is platform-dependent, but is passed to sys_thread_new() when the thread is created.
TCPIP_THREAD_PRIO: The priority assigned to the main tcpip thread. The priority value itself is platform-dependent, but is passed to sys_thread_new() when the thread is created.
TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages The queue size value itself is platform-dependent, but is passed to sys_mbox_new() when tcpip_init is called.
DEFAULT_UDP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a NETCONN_UDP. The queue size value itself is platform-dependent, but is passed to sys_mbox_new() when the recvmbox is created.
DEFAULT_TCP_RECVMBOX_SIZE: The mailbox size for the incoming packets on a NETCONN_TCP. The queue size value itself is platform-dependent, but is passed to sys_mbox_new() when the recvmbox is created.
DEFAULT_ACCEPTMBOX_SIZE: The mailbox size for the incoming connections. The queue size value itself is platform-dependent, but is passed to sys_mbox_new() when the acceptmbox is created.
DEFAULT_RAW_RECVMBOX_SIZE: The mailbox size for the incoming packets on a NETCONN_RAW. The queue size value itself is platform-dependent, but is passed to sys_mbox_new() when the recvmbox is created.
SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets to all local matches if SO_REUSEADDR is turned on. WARNING: Adds a memcpy for every packet if passing to more than one pcb!
LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided
CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets.
Configuring SNTP startup delay
LWIP_TIMERS_CUSTOM==1: Provide your own timer implementation. Function prototypes in timeouts.h and the array of lwip-internal cyclic timers are still included, but the implementation is not. The following functions will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(), sys_timeouts_mbox_fetch()
The maximum number of packets which may be queued for each unresolved address by other network layers. Defaults to 3, 0 means disabled. Old packets are dropped, new packets are queued.
LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
LWIP_DHCP_MAX_DNS_SERVERS > 0: Request DNS servers with discover/select. DNS servers received in the response are passed to DNS via dns_setserver() (up to the maximum limit defined here).
LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on the same interface at the same time.
DNS maximum number of retries when asking for a name, before "timeout".
If this is turned on, the local host-list can be dynamically changed at runtime.
TCP_TTL: Default Time-To-Live value.
The maximum allowed backlog for TCP listen netconns. This backlog is used unless another is explicitly specified. 0xff is the maximum (u8_t).
Define this to something that triggers a watchdog. This is called from tcpip_thread after processing a message.
LWIP_SOCKET_EXTERNAL_HEADERS==1: Use external headers instead of sockets.h and inet.h. In this case, user must provide its own headers by setting the values for LWIP_SOCKET_EXTERNAL_HEADER_SOCKETS_H and LWIP_SOCKET_EXTERNAL_HEADER_INET_H to appropriate include file names and the whole content of the default sockets.h and inet.h is skipped.
LWIP_ICMP6_HL: default hop limit for ICMPv6 messages
ESP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address is being resolved.
TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
Are the zone fields of the given IPv6 addresses equal? (0/1)
Helper struct for const-correctness only. The only meaning of this one is to provide a const payload pointer for PBUF_ROM type.
pointer to the actual data in the buffer
The actual pbuf
Already connecting.
Conn already established.
1: up; 0: down
Args to LWIP_NSC_LINK_CHANGED callback
1: up; 0: down
Args to LWIP_NSC_STATUS_CHANGED callback
Args to LWIP_NSC_IPV6_SET callback
h_errno is exported in netdb.h for access by applications.
PBUF_NEEDS_COPY(p): return a boolean value indicating whether the given pbuf needs to be copied in order to be kept around beyond the current call stack without risking being corrupted. The default setting provides safety: it will make a copy iof any pbuf chain that does not consist entirely of PBUF_ROM type pbufs. For setups with zero-copy support, it may be redefined to evaluate to true in all cases, for example. However, doing so also has an effect on the application side: any buffers that are *not* copied must also *not* be reused by the application after passing them to lwIP. For example, when setting PBUF_NEEDS_COPY to (0), after using udp_send() with a PBUF_RAM pbuf, the application must free the pbuf immediately, rather than reusing it for other purposes. For more background information on this, see tasks #6735 and #7896, and bugs #11400 and #49914.
Indicates the data stored in this pbuf can change. If this pbuf needs
4 bits are reserved for 16 allocation sources (e.g. heap, pool1, pool2, etc)
Define this to 0 to prevent freeing ooseq pbufs when the PBUF_POOL is empty
The size of a fully constructed netif name which the netif can be identified by in APIs. Composed of 2 chars, 3 (max) digits, and 1 \0
netif administrative status changed. up is called AFTER netif is set up.
ping result callback function
Multicast listener query
Router solicitation
Router advertisement
Global variables of this module, kept in a struct for efficient access using base+index.
Unrecognized next header type encountered
Common members of all PCB types
Protocol specific PCB members
Protocol specific PCB members
Output IP packet to interface specifying source address
members common to struct tcp_pcb and struct tcp_listen_pcb
Function prototype for thread functions
Common members of all PCB types
Address resolution protocol
For now, we map straight to sys_arch implementation.
Returned by sys_timeouts_sleeptime() to indicate there is no timer, so we can sleep forever.
MEMCPY-like copying of IP addresses where addresses are known to be 16-bit-aligned if the port is correctly configured (so a port could define this to copying 2 u16_t's) - no NULL-pointer-checking needed.
Update system time immediately when receiving a response from the SNTP server.
SNTP server port
SNTP receive timeout - in milliseconds Also used as retry timeout - this shouldn't be too low. Default is 15 seconds. Must not be beolw 15 seconds by specification (i.e. 15000)
Maximum retry timeout (in milliseconds).
Increase retry timeout with every retry sent Default is on to conform to RFC.
pointer to the application buffer that contains the data to send
UDP IPv4 no checksum
TTL for outgoing multicast packets
used for lwip_netconn_do_recv
Type of resolve call
used for lwip_netconn_do_newconn
TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY)
Flags used on input processing, not on pcb->flags
Table to quickly map an lwIP error (err_t) to a socket error by using -err as an index
nfds passed to poll; 0 if select
LWIP_DNS_API_HOSTENT_STORAGE: if set to 0 (default), lwip_gethostbyname() returns the same global variabe for all calls (in all threads). When set to 1, your port should provide a function struct hostent* sys_thread_hostent( struct hostent* h); which have to do a copy of "h" and return a pointer ont the "per-thread" copy.
Clear revents in each struct pollfd.
Increment select_waiting in each struct lwip_sock.
Decrement select_waiting in each struct lwip_sock.
For release candidates, this is set to 1..254 For official releases, this is set to 255 (LWIP_RC_RELEASE)
Names/Addresses of servers
Random generator function to create random TXIDs and source ports for queries
PPPOL2TP_SUPPORT==1: Enable PPP Over L2TP
PPPOS_SUPPORT==1: Enable PPP Over Serial
DHCP_CREATE_RAND_XID: if this is set to 1, the xid is created using LWIP_RAND() (this overrides DHCP_GLOBAL_XID)
Small optimization: set to 0 if incoming PBUF_POOL pbuf always can be used to modify and send a response packet (and to 1 if this is not the case, e.g. when link header is stripped off when receiving)
The IP header ID of the next outgoing IP packet
Set this to 1 to start a thread that blocks reading on the serial line (using sio_read()).
Maximum packet size that is received by this netif
ESP specific option only applicable if ESP_DNS=1 The last server can be initialized automatically by defining FALLBACK_DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*'
LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862.
Index of affected IPv6 address
Old IPv6 address state
MAC address of the bridge (cannot use the netif's addresses)
This variable is initialized by the system to contain the wildcard IPv6 address.
This is returned by _fromisr() sys functions to tell the outermost function that a higher priority task was woken and the scheduler needs to be invoked.
MEMP_NUM_RAW_PCB: Number of raw connection PCBs (requires the LWIP_RAW option)
MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. (requires the LWIP_TCP option)
MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One per active UDP "connection". (requires the LWIP_UDP option)
IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally) a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived in this time, the whole packet is discarded.
IP_REASS_MAX_PBUFS: Total maximum amount of pbufs waiting to be reassembled. Since the received pbufs are enqueued, be sure to configure PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive packets even if the maximum amount of fragments is enqueued for reassembly!
DEFAULT_THREAD_STACKSIZE: The stack size used by any other lwIP thread. The stack size value itself is platform-dependent, but is passed to sys_thread_new() when the thread is created.
DEFAULT_THREAD_PRIO: The priority assigned to any other lwIP thread. The priority value itself is platform-dependent, but is passed to sys_thread_new() when the thread is created.
MEMP_DEBUG: Enable debugging in memp.c.
TCPIP_DEBUG: Enable debugging in tcpip.c.
It disables a check of SNTP_UPDATE_DELAY it is done in sntp_set_sync_interval
Define this to 1 in arch/cc.h of your port if you do not want to include stddef.h header to get size_t. You need to typedef size_t by yourself in this case.
Define this to 1 in arch/cc.h of your port if your compiler does not provide the stdint.h header. You need to typedef the generic types listed in lwip/arch.h yourself in this case (u8_t, u16_t...).
Define this to 1 in arch/cc.h of your port if your compiler does not provide the inttypes.h header. You need to define the format strings listed in lwip/arch.h yourself in this case (X8_F, U16_F...).
Define this to 1 in arch/cc.h of your port if your compiler does not provide the limits.h header. You need to define the type limits yourself in this case (e.g. INT_MAX, SSIZE_MAX).
Define this to 1 in arch/cc.h of your port if your compiler does not provide the ctype.h header. If ctype.h is available, a few character functions are mapped to the appropriate functions (lwip_islower, lwip_isdigit...), if not, a private implementation is provided.
Get rid of warnings related to pointer-to-numeric and vice-versa casts, e.g. "conversion from 'u8_t' to 'void *' of greater size"
Avoid warnings/errors related to implicitly casting away packed attributes by doing a explicit cast
Calculate safe memory size for an aligned buffer when using an unaligned type as storage. This includes a safety-margin on (MEM_ALIGNMENT - 1) at the start (e.g. if buffer is u8_t[] and actual data will be u32_t*)
MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make sure that there are no cycles in the linked lists.
MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. (requires the LWIP_TCP option)
IP_OPTIONS_ALLOWED: Defines the behavior for IP options. IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1: allow ip_forward() to send packets back out on the netif where it was received. This should only be used for wireless networks. ATTENTION: When this is 1, make sure your netif driver correctly marks incoming link-layer-broadcast/multicast packets as such using the corresponding pbuf flags!
LWIP_MIB2_CALLBACKS==1: Turn on SNMP MIB2 callbacks. Turn this on to get callbacks needed to implement MIB2. Usually MIB2_STATS should be enabled, too.
LWIP_TCP_MAX_SACK_NUM: The maximum number of SACK values to include in TCP segments. Must be at least 1, but is only used if LWIP_TCP_SACK_OUT is enabled. NOTE: Even though we never send more than 3 or 4 SACK ranges in a single segment (depending on other options), setting this option to values greater than 4 is not pointless. This is basically the max number of SACK ranges we want to keep track of. As new data is delivered, some of the SACK ranges may be removed or merged. In that case some of those older SACK ranges may be used again. The amount of memory used to store SACK ranges is LWIP_TCP_MAX_SACK_NUM * 8 bytes for each TCP PCB.
TCP_OOSEQ_MAX_BYTES: The default maximum number of bytes queued on ooseq per pcb if TCP_OOSEQ_BYTES_LIMIT is not defined. Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==1.
TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an explicit window update
LWIP_PBUF_CUSTOM_DATA: Store private data on pbufs (e.g. timestamps) This extends struct pbuf so user can store custom data on every pbuf.
LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1).
SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
SLIP_THREAD_STACKSIZE: The stack size used by the slipif_loop thread. The stack size value itself is platform-dependent, but is passed to sys_thread_new() when the thread is created.
SLIPIF_THREAD_PRIO: The priority assigned to the slipif_loop thread. The priority value itself is platform-dependent, but is passed to sys_thread_new() when the thread is created.
LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int (milliseconds, much like winsock does) instead of a struct timeval (default).
By default, TCP socket/netconn close waits 20 seconds max to send the FIN
LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of pending data in the network buffer. This is the way windows does it. It's the default for lwIP since it is smaller. LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next pending datagram in bytes. This is the way linux does it. This code is only here for compatibility.
CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets
LWIP_IPV6_SCOPES_DEBUG==1: Perform run-time checks to verify that addresses are properly zoned (see ip6_zone.h on what that means) where it matters. Enabling this setting is highly recommended when upgrading from an existing installation that is not yet scope-aware; otherwise it may be too expensive.
LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds). May be updated by router advertisement messages.
LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages
LWIP_DHCP6_GETS_NTP==1: Request NTP servers via DHCPv6. For each response packet, a callback is called, which has to be provided by the port: void dhcp6_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs);
RAW_DEBUG: Enable debugging in raw.c.
TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
LWIP_PERF: Enable performance testing for lwIP (if enabled, arch/perf.h is included)
@deprecated Renamed to
@deprecated Renamed to
Prototype for a function to free a custom pbuf
Function prototype for netif->output functions. Called by lwIP when a packet shall be sent. For ethernet netif, set this to 'etharp_output' and set 'linkoutput'.
Function prototype for netif->output_ip6 functions. Called by lwIP when a packet shall be sent. For ethernet netif, set this to 'ethip6_output' and set 'linkoutput'.
Function prototype for netif->linkoutput functions. Only used for ethernet netifs. This function is called by ARP when a packet shall be sent.
Function prototype for netif igmp_mac_filter functions
Function prototype for netif mld_mac_filter functions
Element size
Args to LWIP_NSC_LINK_CHANGED callback
Args to LWIP_NSC_STATUS_CHANGED callback
Args to LWIP_NSC_IPV4_ADDRESS_CHANGED|LWIP_NSC_IPV4_GATEWAY_CHANGED|LWIP_NSC_IPV4_NETMASK_CHANGED|LWIP_NSC_IPV4_SETTINGS_CHANGED callback
Args to LWIP_NSC_IPV6_SET callback
Index of changed IPv6 address
Old IPv6 address
Args to LWIP_NSC_IPV6_ADDR_STATE_CHANGED callback
Affected IPv6 address
Indicates this pbuf is used for RX (if not set, indicates use for TX). This information can be used to keep some spare RX buffers e.g. for
@file lwIP internal memory pools (do not use in application code) This file is deliberately included multiple times: once with empty definition of LWIP_MEMPOOL() to handle all includes and multiple times to build up various lists of mem pools.
ping result statistic reset
Destination unreachable
Parameter problem
protocol unreachable
fragmentation needed and DF set
time to live exceeded in transit
No route to destination
Port unreachable
Hop limit exceeded in transit
Function prototype for deallocation of arguments. Called *just before* the pcb is freed, so don't expect to be able to do anything with this pcb!
Function prototype to transition arguments from a listening pcb to an accepted pcb
Common members of all PCB types
Common members of all PCB types
Common members of all PCB types
Output IP packet, netif is selected by source address
Function prototype for a stack-internal timer function that has to be called at a defined interval
Array size of lwip_cyclic_timers[]
DHCP server's description of compile time configuration values in dhcpserver.c - DHCPS_DEBUG: Prints very detailed debug messages if set to 1, hardcoded to 0 - USE_CLASS_B_NET: Use class B network mask if enabled, not-defined (could be enabled as CC_FLAGS) - MAX_STATION_NUM: Maximum number of clients, set to Kconfig value CONFIG_LWIP_DHCPS_MAX_STATION_NUM - LWIP_HOOK_DHCPS_POST_STATE: Used to inject user code after parsing DHCP message, not defined - could be enabled in lwipopts.h or via CC_FLAGS - basic usage of the hook to print hex representation of the entire option field is below: #define LWIP_HOOK_DHCPS_POST_STATE(msg, len, state) \ ({ s16_t ret = state; if (state == DHCPS_STATE_ACK) { ESP_LOG_BUFFER_HEXDUMP("DHCPS",msg->options, 312, ESP_LOG_INFO);} ret; }) Definitions related to lease time, units and limits
Router solicitations are sent in 4 second intervals (see RFC 4861, ch. 6.3.7)
Define this to 1 and define LWIP_ARP_FILTER_NETIF_FN(pbuf, netif, type) to a filter function that returns the correct netif when using multiple netifs on one hardware interface where the netif's low-level receive routine cannot decide for the correct netif (e.g. when mapping multiple IP addresses to one hardware interface).
outgoing network interface for multicast packets, by interface index (if nonzero)
This is the Nagle algorithm: try to combine user data to send as few TCP segments as possible. Only send if - no previously transmitted data on the connection remains unacknowledged or - the TF_NODELAY flag is set (nagle algorithm turned off for this pcb) or - the only unsent segment is at least pcb->mss bytes long (or there is more than one unsent segment - with lwIP, this can happen although unsent->len < mss) - or if we are in fast-retransmit (TF_INFR)
This is overridable for the rare case where more than 255 threads select on the same socket...
64-bit NTP timestamp, in network byte order.
Respond to NetBIOS name queries Default is disabled
The Time-To-Live for NetBIOS name responds (in seconds)
DNS server port address
UDP port for multicast DNS queries
Limits the source port to be >= 1024 by default
A custom pbuf that holds a reference to another pbuf, which is freed when this custom pbuf is freed. This is used to create a custom PBUF_REF that points into the original pbuf.
Define this to 1 for an extra check that the output checksum is valid (useful when the checksum is generated by the application, not the stack)
DHCP_ADD_EXTRA_REQUEST_OPTIONS: Additional options added to the list of options that the client requests from the servers (opt 55: DHCP_OPTION_PARAMETER_REQUEST_LIST) If additional options are requested, define this macro as a comma separated list, with leading comma. This macro is useful for example when requested vendor specific ids (VCI/VSI options), here is an example of requesting the VSI option (option 43) (yes, the notation is a bit strange, but it works :) (NOTE: the space between # and define is required because of doxygen...) # define DHCP_ADD_EXTRA_REQUEST_OPTIONS ,43
Re-request a used ARP entry 1 minute before it would expire to prevent
the time an ARP entry stays pending after first request, for ARP_TMR_INTERVAL = 1000, this is 10 seconds. @internal Keep this number at least 2, otherwise it might run out instantly if the timeout occurs directly after a request.
Type of service of a ping procedure
ping receive timeout - in milliseconds
ping delay - in milliseconds
Timer counter to handle calling slow-timer from tcp_tmr()
For Ethernet network interfaces, we might want to send "gratuitous ARP"; this is an ARP packet sent by a node in order to spontaneously cause other nodes to update an entry in their ARP cache.
Symbolic constants for the 'type' parameters in some of the macros. These exist for efficiency only, allowing the macros to avoid certain tests when the address is known not to be of a certain type. Dead code elimination will do the rest. IP6_MULTICAST is supported but currently not optimized. @see ip6_addr_has_scope, ip6_addr_assign_zone, ip6_addr_lacks_zone.
@file This file (together with sockets.h) aims to provide structs and functions from - arpa/inet.h - netinet/in.h
@file lwIP Options Configuration
TCP_OOSEQ_DEBUG: Enable debugging in tcpin.c for OOSEQ.
@file Debug messages infrastructure
@file Support for different processor and compiler architectures
Get rid of alignment cast warnings (GCC -Wcast-align)
Allocates a memory buffer of specified size that is of sufficient size to align its start address using LWIP_MEM_ALIGN. You can declare your own version here e.g. to enforce alignment without adding trailing padding bytes (see LWIP_MEM_ALIGN_BUFFER) or your own section placement requirements. e.g. if you use gcc and need 32 bit alignment: \#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u8_t variable_name[size] \_\_attribute\_\_((aligned(4))) or more portable: \#define LWIP_DECLARE_MEMORY_ALIGNED(variable_name, size) u32_t variable_name[(size + sizeof(u32_t) - 1) / sizeof(u32_t)]
@name Debug level (LWIP_DBG_MIN_LEVEL)
@name Enable/disable debug messages completely (LWIP_DBG_TYPES_ON)
MEMMOVE: override this if you have a faster implementation at hand than the one included in your C library. lwIP currently uses MEMMOVE only when IPv6 fragmentation support is enabled.
MEMP_MEM_INIT==1: Force use of memset to initialize pool memory. Useful if pool are moved in uninitialized section of memory. This will ensure default values in pcbs struct are well initialized in all conditions.
MEM_SIZE: the size of the heap memory. If the application will send a lot of data that needs to be copied, this should be set high.
MEM_SANITY_CHECK==1: run a sanity check after each mem_free() to make sure that the linked list of heap elements is not corrupted.
MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more reliable.
Set this to 1 if you want to free PBUF_RAM pbufs (or call mem_free()) from interrupt context (or another context that doesn't allow waiting for a semaphore). If set to 1, mem_malloc will be protected by a semaphore and SYS_ARCH_PROTECT, while mem_free will only use SYS_ARCH_PROTECT. mem_malloc SYS_ARCH_UNPROTECTs with each loop so that mem_free can run. ATTENTION: As you can see from the above description, this leads to dis-/ enabling interrupts often, which can be slow! Also, on low memory, mem_malloc can need longer. If you don't want that, at least for NO_SYS=0, you can still use the following functions to enqueue a deallocation call which then runs in the tcpip_thread context: - pbuf_free_callback(p); - mem_free_callback(m);
MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). If the application sends a lot of data out of ROM (or other static memory), this should be set high.
MEMP_NUM_ALTCP_PCB: the number of simultaneously active altcp layer pcbs. (requires the LWIP_ALTCP option) Connections with multiple layers require more than one altcp_pcb (e.g. TLS over TCP requires 2 altcp_pcbs, one for TLS and one for TCP).
MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for reassembly (whole packets, not fragments!)
MEMP_NUM_FRAG_PBUF: the number of IP fragments simultaneously sent (fragments, not whole packets!). This is only used with LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs where the packet is not yet sent when netif->output returns.
MEMP_NUM_ARP_QUEUE: the number of simultaneously queued outgoing packets (pbufs) that are waiting for an ARP request (to resolve their destination address) to finish. (requires the ARP_QUEUEING option)
MEMP_NUM_IGMP_GROUP: The number of multicast groups whose network interfaces can be members at the same time (one per netif - allsystems group -, plus one per netif membership). (requires the LWIP_IGMP option)
The number of sys timeouts used by the core stack (not apps) The default number of timeouts is calculated here for all enabled modules.
MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active timeouts. The default number of timeouts is calculated here for all enabled modules. The formula expects settings to be either '0' or '1'.
MEMP_NUM_NETBUF: the number of struct netbufs. (only needed if you use the sequential API, like api_lib.c)
MEMP_NUM_SELECT_CB: the number of struct lwip_select_cb. (Only needed if you have LWIP_MPU_COMPATIBLE==1 and use the socket API. In that case, you need one per thread calling lwip_select.)
MEMP_NUM_TCPIP_MSG_API: the number of struct tcpip_msg, which are used for callback/timeout API communication. (only needed if you use tcpip.c)
MEMP_NUM_TCPIP_MSG_INPKT: the number of struct tcpip_msg, which are used for incoming packets. (only needed if you use tcpip.c)
MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls (before freeing the corresponding memory using lwip_freeaddrinfo()).
MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1.
MEMP_NUM_API_MSG: the number of concurrently active calls to various socket, netconn, and tcpip functions
MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname
MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls to getsockopt/setsockopt
MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the netifapi functions
LWIP_DHCP_AUTOIP_COOP_TRIES: Set to the number of DHCP DISCOVER probes that should be sent before falling back on AUTOIP (the DHCP client keeps running in this case). This can be set as low as 1 to get an AutoIP address very quickly, but you should be prepared to handle a changing IP address when DHCP overrides AutoIP.
DNS do a name checking between the query and the response.
LWIP_ALTCP_TLS==1: enable TLS support for altcp API. This needs a port of the functions in altcp_tls.h to a TLS library. A port to ARM mbedtls is provided with lwIP, see apps/altcp_tls/ directory and LWIP_ALTCP_TLS_MBEDTLS option.
DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread.
If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize.
IPV6_REASS_MAXAGE: Maximum time (in multiples of IP6_REASS_TMR_INTERVAL - so seconds, normally) a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived in this time, the whole packet is discarded.
MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast groups that can be joined. There must be enough groups so that each netif can join the solicited-node multicast group for each of its local addresses, plus one for MDNS if applicable, plus any number of groups to be joined on UDP sockets.
LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages to send during neighbor reachability detection.
Unused: See ND RFC (time in milliseconds).
LWIP_IPV6_DHCP6_STATEFUL==1: enable DHCPv6 stateful address autoconfiguration. (not supported, yet!)
LWIP_IPV6_DHCP6_STATELESS==1: enable DHCPv6 stateless address autoconfiguration.
The maximum of NTP servers requested
LWIP_DHCP6_MAX_DNS_SERVERS > 0: Request DNS servers via DHCPv6. DNS servers received in the response are passed to DNS via dns_setserver() (up to the maximum limit defined here).
LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is compared against this value. If it is smaller, then debugging messages are written. @see debugging_levels
LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable debug messages of certain types. @see debugging_levels
API_MSG_DEBUG: Enable debugging in api_msg.c.
INET_DEBUG: Enable debugging in inet.c.
IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
MEM_DEBUG: Enable debugging in mem.c.
SYS_DEBUG: Enable debugging in sys.c.
TIMERS_DEBUG: Enable debugging in timers.c.
TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
TCP_RTO_DEBUG: Enable debugging in TCP for retransmit timeout.
TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
SLIP_DEBUG: Enable debugging in slipif.c.
AUTOIP_DEBUG: Enable debugging in autoip.c.
ACD_DEBUG: Enable debugging in acd.c.
DHCP6_DEBUG: Enable debugging in dhcp6.c.
@file various utility macros All defines related to this section must not be placed in lwipopts.h, but in arch/perf.h! Measurement calls made throughout lwip, these can be defined to nothing. - PERF_START: start measuring something. - PERF_STOP(x): stop measuring something, and record the result.
@file IP address API (common IPv4 and IPv6)
@file IPv4 address API
Safely copy one IP address to another and change byte order
@file IPv6 addresses.
@file IPv6 address scopes, zones, and scoping policy. This header provides the means to implement support for IPv6 address scopes, as per RFC 4007. An address scope can be either global or more constrained. In lwIP, we say that an address "has a scope" or "is scoped" when its scope is constrained, in which case the address is meaningful only in a specific "zone." For unicast addresses, only link-local addresses have a scope; in that case, the scope is the link. For multicast addresses, there are various scopes defined by RFC 4007 and others. For any constrained scope, a system must establish a (potentially one-to-many) mapping between zones and local interfaces. For example, a link-local address is valid on only one link (its zone). That link may be attached to one or more local interfaces. The decisions on which scopes are constrained and the mapping between zones and interfaces is together what we refer to as the "scoping policy" - more on this in a bit. In lwIP, each IPv6 address has an associated zone index. This zone index may be set to "no zone" (IP6_NO_ZONE, 0) or an actual zone. We say that an address "has a zone" or "is zoned" when its zone index is *not* set to "no zone." In lwIP, in principle, each address should be "properly zoned," which means that if the address has a zone if and only if has a scope. As such, it is a rule that an unscoped (e.g., global) address must never have a zone. Even though one could argue that there is always one zone even for global scopes, this rule exists for implementation simplicity. Violation of the rule will trigger assertions or otherwise result in undesired behavior. Backward compatibility prevents us from requiring that applications always provide properly zoned addresses. We do enforce the rule that the in the lwIP link layer (everything below netif->output_ip6() and in particular ND6) *all* addresses are properly zoned. Thus, on the output paths down the stack, various places deal with the case of addresses that lack a zone. Some of them are best-effort for efficiency (e.g. the PCB bind and connect API calls' attempts to add missing zones); ultimately the IPv6 output handler (ip6_output_if_src) will set a zone if necessary. Aside from dealing with scoped addresses lacking a zone, a proper IPv6 implementation must also ensure that a packet with a scoped source and/or destination address does not leave its zone. This is currently implemented in the input and forward functions. However, for output, these checks are deliberately omitted in order to keep the implementation lightweight. The routing algorithm in ip6_route will take decisions such that it will not cause zone violations unless the application sets bad addresses, though. In terms of scoping policy, lwIP implements the default policy from RFC 4007 using macros in this file. This policy considers link-local unicast addresses and (only) interface-local and link-local multicast addresses as having a scope. For all these addresses, the zone is equal to the interface. As shown below in this file, it is possible to implement a custom policy.
Safely copy one IPv6 address to another and change byte order
Determine if two IPv6 address are on the same network. @deprecated Renamed to
This macro can be used to initialize a variable of type struct in6_addr
next pbuf in singly linked pbuf chain
@file This file is a posix wrapper for lwip/sockets.h.
@file Socket API (to be used from non-TCPIP threads)
@file netif API (to be used from TCPIP thread)
@file lwIP Error codes
@file pbuf API
@file Statistics API (to be used from TCPIP thread)
@file Heap API
@file Memory pool API
@file memory pools lwIP internal implementations (do not use in application code)
@file lwIP internal memory implementations (do not use in application code)
Declare prototype for private memory pool if it is used in multiple files
Initialize a private memory pool
Allocate from a private memory pool
Free element from a private memory pool
@file Posix Errno defines
@file Interface Identification APIs from: RFC 3493: Basic Socket Interface Extensions for IPv6 Section 4: Interface Identification
@file NETDB API (sockets)
Private experimentation
Private experimentation
Reserved for expansion of error messages
net unreachable
host unreachable
source route failed
fragment reassembly time exceeded
Multicast router advertisement
Multicast router solicitation
Multicast router termination
Private experimentation
Private experimentation
Reserved for expansion of informational messages
Communication with destination administratively prohibited
Beyond scope of source address
Address unreachable
Source address failed ingress/egress policy
Reject route to destination
Fragment reassembly time exceeded
A table of callback functions that is invoked for ext arguments
@file TCP API (to be used from TCPIP thread) See also tcp_raw
@file Base TCP API definitions shared by TCP and ALTCP See also tcp_raw
@file IP API
@file IPv4 API
@file IPv4 protocol definitions
@file IPv6 layer.
@file IPv6 protocol definitions
@file IP protocol definitions
@file ICMP API
@file ICMP protocol definitions
@file IPv6 version of ICMP, as per RFC 4443.
@file ICMP6 protocol definitions
next acd module
the currently selected, probed, announced or used IP-Address
sent number of probes or announces, dependent on state
ticks to wait, tick is ACD_TMR_INTERVAL long
ticks until a conflict can again be solved by defending
total number of probed/used IP-Addresses that resulted in a conflict
A list of often ethtypes (although lwIP does not use all of them).
PPP Over Ethernet Discovery Stage
PPP Over Ethernet Session Stage
Process field network
Ethernet for control automation technology
Link layer discovery protocol
Serial real-time communication system
Media redundancy protocol
Precision time protocol
Q-in-Q, 802.1ad
@file Functions to sync with TCPIP thread
@file Timer implementations
@file OS abstraction layer
Same as sys_sem_set_invalid() but taking a value, not a pointer
Same as sys_mbox_set_invalid() but taking a value, not a pointer
@deprecated use tcpip_try_callback() or tcpip_callback() instead
@file DHCP client API
@file UDP API (to be used from TCPIP thread) See also udp_raw
@file UDP protocol definitions
@file ACD IPv4 Address Conflict Detection
@file Ethernet output function - handles OUTGOING ethernet level traffic, implements ARP resolving. To be used in most low-level netif implementations
@file Ethernet protocol definitions
@file IEEE assigned numbers
@file ARP protocol definitions
@file ACD protocol definitions
ACD Timing ACD_TMR_INTERVAL msecs, I recommend a value of 100. The value must divide 1000 with a remainder almost 0. Possible values are 1000, 500, 333, 250, 200, 166, 142, 125, 111, 100 ....
@file Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. No support for MLDv2.
@file MLD6 protocol definitions
@file Neighbor discovery and stateless address autoconfiguration for IPv6. Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 (Address autoconfiguration).
@file SNMP support API for implementing netifs and statitics for MIB2
@file TCPIP API internal implementations (do not use in application code)
@file DNS API lwip DNS resolver header file. Author: Jim Pettinato April 2007 ported from uIP resolv.c Copyright (c) 2002-2003, Adam Dunkels. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Port numbers https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
@file SNTP client API
@file SNTP client options list
@file IANA assigned numbers (RFC 1700 and successors)
SNTP macro to change system time in seconds Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one if you need the additional precision. Alternatively, define SNTP_SET_SYSTEM_TIME_NTP(sec, frac) in order to work with native NTP timestamps instead.
@file Ethernet output for IPv6. Uses ND tables for link-layer addressing.
@file Ethernet input function - handles INCOMING ethernet level traffic To be used in most low-level netif implementations
UDP IPv6 (dual-stack by default, unless you call )
UDP IPv6 lite (dual-stack by default, unless you call )
UDP IPv6 no checksum (dual-stack by default, unless you call )
Raw connection IPv6 (dual-stack by default, unless you call )
@file netconn API (to be used from non-TCPIP threads)
@file netbuf API (for netconn API)
Create new netconn connection
@file raw API (to be used from TCPIP thread) See also raw_raw
@file netconn API lwIP internal implementations (do not use in application code)
@file IGMP API
@file TCP internal implementations (do not use in application code)
@file TCP protocol definitions
@file netif API (to be used from non-TCPIP threads)
@file Sockets API internal implementations (do not use in application code)
@file lwIP initialization API
@file NETBIOS name service responder
@file NETBIOS name service responder options
@file DNS - host name to IP address resolver.
@file IP checksum calculation functions
PPPOE_SCNAME_SUPPORT==1: Enable PPP Over Ethernet Service Name and Concentrator Name support
PPPOL2TP_AUTH_SUPPORT==1: Enable PPP Over L2TP Auth (enable MD5 support)
ppp.h - Network Point to Point Protocol header file. Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. portions Copyright (c) 1997 Global Election Systems Inc. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice and the following disclaimer are included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. REVISION HISTORY 03-01-01 Marc Boucher <marc@mbsi.ca> Ported to lwIP. 97-11-05 Guy Lancaster <glanca@gesn.com>, Global Election Systems Inc. Original derived from BSD codes.
'base class'
pointer to the original pbuf that is referenced
@file Application layered TCP connection API (to be used from TCPIP thread) This file contains the generic API. For more details see altcp_api.
@file IP fragmentation/reassembly
@file Neighbor discovery and stateless address autoconfiguration for IPv6. Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 (Address autoconfiguration).
@file IPv6 fragmentation and reassembly.
@file raw API internal implementations (do not use in application code)
The size of segment pbufs created when TCP_OVERSIZE is enabled
@file DHCPv6 client: IPv6 address autoconfiguration as per RFC 3315 (stateful DHCPv6) and RFC 3736 (stateless DHCPv6).
Option handling: options are parsed in dhcp_parse_reply and saved in an array where other functions can load them from. This might be moved into the struct dhcp (not necessarily since lwIP is single-threaded and the array is only used while in recv callback).
@file AutoIP Automatic LinkLocal IP Configuration
@file DHCP protocol definitions
@file IGMP protocol definitions
@file ip4_napt.h This is a private interface of ip4_napt used from ip4.c @see ip4_napt.c
@file ND6 protocol definitions
@file lwIP netif implementing an IEEE 802.1D MAC Bridge
@file lwIP netif implementing an IEEE 802.1D MAC Bridge
BRIDGEIF_DEBUG: Enable generic debugging in bridgeif.c.
BRIDGEIF_DEBUG: Enable FDB debugging in bridgeif.c.
BRIDGEIF_DEBUG: Enable forwarding debugging in bridgeif.c.
Use this for constant initialization of a bridgeif_initdat_t (ethaddr must be passed as ETH_ADDR())
Use this for constant initialization of a bridgeif_initdat_t (each byte of ethaddr must be passed)
Set this to 1 (default for SLIP_RX_FROM_ISR) to queue incoming packets received by slipif_received_byte[s]() as long as PBUF_POOL pbufs are available. If disabled, packets will be dropped if more than one packet is received.
Define this to the interface speed for SNMP (sio_fd is the sio_fd_t returned by sio_open). The default value of zero means 'unknown'.
Set ping count to zero will ping target infinitely
PING_DEBUG: Enable debugging for PING.
ping target - should be an "ip4_addr_t"
ping identifier - must fit on a u16_t
ping additional data size to include in the packet
ping result action - no default action
@file lwip_napt.h public API of ip4_napt @see ip4_napt.c

Dependencies