35 #define _(n,f) case IGMP_GROUP_PREFIX_TYPE_##f: return (format (s, "%s", #f)); 39 return format (s,
"unknown:%d", type);
58 if ((~0 == pos) && (IGMP_GROUP_PREFIX_TYPE_SSM == type))
67 if ((~0 != pos) && (IGMP_GROUP_PREFIX_TYPE_ASM == type))
78 vec_add2 (igmp_group_prefixs, ssm_default, 1);
83 ssm_default->
igp_type = IGMP_GROUP_PREFIX_TYPE_SSM;
97 return (IGMP_GROUP_PREFIX_TYPE_SSM);
100 return (IGMP_GROUP_PREFIX_TYPE_ASM);
132 .path =
"show igmp ssm-ranges",
133 .short_help =
"show igmp ssm-ranges",
u8 * format_igmp_group_prefix_type(u8 *s, va_list *args)
fib_protocol_t fp_proto
protocol type
static clib_error_t * igmp_ssm_range_init(vlib_main_t *vm)
void igmp_ssm_range_walk(igmp_ssm_range_walk_t fn, void *ctx)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
static uword ip4_destination_matches_route(const ip4_main_t *im, const ip4_address_t *key, const ip4_address_t *dest, uword dest_length)
igmp_group_prefix_type_t igmp_group_prefix_get_type(const ip46_address_t *gaddr)
#define VLIB_INIT_FUNCTION(x)
u8 * format_fib_prefix(u8 *s, va_list *args)
static void igmp_ssm_range_populate(void)
Aggregate type for a prefix.
u16 fp_len
The mask length.
vl_api_fib_path_type_t type
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
#define vec_del1(v, i)
Delete the element at index I.
vl_api_ip4_address_t gaddr
#define vec_search_with_function(v, E, fn)
Search a vector for the index of the entry that matches.
void igmp_group_prefix_set(const fib_prefix_t *pfx, igmp_group_prefix_type_t type)
#define VLIB_CLI_COMMAND(x,...)
static igmp_group_prefix_t * igmp_group_prefixs
int fib_prefix_cmp(const fib_prefix_t *p1, const fib_prefix_t *p2)
Compare two prefixes for equality.
ip4_main_t ip4_main
Global ip4 main structure.
enum igmp_group_prefix_type_t_ igmp_group_prefix_type_t
#define vec_foreach(var, vec)
Vector iterator.
walk_rc_t(* igmp_ssm_range_walk_t)(const fib_prefix_t *pfx, igmp_group_prefix_type_t type, void *ctx)
static int igmp_group_prefix_cmp(const igmp_group_prefix_t *gp1, const fib_prefix_t *p)
igmp_group_prefix_type_t igp_type
struct igmp_group_prefix_t igmp_group_prefix_t
static clib_error_t * igmp_ssm_range_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)