OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gmp_map.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #include <cstdarg>
6 #include "task_map.h"
7 #include "oper/multicast.h"
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 #include "mcast_common.h"
13 
14 #include "task_map.h"
15 #include "task_thread_api.h"
16 #include "patricia_api.h"
17 
18 #include "gmp.h"
19 #include "gmpx_environment.h"
20 #include "gmp_router.h"
21 #include "igmp_private.h"
22 #include "igmp_protocol.h"
23 #include "gmp_externs.h"
24 
25 #include "gmp_intf.h"
26 #include "gmp_map.h"
27 #include "gmp_private.h"
28 #include "gmp_trace.h"
29 #include "gmpr_trace.h"
30 
31 #define MAXSTRINGSIZE_1 1000
32 
33 extern void gmpx_trace(void *context, const char *fmt, ...);
34 
35 extern void gmp_set_def_igmp_version(uint32_t version);
36 extern void gmp_set_def_ipv4_ivl_params(uint32_t robust_count, uint32_t qivl,
37  uint32_t qrivl, uint32_t lmqi);
38 extern void gmp_set_def_intf_params(mc_af mcast_af);
39 #ifdef __cplusplus
40 }
41 #endif
42 
45 
47  gmp_oif_map_cb, // rctx_oif_map_cb
48  gmp_policy_cb, // rctx_policy_cb
49  gmp_ssm_check_cb, // rctx_ssm_check_cb
50 };
51 
53  igmp_notification_ready, // rctx_notif_cb
54  igmp_host_notification_ready, // rctx_host_notif_cb
55  mgm_querier_change, // rctx_querier_cb
56  TRUE, // rctx_delta_notifications
57  FALSE, // rctx_full_notifications
58 };
59 
60 // Value to be used for IGMP Version during init of GMP.
62 {
63  gmpr_intf_params *params = NULL;
64 
65  params = &def_gmpr_intf_params[MCAST_AF_IPV4];
66  params->gmpr_ifparm_version = version;
67 }
68 
69 // Default values to use for IGMP for querier related timer intervals in
70 // GMP code.
71 void gmp_set_def_ipv4_ivl_params(uint32_t robust_count, uint32_t qivl,
72  uint32_t qrivl, uint32_t lmqi)
73 {
74  gmpr_intf_params *params = NULL;
75 
76  params = &def_gmpr_intf_params[MCAST_AF_IPV4];
77  params->gmpr_ifparm_robustness = robust_count;
78  params->gmpr_ifparm_qivl = qivl;
79  params->gmpr_ifparm_qrivl = qrivl;
80  params->gmpr_ifparm_lmqi = lmqi;
81 
82  return;
83 }
84 
85 // Set of defaults for use by GMP as part of GMP initialization.
87 {
88  gmpr_intf_params *params = NULL;
89 
90  if (mcast_af == MCAST_AF_IPV4) {
91 
92  params = &def_gmpr_intf_params[mcast_af];
97  } else {
98  return;
99  }
100 
101  params->gmpr_ifparm_fast_leave = FALSE;
105  params->gmpr_ifparm_chan_limit = 0;
106  params->gmpr_ifparm_chan_threshold = 100;
107  params->gmpr_ifparm_log_interval = 0;
108 
109  return;
110 }
111 
112 // Create, initialization and return global data structure instance
113 // that is used as context and mapping data structure with
114 // GMP code.
115 mgm_global_data *gmp_init(mc_af mcast_af, task *tp, void *gmp_sm)
116 {
117  gmp_proto proto;
118  mgm_global_data *gd;
119 
120  if (mcast_af == MCAST_AF_IPV4) {
121  proto = GMP_PROTO_IGMP;
122  } else {
123  return NULL;
124  }
125 
126  gd = &mgm_global[mcast_af];
127  gd->gmp_sm = gmp_sm;
128  gd->tp = tp;
129  gd->mgm_gd_af = mcast_af;
130 
134 
135  gd->mgm_gmpr_instance = gmpr_create_instance(proto, gd, &gmp_inst_ctx);
137  &igmp_client_context);
139  gmp_set_def_intf_params(mcast_af);
140 
141  return gd;
142 }
143 
144 // Deinit and destroy data structure once the GMP module is
145 // de-inited by the caller.
146 void gmp_deinit(mc_af mcast_af)
147 {
148  mgm_global_data *gd;
149 
150  gd = &mgm_global[mcast_af];
153 
154  gd->mgm_gmpr_client = NULL;
155  gd->mgm_gmpr_instance = NULL;
156 
157  return;
158 }
159 
160 // Set the interface params in the GMP.
162 {
163  gmp_intf_handle *handle;
164 
165  if (gd->mgm_gd_af != MCAST_AF_IPV4) {
166  return;
167  }
168 
169  handle = gmp_gif_to_handle(gif);
170  gmpr_set_intf_params(gd->mgm_gmpr_instance, handle, &gif->params);
171  return;
172 }
173 
174 // Attach an application interface context with GMP interface context.
175 // application interface context is generally the either per-IPAM
176 // gw or dns server in the context of the Agent.
178 {
179  gmp_intf *gif = NULL;
180 
181  if (!gd) {
182  return NULL;
183  }
184 
185  if (gd->mgm_gd_af != MCAST_AF_IPV4) {
186  return NULL;
187  }
188 
189  gif = (gmp_intf *)malloc(sizeof(gmp_intf));
190  if (!gif) {
191  return NULL;
192  }
193 
194  gif->vm_interface = mif_state;
197  std::memset(&gif->gmpif_handle.gmpifh_xmit_thread, 0, sizeof(task_thread));
199  memcpy(&gif->params, &def_gmpr_intf_params[gd->mgm_gd_af],
200  sizeof(gif->params));
201  gmp_set_intf_params(gd, gif);
202 
203  return gif;
204 }
205 
206 // Detach the interface created using above from the GMP.
208 {
209  if (!gd) {
210  return;
211  }
212 
214 
215  free(gif);
216 
217  return;
218 }
219 
220 // Update interface status - currently only IP Address.
222  const gmp_addr_string *intf_addr)
223 {
225  (const u_int8_t *)intf_addr);
226  return TRUE;
227 }
228 
229 // Update querying related params - currently query enable/disable.
231  boolean query)
232 {
235  gmp_set_intf_params(gd, gif);
236  return TRUE;
237 }
238 
239 // Process the IGMP payload.
240 // Preprocessed IP header by Agent packet handler.
242  void *rcv_pkt, u_int32_t packet_len,
243  const gmp_addr_string *src_addr,
244  const gmp_addr_string *dst_addr)
245 {
246  boolean parse_ok = FALSE;
247 
248  if (gd->mgm_gd_af == MCAST_AF_IPV4) {
249  parse_ok = igmp_process_pkt(rcv_pkt, src_addr->gmp_v4_addr,
250  dst_addr->gmp_v4_addr, packet_len,
251  gmp_gif_to_handle(gif), false, NULL, 0);
252  }
253 
254  return parse_ok;
255 }
256 
257 boolean gmp_oif_map_cb(void *inst_context UNUSED, gmp_intf_handle *handle,
258  u_int8_t *group_addr, u_int8_t *source_addr,
259  gmp_intf_handle **output_handle)
260 {
261  *output_handle = handle;
262  return TRUE;
263 }
264 
265 // Handle Multicast Policy configured by user.
266 // Returns allow or deny the <S,G> at VN level.
267 boolean gmp_policy_cb(void *inst_context, gmp_intf_handle *handle,
268  u_int8_t *group_addr, u_int8_t *source_addr,
269  boolean static_group)
270 {
271  mgm_global_data *gd = (mgm_global_data *)inst_context;
272  gmp_intf *gif;
273  gmp_addr_string g;
274  gmp_addr_string s;
275 
276  if (!inst_context) {
277  return FALSE;
278  }
279 
280  gif = gmp_handle_to_gif(handle);
281  if (!gif) {
282  return FALSE;
283  }
284 
285  if (static_group) {
286  return FALSE;
287  }
288 
289  if (!group_addr) {
290  return FALSE;
291  }
292 
293  memcpy(&g, group_addr, IPV4_ADDR_LEN);
294  source_addr ? memcpy(&s, source_addr, IPV4_ADDR_LEN)
295  : memset(&s, 0x00, IPV4_ADDR_LEN);
296 
297  return gmp_policy_check(gd, gif, s, g);
298 }
299 
300 boolean gmp_ssm_check_cb(void *inst_context UNUSED, gmp_intf_handle *handle,
301  u_int8_t *group_addr)
302 {
303  return TRUE;
304 }
305 
306 // Notification handler for handling <S,G>
307 // Values per-<S,G> can be adding, deleting or modifying <S,G>.
308 // Modifying can be change <S> from allow to block and vice-versa.
310 {
311  boolean pending = FALSE;
312  gmpr_client_notification *notification;
313  gmp_intf *gif;
314  gmp_intf_handle *handle;
315  gmp_addr_string g;
316  gmp_addr_string s;
317  int notif_count = IGMP_MAX_NOTIF_PER_PASS;
318 
319  /*
320  * Pull notifications until we run out, hit our max count, or the
321  * protocol is busy.
322  *
323  * NOTE: We might go over the max notifications per pass,
324  * ie. notif_count might be -ve, because we need to make sure that
325  * the notifications for the (s,g) of the same group are being
326  * processed in the same batch.
327  */
328  notification = NULL;
329  while (notif_count-- > 0 || !gmpr_notification_last_sg(notification)) {
330  notification =
331  gmpr_get_notification(gd->mgm_gmpr_client, notification);
332  if (!notification)
333  break;
334 
335  /*
336  * Process received notification...
337  */
338  handle = notification->notif_intf_id;
339  gif = gmp_handle_to_gif(handle);
340 
341  memcpy(&g, &notification->notif_group_addr, IPV4_ADDR_LEN);
342  memcpy(&s, &notification->notif_source_addr, IPV4_ADDR_LEN);
343 
344  switch (notification->notif_type) {
346  if (notification->notif_filter_mode ==
348  gmp_group_notify(gd, gif, MGM_GROUP_ADDED, s, g);
349  } else {
350  gmp_cache_resync_notify(gd, gif, s, g);
351  }
352  break;
353 
355  if (notification->notif_filter_mode ==
357  gmp_group_notify(gd, gif, MGM_GROUP_REMOVED, s, g);
358  } else {
359  gmp_cache_resync_notify(gd, gif, s, g);
360  }
361  break;
362 
364  gmp_group_notify(gd, gif, MGM_GROUP_SRC_REMOVED, s, g);
365  gmp_group_notify(gd, gif, MGM_GROUP_REMOVED, s, g);
366  break;
367 
369  /*
370  * Check if PIM requested a refresh.
371  * If so we don't send a group and source REMOVE
372  * otherwise PIM will clear its state
373  */
374  if (gd->refresh_required == FALSE) {
375  gmp_group_notify(gd, gif, MGM_GROUP_SRC_REMOVED, s, g);
376  }
377  gmp_group_notify(gd, gif, MGM_GROUP_ADDED, s, g);
378  break;
379 
381  /*
382  * Check if PIM requested a refresh.
383  * If so we don't send a group and source REMOVE
384  * otherwise PIM will clear its state
385  */
386  if (gd->refresh_required == FALSE) {
387  gmp_group_notify(gd, gif, MGM_GROUP_SRC_REMOVED, s, g);
388  gmp_group_notify(gd, gif, MGM_GROUP_REMOVED, s, g);
389  }
390  break;
391 
393  gd->refresh_required = FALSE;
394  break;
395 
396  default:
397  /* We should never get here */
398  assert(0);
399  }
400  }
401 
402  /*
403  * If there's a notification pointer, it means that we bailed out due
404  * to hitting the notification count limit or someone is too busy to
405  * process the updates.
406  *
407  * Either way, we explicitly toss the notification block and then fall
408  * out, which causes the job to be requeued.
409  *
410  * On the other hand, if the notification pointer is NULL, it means that
411  * we drained the queue, in which case we should kill the job.
412  */
413  if (notification) {
414  gmpr_return_notification(notification);
415  pending = TRUE;
416  }
417 
418  return pending;
419 }
420 
421 // Per host, per-<S,G> notification to indicate join or leave
422 // among others of an host.
424 {
425  boolean pending = FALSE;
426  gmpr_client_host_notification *gmpr_notif = NULL;
427  gmp_intf *gif;
428  gmp_intf_handle *handle;
429  gmp_addr_string g;
430  gmp_addr_string s;
431  gmp_addr_string h;
432  int notif_count = IGMP_MAX_HOST_NOTIF_PER_PASS;
433 
434  /*
435  * Do this a limited number of times.
436  */
437  while (notif_count--) {
438  /*
439  * Stop if there are no more notifications.
440  */
441  gmpr_notif =
443  if (!gmpr_notif) {
444  break;
445  }
446 
447  /*
448  * Skip NULL MIFs (local groups).
449  */
450  handle = gmpr_notif->host_notif_intf_id;
451  gif = gmp_handle_to_gif(handle);
452  if (!gif) {
453  continue;
454  }
455 
456  /*
457  * Get needed addresses.
458  */
459  memcpy(&g, &gmpr_notif->host_notif_group_addr, IPV4_ADDR_LEN);
460  memcpy(&s, &gmpr_notif->host_notif_source_addr, IPV4_ADDR_LEN);
461  memcpy(&h, &gmpr_notif->host_notif_host_addr, IPV4_ADDR_LEN);
462 
463  /*
464  * Update mapped OIF module.
465  */
466  switch (gmpr_notif->host_notif_type) {
468  break;
469 
471  /*
472  * This is a join.
473  */
474  gmp_host_update(gd, gif, TRUE, h, s, g);
475  break;
476 
480  /*
481  * This is a leave.
482  */
483  gmp_host_update(gd, gif, FALSE, h, s, g);
484  break;
485 
486  default:
487  assert(0);
488  break;
489  }
490  }
491 
492  /*
493  * If there's a notification pointer, it means that we bailed out
494  * due to hitting the notification count limit. In that case we
495  * explicitly toss the notification block and then fall out, which
496  * causes the job to be requeued.
497  *
498  * On the other hand, if the notification pointer is NULL, it means that
499  * we drained the queue, in which case we should kill the job.
500  */
501  if (gmpr_notif) {
502  gmpr_return_host_notification(gmpr_notif);
503  pending = TRUE;
504  }
505 
506  return pending;
507 }
508 
509 // Top level handler to handle both <S,G> and also
510 // per-host, per-<S,G> notifications.
512 {
513  boolean pending = FALSE;
514 
515  pending |= gmp_client_notification(gd);
516 
517  pending |= gmp_client_host_notification(gd);
518 
519  return pending;
520 }
521 
522 // per-<S,G> notification handler registered with GMP.
523 // Triggers the agent IGMP TaskTrigger instance
524 void igmp_notification_ready(void *context)
525 {
526  mgm_global_data *gd = (mgm_global_data *)context;
527 
529 }
530 
531 // per-host, per-<S,G> notification handler registered with GMP.
532 // Triggers the agent IGMP TaskTrigger instance
533 void igmp_host_notification_ready(void *context)
534 {
535  mgm_global_data *gd = (mgm_global_data *)context;
536 
538 }
539 
540 // No-op for now. Single querier support per-compute
541 void mgm_querier_change(void *cli_context UNUSED, gmp_intf_handle *handle,
542  boolean querier, u_int8_t *querier_addr)
543 {
544  return;
545 }
546 
547 // Tracing utility mapped to Multicast trace.
548 void gmpx_trace(void *context, const char *fmt, ...)
549 {
550  va_list arglist;
551  char dest[MAXSTRINGSIZE_1];
552  va_start( arglist, fmt );
553  vsprintf(dest, fmt, arglist);
554  va_end( arglist );
555  char buff[MAXSTRINGSIZE_1];
556  snprintf(buff, sizeof(buff), dest, arglist);
557 
558  MCTRACE(Info, "igmp_trace: ", buff);
559 
560  return;
561 }
562 
563 // Not used.
564 void gmpx_post_event(void *context, gmpx_event_type ev,
565  const void *parms, ...)
566 {
567  return;
568 }
569 
570 // Send one IGMP packet at a time.
572 {
573  uint8_t *pkt = NULL;
574  gmp_addr_string dest_addr;
575  mgm_global_data *gd;
576  gmp_intf *gif;
577 
578  gd = &mgm_global[MCAST_AF_IPV4];
579  gif = gmp_handle_to_gif(intf);
580  if (!gif) {
581  return false;
582  }
583 
584  pkt = gmp_get_send_buffer(gd, gif);
585  if (!pkt) {
586  return false;
587  }
588 
589  uint32_t formatted_len = igmp_next_xmit_packet(GMP_ROLE_ROUTER, intf, pkt,
590  dest_addr.gmp_v4_addr, 1500, gd, 0);
591  if (formatted_len == 0) {
592  gmp_free_send_buffer(gd, gif, pkt);
593  return false;
594  }
595 
596  gmp_send_one_packet(gd, gif, pkt, formatted_len, dest_addr);
597 
598  gmp_free_send_buffer(gd, gif, pkt);
599 
600  return true;
601 }
602 
603 // Called by GMP to send out IGMP packet.
604 void gmp_xmit_ready(gmp_role role, gmp_proto proto, gmpx_intf_id intf_id)
605 {
606  if (role != GMP_ROLE_ROUTER) {
607  return;
608  }
609 
610  if (proto != GMP_PROTO_IGMP) {
611  return;
612  }
613 
614  gmp_intf_handle *intf = (gmp_intf_handle*)intf_id;
615  if (!intf) {
616  return;
617  }
618 
619  while (igmp_send_one_packet(intf));
620 
621  return;
622 }
623 
625  gmp_packet *rcv_packet)
626 {
627  return;
628 }
629 
void gmp_register_peek_function(gmp_role role, gmp_xmit_peek_callback_func xm_peek_cb, gmp_rcv_peek_callback_func rc_peek_cb)
#define IGMP_MAX_HOST_NOTIF_PER_PASS
Definition: gmp_map.h:26
uint8_t gmpr_ifparm_version
Definition: gmp.h:98
#define MGM_GROUP_ADDED
Definition: gmp_map.h:28
gmp_filter_mode notif_filter_mode
Definition: gmp_router.h:246
gmp_addr_string host_notif_host_addr
Definition: gmp_router.h:275
bool igmp_send_one_packet(gmp_intf_handle *intf)
Definition: gmp_map.cc:571
int gmpr_detach_intf(gmp_instance_id instance_id, gmpx_intf_id intf_id)
void gmp_free_send_buffer(mgm_global_data *gd, gmp_intf *intf, uint8_t *buffer)
Definition: gmp_proto.cc:970
gmpr_client_host_notification_type host_notif_type
Definition: gmp_router.h:270
#define TRUE
Definition: mcast_common.h:15
uint8_t * gmp_get_send_buffer(mgm_global_data *gd, gmp_intf *intf)
Definition: gmp_proto.cc:959
gmp_proto gmpif_proto
Definition: gmp_intf.h:46
gmp_intf_handle gmpif_handle
Definition: gmp_intf.h:47
boolean gmpifh_host
Definition: gmp_intf.h:26
void * vm_interface
Definition: gmp_intf.h:49
void gmpr_return_notification(gmpr_client_notification *notification)
gmpr_intf_params params
Definition: gmp_intf.h:50
#define MCTRACE(obj,...)
Definition: multicast.h:18
void * gmp_sm
Definition: gmp_map.h:16
#define IGMP_MAX_NOTIF_PER_PASS
Definition: gmp_map.h:25
uint32_t gmpr_ifparm_chan_threshold
Definition: gmp.h:104
#define IPV4_ADDR_LEN
Definition: gmp.h:24
void gmp_set_intf_params(mgm_global_data *gd, gmp_intf *gif)
Definition: gmp_map.cc:161
#define MAXSTRINGSIZE_1
Definition: gmp_map.cc:31
uint32_t igmp_next_xmit_packet(gmp_role role, gmpx_intf_id intf_id, void *packet, uint8_t *dest_addr, uint32_t packet_len, void *trace_context, uint32_t trace_flags)
gmp_intf * gmp_attach_intf(mgm_global_data *gd, void *mif_state)
Definition: gmp_map.cc:177
Definition: task_int.h:10
uint8_t gmpr_ifparm_robustness
Definition: gmp.h:99
gmpr_client_notification * gmpr_get_notification(gmp_client_id client_id, gmpr_client_notification *last_notification)
gmp_addr_string notif_group_addr
Definition: gmp_router.h:243
static gmp_intf_handle * gmp_gif_to_handle(gmp_intf *gif)
Definition: gmp_intf.h:78
#define FALSE
Definition: mcast_common.h:14
uint32_t gmpr_ifparm_qivl
Definition: gmp.h:100
gmp_proto
Definition: gmp.h:45
void gmpr_return_host_notification(gmpr_client_host_notification *host_notif)
gmpr_intf_params def_gmpr_intf_params[MCAST_AF_MAX]
Definition: gmp_map.cc:44
boolean gmp_client_host_notification(mgm_global_data *gd)
Definition: gmp_map.cc:423
gmpr_client_host_notification * gmpr_get_host_notification(gmp_client_id client_id, gmpr_client_host_notification *last_notification)
void igmp_host_notification_ready(void *context)
Definition: gmp_map.cc:533
int gmpr_attach_intf(gmp_instance_id instance_id, gmpx_intf_id intf_id)
void gmpx_post_event(void *context, gmpx_event_type ev, const void *parms,...)
Definition: gmp_map.cc:564
boolean gmpr_ifparm_fast_leave
Definition: gmp.h:106
void gmp_set_def_ipv4_ivl_params(uint32_t robust_count, uint32_t qivl, uint32_t qrivl, uint32_t lmqi)
Definition: gmp_map.cc:71
#define IGMP_QUERY_RESPONSE_INTERVAL
Definition: igmp_private.h:10
void gmp_xmit_ready(gmp_role role, gmp_proto proto, gmpx_intf_id intf_id)
Definition: gmp_map.cc:604
void gmp_set_def_igmp_version(uint32_t version)
Definition: gmp_map.cc:61
void gmp_deinit(mc_af mcast_af)
Definition: gmp_map.cc:146
gmpx_intf_id notif_intf_id
Definition: gmp_router.h:242
boolean refresh_required
Definition: gmp_map.h:20
int gmpr_set_intf_params(gmp_instance_id instance_id, gmpx_intf_id intf_id, gmpr_intf_params *params)
gmp_addr_string notif_source_addr
Definition: gmp_router.h:245
boolean gmp_oif_map_cb(void *inst_context UNUSED, gmp_intf_handle *handle, u_int8_t *group_addr, u_int8_t *source_addr, gmp_intf_handle **output_handle)
Definition: gmp_map.cc:257
void gmpr_update_trace_flags(gmp_instance_id instance_id, uint32_t trace_flags)
gmp_addr_string host_notif_source_addr
Definition: gmp_router.h:273
boolean gmpr_ifparm_suppress_gs_query
Definition: gmp.h:110
boolean gmpr_ifparm_suppress_gen_query
Definition: gmp.h:109
mgm_global_data * gmp_init(mc_af mcast_af, task *tp, void *gmp_sm)
Definition: gmp_map.cc:115
boolean gmpr_ifparm_passive_receive
Definition: gmp.h:108
boolean gmp_update_intf_state(mgm_global_data *gd, gmp_intf *gif, const gmp_addr_string *intf_addr)
Definition: gmp_map.cc:221
void gmpx_trace(void *context, const char *parms,...)
Definition: gmp_map.cc:548
uint32_t gmpr_ifparm_chan_limit
Definition: gmp.h:103
void * mgm_gmpr_instance
Definition: gmp_map.h:21
boolean gmp_policy_check(mgm_global_data *gd, gmp_intf *intf, gmp_addr_string source, gmp_addr_string group)
Definition: gmp_proto.cc:827
void * mgm_gmpr_client
Definition: gmp_map.h:22
#define MGM_GROUP_SRC_REMOVED
Definition: gmp_map.h:30
void mgm_querier_change(void *cli_context UNUSED, gmp_intf_handle *handle, boolean querier, u_int8_t *querier_addr)
Definition: gmp_map.cc:541
boolean igmp_process_pkt(void *rcv_pkt, const uint8_t *src_addr, const uint8_t *dest_addr, uint32_t packet_len, gmpx_intf_id intf_id, gmpx_packet_attr attrib, void *trace_context, uint32_t trace_flags)
mgm_global_data mgm_global[MCAST_AF_MAX]
Definition: gmp_map.cc:43
mc_af
Definition: gmp_map.h:8
void igmp_notification_ready(void *context)
Definition: gmp_map.cc:524
mc_af mgm_gd_af
Definition: gmp_map.h:18
void gmp_set_def_intf_params(mc_af mcast_af)
Definition: gmp_map.cc:86
boolean gmp_client_notification(mgm_global_data *gd)
Definition: gmp_map.cc:309
#define IGMP_QUERY_INTERVAL
Definition: igmp_private.h:9
boolean gmp_process_pkt(mgm_global_data *gd, gmp_intf *gif, void *rcv_pkt, u_int32_t packet_len, const gmp_addr_string *src_addr, const gmp_addr_string *dst_addr)
Definition: gmp_map.cc:241
#define IGMP_ROBUST_COUNT
Definition: igmp_private.h:8
void gmp_notification_ready(mgm_global_data *gd)
Definition: gmp_proto.cc:856
#define IGMP_VERSION_3
Definition: igmp_private.h:15
#define IGMP_QUERY_LASTMEMBER_INTERVAL
Definition: igmp_private.h:11
void gmpr_destroy_instance(gmp_instance_id instance_id)
boolean gmp_policy_cb(void *inst_context, gmp_intf_handle *handle, u_int8_t *group_addr, u_int8_t *source_addr, boolean static_group)
Definition: gmp_map.cc:267
gmp_client_id gmpr_register(gmp_instance_id instance_id, void *cli_context, gmpr_client_context *context)
uint32_t gmpr_ifparm_qrivl
Definition: gmp.h:101
gmp_addr_string host_notif_group_addr
Definition: gmp_router.h:272
#define UNUSED
uint32_t gmpr_ifparm_lmqi
Definition: gmp.h:102
uint8_t gmp_v4_addr[IPV4_ADDR_LEN]
Definition: gmp.h:77
void gmp_group_notify(mgm_global_data *gd, gmp_intf *gif, int group_action, gmp_addr_string source, gmp_addr_string group)
Definition: gmp_proto.cc:870
gmp_role
Definition: gmp.h:56
gmp_instance_id gmpr_create_instance(gmp_proto proto, void *inst_context, gmpr_instance_context *context)
gmpr_client_notification_type notif_type
Definition: gmp_router.h:244
static gmpr_client_context igmp_client_context
Definition: gmp_map.cc:52
#define MGM_GROUP_REMOVED
Definition: gmp_map.h:29
boolean gmp_ssm_check_cb(void *inst_context UNUSED, gmp_intf_handle *handle, u_int8_t *group_addr)
Definition: gmp_map.cc:300
void gmp_cache_resync_notify(mgm_global_data *gd, gmp_intf *gif, gmp_addr_string source, gmp_addr_string group)
Definition: gmp_proto.cc:899
void gmp_detach_intf(mgm_global_data *gd, gmp_intf *gif)
Definition: gmp_map.cc:207
static gmpr_instance_context gmp_inst_ctx
Definition: gmp_map.cc:46
void gmpr_detach(gmp_client_id client_id)
void gmp_static_peek(gmp_intf_handle *handle, gmp_proto proto, gmp_packet *rcv_packet)
Definition: gmp_map.cc:624
uint32_t gmpr_ifparm_log_interval
Definition: gmp.h:105
gmpx_event_type
boolean gmp_notification_handler(mgm_global_data *gd)
Definition: gmp_map.cc:511
void gmp_host_update(mgm_global_data *gd, gmp_intf *intf, boolean join, gmp_addr_string host, gmp_addr_string source, gmp_addr_string group)
Definition: gmp_proto.cc:927
void gmp_register_io(gmp_role role, gmp_proto proto, gmpp_xmit_ready_func xmit_ready)
void gmp_send_one_packet(mgm_global_data *gd, gmp_intf *intf, uint8_t *pkt, uint32_t pkt_len, gmp_addr_string dest)
Definition: gmp_proto.cc:983
boolean gmp_update_intf_querying(mgm_global_data *gd, gmp_intf *gif, boolean query)
Definition: gmp_map.cc:230
boolean gmpr_notification_last_sg(gmpr_client_notification *notification)
void gmpr_update_intf_state(gmp_instance_id instance_id, gmpx_intf_id intf_id, const uint8_t *intf_addr)
task_thread gmpifh_xmit_thread
Definition: gmp_intf.h:27