18 #ifndef __IP6_NEIGHBOR_H__ 19 #define __IP6_NEIGHBOR_H__ 46 icmp6_neighbor_solicitation_header_t *h0;
53 (vm, &ip6_neighbor_packet_template, &bi0);
66 h0->ip.src_address = *
src;
67 h0->ip.dst_address.as_u8[13] = dst->
as_u8[13];
68 h0->ip.dst_address.as_u8[14] = dst->
as_u8[14];
69 h0->ip.dst_address.as_u8[15] = dst->
as_u8[15];
71 h0->neighbor.target_address = *
dst;
73 clib_memcpy (h0->link_layer_option.ethernet_address,
77 h0->neighbor.icmp.checksum = 0;
78 h0->neighbor.icmp.checksum =
81 ASSERT (bogus_length == 0);
91 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)
vl_api_interface_index_t sw_if_index
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.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.