18 #ifndef __IP6_NEIGHBOR_H__ 19 #define __IP6_NEIGHBOR_H__ 35 const ip6_address_t *
addr);
38 const ip6_address_t *
dst);
44 const ip6_address_t *
src,
const ip6_address_t *
dst)
46 icmp6_neighbor_solicitation_header_t *h0;
53 (vm, &ip6_neighbor_packet_template, &bi0);
72 h0->ip.src_address = *
src;
73 h0->ip.dst_address.as_u8[13] = dst->as_u8[13];
74 h0->ip.dst_address.as_u8[14] = dst->as_u8[14];
75 h0->ip.dst_address.as_u8[15] = dst->as_u8[15];
77 h0->neighbor.target_address = *
dst;
79 clib_memcpy (h0->link_layer_option.ethernet_address,
83 h0->neighbor.icmp.checksum = 0;
84 h0->neighbor.icmp.checksum =
87 ASSERT (bogus_length == 0);
97 b0->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static vlib_buffer_t * ip6_neighbor_probe(vlib_main_t *vm, vnet_main_t *vnm, const ip_adjacency_t *adj, const ip6_address_t *src, const ip6_address_t *dst)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
adj_index_t ip6_link_get_mcast_adj(u32 sw_if_index)
#define clib_memcpy(d, s, n)
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)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
void ip6_neighbor_probe_dst(const ip_adjacency_t *adj, const ip6_address_t *dst)
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
u32 ia_node_index
The VLIB node in which this adj is used to forward packets.
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
vlib_packet_template_t ip6_neighbor_packet_template
void ip6_neighbor_advertise(vlib_main_t *vm, vnet_main_t *vnm, u32 sw_if_index, const ip6_address_t *addr)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define VLIB_BUFFER_TRACE_TRAJECTORY_INIT(b)
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
bool ip6_link_is_enabled(u32 sw_if_index)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
vl_api_interface_index_t sw_if_index