diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2018-06-28 12:27:52 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-06-29 10:00:17 +0000 |
commit | 91ce84374167e2b23557aae4a2472acfc6fa7c09 (patch) | |
tree | 91aca00b828464ca5e601ef6ceb62ca38f80532f /src/plugins/igmp/igmp.h | |
parent | e95d1a1a081e96989740eb1b46ed83ffb6fa0cc0 (diff) |
igmp: bugfix and minor improvements
Change-Id: I8d284117a668dc55c06a6d68fe358a3d7e26c738
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/plugins/igmp/igmp.h')
-rw-r--r-- | src/plugins/igmp/igmp.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/plugins/igmp/igmp.h b/src/plugins/igmp/igmp.h index 4f197d99bdd..b8759ffa3b1 100644 --- a/src/plugins/igmp/igmp.h +++ b/src/plugins/igmp/igmp.h @@ -40,11 +40,23 @@ /** General Query address - 224.0.0.1 */ #define IGMP_GENERAL_QUERY_ADDRESS (0xE0000001) /** Membership Report address - 224.0.0.22 */ -#define IGMP_MEMBERSHIP_REPORT_ADDRESS (0xE0000016) +#define IGMP_MEMBERSHIP_REPORT_ADDRESS (0xE0000016) /** helper macro to get igmp mebership group from pointer plus offset */ #define group_ptr(p, l) ((igmp_membership_group_v3_t *)((char*)p + l)) +#define foreach_igmp_config_flag \ + _(0, QUERY_RESP_RECVED, "query_response_received") \ + _(1, CAN_SEND_REPORT, "can_send_report") \ + _(2, CLI_API_CONFIGURED, "cli/api") + +typedef enum +{ +#define _(a,b,c) IGMP_CONFIG_FLAG_##b = (1 << a), + foreach_igmp_config_flag +#undef _ +} igmp_config_flag_t; + enum { IGMP_PROCESS_EVENT_UPDATE_TIMER = 1, @@ -133,7 +145,6 @@ typedef struct igmp_group_t_ /** \brief igmp configuration @param sw_if_index - interface sw_if_index @param adj_index - adjacency index - @param cli_api_configured - if zero, an igmp report was received @param next_create_msg - specify next igmp message @param igmp_ver - igmp version @param robustness_var - robustness variable @@ -147,8 +158,6 @@ typedef struct igmp_config_t_ adj_index_t adj_index; - u8 cli_api_configured; - create_msg_t *next_create_msg; igmp_ver_t igmp_ver; @@ -156,8 +165,6 @@ typedef struct igmp_config_t_ u8 robustness_var; u8 flags; -#define IGMP_CONFIG_FLAG_QUERY_RESP_RECVED (1 << 0) -#define IGMP_CONFIG_FLAG_CAN_SEND_REPORT (1 << 1) uword *igmp_group_by_key; @@ -207,8 +214,6 @@ typedef struct igmp_main_t_ igmp_config_t *configs; - u32 **buffers; - igmp_timer_t *timers; igmp_type_info_t *type_infos; @@ -256,15 +261,14 @@ extern vlib_node_registration_t igmp_parse_report_node; @param sw_if_index - interface sw_if_index @param saddr - source address @param gaddr - group address - @param cli_api_configured - if zero, an igmp report has been received on interface + @param flags - igmp configuration flags Add/del (S,G) on an interface. If user configured, send a status change report from the interface. If a report was received on interface notify registered api clients. */ int igmp_listen (vlib_main_t * vm, u8 enable, u32 sw_if_index, - ip46_address_t saddr, ip46_address_t gaddr, - u8 cli_api_configured); + ip46_address_t saddr, ip46_address_t gaddr, u8 flags); /** \brief igmp clear config @param config - igmp configuration |