#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"
#include "lwip/err.h"
#include "lwip/netif.h"
#include "lwip/ip4.h"
#include "lwip/ip6.h"
Data Structures | |
struct | ip_globals |
struct | ip_pcb |
Macros | |
#define | ip6_current_dest_addr() (ipX_2_ip6(&ip_data.current_iphdr_dest)) |
Destination IPv6 address of current_header. More... | |
#define | ip6_current_header() (ip_data.current_ip6_header) |
Get the IPv6 header of the current packet. More... | |
#define | ip6_current_src_addr() (ipX_2_ip6(&ip_data.current_iphdr_src)) |
Source IPv6 address of current_header. More... | |
#define | ip_current_dest_addr() (ipX_2_ip(&ip_data.current_iphdr_dest)) |
Destination IP4 address of current_header. More... | |
#define | ip_current_header() (ip_data.current_ip4_header) |
Get the IP header of the current packet. More... | |
#define | ip_current_header_proto() |
Get the transport layer protocol. More... | |
#define | ip_current_header_tot_len() (ip_data.current_ip_header_tot_len) |
Total header length of ip(6)_current_header() (i.e. More... | |
#define | ip_current_is_v6() (ip6_current_header() != NULL) |
Returns TRUE if the current IP input packet is IPv6, FALSE if it is IPv4. More... | |
#define | ip_current_netif() (ip_data.current_netif) |
Get the interface that received the current packet. More... | |
#define | ip_current_src_addr() (ipX_2_ip(&ip_data.current_iphdr_src)) |
Source IP4 address of current_header. More... | |
#define | ip_get_option(pcb, opt) ((pcb)->so_options & (opt)) |
Gets an IP pcb option (SOF_* flags) More... | |
#define | IP_HDRINCL NULL |
#define | IP_PCB |
#define | IP_PCB_ADDRHINT |
#define | IP_PCB_IPVER_EQ(pcb1, pcb2) ((pcb1)->isipv6 == (pcb2)->isipv6) |
#define | IP_PCB_IPVER_INPUT_MATCH(pcb) |
#define | IP_PCB_ISIPV6_MEMBER u8_t isipv6; |
#define | ip_reset_option(pcb, opt) ((pcb)->so_options &= ~(opt)) |
Resets an IP pcb option (SOF_* flags) More... | |
#define | ip_set_option(pcb, opt) ((pcb)->so_options |= (opt)) |
Sets an IP pcb option (SOF_* flags) More... | |
#define | ip_set_v6(pcb, val) do{if(pcb != NULL) { pcb->isipv6 = val; }}while(0) |
Set an IP_PCB to IPv6 (IPv4 is the default) More... | |
#define | ipX_current_dest_addr() (&ip_data.current_iphdr_dest) |
Destination IP address of current_header. More... | |
#define | ipX_current_dest_addr() (&ip_data.current_iphdr_dest) |
Destination IP address of current_header. More... | |
#define | ipX_current_src_addr() (&ip_data.current_iphdr_src) |
Source IP address of current_header. More... | |
#define | ipX_current_src_addr() (&ip_data.current_iphdr_src) |
Source IP address of current_header. More... | |
#define | ipX_debug_print(is_ipv6, p) ((is_ipv6) ? ip6_debug_print(p) : ip_debug_print(p)) |
#define | ipX_netif_get_local_ipX(isipv6, netif, dest) |
#define | ipX_next_header_ptr() |
Get the transport layer header. More... | |
#define | ipX_output(isipv6, p, src, dest, ttl, tos, proto) |
#define | ipX_output_hinted(isipv6, p, src, dest, ttl, tos, proto, addr_hint) |
#define | ipX_output_if(isipv6, p, src, dest, ttl, tos, proto, netif) |
#define | ipX_output_if_src(isipv6, p, src, dest, ttl, tos, proto, netif) |
#define | ipX_route(isipv6, src, dest) |
#define | ipX_route_get_local_ipX(isipv6, src, dest, netif, ipXaddr) |
#define | LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p) LWIP_ASSERT("p->ref == 1", (p)->ref == 1) |
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 More... | |
#define | PCB_ISIPV6(pcb) ((pcb)->isipv6) |
#define | SOF_BROADCAST 0x20U /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */ |
#define | SOF_INHERITED (SOF_REUSEADDR|SOF_KEEPALIVE) |
#define | SOF_KEEPALIVE 0x08U /* keep connections alive */ |
#define | SOF_REUSEADDR 0x04U /* allow local address reuse */ |
Variables | |
struct ip_globals | ip_data |
Global data for both IPv4 and IPv6. More... | |
#define ip6_current_dest_addr | ( | ) | (ipX_2_ip6(&ip_data.current_iphdr_dest)) |
Destination IPv6 address of current_header.
Referenced by icmp6_input(), ip6_input(), ip6_reass(), mld6_input(), nd6_input(), nd6_send_q(), and udp_input().
#define ip6_current_header | ( | ) | (ip_data.current_ip6_header) |
Get the IPv6 header of the current packet.
This function must only be called from a receive callback (udp_recv, raw_recv, tcp_accept). It will return NULL otherwise.
Referenced by ip6_reass().
#define ip6_current_src_addr | ( | ) | (ipX_2_ip6(&ip_data.current_iphdr_src)) |
Source IPv6 address of current_header.
Referenced by icmp6_input(), icmp6_send_response(), ip6_input(), ip6_reass(), nd6_input(), nd6_send_na(), raw_input(), tcp_receive(), and udp_input().
#define ip_current_dest_addr | ( | ) | (ipX_2_ip(&ip_data.current_iphdr_dest)) |
Destination IP4 address of current_header.
Referenced by icmp_input(), ip_input(), raw_input(), tcp_input(), and udp_input().
#define ip_current_header | ( | ) | (ip_data.current_ip4_header) |
Get the IP header of the current packet.
This function must only be called from a receive callback (udp_recv, raw_recv, tcp_accept). It will return NULL otherwise.
Referenced by icmp_input(), and udp_input().
#define ip_current_header_proto | ( | ) |
Get the transport layer protocol.
Referenced by udp_input().
#define ip_current_header_tot_len | ( | ) | (ip_data.current_ip_header_tot_len) |
Total header length of ip(6)_current_header() (i.e.
after this, the UDP/TCP header starts)
Referenced by udp_input().
#define ip_current_is_v6 | ( | ) | (ip6_current_header() != NULL) |
Returns TRUE if the current IP input packet is IPv6, FALSE if it is IPv4.
Referenced by recv_udp(), tcp_input(), tcp_listen_input(), tcp_process(), tcp_timewait_input(), and udp_input().
#define ip_current_netif | ( | ) | (ip_data.current_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.
Referenced by icmp6_send_response().
#define ip_current_src_addr | ( | ) | (ipX_2_ip(&ip_data.current_iphdr_src)) |
Source IP4 address of current_header.
Referenced by icmp_input(), ip_input(), raw_input(), and udp_input().
#define ip_get_option | ( | pcb, | |
opt | |||
) | ((pcb)->so_options & (opt)) |
Gets an IP pcb option (SOF_* flags)
Referenced by raw_input(), raw_sendto(), tcp_bind(), tcp_connect(), tcp_listen_with_backlog(), tcp_slowtmr(), udp_bind(), and udp_input().
#define IP_HDRINCL NULL |
Referenced by icmp_input(), ip6_output(), ip6_output_if(), and ip6_output_if_src().
#define IP_PCB |
#define IP_PCB_ADDRHINT |
#define IP_PCB_IPVER_EQ | ( | pcb1, | |
pcb2 | |||
) | ((pcb1)->isipv6 == (pcb2)->isipv6) |
Referenced by tcp_bind(), tcp_connect(), tcp_listen_with_backlog(), tcp_pcb_purge(), and udp_bind().
#define IP_PCB_IPVER_INPUT_MATCH | ( | pcb | ) |
Referenced by raw_input(), tcp_input(), and udp_input().
#define IP_PCB_ISIPV6_MEMBER u8_t isipv6; |
#define ip_reset_option | ( | pcb, | |
opt | |||
) | ((pcb)->so_options &= ~(opt)) |
Resets an IP pcb option (SOF_* flags)
#define ip_set_option | ( | pcb, | |
opt | |||
) | ((pcb)->so_options |= (opt)) |
Sets an IP pcb option (SOF_* flags)
Referenced by dhcp_inform(), and dhcp_start().
Set an IP_PCB to IPv6 (IPv4 is the default)
Referenced by pcb_new(), raw_new_ip6(), tcp_new_ip6(), and udp_new_ip6().
#define ipX_current_dest_addr | ( | ) | (&ip_data.current_iphdr_dest) |
Destination IP address of current_header.
Union destination address of current_header.
Referenced by raw_input(), recv_udp(), tcp_input(), tcp_listen_input(), tcp_process(), tcp_timewait_input(), and udp_input().
#define ipX_current_dest_addr | ( | ) | (&ip_data.current_iphdr_dest) |
Destination IP address of current_header.
Union destination address of current_header.
#define ipX_current_src_addr | ( | ) | (&ip_data.current_iphdr_src) |
Source IP address of current_header.
Union source address of current_header.
Referenced by recv_raw(), tcp_input(), tcp_listen_input(), tcp_process(), tcp_timewait_input(), and udp_input().
#define ipX_current_src_addr | ( | ) | (&ip_data.current_iphdr_src) |
Source IP address of current_header.
Union source address of current_header.
#define ipX_debug_print | ( | is_ipv6, | |
p | |||
) | ((is_ipv6) ? ip6_debug_print(p) : ip_debug_print(p)) |
#define ipX_netif_get_local_ipX | ( | isipv6, | |
netif, | |||
dest | |||
) |
Referenced by raw_sendto().
#define ipX_next_header_ptr | ( | ) |
Get the transport layer header.
Referenced by recv_udp().
#define ipX_output | ( | isipv6, | |
p, | |||
src, | |||
dest, | |||
ttl, | |||
tos, | |||
proto | |||
) |
Referenced by tcp_keepalive(), tcp_output_segment(), tcp_rst_impl(), tcp_send_empty_ack(), and tcp_zero_window_probe().
#define ipX_output_hinted | ( | isipv6, | |
p, | |||
src, | |||
dest, | |||
ttl, | |||
tos, | |||
proto, | |||
addr_hint | |||
) |
Referenced by tcp_keepalive(), tcp_output_segment(), tcp_send_empty_ack(), and tcp_zero_window_probe().
#define ipX_output_if | ( | isipv6, | |
p, | |||
src, | |||
dest, | |||
ttl, | |||
tos, | |||
proto, | |||
netif | |||
) |
Referenced by raw_sendto().
#define ipX_output_if_src | ( | isipv6, | |
p, | |||
src, | |||
dest, | |||
ttl, | |||
tos, | |||
proto, | |||
netif | |||
) |
#define ipX_route | ( | isipv6, | |
src, | |||
dest | |||
) |
Referenced by raw_sendto(), and tcp_eff_send_mss_impl().
#define ipX_route_get_local_ipX | ( | isipv6, | |
src, | |||
dest, | |||
netif, | |||
ipXaddr | |||
) |
Referenced by tcp_connect(), and tcp_output_segment().
#define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX | ( | p | ) | LWIP_ASSERT("p->ref == 1", (p)->ref == 1) |
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
Referenced by ip6_output(), ip6_output_if_src(), and ip_output().
#define PCB_ISIPV6 | ( | pcb | ) | ((pcb)->isipv6) |
Referenced by lwip_netconn_do_getaddr(), lwip_netconn_do_join_leave_group(), lwip_netconn_do_send(), netconn_sendto(), raw_bind(), raw_connect(), raw_input(), raw_sendto(), recv_raw(), tcp_abandon(), tcp_bind(), tcp_close_shutdown(), tcp_connect(), tcp_keepalive(), tcp_listen_dual_with_backlog(), tcp_listen_input(), tcp_listen_with_backlog(), tcp_output_segment(), tcp_pcb_purge(), tcp_process(), tcp_receive(), tcp_send_empty_ack(), tcp_slowtmr(), tcp_zero_window_probe(), udp_bind(), udp_connect(), udp_disconnect(), and udp_input().
#define SOF_BROADCAST 0x20U /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */ |
Referenced by dhcp_inform(), dhcp_start(), raw_input(), raw_sendto(), and udp_input().
#define SOF_INHERITED (SOF_REUSEADDR|SOF_KEEPALIVE) |
Referenced by tcp_listen_input().
#define SOF_KEEPALIVE 0x08U /* keep connections alive */ |
Referenced by tcp_slowtmr().
#define SOF_REUSEADDR 0x04U /* allow local address reuse */ |
Referenced by tcp_bind(), tcp_connect(), tcp_listen_with_backlog(), udp_bind(), and udp_input().
struct ip_globals ip_data |
Global data for both IPv4 and IPv6.
Referenced by ip6_input(), and ip_input().