summaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp/igmp.api
blob: 1533d666a1c91b990628c93af0fa982d109bf435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*
 *------------------------------------------------------------------
 * Copyright (c) 2017 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *------------------------------------------------------------------
 */

option version = "1.0.0";

/** \brief 
    Used by a 'host' to enable the recption/listening of packets for a specific
    multicast group
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param enable - if set, enable igmp messages on configuration
    @param sw_if_index - interface sw index
    @param saddr - source address
    @param gaddr - group address
*/
autoreply define igmp_listen
{
  u32 client_index;
  u32 context;

  u8 enable;
  u32 sw_if_index;
  u8 saddr[4];
  u8 gaddr[4];
};

/** \brief 
    Used by a 'router' to enable the recption of IGMP packets and the
    construction of group state for hosts on the link
    multicast group
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param enable - if set, enable igmp messages on configuration
    @param sw_if_index - interface sw index
*/
autoreply define igmp_enable_disable
{
  u32 client_index;
  u32 context;

  u8 enable;
  u32 sw_if_index;
};

/** \brief dump (S,G)s from interface
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - interface sw index
    @param dump_all - get (S,G)s from all interfaces
*/
define igmp_dump
{
  u32 client_index;
  u32 context;

  u32 sw_if_index;
  u8 dump_all;
};

/** \brief igmp details
    @param context - sender context, to match reply w/ request
    @param sw_if_index - interface sw index
    @param saddr - source address
    @param gaddr - group address
*/
define igmp_details
{
  u32 context;

  u32 sw_if_index;
  u8 saddr[4];
  u8 gaddr[4];
};

/** \brief remove all (S,G)s from an interface
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - interface sw index
*/
autoreply define igmp_clear_interface
{
  u32 client_index;
  u32 context;

  u32 sw_if_index;
};

/** \brief register for igmp events
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param pid - sender's pid
    @param enable - 1 enable, 0 disable igmp events
*/
autoreply define want_igmp_events
{
  u32 client_index;
  u32 context;

  u32 enable;
  u32 pid;
};

service {
  rpc want_igmp_events returns want_igmp_events_reply
    events igmp_event;
};

/** \brief igmp event details
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - interface sw index
    @param saddr - source address
    @param gaddr - group address
    @param is_join - if set source is joining the group, else leaving
*/
define igmp_event
{
  u32 context;

  u32 sw_if_index;
  u8 saddr[4];
  u8 gaddr[4];
  u8 is_join;
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */