Bind an UDP PCB. ipaddr & port are expected to be in the same byte order as in the pcb. @see udp_disconnect()
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()
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()
Convert numeric IP address (both versions) into ASCII representation. returns ptr to static buffer; not reentrant!
Convert IP address string (both versions) to numeric. The version is auto-detected from the string.
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.
Initialize one of the DNS servers.
Same as udp_sendto_if, but with source address
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.
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).
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:
Execute a DNS query, only one IP address is returned
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.
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.
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.
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.
Sets DNS server address for the DHCP server
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.
Hook to generate an Initial Sequence Number (ISN) for a new TCP connection.
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
This function is called from netif.c when address is changed
Initialize one of the NTP servers by IP address
Join multicast groups for UDP netconns.
Join multicast groups for UDP netconns.
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.
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.
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()
This function is called from netif.c when address is changed or netif is removed
Creates a new address information (addrinfo) structure based on the provided parameters.
Actually send an sntp request to a server.
Receive input function for DNS response packets arriving for the dns UDP pcb.
Look up a hostname in the array of known hostnames.
This function is called from netif.c when address is changed
If an incoming DHCP message is in response to us, then trigger the state machine
Helper function for tcp_netif_ip_addr_changed() that iterates a pcb list
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).
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
DNS found callback when using DNS names as server address.
UDP recv callback for the sntp pcb
NetBIOS Name service recv callback
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