IGMP plugin
[vpp.git] / src / plugins / igmp / igmp.api
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 option version = "1.0.0";
19
20 /** \brief 
21     Used by a 'host' to enable the recption/listening of packets for a specific
22     multicast group
23     @param client_index - opaque cookie to identify the sender
24     @param context - sender context, to match reply w/ request
25     @param enable - if set, enable igmp messages on configuration
26     @param sw_if_index - interface sw index
27     @param saddr - source address
28     @param gaddr - group address
29 */
30 autoreply define igmp_listen
31 {
32   u32 client_index;
33   u32 context;
34
35   u8 enable;
36   u32 sw_if_index;
37   u8 saddr[4];
38   u8 gaddr[4];
39 };
40
41 /** \brief 
42     Used by a 'router' to enable the recption of IGMP packets and the
43     construction of group state for hosts on the link
44     multicast group
45     @param client_index - opaque cookie to identify the sender
46     @param context - sender context, to match reply w/ request
47     @param enable - if set, enable igmp messages on configuration
48     @param sw_if_index - interface sw index
49 */
50 autoreply define igmp_enable_disable
51 {
52   u32 client_index;
53   u32 context;
54
55   u8 enable;
56   u32 sw_if_index;
57 };
58
59 /** \brief dump (S,G)s from interface
60     @param client_index - opaque cookie to identify the sender
61     @param context - sender context, to match reply w/ request
62     @param sw_if_index - interface sw index
63     @param dump_all - get (S,G)s from all interfaces
64 */
65 define igmp_dump
66 {
67   u32 client_index;
68   u32 context;
69
70   u32 sw_if_index;
71   u8 dump_all;
72 };
73
74 /** \brief igmp details
75     @param context - sender context, to match reply w/ request
76     @param sw_if_index - interface sw index
77     @param saddr - source address
78     @param gaddr - group address
79 */
80 define igmp_details
81 {
82   u32 context;
83
84   u32 sw_if_index;
85   u8 saddr[4];
86   u8 gaddr[4];
87 };
88
89 /** \brief remove all (S,G)s from an interface
90     @param client_index - opaque cookie to identify the sender
91     @param context - sender context, to match reply w/ request
92     @param sw_if_index - interface sw index
93 */
94 autoreply define igmp_clear_interface
95 {
96   u32 client_index;
97   u32 context;
98
99   u32 sw_if_index;
100 };
101
102 /** \brief register for igmp events
103     @param client_index - opaque cookie to identify the sender
104     @param context - sender context, to match reply w/ request
105     @param pid - sender's pid
106     @param enable - 1 enable, 0 disable igmp events
107 */
108 autoreply define want_igmp_events
109 {
110   u32 client_index;
111   u32 context;
112
113   u32 enable;
114   u32 pid;
115 };
116
117 service {
118   rpc want_igmp_events returns want_igmp_events_reply
119     events igmp_event;
120 };
121
122 /** \brief igmp event details
123     @param client_index - opaque cookie to identify the sender
124     @param context - sender context, to match reply w/ request
125     @param sw_if_index - interface sw index
126     @param saddr - source address
127     @param gaddr - group address
128     @param is_join - if set source is joining the group, else leaving
129 */
130 define igmp_event
131 {
132   u32 context;
133
134   u32 sw_if_index;
135   u8 saddr[4];
136   u8 gaddr[4];
137   u8 is_join;
138 };
139
140 /*
141  * Local Variables:
142  * eval: (c-set-style "gnu")
143  * End:
144  */