|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
40 ip6_hop_by_hop_ext_t ext_hdr;
41 ip6_router_alert_option_t alert;
42 ip6_padN_option_t
pad;
46 icmp6_multicast_address_record_t records[0];
47 }) icmp6_multicast_listener_report_header_t;
52 icmp6_multicast_listener_report_header_t report_hdr;
112 if (!mcast_group_info)
122 mcast_group_info->
type = 4;
126 sizeof (ip6_address_t));
142 if (mcast_group_info)
201 sizeof (ip6_address_t));
205 IP6_MULTICAST_SCOPE_link_local,
206 IP6_MULTICAST_GROUP_ID_all_hosts);
208 IP6_MULTICAST_SCOPE_link_local,
209 IP6_MULTICAST_GROUP_ID_all_routers);
211 IP6_MULTICAST_SCOPE_link_local,
212 IP6_MULTICAST_GROUP_ID_mldv2_routers);
230 mhash_unset (&imd->address_to_mldp_index, &m->mcast_address, 0);
258 icmp6_multicast_listener_report_header_t *rh0;
282 payload_length =
sizeof (icmp6_multicast_listener_report_header_t);
284 b0->
error = ICMP6_ERROR_NONE;
288 rh0 = (icmp6_multicast_listener_report_header_t *) & rp0->report_hdr;
293 clib_host_to_net_u32 (0x6 << 28);
295 ip0->
protocol = IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS;
300 rh0->icmp.type = ICMP6_multicast_listener_report_v2;
308 IP6_MULTICAST_SCOPE_link_local,
309 IP6_MULTICAST_GROUP_ID_mldv2_routers);
313 int num_addr_records = 0;
314 icmp6_multicast_address_record_t rr;
317 rh0->ext_hdr.next_hdr = IP_PROTOCOL_ICMP6;
318 rh0->ext_hdr.n_data_u64s = 0;
322 rh0->alert.value = 0;
327 rh0->icmp.checksum = 0;
333 rr.aux_data_len_u32s = 0;
334 rr.num_sources = clib_host_to_net_u16 (m->
num_sources);
340 sizeof(icmp6_multicast_address_record_t)))
346 payload_length +=
sizeof( icmp6_multicast_address_record_t);
351 rh0->num_addr_records = clib_host_to_net_u16 (num_addr_records);
358 ASSERT (bogus_length == 0);
369 b0->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
433 return frame->n_vectors;
439 .name =
"ip6-mld-process",
448 u32 indent = va_arg (*args,
u32);
474 const ip6_address_t *
address,
u8 address_oength)
493 const ip6_address_t *
address,
u8 address_oength)
#define pool_flush(VAR, POOL, BODY)
Remove all elements from a pool in a safe way.
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
ip6_multicast_address_scope_t
index_t ip6_link_delegate_get(u32 sw_if_index, ip6_link_delegate_id_t id)
static void ip6_neighbor_send_mldpv2_report(u32 sw_if_index)
ip6_mldp_group_t * mldp_group_pool
vnet_sw_interface_type_t type
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
static void ip6_neighbor_del_mld_prefix(ip6_mld_t *imd, ip6_address_t *addr)
Delete a multicast Address from the advertised MLD set.
#define clib_memcpy(d, s, n)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static u8 * format_ip6_mld(u8 *s, va_list *args)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vlib_main_t vlib_node_runtime_t * node
ip6_link_disable_fn_t ildv_disable
bool ip6_link_delegate_update(u32 sw_if_index, ip6_link_delegate_id_t id, index_t ii)
static ip6_mld_t * ip6_mld_pool
#define pool_put(P, E)
Free an object E in pool P.
static uword * mhash_get(mhash_t *h, const void *key)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static void ip6_mld_delegate_disable(index_t imdi)
__clib_export void mhash_init(mhash_t *h, uword n_value_bytes, uword n_key_bytes)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
ip6_link_delegate_id_t ip6_link_delegate_register(const ip6_link_delegate_vft_t *vft)
const static ip6_link_delegate_vft_t ip6_mld_delegate_vft
VFT for registering as a delegate to an IP6 link.
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
#define pool_foreach(VAR, POOL)
Iterate through pool.
vlib_error_t error
Error code for buffers to be enqueued to error handler.
icmp6_multicast_listener_report_packet_t
static __clib_warn_unused_result u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
static void * vlib_process_get_event_data(vlib_main_t *vm, uword *return_event_type_opaque)
const ip6_address_t * ip6_get_link_local_address(u32 sw_if_index)
vnet_main_t * vnet_get_main(void)
static void ip6_set_solicited_node_multicast_address(ip6_address_t *a, u32 id)
static const ethernet_interface_t * ip6_mld_get_eth_itf(u32 sw_if_index)
u32 ip6_link_delegate_id_t
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
manual_print typedef address
static void ip6_address_copy(ip6_address_t *dst, const ip6_address_t *src)
static void ip6_mld_link_enable(u32 sw_if_index)
create and initialize router advertisement parameters with default values for this intfc
static void ip6_mld_address_add(u32 imi, const ip6_address_t *address, u8 address_oength)
callback when an interface address is added or deleted
mhash_t address_to_mldp_index
struct _vlib_node_registration vlib_node_registration_t
u16 current_length
Nbytes between current data and the end of this buffer.
static uword vnet_sw_interface_is_admin_up(vnet_main_t *vnm, u32 sw_if_index)
ethernet_interface_t * ethernet_get_interface(ethernet_main_t *em, u32 hw_if_index)
static void ip6_mld_address_del(u32 imi, const ip6_address_t *address, u8 address_oength)
ip6_address_t mcast_address
static void ip6_set_reserved_multicast_address(ip6_address_t *a, ip6_multicast_address_scope_t scope, u16 id)
static void ip6_neighbor_add_mld_grp(ip6_mld_t *a, ip6_multicast_address_scope_t scope, ip6_multicast_link_local_group_id_t group)
Add a multicast Address to the advertised MLD set.
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
u32 local_interface_sw_if_index
ethernet_main_t ethernet_main
static f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
Suspend a cooperative multi-tasking thread Waits for an event, or for the indicated number of seconds...
description fragment has unexpected format
#define VLIB_INIT_FUNCTION(x)
ip6_address_t * mcast_source_address_pool
static void ip6_neighbor_add_mld_prefix(ip6_mld_t *imd, ip6_address_t *addr)
Add a multicast Address to the advertised MLD set.
#define IP6_MLDP_ALERT_TYPE
vlib_node_registration_t ip6_mld_event_process_node
(constructor) VLIB_REGISTER_NODE (ip6_mld_event_process_node)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
struct ip6_nd_t_ ip6_mld_t
ip6_multicast_link_local_group_id_t
static uword ip6_mld_event_process(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static clib_error_t * ip6_mld_init(vlib_main_t *vm)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
adj_index_t ip6_link_get_mcast_adj(u32 sw_if_index)
#define pool_free(p)
Free a pool.
#define clib_warning(format, args...)
u8 pad[3]
log2 (size of the packing page block)
static ip6_link_delegate_id_t ip6_mld_delegate_id
typedef CLIB_PACKED(struct { ip6_hop_by_hop_ext_t ext_hdr;ip6_router_alert_option_t alert;ip6_padN_option_t pad;icmp46_header_t icmp;u16 rsvd;u16 num_addr_records;icmp6_multicast_address_record_t records[0];})
static ip6_mld_t * ip6_mld_get_itf(u32 sw_if_index)
@ VNET_SW_INTERFACE_TYPE_HARDWARE
int vlib_buffer_add_data(vlib_main_t *vm, u32 *buffer_index, void *data, u32 n_data_bytes)
static vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
vl_api_interface_index_t sw_if_index
static uword ip6_mld_timer_event(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
__clib_export uword mhash_unset(mhash_t *h, void *key, uword *old_value)
static void mhash_free(mhash_t *h)
static uword mhash_set(mhash_t *h, void *key, uword new_value, uword *old_value)
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,...)