42 b->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
43 b->
flags |= VLIB_BUFFER_IS_TRACED;
101 option[0] = 0x80 | 20;
103 option[2] = option[3] = 0;
124 report->
header.
type = IGMP_TYPE_membership_report_v3;
228 const ip46_address_t * grp,
281 const ip46_address_t * grp,
283 const ip46_address_t *
src)
310 const ip46_address_t * grp,
311 const ip46_address_t * srcs,
315 const ip46_address_t *s;
330 if (
NULL == igmp_group)
338 if (
NULL == igmp_group)
388 if (
NULL == igmp_group)
394 IGMP_DBG (
" ..add-group: %U srcs:%d",
429 query->
header.
type = IGMP_TYPE_membership_query;
450 const ip46_address_t * srcs)
467 const ip46_address_t *
src;
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
igmp_membership_group_v3_type_t type
#define vec_foreach_index(var, v)
Iterate over vector indices.
void igmp_pkt_query_v3_send(igmp_pkt_build_query_t *bq)
vnet_main_t * vnet_get_main(void)
ip4_address_t src_addresses[0]
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
#define clib_memcpy_fast(a, b, c)
static void vlib_buffer_append(vlib_buffer_t *b, uword l)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
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)
u16 current_length
Nbytes between current data and the end of this buffer.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
typedef igmp_group
Used by a 'host' to enable the reception/listening of packets for a specific multicast group...
igmp_membership_group_v3_type_t
ip_lookup_main_t lookup_main
static u32 vnet_sw_interface_get_mtu(vnet_main_t *vnm, u32 sw_if_index, vnet_mtu_t af)
#define IGMP_GENERAL_QUERY_ADDRESS
General Query address - 224.0.0.1 Membership Report address - 224.0.0.22 SSM default range 232/8...
format_function_t format_vnet_sw_if_index_name
void igmp_pkt_build_report_init(igmp_pkt_build_report_t *br, u32 sw_if_index)
vlib_node_registration_t ip4_rewrite_mcast_node
(constructor) VLIB_REGISTER_NODE (ip4_rewrite_mcast_node)
enum igmp_msg_type_t_ igmp_msg_type_t
vl_api_interface_index_t sw_if_index
static vlib_buffer_t * igmp_pkt_build_ip_header(igmp_pkt_build_t *bk, igmp_msg_type_t msg_type, const igmp_group_t *group)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
static vlib_buffer_t * igmp_pkt_build_report_get_active(igmp_pkt_build_report_t *br)
void igmp_pkt_report_v3_send(igmp_pkt_build_report_t *br)
vl_api_fib_path_type_t type
igmp_config_t * igmp_config_lookup(u32 sw_if_index)
igmp config lookup
static void igmp_pkt_build_query_bake(igmp_pkt_build_query_t *bq)
static vlib_buffer_t * igmp_pkt_build_query_get_active(igmp_pkt_build_query_t *bq)
#define IGMP_MEMBERSHIP_REPORT_ADDRESS
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static vlib_buffer_t * igmp_pkt_get_buffer(igmp_pkt_build_t *bk)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static void igmp_pkt_tx(igmp_pkt_build_t *bk)
format_function_t format_ip46_address
static igmp_membership_group_v3_t * igmp_pkt_report_v3_append_src(igmp_pkt_build_report_t *br, igmp_membership_group_v3_t *igmp_group, const ip46_address_t *grp, igmp_membership_group_v3_type_t type, const ip46_address_t *src)
4.2.16 " If the set of Group Records required in a Report does not fit within the size limit of a sin...
#define vec_free(V)
Free vector's memory (no header).
static u32 igmp_pkt_report_v3_get_size(const igmp_group_t *group)
void igmp_pkt_query_v3_add_group(igmp_pkt_build_query_t *bq, const igmp_group_t *group, const ip46_address_t *srcs)
static vlib_buffer_t * igmp_pkt_build_query_v3(igmp_pkt_build_query_t *bq, const igmp_group_t *group)
static uword hash_elts(void *v)
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)
static vlib_buffer_t * igmp_pkt_build_report_v3(igmp_pkt_build_report_t *br, const igmp_group_t *group)
ip4_address_t group_address
static igmp_membership_group_v3_t * igmp_pkt_report_v3_append_group(igmp_pkt_build_report_t *br, const ip46_address_t *grp, igmp_membership_group_v3_type_t type)
static vlib_main_t * vlib_get_main(void)
igmp_filter_mode_t router_filter_mode
The current filter mode of the group (see 6.2.1)
IGMP interface configuration.
static void igmp_pkt_build_report_bake(igmp_pkt_build_report_t *br)
#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.
#define VLIB_BUFFER_TRACE_TRAJECTORY_INIT(b)
IGMP group A multicast group address for which reception has been requested.
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
igmp_key_t * key
The source's key.
void igmp_pkt_build_query_init(igmp_pkt_build_query_t *bq, u32 sw_if_index)
ip4_address_t src_addresses[0]
ip4_main_t ip4_main
Global ip4 main structure.
#define vec_foreach(var, vec)
Vector iterator.
uword * igmp_src_by_key[IGMP_N_FILTER_MODES]
Source list per-filter mode.
static u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
static int ip4_src_address_for_packet(ip_lookup_main_t *lm, u32 sw_if_index, ip4_address_t *src)
static ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static u16 ip4_header_checksum(ip4_header_t *i)
IGMP source The representation of a specified source address with in multicast group.
static u16 ip_csum_fold(ip_csum_t c)
ip4_address_t group_address