1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/igmp.api.json
7 // Package igmp contains generated bindings for API file igmp.api.
17 api "git.fd.io/govpp.git/api"
18 interface_types "git.fd.io/govpp.git/binapi/interface_types"
19 ip_types "git.fd.io/govpp.git/binapi/ip_types"
20 codec "git.fd.io/govpp.git/codec"
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
33 VersionCrc = 0x290eccf8
36 // FilterMode defines enum 'filter_mode'.
37 type FilterMode uint32
40 EXCLUDE FilterMode = 0
41 INCLUDE FilterMode = 1
45 FilterMode_name = map[uint32]string{
49 FilterMode_value = map[string]uint32{
55 func (x FilterMode) String() string {
56 s, ok := FilterMode_name[uint32(x)]
60 return "FilterMode(" + strconv.Itoa(int(x)) + ")"
63 // GroupPrefixType defines enum 'group_prefix_type'.
64 type GroupPrefixType uint32
67 ASM GroupPrefixType = 0
68 SSM GroupPrefixType = 1
72 GroupPrefixType_name = map[uint32]string{
76 GroupPrefixType_value = map[string]uint32{
82 func (x GroupPrefixType) String() string {
83 s, ok := GroupPrefixType_name[uint32(x)]
87 return "GroupPrefixType(" + strconv.Itoa(int(x)) + ")"
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"`
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"`
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"`
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
117 func (m *IgmpClearInterface) Size() int {
122 size += 4 // m.SwIfIndex
125 func (m *IgmpClearInterface) Marshal(b []byte) ([]byte, error) {
126 var buf *codec.Buffer
128 buf = codec.NewBuffer(make([]byte, m.Size()))
130 buf = codec.NewBuffer(b)
132 buf.EncodeUint32(uint32(m.SwIfIndex))
133 return buf.Bytes(), nil
135 func (m *IgmpClearInterface) Unmarshal(b []byte) error {
136 buf := codec.NewBuffer(b)
137 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
141 // IgmpClearInterfaceReply defines message 'igmp_clear_interface_reply'.
142 type IgmpClearInterfaceReply struct {
143 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
146 func (m *IgmpClearInterfaceReply) Reset() { *m = IgmpClearInterfaceReply{} }
147 func (*IgmpClearInterfaceReply) GetMessageName() string { return "igmp_clear_interface_reply" }
148 func (*IgmpClearInterfaceReply) GetCrcString() string { return "e8d4e804" }
149 func (*IgmpClearInterfaceReply) GetMessageType() api.MessageType {
150 return api.ReplyMessage
153 func (m *IgmpClearInterfaceReply) Size() int {
158 size += 4 // m.Retval
161 func (m *IgmpClearInterfaceReply) Marshal(b []byte) ([]byte, error) {
162 var buf *codec.Buffer
164 buf = codec.NewBuffer(make([]byte, m.Size()))
166 buf = codec.NewBuffer(b)
168 buf.EncodeUint32(uint32(m.Retval))
169 return buf.Bytes(), nil
171 func (m *IgmpClearInterfaceReply) Unmarshal(b []byte) error {
172 buf := codec.NewBuffer(b)
173 m.Retval = int32(buf.DecodeUint32())
177 // IgmpDetails defines message 'igmp_details'.
178 type IgmpDetails struct {
179 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
180 Saddr ip_types.IP4Address `binapi:"ip4_address,name=saddr" json:"saddr,omitempty"`
181 Gaddr ip_types.IP4Address `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
184 func (m *IgmpDetails) Reset() { *m = IgmpDetails{} }
185 func (*IgmpDetails) GetMessageName() string { return "igmp_details" }
186 func (*IgmpDetails) GetCrcString() string { return "52f12a89" }
187 func (*IgmpDetails) GetMessageType() api.MessageType {
188 return api.ReplyMessage
191 func (m *IgmpDetails) Size() int {
196 size += 4 // m.SwIfIndex
197 size += 1 * 4 // m.Saddr
198 size += 1 * 4 // m.Gaddr
201 func (m *IgmpDetails) Marshal(b []byte) ([]byte, error) {
202 var buf *codec.Buffer
204 buf = codec.NewBuffer(make([]byte, m.Size()))
206 buf = codec.NewBuffer(b)
208 buf.EncodeUint32(uint32(m.SwIfIndex))
209 buf.EncodeBytes(m.Saddr[:], 4)
210 buf.EncodeBytes(m.Gaddr[:], 4)
211 return buf.Bytes(), nil
213 func (m *IgmpDetails) Unmarshal(b []byte) error {
214 buf := codec.NewBuffer(b)
215 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
216 copy(m.Saddr[:], buf.DecodeBytes(4))
217 copy(m.Gaddr[:], buf.DecodeBytes(4))
221 // IgmpDump defines message 'igmp_dump'.
222 type IgmpDump struct {
223 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
226 func (m *IgmpDump) Reset() { *m = IgmpDump{} }
227 func (*IgmpDump) GetMessageName() string { return "igmp_dump" }
228 func (*IgmpDump) GetCrcString() string { return "f9e6675e" }
229 func (*IgmpDump) GetMessageType() api.MessageType {
230 return api.RequestMessage
233 func (m *IgmpDump) Size() int {
238 size += 4 // m.SwIfIndex
241 func (m *IgmpDump) Marshal(b []byte) ([]byte, error) {
242 var buf *codec.Buffer
244 buf = codec.NewBuffer(make([]byte, m.Size()))
246 buf = codec.NewBuffer(b)
248 buf.EncodeUint32(uint32(m.SwIfIndex))
249 return buf.Bytes(), nil
251 func (m *IgmpDump) Unmarshal(b []byte) error {
252 buf := codec.NewBuffer(b)
253 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
257 // IgmpEnableDisable defines message 'igmp_enable_disable'.
258 type IgmpEnableDisable struct {
259 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
260 Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
261 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
264 func (m *IgmpEnableDisable) Reset() { *m = IgmpEnableDisable{} }
265 func (*IgmpEnableDisable) GetMessageName() string { return "igmp_enable_disable" }
266 func (*IgmpEnableDisable) GetCrcString() string { return "b1edfb96" }
267 func (*IgmpEnableDisable) GetMessageType() api.MessageType {
268 return api.RequestMessage
271 func (m *IgmpEnableDisable) Size() int {
276 size += 1 // m.Enable
278 size += 4 // m.SwIfIndex
281 func (m *IgmpEnableDisable) Marshal(b []byte) ([]byte, error) {
282 var buf *codec.Buffer
284 buf = codec.NewBuffer(make([]byte, m.Size()))
286 buf = codec.NewBuffer(b)
288 buf.EncodeBool(m.Enable)
289 buf.EncodeUint8(uint8(m.Mode))
290 buf.EncodeUint32(uint32(m.SwIfIndex))
291 return buf.Bytes(), nil
293 func (m *IgmpEnableDisable) Unmarshal(b []byte) error {
294 buf := codec.NewBuffer(b)
295 m.Enable = buf.DecodeBool()
296 m.Mode = buf.DecodeUint8()
297 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
301 // IgmpEnableDisableReply defines message 'igmp_enable_disable_reply'.
302 type IgmpEnableDisableReply struct {
303 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
306 func (m *IgmpEnableDisableReply) Reset() { *m = IgmpEnableDisableReply{} }
307 func (*IgmpEnableDisableReply) GetMessageName() string { return "igmp_enable_disable_reply" }
308 func (*IgmpEnableDisableReply) GetCrcString() string { return "e8d4e804" }
309 func (*IgmpEnableDisableReply) GetMessageType() api.MessageType {
310 return api.ReplyMessage
313 func (m *IgmpEnableDisableReply) Size() int {
318 size += 4 // m.Retval
321 func (m *IgmpEnableDisableReply) Marshal(b []byte) ([]byte, error) {
322 var buf *codec.Buffer
324 buf = codec.NewBuffer(make([]byte, m.Size()))
326 buf = codec.NewBuffer(b)
328 buf.EncodeUint32(uint32(m.Retval))
329 return buf.Bytes(), nil
331 func (m *IgmpEnableDisableReply) Unmarshal(b []byte) error {
332 buf := codec.NewBuffer(b)
333 m.Retval = int32(buf.DecodeUint32())
337 // IgmpEvent defines message 'igmp_event'.
338 type IgmpEvent struct {
339 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
340 Filter FilterMode `binapi:"filter_mode,name=filter" json:"filter,omitempty"`
341 Saddr ip_types.IP4Address `binapi:"ip4_address,name=saddr" json:"saddr,omitempty"`
342 Gaddr ip_types.IP4Address `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
345 func (m *IgmpEvent) Reset() { *m = IgmpEvent{} }
346 func (*IgmpEvent) GetMessageName() string { return "igmp_event" }
347 func (*IgmpEvent) GetCrcString() string { return "d7696eaf" }
348 func (*IgmpEvent) GetMessageType() api.MessageType {
349 return api.OtherMessage
352 func (m *IgmpEvent) Size() int {
357 size += 4 // m.SwIfIndex
358 size += 4 // m.Filter
359 size += 1 * 4 // m.Saddr
360 size += 1 * 4 // m.Gaddr
363 func (m *IgmpEvent) Marshal(b []byte) ([]byte, error) {
364 var buf *codec.Buffer
366 buf = codec.NewBuffer(make([]byte, m.Size()))
368 buf = codec.NewBuffer(b)
370 buf.EncodeUint32(uint32(m.SwIfIndex))
371 buf.EncodeUint32(uint32(m.Filter))
372 buf.EncodeBytes(m.Saddr[:], 4)
373 buf.EncodeBytes(m.Gaddr[:], 4)
374 return buf.Bytes(), nil
376 func (m *IgmpEvent) Unmarshal(b []byte) error {
377 buf := codec.NewBuffer(b)
378 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
379 m.Filter = FilterMode(buf.DecodeUint32())
380 copy(m.Saddr[:], buf.DecodeBytes(4))
381 copy(m.Gaddr[:], buf.DecodeBytes(4))
385 // IgmpGroupPrefixDetails defines message 'igmp_group_prefix_details'.
386 type IgmpGroupPrefixDetails struct {
387 Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
390 func (m *IgmpGroupPrefixDetails) Reset() { *m = IgmpGroupPrefixDetails{} }
391 func (*IgmpGroupPrefixDetails) GetMessageName() string { return "igmp_group_prefix_details" }
392 func (*IgmpGroupPrefixDetails) GetCrcString() string { return "c3b3c526" }
393 func (*IgmpGroupPrefixDetails) GetMessageType() api.MessageType {
394 return api.ReplyMessage
397 func (m *IgmpGroupPrefixDetails) Size() int {
402 size += 4 // m.Gp.Type
403 size += 1 // m.Gp.Prefix.Address.Af
404 size += 1 * 16 // m.Gp.Prefix.Address.Un
405 size += 1 // m.Gp.Prefix.Len
408 func (m *IgmpGroupPrefixDetails) Marshal(b []byte) ([]byte, error) {
409 var buf *codec.Buffer
411 buf = codec.NewBuffer(make([]byte, m.Size()))
413 buf = codec.NewBuffer(b)
415 buf.EncodeUint32(uint32(m.Gp.Type))
416 buf.EncodeUint8(uint8(m.Gp.Prefix.Address.Af))
417 buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 0)
418 buf.EncodeUint8(uint8(m.Gp.Prefix.Len))
419 return buf.Bytes(), nil
421 func (m *IgmpGroupPrefixDetails) Unmarshal(b []byte) error {
422 buf := codec.NewBuffer(b)
423 m.Gp.Type = GroupPrefixType(buf.DecodeUint32())
424 m.Gp.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
425 copy(m.Gp.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
426 m.Gp.Prefix.Len = buf.DecodeUint8()
430 // IgmpGroupPrefixDump defines message 'igmp_group_prefix_dump'.
431 type IgmpGroupPrefixDump struct{}
433 func (m *IgmpGroupPrefixDump) Reset() { *m = IgmpGroupPrefixDump{} }
434 func (*IgmpGroupPrefixDump) GetMessageName() string { return "igmp_group_prefix_dump" }
435 func (*IgmpGroupPrefixDump) GetCrcString() string { return "51077d14" }
436 func (*IgmpGroupPrefixDump) GetMessageType() api.MessageType {
437 return api.RequestMessage
440 func (m *IgmpGroupPrefixDump) Size() int {
447 func (m *IgmpGroupPrefixDump) Marshal(b []byte) ([]byte, error) {
448 var buf *codec.Buffer
450 buf = codec.NewBuffer(make([]byte, m.Size()))
452 buf = codec.NewBuffer(b)
454 return buf.Bytes(), nil
456 func (m *IgmpGroupPrefixDump) Unmarshal(b []byte) error {
460 // IgmpGroupPrefixSet defines message 'igmp_group_prefix_set'.
461 type IgmpGroupPrefixSet struct {
462 Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
465 func (m *IgmpGroupPrefixSet) Reset() { *m = IgmpGroupPrefixSet{} }
466 func (*IgmpGroupPrefixSet) GetMessageName() string { return "igmp_group_prefix_set" }
467 func (*IgmpGroupPrefixSet) GetCrcString() string { return "d4f20ac5" }
468 func (*IgmpGroupPrefixSet) GetMessageType() api.MessageType {
469 return api.RequestMessage
472 func (m *IgmpGroupPrefixSet) Size() int {
477 size += 4 // m.Gp.Type
478 size += 1 // m.Gp.Prefix.Address.Af
479 size += 1 * 16 // m.Gp.Prefix.Address.Un
480 size += 1 // m.Gp.Prefix.Len
483 func (m *IgmpGroupPrefixSet) Marshal(b []byte) ([]byte, error) {
484 var buf *codec.Buffer
486 buf = codec.NewBuffer(make([]byte, m.Size()))
488 buf = codec.NewBuffer(b)
490 buf.EncodeUint32(uint32(m.Gp.Type))
491 buf.EncodeUint8(uint8(m.Gp.Prefix.Address.Af))
492 buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 0)
493 buf.EncodeUint8(uint8(m.Gp.Prefix.Len))
494 return buf.Bytes(), nil
496 func (m *IgmpGroupPrefixSet) Unmarshal(b []byte) error {
497 buf := codec.NewBuffer(b)
498 m.Gp.Type = GroupPrefixType(buf.DecodeUint32())
499 m.Gp.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
500 copy(m.Gp.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
501 m.Gp.Prefix.Len = buf.DecodeUint8()
505 // IgmpGroupPrefixSetReply defines message 'igmp_group_prefix_set_reply'.
506 type IgmpGroupPrefixSetReply struct {
507 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
510 func (m *IgmpGroupPrefixSetReply) Reset() { *m = IgmpGroupPrefixSetReply{} }
511 func (*IgmpGroupPrefixSetReply) GetMessageName() string { return "igmp_group_prefix_set_reply" }
512 func (*IgmpGroupPrefixSetReply) GetCrcString() string { return "e8d4e804" }
513 func (*IgmpGroupPrefixSetReply) GetMessageType() api.MessageType {
514 return api.ReplyMessage
517 func (m *IgmpGroupPrefixSetReply) Size() int {
522 size += 4 // m.Retval
525 func (m *IgmpGroupPrefixSetReply) Marshal(b []byte) ([]byte, error) {
526 var buf *codec.Buffer
528 buf = codec.NewBuffer(make([]byte, m.Size()))
530 buf = codec.NewBuffer(b)
532 buf.EncodeUint32(uint32(m.Retval))
533 return buf.Bytes(), nil
535 func (m *IgmpGroupPrefixSetReply) Unmarshal(b []byte) error {
536 buf := codec.NewBuffer(b)
537 m.Retval = int32(buf.DecodeUint32())
541 // IgmpListen defines message 'igmp_listen'.
542 type IgmpListen struct {
543 Group IgmpGroup `binapi:"igmp_group,name=group" json:"group,omitempty"`
546 func (m *IgmpListen) Reset() { *m = IgmpListen{} }
547 func (*IgmpListen) GetMessageName() string { return "igmp_listen" }
548 func (*IgmpListen) GetCrcString() string { return "3f93a51a" }
549 func (*IgmpListen) GetMessageType() api.MessageType {
550 return api.RequestMessage
553 func (m *IgmpListen) Size() int {
558 size += 4 // m.Group.Filter
559 size += 1 // m.Group.NSrcs
560 size += 4 // m.Group.SwIfIndex
561 size += 1 * 4 // m.Group.Gaddr
562 for j2 := 0; j2 < len(m.Group.Saddrs); j2++ {
563 var s2 ip_types.IP4Address
565 if j2 < len(m.Group.Saddrs) {
566 s2 = m.Group.Saddrs[j2]
572 func (m *IgmpListen) Marshal(b []byte) ([]byte, error) {
573 var buf *codec.Buffer
575 buf = codec.NewBuffer(make([]byte, m.Size()))
577 buf = codec.NewBuffer(b)
579 buf.EncodeUint32(uint32(m.Group.Filter))
580 buf.EncodeUint8(uint8(len(m.Group.Saddrs)))
581 buf.EncodeUint32(uint32(m.Group.SwIfIndex))
582 buf.EncodeBytes(m.Group.Gaddr[:], 4)
583 for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
584 var v1 ip_types.IP4Address
585 if j1 < len(m.Group.Saddrs) {
586 v1 = m.Group.Saddrs[j1]
588 buf.EncodeBytes(v1[:], 4)
590 return buf.Bytes(), nil
592 func (m *IgmpListen) Unmarshal(b []byte) error {
593 buf := codec.NewBuffer(b)
594 m.Group.Filter = FilterMode(buf.DecodeUint32())
595 m.Group.NSrcs = buf.DecodeUint8()
596 m.Group.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
597 copy(m.Group.Gaddr[:], buf.DecodeBytes(4))
598 m.Group.Saddrs = make([]ip_types.IP4Address, int(m.Group.NSrcs))
599 for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
600 copy(m.Group.Saddrs[j1][:], buf.DecodeBytes(4))
605 // IgmpListenReply defines message 'igmp_listen_reply'.
606 type IgmpListenReply struct {
607 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
610 func (m *IgmpListenReply) Reset() { *m = IgmpListenReply{} }
611 func (*IgmpListenReply) GetMessageName() string { return "igmp_listen_reply" }
612 func (*IgmpListenReply) GetCrcString() string { return "e8d4e804" }
613 func (*IgmpListenReply) GetMessageType() api.MessageType {
614 return api.ReplyMessage
617 func (m *IgmpListenReply) Size() int {
622 size += 4 // m.Retval
625 func (m *IgmpListenReply) Marshal(b []byte) ([]byte, error) {
626 var buf *codec.Buffer
628 buf = codec.NewBuffer(make([]byte, m.Size()))
630 buf = codec.NewBuffer(b)
632 buf.EncodeUint32(uint32(m.Retval))
633 return buf.Bytes(), nil
635 func (m *IgmpListenReply) Unmarshal(b []byte) error {
636 buf := codec.NewBuffer(b)
637 m.Retval = int32(buf.DecodeUint32())
641 // IgmpProxyDeviceAddDel defines message 'igmp_proxy_device_add_del'.
642 type IgmpProxyDeviceAddDel struct {
643 Add uint8 `binapi:"u8,name=add" json:"add,omitempty"`
644 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
645 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
648 func (m *IgmpProxyDeviceAddDel) Reset() { *m = IgmpProxyDeviceAddDel{} }
649 func (*IgmpProxyDeviceAddDel) GetMessageName() string { return "igmp_proxy_device_add_del" }
650 func (*IgmpProxyDeviceAddDel) GetCrcString() string { return "0b9be9ce" }
651 func (*IgmpProxyDeviceAddDel) GetMessageType() api.MessageType {
652 return api.RequestMessage
655 func (m *IgmpProxyDeviceAddDel) Size() int {
662 size += 4 // m.SwIfIndex
665 func (m *IgmpProxyDeviceAddDel) Marshal(b []byte) ([]byte, error) {
666 var buf *codec.Buffer
668 buf = codec.NewBuffer(make([]byte, m.Size()))
670 buf = codec.NewBuffer(b)
672 buf.EncodeUint8(uint8(m.Add))
673 buf.EncodeUint32(uint32(m.VrfID))
674 buf.EncodeUint32(uint32(m.SwIfIndex))
675 return buf.Bytes(), nil
677 func (m *IgmpProxyDeviceAddDel) Unmarshal(b []byte) error {
678 buf := codec.NewBuffer(b)
679 m.Add = buf.DecodeUint8()
680 m.VrfID = buf.DecodeUint32()
681 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
685 // IgmpProxyDeviceAddDelInterface defines message 'igmp_proxy_device_add_del_interface'.
686 type IgmpProxyDeviceAddDelInterface struct {
687 Add bool `binapi:"bool,name=add" json:"add,omitempty"`
688 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
689 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
692 func (m *IgmpProxyDeviceAddDelInterface) Reset() { *m = IgmpProxyDeviceAddDelInterface{} }
693 func (*IgmpProxyDeviceAddDelInterface) GetMessageName() string {
694 return "igmp_proxy_device_add_del_interface"
696 func (*IgmpProxyDeviceAddDelInterface) GetCrcString() string { return "1a9ec24a" }
697 func (*IgmpProxyDeviceAddDelInterface) GetMessageType() api.MessageType {
698 return api.RequestMessage
701 func (m *IgmpProxyDeviceAddDelInterface) Size() int {
708 size += 4 // m.SwIfIndex
711 func (m *IgmpProxyDeviceAddDelInterface) Marshal(b []byte) ([]byte, error) {
712 var buf *codec.Buffer
714 buf = codec.NewBuffer(make([]byte, m.Size()))
716 buf = codec.NewBuffer(b)
718 buf.EncodeBool(m.Add)
719 buf.EncodeUint32(uint32(m.VrfID))
720 buf.EncodeUint32(uint32(m.SwIfIndex))
721 return buf.Bytes(), nil
723 func (m *IgmpProxyDeviceAddDelInterface) Unmarshal(b []byte) error {
724 buf := codec.NewBuffer(b)
725 m.Add = buf.DecodeBool()
726 m.VrfID = buf.DecodeUint32()
727 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
731 // IgmpProxyDeviceAddDelInterfaceReply defines message 'igmp_proxy_device_add_del_interface_reply'.
732 type IgmpProxyDeviceAddDelInterfaceReply struct {
733 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
736 func (m *IgmpProxyDeviceAddDelInterfaceReply) Reset() { *m = IgmpProxyDeviceAddDelInterfaceReply{} }
737 func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageName() string {
738 return "igmp_proxy_device_add_del_interface_reply"
740 func (*IgmpProxyDeviceAddDelInterfaceReply) GetCrcString() string { return "e8d4e804" }
741 func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageType() api.MessageType {
742 return api.ReplyMessage
745 func (m *IgmpProxyDeviceAddDelInterfaceReply) Size() int {
750 size += 4 // m.Retval
753 func (m *IgmpProxyDeviceAddDelInterfaceReply) Marshal(b []byte) ([]byte, error) {
754 var buf *codec.Buffer
756 buf = codec.NewBuffer(make([]byte, m.Size()))
758 buf = codec.NewBuffer(b)
760 buf.EncodeUint32(uint32(m.Retval))
761 return buf.Bytes(), nil
763 func (m *IgmpProxyDeviceAddDelInterfaceReply) Unmarshal(b []byte) error {
764 buf := codec.NewBuffer(b)
765 m.Retval = int32(buf.DecodeUint32())
769 // IgmpProxyDeviceAddDelReply defines message 'igmp_proxy_device_add_del_reply'.
770 type IgmpProxyDeviceAddDelReply struct {
771 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
774 func (m *IgmpProxyDeviceAddDelReply) Reset() { *m = IgmpProxyDeviceAddDelReply{} }
775 func (*IgmpProxyDeviceAddDelReply) GetMessageName() string { return "igmp_proxy_device_add_del_reply" }
776 func (*IgmpProxyDeviceAddDelReply) GetCrcString() string { return "e8d4e804" }
777 func (*IgmpProxyDeviceAddDelReply) GetMessageType() api.MessageType {
778 return api.ReplyMessage
781 func (m *IgmpProxyDeviceAddDelReply) Size() int {
786 size += 4 // m.Retval
789 func (m *IgmpProxyDeviceAddDelReply) Marshal(b []byte) ([]byte, error) {
790 var buf *codec.Buffer
792 buf = codec.NewBuffer(make([]byte, m.Size()))
794 buf = codec.NewBuffer(b)
796 buf.EncodeUint32(uint32(m.Retval))
797 return buf.Bytes(), nil
799 func (m *IgmpProxyDeviceAddDelReply) Unmarshal(b []byte) error {
800 buf := codec.NewBuffer(b)
801 m.Retval = int32(buf.DecodeUint32())
805 // WantIgmpEvents defines message 'want_igmp_events'.
806 type WantIgmpEvents struct {
807 Enable uint32 `binapi:"u32,name=enable" json:"enable,omitempty"`
808 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
811 func (m *WantIgmpEvents) Reset() { *m = WantIgmpEvents{} }
812 func (*WantIgmpEvents) GetMessageName() string { return "want_igmp_events" }
813 func (*WantIgmpEvents) GetCrcString() string { return "cfaccc1f" }
814 func (*WantIgmpEvents) GetMessageType() api.MessageType {
815 return api.RequestMessage
818 func (m *WantIgmpEvents) Size() int {
823 size += 4 // m.Enable
827 func (m *WantIgmpEvents) Marshal(b []byte) ([]byte, error) {
828 var buf *codec.Buffer
830 buf = codec.NewBuffer(make([]byte, m.Size()))
832 buf = codec.NewBuffer(b)
834 buf.EncodeUint32(uint32(m.Enable))
835 buf.EncodeUint32(uint32(m.PID))
836 return buf.Bytes(), nil
838 func (m *WantIgmpEvents) Unmarshal(b []byte) error {
839 buf := codec.NewBuffer(b)
840 m.Enable = buf.DecodeUint32()
841 m.PID = buf.DecodeUint32()
845 // WantIgmpEventsReply defines message 'want_igmp_events_reply'.
846 type WantIgmpEventsReply struct {
847 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
850 func (m *WantIgmpEventsReply) Reset() { *m = WantIgmpEventsReply{} }
851 func (*WantIgmpEventsReply) GetMessageName() string { return "want_igmp_events_reply" }
852 func (*WantIgmpEventsReply) GetCrcString() string { return "e8d4e804" }
853 func (*WantIgmpEventsReply) GetMessageType() api.MessageType {
854 return api.ReplyMessage
857 func (m *WantIgmpEventsReply) Size() int {
862 size += 4 // m.Retval
865 func (m *WantIgmpEventsReply) Marshal(b []byte) ([]byte, error) {
866 var buf *codec.Buffer
868 buf = codec.NewBuffer(make([]byte, m.Size()))
870 buf = codec.NewBuffer(b)
872 buf.EncodeUint32(uint32(m.Retval))
873 return buf.Bytes(), nil
875 func (m *WantIgmpEventsReply) Unmarshal(b []byte) error {
876 buf := codec.NewBuffer(b)
877 m.Retval = int32(buf.DecodeUint32())
881 func init() { file_igmp_binapi_init() }
882 func file_igmp_binapi_init() {
883 api.RegisterMessage((*IgmpClearInterface)(nil), "igmp_clear_interface_f9e6675e")
884 api.RegisterMessage((*IgmpClearInterfaceReply)(nil), "igmp_clear_interface_reply_e8d4e804")
885 api.RegisterMessage((*IgmpDetails)(nil), "igmp_details_52f12a89")
886 api.RegisterMessage((*IgmpDump)(nil), "igmp_dump_f9e6675e")
887 api.RegisterMessage((*IgmpEnableDisable)(nil), "igmp_enable_disable_b1edfb96")
888 api.RegisterMessage((*IgmpEnableDisableReply)(nil), "igmp_enable_disable_reply_e8d4e804")
889 api.RegisterMessage((*IgmpEvent)(nil), "igmp_event_d7696eaf")
890 api.RegisterMessage((*IgmpGroupPrefixDetails)(nil), "igmp_group_prefix_details_c3b3c526")
891 api.RegisterMessage((*IgmpGroupPrefixDump)(nil), "igmp_group_prefix_dump_51077d14")
892 api.RegisterMessage((*IgmpGroupPrefixSet)(nil), "igmp_group_prefix_set_d4f20ac5")
893 api.RegisterMessage((*IgmpGroupPrefixSetReply)(nil), "igmp_group_prefix_set_reply_e8d4e804")
894 api.RegisterMessage((*IgmpListen)(nil), "igmp_listen_3f93a51a")
895 api.RegisterMessage((*IgmpListenReply)(nil), "igmp_listen_reply_e8d4e804")
896 api.RegisterMessage((*IgmpProxyDeviceAddDel)(nil), "igmp_proxy_device_add_del_0b9be9ce")
897 api.RegisterMessage((*IgmpProxyDeviceAddDelInterface)(nil), "igmp_proxy_device_add_del_interface_1a9ec24a")
898 api.RegisterMessage((*IgmpProxyDeviceAddDelInterfaceReply)(nil), "igmp_proxy_device_add_del_interface_reply_e8d4e804")
899 api.RegisterMessage((*IgmpProxyDeviceAddDelReply)(nil), "igmp_proxy_device_add_del_reply_e8d4e804")
900 api.RegisterMessage((*WantIgmpEvents)(nil), "want_igmp_events_cfaccc1f")
901 api.RegisterMessage((*WantIgmpEventsReply)(nil), "want_igmp_events_reply_e8d4e804")
904 // Messages returns list of all messages in this module.
905 func AllMessages() []api.Message {
906 return []api.Message{
907 (*IgmpClearInterface)(nil),
908 (*IgmpClearInterfaceReply)(nil),
911 (*IgmpEnableDisable)(nil),
912 (*IgmpEnableDisableReply)(nil),
914 (*IgmpGroupPrefixDetails)(nil),
915 (*IgmpGroupPrefixDump)(nil),
916 (*IgmpGroupPrefixSet)(nil),
917 (*IgmpGroupPrefixSetReply)(nil),
919 (*IgmpListenReply)(nil),
920 (*IgmpProxyDeviceAddDel)(nil),
921 (*IgmpProxyDeviceAddDelInterface)(nil),
922 (*IgmpProxyDeviceAddDelInterfaceReply)(nil),
923 (*IgmpProxyDeviceAddDelReply)(nil),
924 (*WantIgmpEvents)(nil),
925 (*WantIgmpEventsReply)(nil),