|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
32 static ip46_address_t *
35 ip46_address_t *srcs = NULL;
51 for (ii = 0; ii < n; ii++)
89 IGMP_MEMBERSHIP_GROUP_mode_is_include);
97 ip46_address_t *intersect;
100 IGMP_FILTER_MODE_INCLUDE,
108 IGMP_MEMBERSHIP_GROUP_mode_is_include);
124 case IGMP_FILTER_MODE_INCLUDE:
125 return (IGMP_MEMBERSHIP_GROUP_mode_is_include);
126 case IGMP_FILTER_MODE_EXCLUDE:
127 return (IGMP_MEMBERSHIP_GROUP_mode_is_exclude);
130 return (IGMP_MEMBERSHIP_GROUP_mode_is_include);
147 ASSERT (config->
timers[IGMP_CONFIG_TIMER_GENERAL_REPORT] !=
152 IGMP_DBG (
"send-general-report: %U",
186 if (IGMP_MODE_ROUTER == config->
mode)
215 config->
timers[IGMP_CONFIG_TIMER_GENERAL_REPORT])
219 IGMP_DBG (
"...general-query-rx: %U schedule for %f",
226 config->
timers[IGMP_CONFIG_TIMER_GENERAL_REPORT] =
244 ip46_address_t *srcs;
259 tid = group->
timers[IGMP_GROUP_TIMER_QUERY_REPLY];
261 IGMP_DBG (
"...group-query-rx: %U for (%U, %U)",
272 ip46_address_t *current, *s;
294 IGMP_DBG (
"...group-query-rx: schedule:%f", delay);
296 group->
timers[IGMP_GROUP_TIMER_QUERY_REPLY] =
#define FOR_EACH_GROUP(_group, _config, _body)
vnet_interface_main_t * im
u32 igmp_group_index(const igmp_group_t *g)
void * igmp_timer_get_data(igmp_timer_id_t tid)
static f64 igmp_get_random_resp_delay(const igmp_header_t *header)
static igmp_membership_group_v3_type_t igmp_filter_mode_to_report_type(igmp_filter_mode_t mode)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
void igmp_timer_retire(igmp_timer_id_t *tid)
IGMP interface configuration.
static void igmp_send_group_report_v3(u32 obj, void *data)
#define IGMP_TIMER_ID_INVALID
void igmp_pkt_report_v3_add_report(igmp_pkt_build_report_t *br, const ip46_address_t *grp, const ip46_address_t *srcs, igmp_membership_group_v3_type_t type)
IGMP group A multicast group address for which reception has been requested.
vl_api_tunnel_mode_t mode
static f64 igmp_header_get_max_resp_time(const igmp_header_t *header)
Calculate the maximum response time allowed from the header.
igmp_config_t * igmp_config_lookup(u32 sw_if_index)
igmp config lookup
static f64 random_f64(u32 *seed)
Generate f64 random number in the interval [0,1].
#define vec_search_with_function(v, E, fn)
Search a vector for the index of the entry that matches.
u32 config
The pool index of the config object this group is in.
ip4_address_t src_addresses[0]
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static u8 ip46_address_is_equal(const ip46_address_t *ip46_1, const ip46_address_t *ip46_2)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
vnet_main_t * vnet_get_main(void)
u32 timers[IGMP_GROUP_N_TIMERS]
A vector of running timers for the group.
igmp_timer_id_t timers[IGMP_CONFIG_N_TIMERS]
A vector of scheduled query-response timers.
static void igmp_send_general_report_v3(u32 obj, void *data)
Send igmp membership general report.
u32 igmp_config_index(const igmp_config_t *c)
Get the pool index for a config.
static int igmp_membership_query_v3_is_general(const igmp_membership_query_v3_t *q)
igmp_membership_group_v3_type_t
igmp_group_t * igmp_group_lookup(igmp_config_t *config, const igmp_key_t *key)
igmp group lookup
ip4_address_t group_address
void igmp_pkt_report_v3_add_group(igmp_pkt_build_report_t *br, const igmp_group_t *group, igmp_membership_group_v3_type_t type)
void igmp_timer_set_data(igmp_timer_id_t tid, void *data)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
#define vec_free(V)
Free vector's memory (no header).
ip46_address_t * igmp_group_new_intersect_present(igmp_group_t *group, igmp_filter_mode_t mode, const ip46_address_t *saddrs)
void igmp_handle_query(const igmp_query_args_t *args)
Called from the main thread on reception of a Query message.
igmp_key_t * key
The group's key within the per-interface config.
format_function_t format_vnet_sw_if_index_name
void igmp_pkt_report_v3_send(igmp_pkt_build_report_t *br)
#define vec_foreach(var, vec)
Vector iterator.
void igmp_pkt_build_report_init(igmp_pkt_build_report_t *br, u32 sw_if_index)
u32 igmp_timer_id_t
The id of a running timer.
static vlib_main_t * vlib_get_main(void)
static ip46_address_t * igmp_query_mk_source_list(const igmp_membership_query_v3_t *q)
igmp_filter_mode_t router_filter_mode
The current filter mode of the group (see 6.2.1)
enum igmp_filter_mode_t_ igmp_filter_mode_t
static f64 vlib_time_now(vlib_main_t *vm)
A copy of the query message sent from the worker to the main thread.
igmp_membership_query_v3_t query[0]
collection of data related to IGMP
igmp_timer_id_t igmp_timer_schedule(f64 when, u32 obj, igmp_timer_function_t fn, void *data)
Schedule a timer to expire in 'when' seconds.
ip46_address_t igmp_key_t
IGMP Key Used to index groups within an interface config and sources within a list.