|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
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)
107 im->igmp_proxy_device_by_vrf_id[
vrf_id] =
108 proxy_device -
im->proxy_devices;
116 else if (proxy_device && !add)
126 im->igmp_proxy_device_by_vrf_id[
vrf_id] = ~0;
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)
274 [(*proxy_group)->router_filter_mode], proxy_src->
key,
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 FOR_EACH_GROUP(_group, _config, _body)
vnet_interface_main_t * im
IGMP source The representation of a specified source address with in multicast group.
u32 igmp_group_n_srcs(const igmp_group_t *group, igmp_filter_mode_t mode)
u32 igmp_group_index(const igmp_group_t *g)
const ip46_address_t zero_addr
#include <vnet/feature/feature.h>
igmp_config_t * igmp_config_get(u32 index)
Get the config from the pool index.
IGMP interface configuration.
Aggregate type for a prefix.
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)
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
void igmp_group_clear(igmp_group_t **group)
void igmp_proxy_device_mfib_path_add_del(igmp_group_t *group, u8 add)
IGMP group A multicast group address for which reception has been requested.
#define pool_put(P, E)
Free an object E in pool P.
dpo_proto_t frp_proto
The protocol of the address below.
igmp_config_t * igmp_config_lookup(u32 sw_if_index)
igmp config lookup
u32 config
The pool index of the config object this group is in.
igmp_proxy_device_t * igmp_proxy_device_lookup(u32 vrf_id)
void mfib_table_lock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Release a reference counting lock on the table.
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.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
igmp_group_t * igmp_group_get(u32 index)
u32 igmp_src_index(igmp_src_t *src)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define FOR_EACH_SRC(_src, _group, _filter, _body)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
igmp_group_t * igmp_group_lookup(igmp_config_t *config, const igmp_key_t *key)
igmp group lookup
u32 proxy_device_id
ID of a proxy device this configuration is on.
static void igmp_proxy_device_merge_src(igmp_group_t **proxy_group, igmp_src_t *src, ip46_address_t **srcaddrs, u8 block)
#define hash_set_mem(h, key, value)
mfib_table_t * mfib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
void igmp_src_free(igmp_src_t *src)
u8 * referance_by_config_index
Tells us which configurations have this source.
#define ALWAYS_ASSERT(truth)
fib_protocol_t fp_proto
protocol type
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
void mfib_table_unlock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Take a reference counting lock on the table.
#define vec_search(v, E)
Search a vector for the index of the entry that matches.
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)
int igmp_proxy_device_add_del(u32 vrf_id, u32 sw_if_index, u8 add)
IGMP proxy device add/del.
#define vec_free(V)
Free vector's memory (no header).
int igmp_proxy_device_add_del_interface(u32 vrf_id, u32 sw_if_index, u8 add)
IGMP proxy device add/del interface.
igmp_key_t * key
The group's key within the per-interface config.
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
void igmp_pkt_report_v3_send(igmp_pkt_build_report_t *br)
A representation of a path as described by a route producer.
#define vec_foreach(var, vec)
Vector iterator.
void igmp_pkt_build_report_init(igmp_pkt_build_report_t *br, u32 sw_if_index)
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.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
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)
Add n paths to an entry (aka route) in the FIB.
igmp_filter_mode_t router_filter_mode
The current filter mode of the group (see 6.2.1)
void igmp_proxy_device_merge_config(igmp_config_t *config, u8 block)
igmp_group_t * igmp_group_alloc(igmp_config_t *config, const igmp_key_t *gkey, igmp_filter_mode_t mode)
igmp_key_t * key
The source's key.
void igmp_clear_config(igmp_config_t *config)
igmp clear config
vl_api_interface_index_t sw_if_index
#define vec_del1(v, i)
Delete the element at index I.
collection of data related to IGMP
void igmp_proxy_device_block_src(igmp_config_t *config, igmp_group_t *group, igmp_src_t *src)
igmp_src_t * igmp_src_alloc(u32 group_index, const igmp_key_t *skey, igmp_mode_t mode)