558d533bd9c4a933ac2613219189bc06d6c38d39
[govpp.git] / binapi / igmp / igmp.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package igmp contains generated bindings for API file igmp.api.
7 //
8 // Contents:
9 //   2 enums
10 //   2 structs
11 //  19 messages
12 //
13 package igmp
14
15 import (
16         "strconv"
17
18         api "git.fd.io/govpp.git/api"
19         interface_types "git.fd.io/govpp.git/binapi/interface_types"
20         ip_types "git.fd.io/govpp.git/binapi/ip_types"
21         codec "git.fd.io/govpp.git/codec"
22 )
23
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
29
30 const (
31         APIFile    = "igmp"
32         APIVersion = "1.0.0"
33         VersionCrc = 0x290eccf8
34 )
35
36 // FilterMode defines enum 'filter_mode'.
37 type FilterMode uint32
38
39 const (
40         EXCLUDE FilterMode = 0
41         INCLUDE FilterMode = 1
42 )
43
44 var (
45         FilterMode_name = map[uint32]string{
46                 0: "EXCLUDE",
47                 1: "INCLUDE",
48         }
49         FilterMode_value = map[string]uint32{
50                 "EXCLUDE": 0,
51                 "INCLUDE": 1,
52         }
53 )
54
55 func (x FilterMode) String() string {
56         s, ok := FilterMode_name[uint32(x)]
57         if ok {
58                 return s
59         }
60         return "FilterMode(" + strconv.Itoa(int(x)) + ")"
61 }
62
63 // GroupPrefixType defines enum 'group_prefix_type'.
64 type GroupPrefixType uint32
65
66 const (
67         ASM GroupPrefixType = 0
68         SSM GroupPrefixType = 1
69 )
70
71 var (
72         GroupPrefixType_name = map[uint32]string{
73                 0: "ASM",
74                 1: "SSM",
75         }
76         GroupPrefixType_value = map[string]uint32{
77                 "ASM": 0,
78                 "SSM": 1,
79         }
80 )
81
82 func (x GroupPrefixType) String() string {
83         s, ok := GroupPrefixType_name[uint32(x)]
84         if ok {
85                 return s
86         }
87         return "GroupPrefixType(" + strconv.Itoa(int(x)) + ")"
88 }
89
90 // GroupPrefix defines type 'group_prefix'.
91 type GroupPrefix struct {
92         Type   GroupPrefixType `binapi:"group_prefix_type,name=type" json:"type,omitempty"`
93         Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
94 }
95
96 // IgmpGroup defines type 'igmp_group'.
97 type IgmpGroup struct {
98         Filter    FilterMode                     `binapi:"filter_mode,name=filter" json:"filter,omitempty"`
99         NSrcs     uint8                          `binapi:"u8,name=n_srcs" json:"-"`
100         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
101         Gaddr     ip_types.IP4Address            `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
102         Saddrs    []ip_types.IP4Address          `binapi:"ip4_address[n_srcs],name=saddrs" json:"saddrs,omitempty"`
103 }
104
105 // IgmpClearInterface defines message 'igmp_clear_interface'.
106 type IgmpClearInterface struct {
107         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
108 }
109
110 func (m *IgmpClearInterface) Reset()               { *m = IgmpClearInterface{} }
111 func (*IgmpClearInterface) GetMessageName() string { return "igmp_clear_interface" }
112 func (*IgmpClearInterface) GetCrcString() string   { return "f9e6675e" }
113 func (*IgmpClearInterface) GetMessageType() api.MessageType {
114         return api.RequestMessage
115 }
116
117 func (m *IgmpClearInterface) Size() (size int) {
118         if m == nil {
119                 return 0
120         }
121         size += 4 // m.SwIfIndex
122         return size
123 }
124 func (m *IgmpClearInterface) Marshal(b []byte) ([]byte, error) {
125         if b == nil {
126                 b = make([]byte, m.Size())
127         }
128         buf := codec.NewBuffer(b)
129         buf.EncodeUint32(uint32(m.SwIfIndex))
130         return buf.Bytes(), nil
131 }
132 func (m *IgmpClearInterface) Unmarshal(b []byte) error {
133         buf := codec.NewBuffer(b)
134         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
135         return nil
136 }
137
138 // IgmpClearInterfaceReply defines message 'igmp_clear_interface_reply'.
139 type IgmpClearInterfaceReply struct {
140         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
141 }
142
143 func (m *IgmpClearInterfaceReply) Reset()               { *m = IgmpClearInterfaceReply{} }
144 func (*IgmpClearInterfaceReply) GetMessageName() string { return "igmp_clear_interface_reply" }
145 func (*IgmpClearInterfaceReply) GetCrcString() string   { return "e8d4e804" }
146 func (*IgmpClearInterfaceReply) GetMessageType() api.MessageType {
147         return api.ReplyMessage
148 }
149
150 func (m *IgmpClearInterfaceReply) Size() (size int) {
151         if m == nil {
152                 return 0
153         }
154         size += 4 // m.Retval
155         return size
156 }
157 func (m *IgmpClearInterfaceReply) Marshal(b []byte) ([]byte, error) {
158         if b == nil {
159                 b = make([]byte, m.Size())
160         }
161         buf := codec.NewBuffer(b)
162         buf.EncodeInt32(m.Retval)
163         return buf.Bytes(), nil
164 }
165 func (m *IgmpClearInterfaceReply) Unmarshal(b []byte) error {
166         buf := codec.NewBuffer(b)
167         m.Retval = buf.DecodeInt32()
168         return nil
169 }
170
171 // IgmpDetails defines message 'igmp_details'.
172 type IgmpDetails struct {
173         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
174         Saddr     ip_types.IP4Address            `binapi:"ip4_address,name=saddr" json:"saddr,omitempty"`
175         Gaddr     ip_types.IP4Address            `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
176 }
177
178 func (m *IgmpDetails) Reset()               { *m = IgmpDetails{} }
179 func (*IgmpDetails) GetMessageName() string { return "igmp_details" }
180 func (*IgmpDetails) GetCrcString() string   { return "52f12a89" }
181 func (*IgmpDetails) GetMessageType() api.MessageType {
182         return api.ReplyMessage
183 }
184
185 func (m *IgmpDetails) Size() (size int) {
186         if m == nil {
187                 return 0
188         }
189         size += 4     // m.SwIfIndex
190         size += 1 * 4 // m.Saddr
191         size += 1 * 4 // m.Gaddr
192         return size
193 }
194 func (m *IgmpDetails) Marshal(b []byte) ([]byte, error) {
195         if b == nil {
196                 b = make([]byte, m.Size())
197         }
198         buf := codec.NewBuffer(b)
199         buf.EncodeUint32(uint32(m.SwIfIndex))
200         buf.EncodeBytes(m.Saddr[:], 4)
201         buf.EncodeBytes(m.Gaddr[:], 4)
202         return buf.Bytes(), nil
203 }
204 func (m *IgmpDetails) Unmarshal(b []byte) error {
205         buf := codec.NewBuffer(b)
206         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
207         copy(m.Saddr[:], buf.DecodeBytes(4))
208         copy(m.Gaddr[:], buf.DecodeBytes(4))
209         return nil
210 }
211
212 // IgmpDump defines message 'igmp_dump'.
213 type IgmpDump struct {
214         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
215 }
216
217 func (m *IgmpDump) Reset()               { *m = IgmpDump{} }
218 func (*IgmpDump) GetMessageName() string { return "igmp_dump" }
219 func (*IgmpDump) GetCrcString() string   { return "f9e6675e" }
220 func (*IgmpDump) GetMessageType() api.MessageType {
221         return api.RequestMessage
222 }
223
224 func (m *IgmpDump) Size() (size int) {
225         if m == nil {
226                 return 0
227         }
228         size += 4 // m.SwIfIndex
229         return size
230 }
231 func (m *IgmpDump) Marshal(b []byte) ([]byte, error) {
232         if b == nil {
233                 b = make([]byte, m.Size())
234         }
235         buf := codec.NewBuffer(b)
236         buf.EncodeUint32(uint32(m.SwIfIndex))
237         return buf.Bytes(), nil
238 }
239 func (m *IgmpDump) Unmarshal(b []byte) error {
240         buf := codec.NewBuffer(b)
241         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
242         return nil
243 }
244
245 // IgmpEnableDisable defines message 'igmp_enable_disable'.
246 type IgmpEnableDisable struct {
247         Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
248         Mode      uint8                          `binapi:"u8,name=mode" json:"mode,omitempty"`
249         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
250 }
251
252 func (m *IgmpEnableDisable) Reset()               { *m = IgmpEnableDisable{} }
253 func (*IgmpEnableDisable) GetMessageName() string { return "igmp_enable_disable" }
254 func (*IgmpEnableDisable) GetCrcString() string   { return "b1edfb96" }
255 func (*IgmpEnableDisable) GetMessageType() api.MessageType {
256         return api.RequestMessage
257 }
258
259 func (m *IgmpEnableDisable) Size() (size int) {
260         if m == nil {
261                 return 0
262         }
263         size += 1 // m.Enable
264         size += 1 // m.Mode
265         size += 4 // m.SwIfIndex
266         return size
267 }
268 func (m *IgmpEnableDisable) Marshal(b []byte) ([]byte, error) {
269         if b == nil {
270                 b = make([]byte, m.Size())
271         }
272         buf := codec.NewBuffer(b)
273         buf.EncodeBool(m.Enable)
274         buf.EncodeUint8(m.Mode)
275         buf.EncodeUint32(uint32(m.SwIfIndex))
276         return buf.Bytes(), nil
277 }
278 func (m *IgmpEnableDisable) Unmarshal(b []byte) error {
279         buf := codec.NewBuffer(b)
280         m.Enable = buf.DecodeBool()
281         m.Mode = buf.DecodeUint8()
282         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
283         return nil
284 }
285
286 // IgmpEnableDisableReply defines message 'igmp_enable_disable_reply'.
287 type IgmpEnableDisableReply struct {
288         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
289 }
290
291 func (m *IgmpEnableDisableReply) Reset()               { *m = IgmpEnableDisableReply{} }
292 func (*IgmpEnableDisableReply) GetMessageName() string { return "igmp_enable_disable_reply" }
293 func (*IgmpEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
294 func (*IgmpEnableDisableReply) GetMessageType() api.MessageType {
295         return api.ReplyMessage
296 }
297
298 func (m *IgmpEnableDisableReply) Size() (size int) {
299         if m == nil {
300                 return 0
301         }
302         size += 4 // m.Retval
303         return size
304 }
305 func (m *IgmpEnableDisableReply) Marshal(b []byte) ([]byte, error) {
306         if b == nil {
307                 b = make([]byte, m.Size())
308         }
309         buf := codec.NewBuffer(b)
310         buf.EncodeInt32(m.Retval)
311         return buf.Bytes(), nil
312 }
313 func (m *IgmpEnableDisableReply) Unmarshal(b []byte) error {
314         buf := codec.NewBuffer(b)
315         m.Retval = buf.DecodeInt32()
316         return nil
317 }
318
319 // IgmpEvent defines message 'igmp_event'.
320 type IgmpEvent struct {
321         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
322         Filter    FilterMode                     `binapi:"filter_mode,name=filter" json:"filter,omitempty"`
323         Saddr     ip_types.IP4Address            `binapi:"ip4_address,name=saddr" json:"saddr,omitempty"`
324         Gaddr     ip_types.IP4Address            `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
325 }
326
327 func (m *IgmpEvent) Reset()               { *m = IgmpEvent{} }
328 func (*IgmpEvent) GetMessageName() string { return "igmp_event" }
329 func (*IgmpEvent) GetCrcString() string   { return "d7696eaf" }
330 func (*IgmpEvent) GetMessageType() api.MessageType {
331         return api.OtherMessage
332 }
333
334 func (m *IgmpEvent) Size() (size int) {
335         if m == nil {
336                 return 0
337         }
338         size += 4     // m.SwIfIndex
339         size += 4     // m.Filter
340         size += 1 * 4 // m.Saddr
341         size += 1 * 4 // m.Gaddr
342         return size
343 }
344 func (m *IgmpEvent) Marshal(b []byte) ([]byte, error) {
345         if b == nil {
346                 b = make([]byte, m.Size())
347         }
348         buf := codec.NewBuffer(b)
349         buf.EncodeUint32(uint32(m.SwIfIndex))
350         buf.EncodeUint32(uint32(m.Filter))
351         buf.EncodeBytes(m.Saddr[:], 4)
352         buf.EncodeBytes(m.Gaddr[:], 4)
353         return buf.Bytes(), nil
354 }
355 func (m *IgmpEvent) Unmarshal(b []byte) error {
356         buf := codec.NewBuffer(b)
357         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
358         m.Filter = FilterMode(buf.DecodeUint32())
359         copy(m.Saddr[:], buf.DecodeBytes(4))
360         copy(m.Gaddr[:], buf.DecodeBytes(4))
361         return nil
362 }
363
364 // IgmpGroupPrefixDetails defines message 'igmp_group_prefix_details'.
365 type IgmpGroupPrefixDetails struct {
366         Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
367 }
368
369 func (m *IgmpGroupPrefixDetails) Reset()               { *m = IgmpGroupPrefixDetails{} }
370 func (*IgmpGroupPrefixDetails) GetMessageName() string { return "igmp_group_prefix_details" }
371 func (*IgmpGroupPrefixDetails) GetCrcString() string   { return "c3b3c526" }
372 func (*IgmpGroupPrefixDetails) GetMessageType() api.MessageType {
373         return api.ReplyMessage
374 }
375
376 func (m *IgmpGroupPrefixDetails) Size() (size int) {
377         if m == nil {
378                 return 0
379         }
380         size += 4      // m.Gp.Type
381         size += 1      // m.Gp.Prefix.Address.Af
382         size += 1 * 16 // m.Gp.Prefix.Address.Un
383         size += 1      // m.Gp.Prefix.Len
384         return size
385 }
386 func (m *IgmpGroupPrefixDetails) Marshal(b []byte) ([]byte, error) {
387         if b == nil {
388                 b = make([]byte, m.Size())
389         }
390         buf := codec.NewBuffer(b)
391         buf.EncodeUint32(uint32(m.Gp.Type))
392         buf.EncodeUint8(uint8(m.Gp.Prefix.Address.Af))
393         buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 16)
394         buf.EncodeUint8(m.Gp.Prefix.Len)
395         return buf.Bytes(), nil
396 }
397 func (m *IgmpGroupPrefixDetails) Unmarshal(b []byte) error {
398         buf := codec.NewBuffer(b)
399         m.Gp.Type = GroupPrefixType(buf.DecodeUint32())
400         m.Gp.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
401         copy(m.Gp.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
402         m.Gp.Prefix.Len = buf.DecodeUint8()
403         return nil
404 }
405
406 // IgmpGroupPrefixDump defines message 'igmp_group_prefix_dump'.
407 type IgmpGroupPrefixDump struct{}
408
409 func (m *IgmpGroupPrefixDump) Reset()               { *m = IgmpGroupPrefixDump{} }
410 func (*IgmpGroupPrefixDump) GetMessageName() string { return "igmp_group_prefix_dump" }
411 func (*IgmpGroupPrefixDump) GetCrcString() string   { return "51077d14" }
412 func (*IgmpGroupPrefixDump) GetMessageType() api.MessageType {
413         return api.RequestMessage
414 }
415
416 func (m *IgmpGroupPrefixDump) Size() (size int) {
417         if m == nil {
418                 return 0
419         }
420         return size
421 }
422 func (m *IgmpGroupPrefixDump) Marshal(b []byte) ([]byte, error) {
423         if b == nil {
424                 b = make([]byte, m.Size())
425         }
426         buf := codec.NewBuffer(b)
427         return buf.Bytes(), nil
428 }
429 func (m *IgmpGroupPrefixDump) Unmarshal(b []byte) error {
430         return nil
431 }
432
433 // IgmpGroupPrefixSet defines message 'igmp_group_prefix_set'.
434 type IgmpGroupPrefixSet struct {
435         Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
436 }
437
438 func (m *IgmpGroupPrefixSet) Reset()               { *m = IgmpGroupPrefixSet{} }
439 func (*IgmpGroupPrefixSet) GetMessageName() string { return "igmp_group_prefix_set" }
440 func (*IgmpGroupPrefixSet) GetCrcString() string   { return "d4f20ac5" }
441 func (*IgmpGroupPrefixSet) GetMessageType() api.MessageType {
442         return api.RequestMessage
443 }
444
445 func (m *IgmpGroupPrefixSet) Size() (size int) {
446         if m == nil {
447                 return 0
448         }
449         size += 4      // m.Gp.Type
450         size += 1      // m.Gp.Prefix.Address.Af
451         size += 1 * 16 // m.Gp.Prefix.Address.Un
452         size += 1      // m.Gp.Prefix.Len
453         return size
454 }
455 func (m *IgmpGroupPrefixSet) Marshal(b []byte) ([]byte, error) {
456         if b == nil {
457                 b = make([]byte, m.Size())
458         }
459         buf := codec.NewBuffer(b)
460         buf.EncodeUint32(uint32(m.Gp.Type))
461         buf.EncodeUint8(uint8(m.Gp.Prefix.Address.Af))
462         buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 16)
463         buf.EncodeUint8(m.Gp.Prefix.Len)
464         return buf.Bytes(), nil
465 }
466 func (m *IgmpGroupPrefixSet) Unmarshal(b []byte) error {
467         buf := codec.NewBuffer(b)
468         m.Gp.Type = GroupPrefixType(buf.DecodeUint32())
469         m.Gp.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
470         copy(m.Gp.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
471         m.Gp.Prefix.Len = buf.DecodeUint8()
472         return nil
473 }
474
475 // IgmpGroupPrefixSetReply defines message 'igmp_group_prefix_set_reply'.
476 type IgmpGroupPrefixSetReply struct {
477         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
478 }
479
480 func (m *IgmpGroupPrefixSetReply) Reset()               { *m = IgmpGroupPrefixSetReply{} }
481 func (*IgmpGroupPrefixSetReply) GetMessageName() string { return "igmp_group_prefix_set_reply" }
482 func (*IgmpGroupPrefixSetReply) GetCrcString() string   { return "e8d4e804" }
483 func (*IgmpGroupPrefixSetReply) GetMessageType() api.MessageType {
484         return api.ReplyMessage
485 }
486
487 func (m *IgmpGroupPrefixSetReply) Size() (size int) {
488         if m == nil {
489                 return 0
490         }
491         size += 4 // m.Retval
492         return size
493 }
494 func (m *IgmpGroupPrefixSetReply) Marshal(b []byte) ([]byte, error) {
495         if b == nil {
496                 b = make([]byte, m.Size())
497         }
498         buf := codec.NewBuffer(b)
499         buf.EncodeInt32(m.Retval)
500         return buf.Bytes(), nil
501 }
502 func (m *IgmpGroupPrefixSetReply) Unmarshal(b []byte) error {
503         buf := codec.NewBuffer(b)
504         m.Retval = buf.DecodeInt32()
505         return nil
506 }
507
508 // IgmpListen defines message 'igmp_listen'.
509 type IgmpListen struct {
510         Group IgmpGroup `binapi:"igmp_group,name=group" json:"group,omitempty"`
511 }
512
513 func (m *IgmpListen) Reset()               { *m = IgmpListen{} }
514 func (*IgmpListen) GetMessageName() string { return "igmp_listen" }
515 func (*IgmpListen) GetCrcString() string   { return "3f93a51a" }
516 func (*IgmpListen) GetMessageType() api.MessageType {
517         return api.RequestMessage
518 }
519
520 func (m *IgmpListen) Size() (size int) {
521         if m == nil {
522                 return 0
523         }
524         size += 4     // m.Group.Filter
525         size += 1     // m.Group.NSrcs
526         size += 4     // m.Group.SwIfIndex
527         size += 1 * 4 // m.Group.Gaddr
528         for j2 := 0; j2 < len(m.Group.Saddrs); j2++ {
529                 var s2 ip_types.IP4Address
530                 _ = s2
531                 if j2 < len(m.Group.Saddrs) {
532                         s2 = m.Group.Saddrs[j2]
533                 }
534                 size += 1 * 4 // s2
535         }
536         return size
537 }
538 func (m *IgmpListen) Marshal(b []byte) ([]byte, error) {
539         if b == nil {
540                 b = make([]byte, m.Size())
541         }
542         buf := codec.NewBuffer(b)
543         buf.EncodeUint32(uint32(m.Group.Filter))
544         buf.EncodeUint8(uint8(len(m.Group.Saddrs)))
545         buf.EncodeUint32(uint32(m.Group.SwIfIndex))
546         buf.EncodeBytes(m.Group.Gaddr[:], 4)
547         for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
548                 var v1 ip_types.IP4Address // Saddrs
549                 if j1 < len(m.Group.Saddrs) {
550                         v1 = m.Group.Saddrs[j1]
551                 }
552                 buf.EncodeBytes(v1[:], 4)
553         }
554         return buf.Bytes(), nil
555 }
556 func (m *IgmpListen) Unmarshal(b []byte) error {
557         buf := codec.NewBuffer(b)
558         m.Group.Filter = FilterMode(buf.DecodeUint32())
559         m.Group.NSrcs = buf.DecodeUint8()
560         m.Group.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
561         copy(m.Group.Gaddr[:], buf.DecodeBytes(4))
562         m.Group.Saddrs = make([]ip_types.IP4Address, m.Group.NSrcs)
563         for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
564                 copy(m.Group.Saddrs[j1][:], buf.DecodeBytes(4))
565         }
566         return nil
567 }
568
569 // IgmpListenReply defines message 'igmp_listen_reply'.
570 type IgmpListenReply struct {
571         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
572 }
573
574 func (m *IgmpListenReply) Reset()               { *m = IgmpListenReply{} }
575 func (*IgmpListenReply) GetMessageName() string { return "igmp_listen_reply" }
576 func (*IgmpListenReply) GetCrcString() string   { return "e8d4e804" }
577 func (*IgmpListenReply) GetMessageType() api.MessageType {
578         return api.ReplyMessage
579 }
580
581 func (m *IgmpListenReply) Size() (size int) {
582         if m == nil {
583                 return 0
584         }
585         size += 4 // m.Retval
586         return size
587 }
588 func (m *IgmpListenReply) Marshal(b []byte) ([]byte, error) {
589         if b == nil {
590                 b = make([]byte, m.Size())
591         }
592         buf := codec.NewBuffer(b)
593         buf.EncodeInt32(m.Retval)
594         return buf.Bytes(), nil
595 }
596 func (m *IgmpListenReply) Unmarshal(b []byte) error {
597         buf := codec.NewBuffer(b)
598         m.Retval = buf.DecodeInt32()
599         return nil
600 }
601
602 // IgmpProxyDeviceAddDel defines message 'igmp_proxy_device_add_del'.
603 type IgmpProxyDeviceAddDel struct {
604         Add       uint8                          `binapi:"u8,name=add" json:"add,omitempty"`
605         VrfID     uint32                         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
606         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
607 }
608
609 func (m *IgmpProxyDeviceAddDel) Reset()               { *m = IgmpProxyDeviceAddDel{} }
610 func (*IgmpProxyDeviceAddDel) GetMessageName() string { return "igmp_proxy_device_add_del" }
611 func (*IgmpProxyDeviceAddDel) GetCrcString() string   { return "0b9be9ce" }
612 func (*IgmpProxyDeviceAddDel) GetMessageType() api.MessageType {
613         return api.RequestMessage
614 }
615
616 func (m *IgmpProxyDeviceAddDel) Size() (size int) {
617         if m == nil {
618                 return 0
619         }
620         size += 1 // m.Add
621         size += 4 // m.VrfID
622         size += 4 // m.SwIfIndex
623         return size
624 }
625 func (m *IgmpProxyDeviceAddDel) Marshal(b []byte) ([]byte, error) {
626         if b == nil {
627                 b = make([]byte, m.Size())
628         }
629         buf := codec.NewBuffer(b)
630         buf.EncodeUint8(m.Add)
631         buf.EncodeUint32(m.VrfID)
632         buf.EncodeUint32(uint32(m.SwIfIndex))
633         return buf.Bytes(), nil
634 }
635 func (m *IgmpProxyDeviceAddDel) Unmarshal(b []byte) error {
636         buf := codec.NewBuffer(b)
637         m.Add = buf.DecodeUint8()
638         m.VrfID = buf.DecodeUint32()
639         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
640         return nil
641 }
642
643 // IgmpProxyDeviceAddDelInterface defines message 'igmp_proxy_device_add_del_interface'.
644 type IgmpProxyDeviceAddDelInterface struct {
645         Add       bool                           `binapi:"bool,name=add" json:"add,omitempty"`
646         VrfID     uint32                         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
647         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
648 }
649
650 func (m *IgmpProxyDeviceAddDelInterface) Reset() { *m = IgmpProxyDeviceAddDelInterface{} }
651 func (*IgmpProxyDeviceAddDelInterface) GetMessageName() string {
652         return "igmp_proxy_device_add_del_interface"
653 }
654 func (*IgmpProxyDeviceAddDelInterface) GetCrcString() string { return "1a9ec24a" }
655 func (*IgmpProxyDeviceAddDelInterface) GetMessageType() api.MessageType {
656         return api.RequestMessage
657 }
658
659 func (m *IgmpProxyDeviceAddDelInterface) Size() (size int) {
660         if m == nil {
661                 return 0
662         }
663         size += 1 // m.Add
664         size += 4 // m.VrfID
665         size += 4 // m.SwIfIndex
666         return size
667 }
668 func (m *IgmpProxyDeviceAddDelInterface) Marshal(b []byte) ([]byte, error) {
669         if b == nil {
670                 b = make([]byte, m.Size())
671         }
672         buf := codec.NewBuffer(b)
673         buf.EncodeBool(m.Add)
674         buf.EncodeUint32(m.VrfID)
675         buf.EncodeUint32(uint32(m.SwIfIndex))
676         return buf.Bytes(), nil
677 }
678 func (m *IgmpProxyDeviceAddDelInterface) Unmarshal(b []byte) error {
679         buf := codec.NewBuffer(b)
680         m.Add = buf.DecodeBool()
681         m.VrfID = buf.DecodeUint32()
682         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
683         return nil
684 }
685
686 // IgmpProxyDeviceAddDelInterfaceReply defines message 'igmp_proxy_device_add_del_interface_reply'.
687 type IgmpProxyDeviceAddDelInterfaceReply struct {
688         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
689 }
690
691 func (m *IgmpProxyDeviceAddDelInterfaceReply) Reset() { *m = IgmpProxyDeviceAddDelInterfaceReply{} }
692 func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageName() string {
693         return "igmp_proxy_device_add_del_interface_reply"
694 }
695 func (*IgmpProxyDeviceAddDelInterfaceReply) GetCrcString() string { return "e8d4e804" }
696 func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageType() api.MessageType {
697         return api.ReplyMessage
698 }
699
700 func (m *IgmpProxyDeviceAddDelInterfaceReply) Size() (size int) {
701         if m == nil {
702                 return 0
703         }
704         size += 4 // m.Retval
705         return size
706 }
707 func (m *IgmpProxyDeviceAddDelInterfaceReply) Marshal(b []byte) ([]byte, error) {
708         if b == nil {
709                 b = make([]byte, m.Size())
710         }
711         buf := codec.NewBuffer(b)
712         buf.EncodeInt32(m.Retval)
713         return buf.Bytes(), nil
714 }
715 func (m *IgmpProxyDeviceAddDelInterfaceReply) Unmarshal(b []byte) error {
716         buf := codec.NewBuffer(b)
717         m.Retval = buf.DecodeInt32()
718         return nil
719 }
720
721 // IgmpProxyDeviceAddDelReply defines message 'igmp_proxy_device_add_del_reply'.
722 type IgmpProxyDeviceAddDelReply struct {
723         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
724 }
725
726 func (m *IgmpProxyDeviceAddDelReply) Reset()               { *m = IgmpProxyDeviceAddDelReply{} }
727 func (*IgmpProxyDeviceAddDelReply) GetMessageName() string { return "igmp_proxy_device_add_del_reply" }
728 func (*IgmpProxyDeviceAddDelReply) GetCrcString() string   { return "e8d4e804" }
729 func (*IgmpProxyDeviceAddDelReply) GetMessageType() api.MessageType {
730         return api.ReplyMessage
731 }
732
733 func (m *IgmpProxyDeviceAddDelReply) Size() (size int) {
734         if m == nil {
735                 return 0
736         }
737         size += 4 // m.Retval
738         return size
739 }
740 func (m *IgmpProxyDeviceAddDelReply) Marshal(b []byte) ([]byte, error) {
741         if b == nil {
742                 b = make([]byte, m.Size())
743         }
744         buf := codec.NewBuffer(b)
745         buf.EncodeInt32(m.Retval)
746         return buf.Bytes(), nil
747 }
748 func (m *IgmpProxyDeviceAddDelReply) Unmarshal(b []byte) error {
749         buf := codec.NewBuffer(b)
750         m.Retval = buf.DecodeInt32()
751         return nil
752 }
753
754 // WantIgmpEvents defines message 'want_igmp_events'.
755 type WantIgmpEvents struct {
756         Enable uint32 `binapi:"u32,name=enable" json:"enable,omitempty"`
757         PID    uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
758 }
759
760 func (m *WantIgmpEvents) Reset()               { *m = WantIgmpEvents{} }
761 func (*WantIgmpEvents) GetMessageName() string { return "want_igmp_events" }
762 func (*WantIgmpEvents) GetCrcString() string   { return "cfaccc1f" }
763 func (*WantIgmpEvents) GetMessageType() api.MessageType {
764         return api.RequestMessage
765 }
766
767 func (m *WantIgmpEvents) Size() (size int) {
768         if m == nil {
769                 return 0
770         }
771         size += 4 // m.Enable
772         size += 4 // m.PID
773         return size
774 }
775 func (m *WantIgmpEvents) Marshal(b []byte) ([]byte, error) {
776         if b == nil {
777                 b = make([]byte, m.Size())
778         }
779         buf := codec.NewBuffer(b)
780         buf.EncodeUint32(m.Enable)
781         buf.EncodeUint32(m.PID)
782         return buf.Bytes(), nil
783 }
784 func (m *WantIgmpEvents) Unmarshal(b []byte) error {
785         buf := codec.NewBuffer(b)
786         m.Enable = buf.DecodeUint32()
787         m.PID = buf.DecodeUint32()
788         return nil
789 }
790
791 // WantIgmpEventsReply defines message 'want_igmp_events_reply'.
792 type WantIgmpEventsReply struct {
793         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
794 }
795
796 func (m *WantIgmpEventsReply) Reset()               { *m = WantIgmpEventsReply{} }
797 func (*WantIgmpEventsReply) GetMessageName() string { return "want_igmp_events_reply" }
798 func (*WantIgmpEventsReply) GetCrcString() string   { return "e8d4e804" }
799 func (*WantIgmpEventsReply) GetMessageType() api.MessageType {
800         return api.ReplyMessage
801 }
802
803 func (m *WantIgmpEventsReply) Size() (size int) {
804         if m == nil {
805                 return 0
806         }
807         size += 4 // m.Retval
808         return size
809 }
810 func (m *WantIgmpEventsReply) Marshal(b []byte) ([]byte, error) {
811         if b == nil {
812                 b = make([]byte, m.Size())
813         }
814         buf := codec.NewBuffer(b)
815         buf.EncodeInt32(m.Retval)
816         return buf.Bytes(), nil
817 }
818 func (m *WantIgmpEventsReply) Unmarshal(b []byte) error {
819         buf := codec.NewBuffer(b)
820         m.Retval = buf.DecodeInt32()
821         return nil
822 }
823
824 func init() { file_igmp_binapi_init() }
825 func file_igmp_binapi_init() {
826         api.RegisterMessage((*IgmpClearInterface)(nil), "igmp_clear_interface_f9e6675e")
827         api.RegisterMessage((*IgmpClearInterfaceReply)(nil), "igmp_clear_interface_reply_e8d4e804")
828         api.RegisterMessage((*IgmpDetails)(nil), "igmp_details_52f12a89")
829         api.RegisterMessage((*IgmpDump)(nil), "igmp_dump_f9e6675e")
830         api.RegisterMessage((*IgmpEnableDisable)(nil), "igmp_enable_disable_b1edfb96")
831         api.RegisterMessage((*IgmpEnableDisableReply)(nil), "igmp_enable_disable_reply_e8d4e804")
832         api.RegisterMessage((*IgmpEvent)(nil), "igmp_event_d7696eaf")
833         api.RegisterMessage((*IgmpGroupPrefixDetails)(nil), "igmp_group_prefix_details_c3b3c526")
834         api.RegisterMessage((*IgmpGroupPrefixDump)(nil), "igmp_group_prefix_dump_51077d14")
835         api.RegisterMessage((*IgmpGroupPrefixSet)(nil), "igmp_group_prefix_set_d4f20ac5")
836         api.RegisterMessage((*IgmpGroupPrefixSetReply)(nil), "igmp_group_prefix_set_reply_e8d4e804")
837         api.RegisterMessage((*IgmpListen)(nil), "igmp_listen_3f93a51a")
838         api.RegisterMessage((*IgmpListenReply)(nil), "igmp_listen_reply_e8d4e804")
839         api.RegisterMessage((*IgmpProxyDeviceAddDel)(nil), "igmp_proxy_device_add_del_0b9be9ce")
840         api.RegisterMessage((*IgmpProxyDeviceAddDelInterface)(nil), "igmp_proxy_device_add_del_interface_1a9ec24a")
841         api.RegisterMessage((*IgmpProxyDeviceAddDelInterfaceReply)(nil), "igmp_proxy_device_add_del_interface_reply_e8d4e804")
842         api.RegisterMessage((*IgmpProxyDeviceAddDelReply)(nil), "igmp_proxy_device_add_del_reply_e8d4e804")
843         api.RegisterMessage((*WantIgmpEvents)(nil), "want_igmp_events_cfaccc1f")
844         api.RegisterMessage((*WantIgmpEventsReply)(nil), "want_igmp_events_reply_e8d4e804")
845 }
846
847 // Messages returns list of all messages in this module.
848 func AllMessages() []api.Message {
849         return []api.Message{
850                 (*IgmpClearInterface)(nil),
851                 (*IgmpClearInterfaceReply)(nil),
852                 (*IgmpDetails)(nil),
853                 (*IgmpDump)(nil),
854                 (*IgmpEnableDisable)(nil),
855                 (*IgmpEnableDisableReply)(nil),
856                 (*IgmpEvent)(nil),
857                 (*IgmpGroupPrefixDetails)(nil),
858                 (*IgmpGroupPrefixDump)(nil),
859                 (*IgmpGroupPrefixSet)(nil),
860                 (*IgmpGroupPrefixSetReply)(nil),
861                 (*IgmpListen)(nil),
862                 (*IgmpListenReply)(nil),
863                 (*IgmpProxyDeviceAddDel)(nil),
864                 (*IgmpProxyDeviceAddDelInterface)(nil),
865                 (*IgmpProxyDeviceAddDelInterfaceReply)(nil),
866                 (*IgmpProxyDeviceAddDelReply)(nil),
867                 (*WantIgmpEvents)(nil),
868                 (*WantIgmpEventsReply)(nil),
869         }
870 }