ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
IpArgs Struct Reference

True if ip is empty (PROTOCORE_IP_NONE) or the all-zero unspecified address (0.0.0.0 / ::). More...

#include <ip.h>

Public Attributes

const char * text
 the textual address a parse reads
 
const protocore_ip * ip
 the address a call reads
 
const protocore_ip * b
 the second address a compare or a prefix test reads
 
protocore_ip * out
 where a parse lands its result
 
char * buf
 where a format writes
 
size_t cap
 how much room that has
 
uint8_t prefix_len
 the prefix length a match tests to
 

Detailed Description

True if ip is empty (PROTOCORE_IP_NONE) or the all-zero unspecified address (0.0.0.0 / ::).

CIDR containment: is addr inside the net / prefix_len block?

The two must be the same family. prefix_len is 0..32 for v4, 0..128 for v6; the top prefix_len bits of the address bytes must match net (a prefix of 0 matches everything). This is the standard v4/v6 allowlist match.

Returns
true if addr is covered; false on a family mismatch or an out-of-range prefix.

The address, or pair of addresses, one call acts on.

Definition at line 110 of file ip.h.

Member Data Documentation

◆ text

const char* IpArgs::text

the textual address a parse reads

Definition at line 112 of file ip.h.

◆ ip

const protocore_ip* IpArgs::ip

the address a call reads

Definition at line 113 of file ip.h.

◆ b

const protocore_ip* IpArgs::b

the second address a compare or a prefix test reads

Definition at line 114 of file ip.h.

◆ out

protocore_ip* IpArgs::out

where a parse lands its result

Definition at line 115 of file ip.h.

◆ buf

char* IpArgs::buf

where a format writes

Definition at line 116 of file ip.h.

◆ cap

size_t IpArgs::cap

how much room that has

Definition at line 117 of file ip.h.

◆ prefix_len

uint8_t IpArgs::prefix_len

the prefix length a match tests to

Definition at line 118 of file ip.h.


The documentation for this struct was generated from the following file: