45 b->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
46 b->
flags |= VLIB_BUFFER_IS_TRACED;
104 option[0] = 0x80 | 20;
106 option[2] = option[3] = 0;
127 report->
header.
type = IGMP_TYPE_membership_report_v3;
231 const ip46_address_t * grp,
254 igmp_group->
type = type;
284 const ip46_address_t * grp,
286 const ip46_address_t *
src)
313 const ip46_address_t * grp,
314 const ip46_address_t * srcs,
318 const ip46_address_t *s;
333 if (
NULL == igmp_group)
341 if (
NULL == igmp_group)
391 if (
NULL == igmp_group)
397 IGMP_DBG (
" ..add-group: %U srcs:%d",
432 query->
header.
type = IGMP_TYPE_membership_query;
453 const ip46_address_t * srcs)
470 const ip46_address_t *
src;
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]
#define clib_memcpy_fast(a, b, c)
static void vlib_buffer_append(vlib_buffer_t *b, uword l)
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)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
igmp_membership_group_v3_type_t
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
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
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
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)
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)
u16 current_length
Nbytes between current data and the end of this buffer.
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.
#define VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX
static void igmp_pkt_tx(igmp_pkt_build_t *bk)
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 ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
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.
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)
static void vlib_buffer_init_for_free_list(vlib_buffer_t *dst, vlib_buffer_free_list_t *fl)
ip4_address_t src_addresses[0]
ip4_main_t ip4_main
Global ip4 main structure.
#define vec_foreach(var, vec)
Vector iterator.
static vlib_buffer_free_list_t * vlib_buffer_get_free_list(vlib_main_t *vm, vlib_buffer_free_list_index_t free_list_index)
uword * igmp_src_by_key[IGMP_N_FILTER_MODES]
Source list per-filter mode.
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
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 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