sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
ip.h File Reference
#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"
#include "lwip/prot/ip.h"

Go to the source code of this file.

Classes

struct  ip_pcb
struct  ip_globals

Macros

#define LWIP_IP_HDRINCL   NULL
#define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p)
#define IP_PCB_NETIFHINT
#define IP_PCB
#define pcb_tci_init(pcb)
#define SOF_REUSEADDR   0x04U
#define SOF_KEEPALIVE   0x08U
#define SOF_BROADCAST   0x20U
#define SOF_INHERITED   (SOF_REUSEADDR|SOF_KEEPALIVE)
#define ip_current_netif()
#define ip_current_input_netif()
#define ip_current_header_tot_len()
#define ip_current_src_addr()
#define ip_current_dest_addr()
#define ip_current_src_addr()
#define ip_current_dest_addr()
#define ip_get_option(pcb, opt)
#define ip_set_option(pcb, opt)
#define ip_reset_option(pcb, opt)
#define ip_route_get_local_ip(src, dest, netif, ipaddr)

Variables

struct ip_globals ip_data

Detailed Description

IP API

Definition in file ip.h.

Macro Definition Documentation

◆ ip_current_dest_addr [1/2]

#define ip_current_dest_addr ( )
Value:
(&ip_data.current_iphdr_dest)

Destination IP address of current_header

Union destination address of current_header

Definition at line 156 of file ip.h.

◆ ip_current_dest_addr [2/2]

#define ip_current_dest_addr ( )
Value:
(&ip_data.current_iphdr_dest)

Destination IP address of current_header

Union destination address of current_header

Definition at line 156 of file ip.h.

◆ ip_current_header_tot_len

#define ip_current_header_tot_len ( )
Value:
(ip_data.current_ip_header_tot_len)

Total header length of ip(6)_current_header() (i.e. after this, the UDP/TCP header starts)

Definition at line 152 of file ip.h.

◆ ip_current_input_netif

#define ip_current_input_netif ( )
Value:
(ip_data.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.

Definition at line 150 of file ip.h.

◆ ip_current_netif

#define ip_current_netif ( )
Value:
(ip_data.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.

Definition at line 146 of file ip.h.

◆ ip_current_src_addr [1/2]

#define ip_current_src_addr ( )
Value:
(&ip_data.current_iphdr_src)

Source IP address of current_header

Union source address of current_header

Definition at line 154 of file ip.h.

◆ ip_current_src_addr [2/2]

#define ip_current_src_addr ( )
Value:
(&ip_data.current_iphdr_src)

Source IP address of current_header

Union source address of current_header

Definition at line 154 of file ip.h.

◆ ip_get_option

#define ip_get_option ( pcb,
opt )
Value:
((pcb)->so_options & (opt))

Gets an IP pcb option (SOF_* flags)

Definition at line 228 of file ip.h.

◆ IP_PCB

#define IP_PCB
Value:
\
ip_addr_t local_ip; \
ip_addr_t remote_ip; \
\
u8_t netif_idx; \
\
u8_t so_options; \
\
u8_t tos; \
\
u8_t ttl \
\
IP_PCB_NETIFHINT

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.

Definition at line 76 of file ip.h.

◆ IP_PCB_NETIFHINT

#define IP_PCB_NETIFHINT

Definition at line 69 of file ip.h.

◆ ip_reset_option

#define ip_reset_option ( pcb,
opt )
Value:
((pcb)->so_options = (u8_t)((pcb)->so_options & ~(opt)))

Resets an IP pcb option (SOF_* flags)

Definition at line 232 of file ip.h.

◆ ip_route_get_local_ip

#define ip_route_get_local_ip ( src,
dest,
netif,
ipaddr )
Value:
do { \
(netif) = ip_route(src, dest); \
(ipaddr) = ip_netif_get_local_ip(netif, dest); \
}while(0)

Definition at line 330 of file ip.h.

◆ ip_set_option

#define ip_set_option ( pcb,
opt )
Value:
((pcb)->so_options = (u8_t)((pcb)->so_options | (opt)))

Sets an IP pcb option (SOF_* flags)

Definition at line 230 of file ip.h.

◆ LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX

#define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX ( p)
Value:
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

Definition at line 63 of file ip.h.

◆ LWIP_IP_HDRINCL

#define LWIP_IP_HDRINCL   NULL

Definition at line 58 of file ip.h.

◆ pcb_tci_init

#define pcb_tci_init ( pcb)

Definition at line 104 of file ip.h.

◆ SOF_BROADCAST

#define SOF_BROADCAST   0x20U

Definition at line 112 of file ip.h.

◆ SOF_INHERITED

#define SOF_INHERITED   (SOF_REUSEADDR|SOF_KEEPALIVE)

Definition at line 115 of file ip.h.

◆ SOF_KEEPALIVE

#define SOF_KEEPALIVE   0x08U

Definition at line 111 of file ip.h.

◆ SOF_REUSEADDR

#define SOF_REUSEADDR   0x04U

Definition at line 110 of file ip.h.