|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
69 else if (
unformat (input,
"disable"))
85 .path =
"set interface ip6-nd proxy",
86 .short_help =
"set interface ip6-nd proxy <intfc> [enable|disable]",
121 icmp46_header_t *icmp0;
126 if (type0 == ICMP6_neighbor_solicitation ||
127 type0 == ICMP6_neighbor_advertisement)
129 icmp6_neighbor_solicitation_or_advertisement_header_t *icmp6_nsa;
130 icmp6_neighbor_discovery_ethernet_link_layer_address_option_t
134 icmp6_nsa = (
void *) icmp0;
135 icmp6_nd_ell_addr = (
void *) (icmp6_nsa + 1);
159 fib_index, &
ip6->dst_address, 128);
166 vm, b0,
ip6, icmp6_nsa, icmp6_nd_ell_addr, sw_if_index0);
169 if (b0->
flags & VLIB_BUFFER_IS_TRACED)
186 icmp46_header_t *icmp0;
191 if (type0 == ICMP6_neighbor_solicitation ||
192 type0 == ICMP6_neighbor_advertisement)
194 icmp6_neighbor_solicitation_or_advertisement_header_t *icmp6_nsa;
195 icmp6_neighbor_discovery_ethernet_link_layer_address_option_t
199 icmp6_nsa = (
void *) icmp0;
200 icmp6_nd_ell_addr = (
void *) (icmp6_nsa + 1);
203 if (type0 == ICMP6_neighbor_solicitation)
206 (icmp6_nd_ell_addr->header.type ==
207 ICMP6_NEIGHBOR_DISCOVERY_OPTION_source_link_layer_address) &&
214 .ip.ip6 =
ip6->src_address,
222 vm, b0,
ip6, icmp6_nsa, icmp6_nd_ell_addr, sw_if_index0);
227 icmp6_neighbor_solicitation_or_advertisement_header_t
228 *icmp6_nsa = (
void *) icmp0;
229 icmp6_neighbor_discovery_ethernet_link_layer_address_option_t
230 *icmp6_nd_ell_addr = (
void *) (icmp6_nsa + 1);
232 (icmp6_nd_ell_addr->header.type ==
233 ICMP6_NEIGHBOR_DISCOVERY_OPTION_target_link_layer_address) &&
241 icmp6_nsa->target_address,
251 if (b0->
flags & VLIB_BUFFER_IS_TRACED)
298 to_next[0] = bi0 =
from[0];
299 to_next[1] = bi1 =
from[1];
320 n_left_to_next, bi0, bi1, next0,
334 to_next[0] = bi0 =
from[0];
347 n_left_to_next, bi0, next0);
355 return frame->n_vectors;
365 .vector_size =
sizeof (
u32),
374 .name =
"ip6-unicast-nd-proxy",
384 .vector_size =
sizeof (
u32),
393 .name =
"ip6-multicast-nd-proxy",
397 .arc_name =
"ip6-unicast",
398 .node_name =
"ip6-unicast-nd-proxy",
403 .arc_name =
"ip6-multicast",
404 .node_name =
"ip6-multicast-nd-proxy",
vlib_node_registration_t ip6_unicast_nd_proxy_node
(constructor) VLIB_REGISTER_NODE (ip6_unicast_nd_proxy_node)
static uword ip6_address_is_link_local_unicast(const ip6_address_t *a)
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
static_always_inline void ip6_nd_proxy_multicast(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b0, ip6_header_t *ip6, u32 *next0)
#define clib_memcpy(d, s, n)
nat44_ei_hairpin_src_next_t next_index
fib_node_index_t ip6_fib_table_lookup_exact_match(u32 fib_index, const ip6_address_t *addr, u32 len)
vlib_get_buffers(vm, from, b, n_left_from)
@ VLIB_NODE_TYPE_INTERNAL
#define clib_error_return(e, args...)
#define FIB_NODE_INDEX_INVALID
static clib_error_t * set_int_ip6_nd_proxy_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static_always_inline uword ip6_nd_proxy_node_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_multicast)
static uword ip6_address_is_unspecified(const ip6_address_t *a)
VNET_FEATURE_INIT(ip6_unicast_nd_proxy_node, static)
static void * ip6_next_header(ip6_header_t *i)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
#define VLIB_NODE_FN(node)
vnet_main_t * vnet_get_main(void)
static_always_inline void ip6_nd_proxy_unicast(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b0, ip6_header_t *ip6, u32 *next0)
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
#define static_always_inline
u32 fib_node_index_t
A typedef of a node index.
static vlib_cli_command_t set_int_ip6_nd_proxy_enable_command
(constructor) VLIB_CLI_COMMAND (set_int_ip6_nd_proxy_enable_command)
@ ICMP6_NEIGHBOR_SOLICITATION_NEXT_REPLY
#define VLIB_CLI_COMMAND(x,...)
u32 ip6_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
struct _vlib_node_registration vlib_node_registration_t
static_always_inline void icmp6_send_neighbor_advertisement(vlib_main_t *vm, vlib_buffer_t *b, ip6_header_t *ip6_h, icmp6_neighbor_solicitation_or_advertisement_header_t *icmp6_nsa, icmp6_neighbor_discovery_ethernet_link_layer_address_option_t *icmp6_nd_ell_addr, u32 sw_if_index0)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
vlib_main_t vlib_node_runtime_t * node
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
vlib_put_next_frame(vm, node, next_index, 0)
void ip_neighbor_learn_dp(const ip_neighbor_learn_t *l)
APIs invoked by neighbor implementation (i.s.
@ ICMP6_NEIGHBOR_SOLICITATION_N_NEXT
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)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define VNET_FEATURES(...)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
u32 ip6_ll_fib_get(u32 sw_if_index)
For use in the data plane.
vlib_node_registration_t ip6_multicast_nd_proxy_node
(constructor) VLIB_REGISTER_NODE (ip6_multicast_nd_proxy_node)
int ip6_nd_proxy_enable_disable(u32 sw_if_index, u8 enable)
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
Finish enqueueing two buffers forward in the graph.
vl_api_interface_index_t sw_if_index
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
@ ICMP6_NEIGHBOR_SOLICITATION_NEXT_DROP
vl_api_fib_path_type_t type
static u8 * format_ip6_nd_proxy_trace(u8 *s, va_list *args)
#define vlib_prefetch_buffer_data(b, type)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)