51 &adj->
sub_type.
nbr.next_hop.ip4, adj->rewrite_header.sw_if_index, &ia);
65 u8 *rewrite, rewrite_len;
75 clib_warning (
"Sending GARP for IP4 address %U on sw_if_idex %d",
98 rewrite_len =
vec_len (rewrite);
123 u32 *from, *to_next_drop;
124 uword n_left_from, n_left_to_next_drop, next_index;
139 while (n_left_from > 0)
142 to_next_drop, n_left_to_next_drop);
144 while (n_left_from > 0 && n_left_to_next_drop > 0)
146 u32 pi0, adj_index0, sw_if_index0;
157 to_next_drop[0] = pi0;
159 n_left_to_next_drop -= 1;
163 sw_if_index0 = adj0->rewrite_header.sw_if_index;
264 .vector_size =
sizeof (
u32),
277 .vector_size =
sizeof (
u32),
288 #define foreach_notrace_ip4_arp_error \ 303 vnet_pcap_drop_trace_filter_add_del \ 304 (rt->errors[IP4_ARP_ERROR_##a], \
#define VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST
vnet_main_t * vnet_get_main(void)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
#define clib_memcpy_fast(a, b, c)
ip4_address_t * ip4_interface_first_address(ip4_main_t *im, u32 sw_if_index, ip_interface_address_t **result_ia)
static f64 vlib_time_now(vlib_main_t *vm)
This packet is to be rewritten and forwarded to the next processing node.
ip_lookup_main_t lookup_main
#define VLIB_NODE_FN(node)
void ip4_neighbor_probe_dst(const ip_adjacency_t *adj, const ip4_address_t *dst)
vlib_error_t * errors
Vector of errors for this node.
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
void * vlib_packet_template_get_packet(vlib_main_t *vm, vlib_packet_template_t *t, u32 *bi_result)
vl_api_interface_index_t sw_if_index
#define VLIB_INIT_FUNCTION(x)
struct ip_adjacency_t_::@119::@120 nbr
IP_LOOKUP_NEXT_ARP/IP_LOOKUP_NEXT_REWRITE.
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
union ip_adjacency_t_::@119 sub_type
vlib_error_t error
Error code for buffers to be enqueued to error handler.
struct ip_adjacency_t_::@119::@122 glean
IP_LOOKUP_NEXT_GLEAN.
static_always_inline void mac_address_from_bytes(mac_address_t *mac, const u8 *bytes)
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static clib_error_t * arp_notrace_init(vlib_main_t *vm)
static u64 throttle_seed(throttle_t *t, u32 thread_index, f64 time_now)
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
#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).
static uword ip4_arp_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_glean)
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
#define VLIB_REGISTER_NODE(x,...)
#define vec_free(V)
Free vector's memory (no header).
static ip4_address_t * ip4_interface_address_matching_destination(ip4_main_t *im, const ip4_address_t *dst, u32 sw_if_index, ip_interface_address_t **result_ia)
#define clib_warning(format, args...)
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
void ip4_neighbor_advertise(vlib_main_t *vm, vnet_main_t *vnm, u32 sw_if_index, const ip4_address_t *addr)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
vlib_main_t vlib_node_runtime_t * node
static vlib_buffer_t * ip4_neighbor_probe(vlib_main_t *vm, vnet_main_t *vnm, const ip_adjacency_t *adj0, const ip4_address_t *src, const ip4_address_t *dst)
vlib_packet_template_t ip4_arp_request_packet_template
Template used to generate IP4 ARP packets.
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
throttle_t arp_throttle
ARP throttling.
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
static vlib_main_t * vlib_get_main(void)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
vlib_node_registration_t ip4_arp_node
(constructor) VLIB_REGISTER_NODE (ip4_arp_node)
void ip4_forward_next_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t which_adj_index)
VLIB buffer representation.
#define foreach_notrace_ip4_arp_error
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
u8 * ethernet_build_rewrite(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
build a rewrite string to use for sending packets of type 'link_type' to 'dst_address' ...
ip4_main_t ip4_main
Global ip4 main structure.
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
u16 flags
Copy of main node flags.
vlib_node_registration_t ip4_glean_node
(constructor) VLIB_REGISTER_NODE (ip4_glean_node)
static char * ip4_arp_error_strings[]
#define VLIB_NODE_FLAG_TRACE
static int ip4_src_address_for_packet(ip_lookup_main_t *lm, u32 sw_if_index, ip4_address_t *src)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static int throttle_check(throttle_t *t, u32 thread_index, u64 hash, u64 seed)