42 .ip4 = (*group->
key).ip4,
91 return VNET_API_ERROR_INVALID_INTERFACE;
93 return VNET_API_ERROR_INVALID_INTERFACE;
98 return VNET_API_ERROR_INVALID_INTERFACE;
99 if (config->
mode != IGMP_MODE_HOST)
100 return VNET_API_ERROR_INVALID_INTERFACE;
103 if (!proxy_device && add)
110 proxy_device->
vrf_id = vrf_id;
116 else if (proxy_device && !add)
154 if (mfib_index == ~0)
155 return VNET_API_ERROR_INVALID_INTERFACE;
157 return VNET_API_ERROR_INVALID_INTERFACE;
163 return VNET_API_ERROR_INVALID_INTERFACE;
164 if (config->
mode != IGMP_MODE_ROUTER)
165 return VNET_API_ERROR_INVALID_INTERFACE;
212 if (proxy_group ==
NULL)
216 if (proxy_src ==
NULL)
233 ip46_address_t *srcaddrs =
NULL;
238 IGMP_MEMBERSHIP_GROUP_block_old_sources);
255 ip46_address_t ** srcaddrs,
u8 block)
262 if (proxy_src ==
NULL)
289 IGMP_DBG (
"proxy block src: invalid config %u", d_config);
322 ip46_address_t ** srcaddrs,
u8 block)
351 igmp_proxy_device_merge_src (proxy_group, src, srcaddrs, block);
363 ip46_address_t *srcaddrs =
NULL;
377 if ((
vec_len(srcaddrs) > 0) && proxy_group)
380 block ? IGMP_MEMBERSHIP_GROUP_block_old_sources :
381 IGMP_MEMBERSHIP_GROUP_allow_new_sources);
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
void igmp_proxy_device_mfib_path_add_del(igmp_group_t *group, u8 add)
igmp_group_t * igmp_group_lookup(igmp_config_t *config, const igmp_key_t *key)
igmp group lookup
A representation of a path as described by a route producer.
int igmp_proxy_device_add_del_interface(u32 vrf_id, u32 sw_if_index, u8 add)
IGMP proxy device add/del interface.
u32 group
The group this source is on.
void igmp_proxy_device_merge_config(igmp_config_t *config, u8 block)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define hash_set_mem(h, key, value)
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
dpo_proto_t frp_proto
The protocol of the address below.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
void igmp_pkt_build_report_init(igmp_pkt_build_report_t *br, u32 sw_if_index)
void igmp_src_free(igmp_src_t *src)
static void igmp_proxy_device_merge_src(igmp_group_t *proxy_group, igmp_src_t *src, ip46_address_t **srcaddrs, u8 block)
void igmp_clear_config(igmp_config_t *config)
igmp clear config
u8 * referance_by_config_index
Tells us which configurations have this source.
u32 mfib_table_get_index_for_sw_if_index(fib_protocol_t proto, u32 sw_if_index)
Get the index of the FIB bound to the interface.
igmp_src_t * igmp_src_alloc(u32 group_index, const igmp_key_t *skey, igmp_mode_t mode)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
u32 * igmp_proxy_device_by_vrf_id
per-vrf DB of proxy devices
fib_node_index_t mfib_table_entry_path_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpath, mfib_itf_flags_t itf_flags)
Add n paths to an entry (aka route) in the FIB.
igmp_config_t * igmp_config_get(u32 index)
Get the config from the pool index.
#define FOR_EACH_GROUP(_group, _config, _body)
#define vec_search(v, E)
Search a vector for the index of the entry that matches.
void igmp_pkt_report_v3_send(igmp_pkt_build_report_t *br)
igmp_config_t * igmp_config_lookup(u32 sw_if_index)
igmp config lookup
void mfib_table_unlock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Take a reference counting lock on the table.
u32 config
The pool index of the config object this group is in.
void igmp_group_src_remove(igmp_group_t *group, igmp_src_t *src)
igmp_src_t * igmp_src_lookup(igmp_group_t *group, const igmp_key_t *key)
igmp group lookup
#define pool_put(P, E)
Free an object E in pool P.
#define vec_del1(v, i)
Delete the element at index I.
void mfib_table_lock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Release a reference counting lock on the table.
collection of data related to IGMP
igmp_group_t * igmp_group_alloc(igmp_config_t *config, const igmp_key_t *gkey, igmp_filter_mode_t mode)
#define vec_free(V)
Free vector's memory (no header).
Aggregrate type for a prefix.
igmp_proxy_device_t * igmp_proxy_device_lookup(u32 vrf_id)
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_t * igmp_group_get(u32 index)
u32 igmp_src_index(igmp_src_t *src)
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
igmp_filter_mode_t router_filter_mode
The current filter mode of the group (see 6.2.1)
IGMP interface configuration.
u32 proxy_device_id
ID of a proxy device this configuration is on.
fib_protocol_t fp_proto
protocol type
mfib_table_t * mfib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define FOR_EACH_SRC(_src, _group, _filter, _body)
igmp_key_t * key
The group's key within the per-interface config.
IGMP group A multicast group address for which reception has been requested.
igmp_key_t * key
The source's key.
void igmp_proxy_device_block_src(igmp_config_t *config, igmp_group_t *group, igmp_src_t *src)
static igmp_group_t * igmp_proxy_device_merge_group(igmp_proxy_device_t *proxy_device, igmp_group_t *group, ip46_address_t **srcaddrs, u8 block)
igmp_proxy_device_t * proxy_devices
pool of proxy devices
#define vec_foreach(var, vec)
Vector iterator.
u32 igmp_group_n_srcs(const igmp_group_t *group, igmp_filter_mode_t mode)
void igmp_group_clear(igmp_group_t *group)
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
void mfib_table_entry_path_remove(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpath)
Remove n paths to an entry (aka route) in the FIB.
uword * igmp_src_by_key[IGMP_N_FILTER_MODES]
Source list per-filter mode.
int igmp_proxy_device_add_del(u32 vrf_id, u32 sw_if_index, u8 add)
IGMP proxy device add/del.
u32 igmp_group_index(const igmp_group_t *g)
IGMP source The representation of a specified source address with in multicast group.
const ip46_address_t zero_addr