FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
ip6_mld.c
Go to the documentation of this file.
1 /*
2  * ip/ip6_neighbor.c: IP6 neighbor handling
3  *
4  * Copyright (c) 2010 Cisco and/or its affiliates.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #include <vnet/ip6-nd/ip6_nd.h>
19 
20 #include <vnet/ip/ip.h>
22 
23 #include <vnet/fib/ip6_fib.h>
24 #include <vnet/ip/ip6_link.h>
25 #include <vnet/ip/ip6_ll_table.h>
26 
27 /**
28  * @file
29  * @brief IPv6 Neighbor Adjacency and Neighbor Discovery.
30  *
31  * The files contains the API and CLI code for managing IPv6 neighbor
32  * adjacency tables and neighbor discovery logic.
33  */
34 
35 /* *INDENT-OFF*/
36 /* multicast listener report packet format for ethernet. */
37 typedef CLIB_PACKED (struct
38 {
39  ip6_hop_by_hop_ext_t ext_hdr;
40  ip6_router_alert_option_t alert;
41  ip6_padN_option_t pad;
42  icmp46_header_t icmp;
43  u16 rsvd;
44  u16 num_addr_records;
45  icmp6_multicast_address_record_t records[0];
46 }) icmp6_multicast_listener_report_header_t;
47 
48 typedef CLIB_PACKED (struct
49 {
51  icmp6_multicast_listener_report_header_t report_hdr;
53 /* *INDENT-ON*/
54 
55 typedef struct
56 {
57  /* group information */
60  ip6_address_t mcast_address;
61  ip6_address_t *mcast_source_address_pool;
63 
64 typedef struct ip6_nd_t_
65 {
66  /* local information */
69 
70  /* MLDP group information */
72 
73  /* Hash table mapping address to index in mldp address pool. */
75 
76 } ip6_mld_t;
77 
78 
81 
82 /////
83 
84 static inline ip6_mld_t *
86 {
87  index_t imi;
88 
89  imi = ip6_link_delegate_get (sw_if_index, ip6_mld_delegate_id);
90 
91  if (INDEX_INVALID != imi)
92  return (pool_elt_at_index (ip6_mld_pool, imi));
93 
94  return (NULL);
95 }
96 
97 /**
98  * @brief Add a multicast Address to the advertised MLD set
99  */
100 static void
102 {
103  ip6_mldp_group_t *mcast_group_info;
104  uword *p;
105 
106  /* lookup mldp info for this interface */
107  p = mhash_get (&imd->address_to_mldp_index, addr);
108  mcast_group_info = p ? pool_elt_at_index (imd->mldp_group_pool, p[0]) : 0;
109 
110  /* add address */
111  if (!mcast_group_info)
112  {
113  /* add */
114  u32 mi;
115  pool_get_zero (imd->mldp_group_pool, mcast_group_info);
116 
117  mi = mcast_group_info - imd->mldp_group_pool;
118  mhash_set (&imd->address_to_mldp_index, addr, mi, /* old_value */
119  0);
120 
121  mcast_group_info->type = 4;
122  mcast_group_info->mcast_source_address_pool = 0;
123  mcast_group_info->num_sources = 0;
124  clib_memcpy (&mcast_group_info->mcast_address, addr,
125  sizeof (ip6_address_t));
126  }
127 }
128 
129 /**
130  * @brief Delete a multicast Address from the advertised MLD set
131  */
132 static void
134 {
135  ip6_mldp_group_t *mcast_group_info;
136  uword *p;
137 
138  p = mhash_get (&imd->address_to_mldp_index, &addr);
139  mcast_group_info = p ? pool_elt_at_index (imd->mldp_group_pool, p[0]) : 0;
140 
141  if (mcast_group_info)
142  {
143  mhash_unset (&imd->address_to_mldp_index, &addr,
144  /* old_value */ 0);
145  pool_put (imd->mldp_group_pool, mcast_group_info);
146  }
147 }
148 
149 /**
150  * @brief Add a multicast Address to the advertised MLD set
151  */
152 static void
156 {
157  ip6_address_t addr;
158 
159  ip6_set_reserved_multicast_address (&addr, scope, group);
160 
161  ip6_neighbor_add_mld_prefix (a, &addr);
162 }
163 
164 static const ethernet_interface_t *
166 {
167  const vnet_sw_interface_t *sw;
168 
169  /* lookup radv container - ethernet interfaces only */
170  sw = vnet_get_sup_sw_interface (vnet_get_main (), sw_if_index);
173 
174  return (NULL);
175 }
176 
177 /**
178  * @brief create and initialize router advertisement parameters with default
179  * values for this intfc
180  */
181 static void
183 {
184  const ethernet_interface_t *eth;
185  ip6_mld_t *imd;
186 
187  eth = ip6_mld_get_eth_itf (sw_if_index);
188 
189  if (NULL == eth)
190  return;
191 
192  ASSERT (INDEX_INVALID == ip6_link_delegate_get (sw_if_index,
193  ip6_mld_delegate_id));
194 
195  pool_get_zero (ip6_mld_pool, imd);
196 
197  imd->sw_if_index = sw_if_index;
198 
199  mhash_init (&imd->address_to_mldp_index, sizeof (uword),
200  sizeof (ip6_address_t));
201 
202  /* add multicast groups we will always be reporting */
204  IP6_MULTICAST_SCOPE_link_local,
205  IP6_MULTICAST_GROUP_ID_all_hosts);
207  IP6_MULTICAST_SCOPE_link_local,
208  IP6_MULTICAST_GROUP_ID_all_routers);
210  IP6_MULTICAST_SCOPE_link_local,
211  IP6_MULTICAST_GROUP_ID_mldv2_routers);
212 
213  ip6_link_delegate_update (sw_if_index, ip6_mld_delegate_id,
214  imd - ip6_mld_pool);
215 }
216 
217 static void
219 {
220  ip6_mldp_group_t *m;
221  ip6_mld_t *imd;
222 
223  imd = pool_elt_at_index (ip6_mld_pool, imdi);
224 
225  /* clean MLD pools */
226  /* *INDENT-OFF* */
227  pool_flush (m, imd->mldp_group_pool,
228  ({
229  mhash_unset (&imd->address_to_mldp_index, &m->mcast_address, 0);
230  }));
231  /* *INDENT-ON* */
232 
233  pool_free (imd->mldp_group_pool);
234 
236 
237  pool_put (ip6_mld_pool, imd);
238 }
239 
240 /* send an mldpv2 report */
241 static void
243 {
244  vnet_main_t *vnm = vnet_get_main ();
245  vlib_main_t *vm = vnm->vlib_main;
246  int bogus_length;
247 
248  ip6_mld_t *imd;
249  u16 payload_length;
250  vlib_buffer_t *b0;
251  ip6_header_t *ip0;
252  u32 *to_next;
253  vlib_frame_t *f;
254  u32 bo0;
255  u32 n_to_alloc = 1;
256 
257  icmp6_multicast_listener_report_header_t *rh0;
259 
260  if (!vnet_sw_interface_is_admin_up (vnm, sw_if_index))
261  return;
262 
263  imd = ip6_mld_get_itf (sw_if_index);
264 
265  if (NULL == imd)
266  return;
267 
268  /* send report now - build a mldpv2 report packet */
269  if (0 == vlib_buffer_alloc (vm, &bo0, n_to_alloc))
270  {
271  alloc_fail:
272  clib_warning ("buffer allocation failure");
273  return;
274  }
275 
276  b0 = vlib_get_buffer (vm, bo0);
277 
278  /* adjust the sizeof the buffer to just include the ipv6 header */
280 
281  payload_length = sizeof (icmp6_multicast_listener_report_header_t);
282 
283  b0->error = ICMP6_ERROR_NONE;
284 
285  rp0 = vlib_buffer_get_current (b0);
286  ip0 = (ip6_header_t *) & rp0->ip;
287  rh0 = (icmp6_multicast_listener_report_header_t *) & rp0->report_hdr;
288 
290 
292  clib_host_to_net_u32 (0x6 << 28);
293 
294  ip0->protocol = IP_PROTOCOL_IP6_HOP_BY_HOP_OPTIONS;
295  /* for DEBUG - vnet driver won't seem to emit router alerts */
296  /* ip0->protocol = IP_PROTOCOL_ICMP6; */
297  ip0->hop_limit = 1;
298 
299  rh0->icmp.type = ICMP6_multicast_listener_report_v2;
300 
301  /* source address MUST be the link-local address */
303  ip6_get_link_local_address (sw_if_index));
304 
305  /* destination is all mldpv2 routers */
307  IP6_MULTICAST_SCOPE_link_local,
308  IP6_MULTICAST_GROUP_ID_mldv2_routers);
309 
310  /* add reports here */
311  ip6_mldp_group_t *m;
312  int num_addr_records = 0;
313  icmp6_multicast_address_record_t rr;
314 
315  /* fill in the hop-by-hop extension header (router alert) info */
316  rh0->ext_hdr.next_hdr = IP_PROTOCOL_ICMP6;
317  rh0->ext_hdr.n_data_u64s = 0;
318 
319  rh0->alert.type = IP6_MLDP_ALERT_TYPE;
320  rh0->alert.len = 2;
321  rh0->alert.value = 0;
322 
323  rh0->pad.type = 1;
324  rh0->pad.len = 0;
325 
326  rh0->icmp.checksum = 0;
327 
328  /* *INDENT-OFF* */
329  pool_foreach (m, imd->mldp_group_pool,
330  ({
331  rr.type = m->type;
332  rr.aux_data_len_u32s = 0;
333  rr.num_sources = clib_host_to_net_u16 (m->num_sources);
334  clib_memcpy(&rr.mcast_addr, &m->mcast_address, sizeof(ip6_address_t));
335 
336  num_addr_records++;
337 
338  if(vlib_buffer_add_data (vm, &bo0, (void *)&rr,
339  sizeof(icmp6_multicast_address_record_t)))
340  {
341  vlib_buffer_free (vm, &bo0, 1);
342  goto alloc_fail;
343  }
344 
345  payload_length += sizeof( icmp6_multicast_address_record_t);
346  }));
347  /* *INDENT-ON* */
348 
349  rh0->rsvd = 0;
350  rh0->num_addr_records = clib_host_to_net_u16 (num_addr_records);
351 
352  /* update lengths */
353  ip0->payload_length = clib_host_to_net_u16 (payload_length);
354 
355  rh0->icmp.checksum = ip6_tcp_udp_icmp_compute_checksum (vm, b0, ip0,
356  &bogus_length);
357  ASSERT (bogus_length == 0);
358 
359  /*
360  * OK to override w/ no regard for actual FIB, because
361  * ip6-rewrite only looks at the adjacency.
362  */
363  vnet_buffer (b0)->sw_if_index[VLIB_RX] =
365 
366  vnet_buffer (b0)->ip.adj_index[VLIB_TX] =
368  b0->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
369 
370  vlib_node_t *node = vlib_get_node_by_name (vm, (u8 *) "ip6-rewrite-mcast");
371 
372  f = vlib_get_frame_to_node (vm, node->index);
373  to_next = vlib_frame_vector_args (f);
374  to_next[0] = bo0;
375  f->n_vectors = 1;
376 
377  vlib_put_frame_to_node (vm, node->index, f);
378  return;
379 }
380 
381 /* send a RA or update the timer info etc.. */
382 static uword
385 {
386  vnet_main_t *vnm = vnet_get_main ();
387  ip6_mld_t *imd;
388 
389  /* Interface ip6 radv info list */
390  /* *INDENT-OFF* */
392  ({
394  {
395  imd->all_routers_mcast = 0;
396  continue;
397  }
398 
399  /* Make sure that we've joined the all-routers multicast group */
400  if (!imd->all_routers_mcast)
401  {
402  /* send MDLP_REPORT_EVENT message */
403  ip6_neighbor_send_mldpv2_report(imd->sw_if_index);
404  imd->all_routers_mcast = 1;
405  }
406  }));
407  /* *INDENT-ON* */
408 
409  return 0;
410 }
411 
412 static uword
415 {
416  uword event_type;
417 
418  /* init code here */
419 
420  while (1)
421  {
422  vlib_process_wait_for_event_or_clock (vm, 1. /* seconds */ );
423 
424  if (!vlib_process_get_event_data (vm, &event_type))
425  {
426  /* No events found: timer expired. */
427  /* process interface list and send RAs as appropriate, update timer info */
428  ip6_mld_timer_event (vm, node, frame);
429  }
430  /* else; no events */
431  }
432  return frame->n_vectors;
433 }
434 
435 /* *INDENT-OFF* */
437  .function = ip6_mld_event_process,
438  .name = "ip6-mld-process",
439  .type = VLIB_NODE_TYPE_PROCESS,
440 };
441 /* *INDENT-ON* */
442 
443 static u8 *
444 format_ip6_mld (u8 * s, va_list * args)
445 {
446  index_t imi = va_arg (*args, index_t);
447  u32 indent = va_arg (*args, u32);
448  ip6_mldp_group_t *m;
449  ip6_mld_t *imd;
450 
451  imd = pool_elt_at_index (ip6_mld_pool, imi);
452 
453  s = format (s, "%UJoined group address(es):\n", format_white_space, indent);
454 
455  /* *INDENT-OFF* */
456  pool_foreach (m, imd->mldp_group_pool,
457  ({
458  s = format (s, "%U%U\n",
459  format_white_space, indent+2,
460  format_ip6_address,
461  &m->mcast_address);
462  }));
463  /* *INDENT-ON* */
464 
465  return (s);
466 }
467 
468 /**
469  * @brief callback when an interface address is added or deleted
470  */
471 static void
473  const ip6_address_t * address, u8 address_oength)
474 {
475  ip6_mld_t *imd;
476  ip6_address_t a;
477 
478  imd = pool_elt_at_index (ip6_mld_pool, imi);
479 
480  /* create solicited node multicast address for this interface address */
482 
483  a.as_u8[0xd] = address->as_u8[0xd];
484  a.as_u8[0xe] = address->as_u8[0xe];
485  a.as_u8[0xf] = address->as_u8[0xf];
486 
487  ip6_neighbor_add_mld_prefix (imd, &a);
488 }
489 
490 static void
492  const ip6_address_t * address, u8 address_oength)
493 {
494  ip6_mld_t *imd;
495  ip6_address_t a;
496 
497  imd = pool_elt_at_index (ip6_mld_pool, imi);
498 
499  /* create solicited node multicast address for this interface address */
501 
502  a.as_u8[0xd] = address->as_u8[0xd];
503  a.as_u8[0xe] = address->as_u8[0xe];
504  a.as_u8[0xf] = address->as_u8[0xf];
505 
506  ip6_neighbor_del_mld_prefix (imd, &a);
507 }
508 
509 /**
510  * VFT for registering as a delegate to an IP6 link
511  */
512 const static ip6_link_delegate_vft_t ip6_mld_delegate_vft = {
514  .ildv_enable = ip6_mld_link_enable,
515  .ildv_format = format_ip6_mld,
516  .ildv_addr_add = ip6_mld_address_add,
517  .ildv_addr_del = ip6_mld_address_del,
518 };
519 
520 static clib_error_t *
522 {
523  ip6_mld_delegate_id = ip6_link_delegate_register (&ip6_mld_delegate_vft);
524 
525  return (NULL);
526 }
527 
528 /* *INDENT-OFF* */
530 {
531  .runs_after = VLIB_INITS("icmp6_init"),
532 };
533 /* *INDENT-ON* */
534 
535 /*
536  * fd.io coding-style-patch-verification: ON
537  *
538  * Local Variables:
539  * eval: (c-set-style "gnu")
540  * End:
541  */
Definition: mhash.h:46
u8 pad[3]
log2 (size of the packing page block)
Definition: bihash_doc.h:61
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...
Definition: node_funcs.h:673
a
Definition: bitmap.h:538
static void ip6_neighbor_del_mld_prefix(ip6_mld_t *imd, ip6_address_t *addr)
Delete a multicast Address from the advertised MLD set.
Definition: ip6_mld.c:133
vnet_main_t * vnet_get_main(void)
Definition: misc.c:46
ip6_multicast_address_scope_t
Definition: ip6_packet.h:106
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
Definition: pool.h:255
uword mhash_unset(mhash_t *h, void *key, uword *old_value)
Definition: mhash.c:346
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u32 index
Definition: node.h:282
struct ip6_nd_t_ ip6_mld_t
u16 current_length
Nbytes between current data and the end of this buffer.
Definition: buffer.h:113
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:41
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:424
vhost_vring_addr_t addr
Definition: vhost_user.h:254
ip6_address_t src_address
Definition: ip6_packet.h:310
unsigned char u8
Definition: types.h:56
#define clib_memcpy(d, s, n)
Definition: string.h:180
ethernet_main_t ethernet_main
Definition: init.c:45
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
Definition: pool.h:513
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:173
u32 local_interface_sw_if_index
Definition: vnet.h:54
u8 * format_white_space(u8 *s, va_list *va)
Definition: std-formats.c:129
static vnet_sw_interface_t * vnet_get_sup_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
Definition: main.c:182
static uword ip6_mld_timer_event(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_mld.c:383
unsigned int u32
Definition: types.h:88
mhash_t address_to_mldp_index
Definition: ip6_mld.c:74
static const ethernet_interface_t * ip6_mld_get_eth_itf(u32 sw_if_index)
Definition: ip6_mld.c:165
static uword ip6_mld_event_process(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: ip6_mld.c:413
u32 sw_if_index
Definition: ip6_mld.c:67
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:136
#define pool_flush(VAR, POOL, BODY)
Remove all elements from a pool in a safe way.
Definition: pool.h:573
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:534
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
Definition: node.c:45
ip6_mldp_group_t * mldp_group_pool
Definition: ip6_mld.c:71
vlib_main_t * vlib_main
Definition: vnet.h:80
unsigned short u16
Definition: types.h:57
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
Definition: main.c:216
#define IP6_MLDP_ALERT_TYPE
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:229
#define pool_put(P, E)
Free an object E in pool P.
Definition: pool.h:302
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];})
Definition: ip6_mld.c:37
vnet_main_t vnet_main
Definition: misc.c:43
static uword mhash_set(mhash_t *h, void *key, uword new_value, uword *old_value)
Definition: mhash.h:117
vlib_main_t * vm
Definition: in2out_ed.c:1599
static ip6_link_delegate_id_t ip6_mld_delegate_id
Definition: ip6_mld.c:79
#define pool_free(p)
Free a pool.
Definition: pool.h:427
static void ip6_mld_link_enable(u32 sw_if_index)
create and initialize router advertisement parameters with default values for this intfc ...
Definition: ip6_mld.c:182
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
Definition: ip6_mld.c:472
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:169
void mhash_init(mhash_t *h, uword n_value_bytes, uword n_key_bytes)
Definition: mhash.c:168
u16 n_vectors
Definition: node.h:399
ip6_address_t mcast_address
Definition: ip6_mld.c:60
#define clib_warning(format, args...)
Definition: error.h:59
ip6_address_t * mcast_source_address_pool
Definition: ip6_mld.c:61
static void ip6_neighbor_send_mldpv2_report(u32 sw_if_index)
Definition: ip6_mld.c:242
vlib_main_t vlib_node_runtime_t * node
Definition: in2out_ed.c:1599
u16 ip6_tcp_udp_icmp_compute_checksum(vlib_main_t *vm, vlib_buffer_t *p0, ip6_header_t *ip0, int *bogus_lengthp)
Definition: ip6_forward.c:1095
static void ip6_mld_delegate_disable(index_t imdi)
Definition: ip6_mld.c:218
#define ASSERT(truth)
manual_print typedef address
Definition: ip_types.api:85
static uword * mhash_get(mhash_t *h, const void *key)
Definition: mhash.h:110
static void mhash_free(mhash_t *h)
Definition: mhash.h:149
int all_routers_mcast
Definition: ip6_mld.c:68
ip6_multicast_link_local_group_id_t
Definition: ip6_packet.h:113
static void ip6_neighbor_add_mld_prefix(ip6_mld_t *imd, ip6_address_t *addr)
Add a multicast Address to the advertised MLD set.
Definition: ip6_mld.c:101
static clib_error_t * ip6_mld_init(vlib_main_t *vm)
Definition: ip6_mld.c:521
static uword vnet_sw_interface_is_admin_up(vnet_main_t *vnm, u32 sw_if_index)
static u8 * format_ip6_mld(u8 *s, va_list *args)
Definition: ip6_mld.c:444
u32 ip_version_traffic_class_and_flow_label
Definition: ip6_packet.h:297
Definition: defs.h:47
vlib_node_registration_t ip6_mld_event_process_node
(constructor) VLIB_REGISTER_NODE (ip6_mld_event_process_node)
Definition: ip6_mld.c:436
icmp6_multicast_listener_report_packet_t
Definition: ip6_mld.c:52
static void * vlib_process_get_event_data(vlib_main_t *vm, uword *return_event_type_opaque)
Definition: node_funcs.h:463
vl_api_address_t ip
Definition: l2.api:501
ethernet_interface_t * ethernet_get_interface(ethernet_main_t *em, u32 hw_if_index)
Definition: interface.c:967
static void ip6_set_solicited_node_multicast_address(ip6_address_t *a, u32 id)
Definition: ip6_packet.h:144
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
Definition: dpo.h:47
VLIB buffer representation.
Definition: buffer.h:102
u64 uword
Definition: types.h:112
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:244
static void ip6_address_copy(ip6_address_t *dst, const ip6_address_t *src)
Definition: ip6_packet.h:127
static ip6_mld_t * ip6_mld_pool
Definition: ip6_mld.c:80
#define vnet_buffer(b)
Definition: buffer.h:417
vnet_sw_interface_type_t type
Definition: interface.h:722
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: in2out_ed.c:1600
static ip6_mld_t * ip6_mld_get_itf(u32 sw_if_index)
Definition: ip6_mld.c:85
static u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
Definition: buffer_funcs.h:677
static void ip6_mld_address_del(u32 imi, const ip6_address_t *address, u8 address_oength)
Definition: ip6_mld.c:491
vl_api_gbp_scope_t scope
Definition: gbp.api:74
#define VLIB_INITS(...)
Definition: init.h:344
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:85
Definition: defs.h:46
ip6_address_t dst_address
Definition: ip6_packet.h:310
static void ip6_set_reserved_multicast_address(ip6_address_t *a, ip6_multicast_address_scope_t scope, u16 id)
Definition: ip6_packet.h:134
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.
Definition: ip6_mld.c:153