Convert numeric IP address into decimal dotted ASCII representation. returns ptr to static buffer; not reentrant!
Add a network interface to the list of lwIP netifs.
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.
Change IP address configuration for a network interface (including netmask and default gateway).
Bind an UDP PCB. ipaddr & port are expected to be in the same byte order as in the pcb. @see udp_disconnect()
Bind a netconn to a specific local IP address and port. Binding one netconn twice might not always be checked correctly!
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()
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()
Send a TCP RESET packet (empty segment with RST flag set) either to abort a connection or to show that there is no matching local connection for a received segment. Called by tcp_abort() (to abort a local connection), tcp_input() (if no matching local pcb was found), tcp_listen_input() (if incoming segment has ACK flag set) 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.
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.
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.
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()
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.
Same as udp_sendto_if, but with source address
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.
Send an ARP request packet asking for ipaddr.
Connect a netconn to a specific remote IP address and port.
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).
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.
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.
Get the local or remote IP address and port of a netconn. For RAW netconns, this returns the protocol instead of a port!
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.
Same as ip_output_if() but 'src' address is not replaced by netif address when it is 'any'.
Same as ip4addr_ntoa, but reentrant since a user-supplied buffer is used.
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.
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 a raw ARP packet (opcode and all addresses can be modified)
Like dns_gethostbyname, but returned address type can be controlled:
This function is called from netif.c when address is changed
Match an ARP reply with the offered IP address: check whether the offered IP address is not in use using ARP
This function is called from netif.c when address is changed or netif is removed
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.
Dummy IPv4 output function for netifs not supporting IPv4
Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list
If an incoming DHCP message is in response to us, then trigger the state machine
Initialize one of the DNS servers.
Receive input function for DNS response packets arriving for the dns UDP pcb.
Change the IP address of a network interface
Change the netmask of a network interface
Change the default gateway for a network interface
Simple interface to ip_output_if. It finds the outgoing network interface and calls upon ip_output_if to do the actual work.
Finds (stable) ethernet/IP address pair from ARP table using interface and IP address index.
Possibility to iterate over stable ARP table entries
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).
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
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()
Callback function that is called when DNS name is resolved (or on timeout). A waiting application thread is waked up by signaling the semaphore.
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
Look up a hostname in the array of known hostnames.