FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
igmp_api.h
Go to the documentation of this file.
1 /*
2  *------------------------------------------------------------------
3  * Copyright (c) 2017 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *------------------------------------------------------------------
16  */
17 
18 #ifndef _IGMP_API_H_
19 #define _IGMP_API_H_
20 
21 #include <vlib/vlib.h>
22 #include <vnet/ip/ip.h>
23 
24 /**
25  * @brief IGMP interface enable/disable
26  * Called by a router to enable/disable the reception of IGMP messages
27  * @param sw_if_index - Interface
28  * @param enable - enable/disable
29  * @param mode - Host (1) or router (0)
30  */
31 int igmp_enable_disable (u32 sw_if_index, u8 enable, u8 mode);
32 
33 /**
34  * @brief igmp listen (RFC3376 Section 2).
35  * @param vm - vlib main
36  * @param enable - 0 == remove (S,G), else add (S,G), aka. include/exclue
37  * @param sw_if_index - interface sw_if_index
38  * @param saddr - source address
39  * @param gaddr - group address
40  * @param cli_api_configured - if zero, an igmp report has been received on interface
41  *
42  * Add/del (S,G) on an interface. If user configured,
43  * send a status change report from the interface.
44  * If a report was received on interface notify registered api clients.
45  */
46 int igmp_listen (vlib_main_t * vm, u8 enable, u32 sw_if_index,
47  const ip46_address_t * saddr, const ip46_address_t * gaddr);
48 
49 
50 #endif /* _IGMP_API_H_ */
51 
52 /*
53  * fd.io coding-style-patch-verification: ON
54  *
55  * Local Variables:
56  * eval: (c-set-style "gnu")
57  * End:
58  */
unsigned char u8
Definition: types.h:56
u32 sw_if_index
Definition: vxlan_gbp.api:39
unsigned int u32
Definition: types.h:88
int igmp_listen(vlib_main_t *vm, u8 enable, u32 sw_if_index, const ip46_address_t *saddr, const ip46_address_t *gaddr)
igmp listen (RFC3376 Section 2).
vlib_main_t * vm
Definition: buffer.c:294
int igmp_enable_disable(u32 sw_if_index, u8 enable, u8 mode)
IGMP interface enable/disable Called by a router to enable/disable the reception of IGMP messages...