1/*
2 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
3 * Permission to use, copy, modify, and/or distribute this software for
4 * any purpose with or without fee is hereby granted, provided that the
5 * above copyright notice and this permission notice appear in all copies.
6 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
12 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13 */
14
15
16/**
17 * @defgroup shiva_igmp SHIVA_IGMP
18 * @{
19 */
20#ifndef _SHIVA_IGMP_H_
21#define _SHIVA_IGMP_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif                          /* __cplusplus */
26
27#include "fal/fal_igmp.h"
28
29    sw_error_t
30    shiva_igmp_init(a_uint32_t dev_id);
31
32#ifdef IN_IGMP
33#define SHIVA_IGMP_INIT(rv, dev_id) \
34    { \
35        rv = shiva_igmp_init(dev_id); \
36        SW_RTN_ON_ERROR(rv); \
37    }
38#else
39#define SHIVA_IGMP_INIT(rv, dev_id)
40#endif
41
42#ifdef HSL_STANDALONG
43
44    HSL_LOCAL sw_error_t
45    shiva_port_igmps_status_set(a_uint32_t dev_id, fal_port_t port_id, a_bool_t enable);
46
47
48    HSL_LOCAL sw_error_t
49    shiva_port_igmps_status_get(a_uint32_t dev_id, fal_port_t port_id, a_bool_t *enable);
50
51
52    HSL_LOCAL sw_error_t
53    shiva_igmp_mld_cmd_set(a_uint32_t dev_id, fal_fwd_cmd_t cmd);
54
55
56    HSL_LOCAL sw_error_t
57    shiva_igmp_mld_cmd_get(a_uint32_t dev_id, fal_fwd_cmd_t * cmd);
58
59
60    HSL_LOCAL sw_error_t
61    shiva_port_igmp_mld_join_set(a_uint32_t dev_id, fal_port_t port_id, a_bool_t enable);
62
63
64    HSL_LOCAL sw_error_t
65    shiva_port_igmp_mld_join_get(a_uint32_t dev_id, fal_port_t port_id, a_bool_t * enable);
66
67
68    HSL_LOCAL sw_error_t
69    shiva_port_igmp_mld_leave_set(a_uint32_t dev_id, fal_port_t port_id, a_bool_t enable);
70
71
72    HSL_LOCAL sw_error_t
73    shiva_port_igmp_mld_leave_get(a_uint32_t dev_id, fal_port_t port_id, a_bool_t * enable);
74
75
76    HSL_LOCAL sw_error_t
77    shiva_igmp_mld_rp_set(a_uint32_t dev_id, fal_pbmp_t pts);
78
79
80    HSL_LOCAL sw_error_t
81    shiva_igmp_mld_rp_get(a_uint32_t dev_id, fal_pbmp_t * pts);
82
83
84    HSL_LOCAL sw_error_t
85    shiva_igmp_mld_entry_creat_set(a_uint32_t dev_id, a_bool_t enable);
86
87
88    HSL_LOCAL sw_error_t
89    shiva_igmp_mld_entry_creat_get(a_uint32_t dev_id, a_bool_t * enable);
90
91
92    HSL_LOCAL sw_error_t
93    shiva_igmp_mld_entry_static_set(a_uint32_t dev_id, a_bool_t enable);
94
95
96    HSL_LOCAL sw_error_t
97    shiva_igmp_mld_entry_static_get(a_uint32_t dev_id, a_bool_t * enable);
98
99
100    HSL_LOCAL sw_error_t
101    shiva_igmp_mld_entry_leaky_set(a_uint32_t dev_id, a_bool_t enable);
102
103
104    HSL_LOCAL sw_error_t
105    shiva_igmp_mld_entry_leaky_get(a_uint32_t dev_id, a_bool_t * enable);
106
107
108    HSL_LOCAL sw_error_t
109    shiva_igmp_mld_entry_v3_set(a_uint32_t dev_id, a_bool_t enable);
110
111
112    HSL_LOCAL sw_error_t
113    shiva_igmp_mld_entry_v3_get(a_uint32_t dev_id, a_bool_t * enable);
114
115
116    HSL_LOCAL sw_error_t
117    shiva_igmp_mld_entry_queue_set(a_uint32_t dev_id, a_bool_t enable, a_uint32_t queue);
118
119
120    HSL_LOCAL sw_error_t
121    shiva_igmp_mld_entry_queue_get(a_uint32_t dev_id, a_bool_t * enable, a_uint32_t * queue);
122
123
124#endif
125
126#ifdef __cplusplus
127}
128#endif                          /* __cplusplus */
129
130#endif                          /* _SHIVA_IGMP_H_ */
131/**
132 * @}
133 */
134