ip.h

IP API.

Defines

LWIP_IP_HDRINCL
LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p)

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

IP_PCB_NETIFHINT
IP_PCB

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 having to change all PCB structs.

pcb_tci_init(pcb)
SOF_REUSEADDR
SOF_KEEPALIVE
SOF_BROADCAST
SOF_INHERITED
ip_current_netif()

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, raw_recv, tcp_accept). It will return NULL otherwise.

ip_current_input_netif()

Get the interface that received the current packet.

This function must only be called from a receive callback (udp_recv, raw_recv, tcp_accept). It will return NULL otherwise.

ip_current_header_tot_len()

Total header length of ip(6)_current_header() (i.e.

after this, the UDP/TCP header starts)

ip_current_src_addr()

Source IP address of current_header.

Union source address of current_header.

ip_current_dest_addr()

Destination IP address of current_header.

Union destination address of current_header.

ip_current_src_addr()

Source IP address of current_header.

Union source address of current_header.

ip_current_dest_addr()

Destination IP address of current_header.

Union destination address of current_header.

ip_get_option(pcb, opt)

Gets an IP pcb option (SOF_* flags)

ip_set_option(pcb, opt)

Sets an IP pcb option (SOF_* flags)

ip_reset_option(pcb, opt)

Resets an IP pcb option (SOF_* flags)

ip_route_get_local_ip(src, dest, netif, ipaddr)

Variables

struct ip_globals ip_data
struct ip_pcb
#include <ip.h>

Public Members

IP_PCB
struct ip_globals
#include <ip.h>

Global variables of this module, kept in a struct for efficient access using base+index.

Public Members

struct netif *current_netif

The interface that accepted the packet for the current callback invocation.

struct netif *current_input_netif

The interface that received the packet for the current callback invocation.

u16_t current_ip_header_tot_len

Total header length of current_ip4/6_header (i.e.

after this, the UDP/TCP header starts)

ip_addr_t current_iphdr_src

Source IP address of current_header.

ip_addr_t current_iphdr_dest

Destination IP address of current_header.