|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
42 b->
flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
43 b->
flags |= VLIB_BUFFER_IS_TRACED;
74 ip4->ip_version_and_header_length = 0x46;
76 ip4->protocol = IP_PROTOCOL_IGMP;
100 option[0] = 0x80 | 20;
102 option[2] = option[3] = 0;
123 report->
header.
type = IGMP_TYPE_membership_report_v3;
227 const ip46_address_t * grp,
253 igmp_group->group_address.as_u32 = grp->ip4.as_u32;
280 const ip46_address_t * grp,
282 const ip46_address_t *
src)
309 const ip46_address_t * grp,
310 const ip46_address_t * srcs,
314 const ip46_address_t *s;
393 IGMP_DBG (
" ..add-group: %U srcs:%d",
428 query->
header.
type = IGMP_TYPE_membership_query;
449 const ip46_address_t * srcs)
466 const ip46_address_t *
src;
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)
IGMP source The representation of a specified source address with in multicast group.
#define IGMP_MEMBERSHIP_REPORT_ADDRESS
static void igmp_pkt_build_report_bake(igmp_pkt_build_report_t *br)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
void igmp_pkt_query_v3_add_group(igmp_pkt_build_query_t *bq, const igmp_group_t *group, const ip46_address_t *srcs)
IGMP interface configuration.
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_pkt_query_v3_send(igmp_pkt_build_query_t *bq)
static uword hash_elts(void *v)
IGMP group A multicast group address for which reception has been requested.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
igmp_config_t * igmp_config_lookup(u32 sw_if_index)
igmp config lookup
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
enum igmp_msg_type_t_ igmp_msg_type_t
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
vlib_node_registration_t ip4_rewrite_mcast_node
(constructor) VLIB_REGISTER_NODE (ip4_rewrite_mcast_node)
static vlib_buffer_t * igmp_pkt_build_query_v3(igmp_pkt_build_query_t *bq, const igmp_group_t *group)
void igmp_pkt_build_query_init(igmp_pkt_build_query_t *bq, u32 sw_if_index)
i16 current_data
signed offset in data[], pre_data[] that we are currently processing.
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
ip4_address_t src_addresses[0]
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static void igmp_pkt_tx(igmp_pkt_build_t *bk)
#define FOR_EACH_SRC(_src, _group, _filter, _body)
static __clib_warn_unused_result u32 vlib_buffer_alloc(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Allocate buffers into supplied array.
#define IGMP_GENERAL_QUERY_ADDRESS
General Query address - 224.0.0.1 Membership Report address - 224.0.0.22 SSM default range 232/8.
vnet_main_t * vnet_get_main(void)
static ip_csum_t ip_incremental_checksum(ip_csum_t sum, void *_data, uword n_bytes)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
igmp_membership_group_v3_type_t
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)
#define vec_foreach_index(var, v)
Iterate over vector indices.
static u32 vnet_sw_interface_get_mtu(vnet_main_t *vnm, u32 sw_if_index, vnet_mtu_t af)
static vlib_buffer_t * igmp_pkt_get_buffer(igmp_pkt_build_t *bk)
u16 current_length
Nbytes between current data and the end of this buffer.
#define vec_free(V)
Free vector's memory (no header).
bool fib_sas4_get(u32 sw_if_index, const ip4_address_t *dst, ip4_address_t *src)
Get an IPv4 Source address to use in a packet being sent out an interface.
igmp_key_t * key
The group's key within the per-interface config.
format_function_t format_vnet_sw_if_index_name
format_function_t format_ip46_address
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)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static vlib_buffer_t * igmp_pkt_build_report_v3(igmp_pkt_build_report_t *br, const igmp_group_t *group)
static vlib_main_t * vlib_get_main(void)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
static u16 ip4_header_checksum(ip4_header_t *i)
static void vlib_buffer_append(vlib_buffer_t *b, uword l)
igmp_filter_mode_t router_filter_mode
The current filter mode of the group (see 6.2.1)
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...
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_buffer_t * igmp_pkt_build_report_get_active(igmp_pkt_build_report_t *br)
typedef igmp_group
Used by a 'host' to enable the reception/listening of packets for a specific multicast group.
static u32 igmp_pkt_report_v3_get_size(const igmp_group_t *group)
static void igmp_pkt_build_query_bake(igmp_pkt_build_query_t *bq)
vl_api_interface_index_t sw_if_index
static u16 ip_csum_fold(ip_csum_t c)
static vlib_buffer_t * igmp_pkt_build_query_get_active(igmp_pkt_build_query_t *bq)
vl_api_fib_path_type_t type
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
VLIB buffer representation.
uword * igmp_src_by_key[IGMP_N_FILTER_MODES]
Source list per-filter mode.