Join a group on a network interface.
Leave a group on a network interface.
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()
Invoke extended netif status event
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.
Change IP address configuration for a network interface (including netmask and default gateway).
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.
Join a group on one network interface.
Leave a group on one network interface.
Create a DHCP request, fill in common headers
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
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.
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.
Add a network interface to the list of lwIP netifs.
Same as udp_sendto_if, but with source address
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.
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
Search for a group in the netif's igmp group list
Send ARP/IGMP/MLD/RS events, e.g. on link-up/netif-up or addr-change
Start the DHCP process, discover a DHCP server.
Bring an interface down, disabling any traffic processing.
Called by a driver when its link goes up
Send an ARP request packet asking for ipaddr.
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().
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()
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).
Send a raw ARP packet (opcode and all addresses can be modified)
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.
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.
This function calls dhcp_release_and_stop() internally. @deprecated Use dhcp_release_and_stop() instead.
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
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().
Get the Path MTU for a destination.
Netif was added, set up, or reconnected (link up)
Pass a received packet to tcpip_thread for input processing
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.
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
Enable/Disable NAPT for a specified interface.
Set a network interface as the default network interface (used to output all packets for which no specific route is found)
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.
Report MLD memberships for this interface
Starts the DHCP server on the specified network interface
Stops the DHCP server on the specified netif
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'.
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.
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.
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
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()
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()).
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.
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.
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.
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
Search for a specific igmp group and create a new one if not found-
Send an ICMPv6 packet (with srd/dst address and netif given).
Send a neighbor solicitation message
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
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).
This function calls dhcp_release_and_stop() internally. @deprecated Use dhcp_release_and_stop() instead.
Initialization function passed to netif_add(). ATTENTION: A pointer to a
bridgeif_initdata_t
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 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
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().
Same as ip_output_if() but 'src' address is not replaced by netif address when it is 'any'.
Processes ICMP input packets, called from ip_input(). Currently only processes icmp echo requests and sends out the echo response.
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.
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
DHCP transaction timeout handling (this function must be called every 500ms, see
DHCP_FINE_TIMER_MSECS
). 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
Process an input MLD message. Called by icmp6_input.
Process an incoming neighbor discovery message
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.
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.
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.
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
Called by tcp_output() to actually send a TCP segment over IP.
Common code to see if the current input packet matches the pcb (current input packet is accessed via ip(4/6)_current_* macros)
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.
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
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
A local address has been determined to be a duplicate. Take the appropriate action(s) on the address and the interface as a whole.
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.
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
NAPT for a forwarded packet. It checks weather we need NAPT and modify the packet source address and port if needed.
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!
Set a default netif for IPv4 multicast.
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.
Finds (stable) ethernet/IP address pair from ARP table using interface and IP address index.
Possibility to iterate over stable ARP table entries
Initialize a lwip network interface structure for a loopback interface
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
We received a router advertisement that contains a prefix with the autoconfiguration flag set. Add or update an associated autogenerated address.
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
SLIP netif initialization Call the arch specific sio_open and remember the opened device in the state field of the netif.
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.
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.