23 return (ip46_address->ip4.as_u32 == 0);
25 return (ip46_address->as_u64[0] == 0 && ip46_address->as_u64[1] == 0);
32 return (ip46_address->ip4.as_u8[0] == 127);
34 return (ip46_address->as_u64[0] == 0 &&
35 clib_net_to_host_u64 (ip46_address->as_u64[1]) == 1);
41 return (ip4_address->
as_u8[0] == 127);
47 return (ip6_address->as_u64[0] == 0 &&
48 clib_net_to_host_u64 (ip6_address->as_u64[1]) == 1);
86 dst->ip4.as_u32 = src->ip4.as_u32;
102 sizeof (ip6_address_t));
107 [IP_FEATURE_INPUT] = {
117 [IP_FEATURE_OUTPUT] = {
127 [IP_FEATURE_LOCAL] = {
137 [IP_FEATURE_PUNT] = {
147 [IP_FEATURE_DROP] = {
164 const char *feature_name,
166 void *feature_config,
u32 n_feature_config_bytes)
168 if (IP_FEATURE_INPUT == loc)
173 feature_name, sw_if_index,
174 enable, feature_config,
175 n_feature_config_bytes);
178 feature_name, sw_if_index,
179 enable, feature_config,
180 n_feature_config_bytes);
184 feature_name, sw_if_index,
185 enable, feature_config,
186 n_feature_config_bytes);
199 return (
format (s,
"ip4"));
201 return (
format (s,
"ip6"));
204 return (
format (s,
"unknown"));
235 return (
format (s,
"unicast"));
237 return (
format (s,
"multicast"));
240 return (
format (s,
"unknown"));
270 return (format (s, "%s", #v)); 275 return (
format (s,
"unknown"));
286 else if (unformat (input, #v)) \ 305 return (format (s, "%s", #v)); 310 return (
format (s,
"unknown"));
fib_protocol_t fp_proto
protocol type
void ip_copy(ip46_address_t *dst, ip46_address_t *src, u8 is_ip4)
vl_api_wireguard_peer_flags_t flags
static void ip46_address_mask_ip4(ip46_address_t *ip46)
u8 ip_is_local(u32 fib_index, ip46_address_t *ip46_address, u8 is_ip4)
Checks that an ip is local to the requested fib.
void ip_set(ip46_address_t *dst, void *src, u8 is_ip4)
#define clib_memcpy_fast(a, b, c)
manual_print typedef u8 ip4_address[4]
uword unformat_ip_dscp(unformat_input_t *input, va_list *args)
#define N_IP_FEATURE_LOCATIONS
static const char * ip_arc_names[N_IP_FEATURE_LOCATIONS][N_AF][N_SAFI]
description fragment has unexpected format
Aggregate type for a prefix.
u16 fp_len
The mask length.
fib_node_index_t fib_table_lookup(u32 fib_index, const fib_prefix_t *prefix)
Perfom a longest prefix match in the non-forwarding table.
u8 * format_ip_dscp(u8 *s, va_list *va)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
u8 * format_ip_address_family(u8 *s, va_list *args)
uword unformat_ip_address_family(unformat_input_t *input, va_list *args)
u8 * format_ip_ecn(u8 *s, va_list *va)
enum ip_feature_location_t_ ip_feature_location_t
u8 ip4_is_local_host(ip4_address_t *ip4_address)
enum ip_sub_address_family_t_ ip_sub_address_family_t
u32 fib_node_index_t
A typedef of a node index.
u8 ip6_is_local_host(ip6_address_t *ip6_address)
enum fib_entry_flag_t_ fib_entry_flag_t
#define FOR_EACH_IP_ADDRESS_SUB_FAMILY(_safi)
u8 * format_ip_sub_address_family(u8 *s, va_list *args)
manual_print typedef u8 ip6_address[16]
enum ip_dscp_t_ ip_dscp_t
void ip_feature_enable_disable(ip_address_family_t af, ip_sub_address_family_t safi, ip_feature_location_t loc, const char *feature_name, u32 sw_if_index, int enable, void *feature_config, u32 n_feature_config_bytes)
enum ip_address_family_t_ ip_address_family_t
u8 ip_is_zero(ip46_address_t *ip46_address, u8 is_ip4)
u8 ip_is_local_host(ip46_address_t *ip46_address, u8 is_ip4)
uword unformat_ip_sub_address_family(unformat_input_t *input, va_list *args)
vl_api_interface_index_t sw_if_index
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
fib_entry_flag_t fib_entry_get_flags(fib_node_index_t fib_entry_index)