1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
5 // source: /usr/share/vpp/api/plugins/igmp.api.json
7 // Package igmp contains generated bindings for API file igmp.api.
19 api "git.fd.io/govpp.git/api"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 ip_types "git.fd.io/govpp.git/binapi/ip_types"
22 codec "git.fd.io/govpp.git/codec"
25 // This is a compile-time assertion to ensure that this generated file
26 // is compatible with the GoVPP api package it is being compiled against.
27 // A compilation error at this line likely means your copy of the
28 // GoVPP api package needs to be updated.
29 const _ = api.GoVppAPIPackageIsVersion2
34 VersionCrc = 0x95a4ff29
37 // FilterMode defines enum 'filter_mode'.
38 type FilterMode uint32
41 EXCLUDE FilterMode = 0
42 INCLUDE FilterMode = 1
46 FilterMode_name = map[uint32]string{
50 FilterMode_value = map[string]uint32{
56 func (x FilterMode) String() string {
57 s, ok := FilterMode_name[uint32(x)]
61 return "FilterMode(" + strconv.Itoa(int(x)) + ")"
64 // GroupPrefixType defines enum 'group_prefix_type'.
65 type GroupPrefixType uint32
68 ASM GroupPrefixType = 0
69 SSM GroupPrefixType = 1
73 GroupPrefixType_name = map[uint32]string{
77 GroupPrefixType_value = map[string]uint32{
83 func (x GroupPrefixType) String() string {
84 s, ok := GroupPrefixType_name[uint32(x)]
88 return "GroupPrefixType(" + strconv.Itoa(int(x)) + ")"
91 // GroupPrefix defines type 'group_prefix'.
92 type GroupPrefix struct {
93 Type GroupPrefixType `binapi:"group_prefix_type,name=type" json:"type,omitempty"`
94 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
97 // IgmpGroup defines type 'igmp_group'.
98 type IgmpGroup struct {
99 Filter FilterMode `binapi:"filter_mode,name=filter" json:"filter,omitempty"`
100 NSrcs uint8 `binapi:"u8,name=n_srcs" json:"-"`
101 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
102 Gaddr ip_types.IP4Address `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
103 Saddrs []ip_types.IP4Address `binapi:"ip4_address[n_srcs],name=saddrs" json:"saddrs,omitempty"`
106 // IgmpClearInterface defines message 'igmp_clear_interface'.
107 type IgmpClearInterface struct {
108 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
111 func (m *IgmpClearInterface) Reset() { *m = IgmpClearInterface{} }
112 func (*IgmpClearInterface) GetMessageName() string { return "igmp_clear_interface" }
113 func (*IgmpClearInterface) GetCrcString() string { return "f9e6675e" }
114 func (*IgmpClearInterface) GetMessageType() api.MessageType {
115 return api.RequestMessage
118 func (m *IgmpClearInterface) Size() (size int) {
122 size += 4 // m.SwIfIndex
125 func (m *IgmpClearInterface) Marshal(b []byte) ([]byte, error) {
127 b = make([]byte, m.Size())
129 buf := codec.NewBuffer(b)
130 buf.EncodeUint32(uint32(m.SwIfIndex))
131 return buf.Bytes(), nil
133 func (m *IgmpClearInterface) Unmarshal(b []byte) error {
134 buf := codec.NewBuffer(b)
135 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
139 // IgmpClearInterfaceReply defines message 'igmp_clear_interface_reply'.
140 type IgmpClearInterfaceReply struct {
141 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
144 func (m *IgmpClearInterfaceReply) Reset() { *m = IgmpClearInterfaceReply{} }
145 func (*IgmpClearInterfaceReply) GetMessageName() string { return "igmp_clear_interface_reply" }
146 func (*IgmpClearInterfaceReply) GetCrcString() string { return "e8d4e804" }
147 func (*IgmpClearInterfaceReply) GetMessageType() api.MessageType {
148 return api.ReplyMessage
151 func (m *IgmpClearInterfaceReply) Size() (size int) {
155 size += 4 // m.Retval
158 func (m *IgmpClearInterfaceReply) Marshal(b []byte) ([]byte, error) {
160 b = make([]byte, m.Size())
162 buf := codec.NewBuffer(b)
163 buf.EncodeInt32(m.Retval)
164 return buf.Bytes(), nil
166 func (m *IgmpClearInterfaceReply) Unmarshal(b []byte) error {
167 buf := codec.NewBuffer(b)
168 m.Retval = buf.DecodeInt32()
172 // IgmpDetails defines message 'igmp_details'.
173 type IgmpDetails struct {
174 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
175 Saddr ip_types.IP4Address `binapi:"ip4_address,name=saddr" json:"saddr,omitempty"`
176 Gaddr ip_types.IP4Address `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
179 func (m *IgmpDetails) Reset() { *m = IgmpDetails{} }
180 func (*IgmpDetails) GetMessageName() string { return "igmp_details" }
181 func (*IgmpDetails) GetCrcString() string { return "38f09929" }
182 func (*IgmpDetails) GetMessageType() api.MessageType {
183 return api.ReplyMessage
186 func (m *IgmpDetails) Size() (size int) {
190 size += 4 // m.SwIfIndex
191 size += 1 * 4 // m.Saddr
192 size += 1 * 4 // m.Gaddr
195 func (m *IgmpDetails) Marshal(b []byte) ([]byte, error) {
197 b = make([]byte, m.Size())
199 buf := codec.NewBuffer(b)
200 buf.EncodeUint32(uint32(m.SwIfIndex))
201 buf.EncodeBytes(m.Saddr[:], 4)
202 buf.EncodeBytes(m.Gaddr[:], 4)
203 return buf.Bytes(), nil
205 func (m *IgmpDetails) Unmarshal(b []byte) error {
206 buf := codec.NewBuffer(b)
207 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
208 copy(m.Saddr[:], buf.DecodeBytes(4))
209 copy(m.Gaddr[:], buf.DecodeBytes(4))
213 // IgmpDump defines message 'igmp_dump'.
214 type IgmpDump struct {
215 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
218 func (m *IgmpDump) Reset() { *m = IgmpDump{} }
219 func (*IgmpDump) GetMessageName() string { return "igmp_dump" }
220 func (*IgmpDump) GetCrcString() string { return "f9e6675e" }
221 func (*IgmpDump) GetMessageType() api.MessageType {
222 return api.RequestMessage
225 func (m *IgmpDump) Size() (size int) {
229 size += 4 // m.SwIfIndex
232 func (m *IgmpDump) Marshal(b []byte) ([]byte, error) {
234 b = make([]byte, m.Size())
236 buf := codec.NewBuffer(b)
237 buf.EncodeUint32(uint32(m.SwIfIndex))
238 return buf.Bytes(), nil
240 func (m *IgmpDump) Unmarshal(b []byte) error {
241 buf := codec.NewBuffer(b)
242 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
246 // IgmpEnableDisable defines message 'igmp_enable_disable'.
247 type IgmpEnableDisable struct {
248 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
249 Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
250 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
253 func (m *IgmpEnableDisable) Reset() { *m = IgmpEnableDisable{} }
254 func (*IgmpEnableDisable) GetMessageName() string { return "igmp_enable_disable" }
255 func (*IgmpEnableDisable) GetCrcString() string { return "b1edfb96" }
256 func (*IgmpEnableDisable) GetMessageType() api.MessageType {
257 return api.RequestMessage
260 func (m *IgmpEnableDisable) Size() (size int) {
264 size += 1 // m.Enable
266 size += 4 // m.SwIfIndex
269 func (m *IgmpEnableDisable) Marshal(b []byte) ([]byte, error) {
271 b = make([]byte, m.Size())
273 buf := codec.NewBuffer(b)
274 buf.EncodeBool(m.Enable)
275 buf.EncodeUint8(m.Mode)
276 buf.EncodeUint32(uint32(m.SwIfIndex))
277 return buf.Bytes(), nil
279 func (m *IgmpEnableDisable) Unmarshal(b []byte) error {
280 buf := codec.NewBuffer(b)
281 m.Enable = buf.DecodeBool()
282 m.Mode = buf.DecodeUint8()
283 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
287 // IgmpEnableDisableReply defines message 'igmp_enable_disable_reply'.
288 type IgmpEnableDisableReply struct {
289 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
292 func (m *IgmpEnableDisableReply) Reset() { *m = IgmpEnableDisableReply{} }
293 func (*IgmpEnableDisableReply) GetMessageName() string { return "igmp_enable_disable_reply" }
294 func (*IgmpEnableDisableReply) GetCrcString() string { return "e8d4e804" }
295 func (*IgmpEnableDisableReply) GetMessageType() api.MessageType {
296 return api.ReplyMessage
299 func (m *IgmpEnableDisableReply) Size() (size int) {
303 size += 4 // m.Retval
306 func (m *IgmpEnableDisableReply) Marshal(b []byte) ([]byte, error) {
308 b = make([]byte, m.Size())
310 buf := codec.NewBuffer(b)
311 buf.EncodeInt32(m.Retval)
312 return buf.Bytes(), nil
314 func (m *IgmpEnableDisableReply) Unmarshal(b []byte) error {
315 buf := codec.NewBuffer(b)
316 m.Retval = buf.DecodeInt32()
320 // IgmpEvent defines message 'igmp_event'.
321 type IgmpEvent struct {
322 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
323 Filter FilterMode `binapi:"filter_mode,name=filter" json:"filter,omitempty"`
324 Saddr ip_types.IP4Address `binapi:"ip4_address,name=saddr" json:"saddr,omitempty"`
325 Gaddr ip_types.IP4Address `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
328 func (m *IgmpEvent) Reset() { *m = IgmpEvent{} }
329 func (*IgmpEvent) GetMessageName() string { return "igmp_event" }
330 func (*IgmpEvent) GetCrcString() string { return "85fe93ec" }
331 func (*IgmpEvent) GetMessageType() api.MessageType {
332 return api.OtherMessage
335 func (m *IgmpEvent) Size() (size int) {
339 size += 4 // m.SwIfIndex
340 size += 4 // m.Filter
341 size += 1 * 4 // m.Saddr
342 size += 1 * 4 // m.Gaddr
345 func (m *IgmpEvent) Marshal(b []byte) ([]byte, error) {
347 b = make([]byte, m.Size())
349 buf := codec.NewBuffer(b)
350 buf.EncodeUint32(uint32(m.SwIfIndex))
351 buf.EncodeUint32(uint32(m.Filter))
352 buf.EncodeBytes(m.Saddr[:], 4)
353 buf.EncodeBytes(m.Gaddr[:], 4)
354 return buf.Bytes(), nil
356 func (m *IgmpEvent) Unmarshal(b []byte) error {
357 buf := codec.NewBuffer(b)
358 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
359 m.Filter = FilterMode(buf.DecodeUint32())
360 copy(m.Saddr[:], buf.DecodeBytes(4))
361 copy(m.Gaddr[:], buf.DecodeBytes(4))
365 // IgmpGroupPrefixDetails defines message 'igmp_group_prefix_details'.
366 type IgmpGroupPrefixDetails struct {
367 Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
370 func (m *IgmpGroupPrefixDetails) Reset() { *m = IgmpGroupPrefixDetails{} }
371 func (*IgmpGroupPrefixDetails) GetMessageName() string { return "igmp_group_prefix_details" }
372 func (*IgmpGroupPrefixDetails) GetCrcString() string { return "259ccd81" }
373 func (*IgmpGroupPrefixDetails) GetMessageType() api.MessageType {
374 return api.ReplyMessage
377 func (m *IgmpGroupPrefixDetails) Size() (size int) {
381 size += 4 // m.Gp.Type
382 size += 1 // m.Gp.Prefix.Address.Af
383 size += 1 * 16 // m.Gp.Prefix.Address.Un
384 size += 1 // m.Gp.Prefix.Len
387 func (m *IgmpGroupPrefixDetails) Marshal(b []byte) ([]byte, error) {
389 b = make([]byte, m.Size())
391 buf := codec.NewBuffer(b)
392 buf.EncodeUint32(uint32(m.Gp.Type))
393 buf.EncodeUint8(uint8(m.Gp.Prefix.Address.Af))
394 buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 16)
395 buf.EncodeUint8(m.Gp.Prefix.Len)
396 return buf.Bytes(), nil
398 func (m *IgmpGroupPrefixDetails) Unmarshal(b []byte) error {
399 buf := codec.NewBuffer(b)
400 m.Gp.Type = GroupPrefixType(buf.DecodeUint32())
401 m.Gp.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
402 copy(m.Gp.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
403 m.Gp.Prefix.Len = buf.DecodeUint8()
407 // IgmpGroupPrefixDump defines message 'igmp_group_prefix_dump'.
408 type IgmpGroupPrefixDump struct{}
410 func (m *IgmpGroupPrefixDump) Reset() { *m = IgmpGroupPrefixDump{} }
411 func (*IgmpGroupPrefixDump) GetMessageName() string { return "igmp_group_prefix_dump" }
412 func (*IgmpGroupPrefixDump) GetCrcString() string { return "51077d14" }
413 func (*IgmpGroupPrefixDump) GetMessageType() api.MessageType {
414 return api.RequestMessage
417 func (m *IgmpGroupPrefixDump) Size() (size int) {
423 func (m *IgmpGroupPrefixDump) Marshal(b []byte) ([]byte, error) {
425 b = make([]byte, m.Size())
427 buf := codec.NewBuffer(b)
428 return buf.Bytes(), nil
430 func (m *IgmpGroupPrefixDump) Unmarshal(b []byte) error {
434 // IgmpGroupPrefixSet defines message 'igmp_group_prefix_set'.
435 type IgmpGroupPrefixSet struct {
436 Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
439 func (m *IgmpGroupPrefixSet) Reset() { *m = IgmpGroupPrefixSet{} }
440 func (*IgmpGroupPrefixSet) GetMessageName() string { return "igmp_group_prefix_set" }
441 func (*IgmpGroupPrefixSet) GetCrcString() string { return "5b14a5ce" }
442 func (*IgmpGroupPrefixSet) GetMessageType() api.MessageType {
443 return api.RequestMessage
446 func (m *IgmpGroupPrefixSet) Size() (size int) {
450 size += 4 // m.Gp.Type
451 size += 1 // m.Gp.Prefix.Address.Af
452 size += 1 * 16 // m.Gp.Prefix.Address.Un
453 size += 1 // m.Gp.Prefix.Len
456 func (m *IgmpGroupPrefixSet) Marshal(b []byte) ([]byte, error) {
458 b = make([]byte, m.Size())
460 buf := codec.NewBuffer(b)
461 buf.EncodeUint32(uint32(m.Gp.Type))
462 buf.EncodeUint8(uint8(m.Gp.Prefix.Address.Af))
463 buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 16)
464 buf.EncodeUint8(m.Gp.Prefix.Len)
465 return buf.Bytes(), nil
467 func (m *IgmpGroupPrefixSet) Unmarshal(b []byte) error {
468 buf := codec.NewBuffer(b)
469 m.Gp.Type = GroupPrefixType(buf.DecodeUint32())
470 m.Gp.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
471 copy(m.Gp.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
472 m.Gp.Prefix.Len = buf.DecodeUint8()
476 // IgmpGroupPrefixSetReply defines message 'igmp_group_prefix_set_reply'.
477 type IgmpGroupPrefixSetReply struct {
478 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
481 func (m *IgmpGroupPrefixSetReply) Reset() { *m = IgmpGroupPrefixSetReply{} }
482 func (*IgmpGroupPrefixSetReply) GetMessageName() string { return "igmp_group_prefix_set_reply" }
483 func (*IgmpGroupPrefixSetReply) GetCrcString() string { return "e8d4e804" }
484 func (*IgmpGroupPrefixSetReply) GetMessageType() api.MessageType {
485 return api.ReplyMessage
488 func (m *IgmpGroupPrefixSetReply) Size() (size int) {
492 size += 4 // m.Retval
495 func (m *IgmpGroupPrefixSetReply) Marshal(b []byte) ([]byte, error) {
497 b = make([]byte, m.Size())
499 buf := codec.NewBuffer(b)
500 buf.EncodeInt32(m.Retval)
501 return buf.Bytes(), nil
503 func (m *IgmpGroupPrefixSetReply) Unmarshal(b []byte) error {
504 buf := codec.NewBuffer(b)
505 m.Retval = buf.DecodeInt32()
509 // IgmpListen defines message 'igmp_listen'.
510 type IgmpListen struct {
511 Group IgmpGroup `binapi:"igmp_group,name=group" json:"group,omitempty"`
514 func (m *IgmpListen) Reset() { *m = IgmpListen{} }
515 func (*IgmpListen) GetMessageName() string { return "igmp_listen" }
516 func (*IgmpListen) GetCrcString() string { return "19a49f1e" }
517 func (*IgmpListen) GetMessageType() api.MessageType {
518 return api.RequestMessage
521 func (m *IgmpListen) Size() (size int) {
525 size += 4 // m.Group.Filter
526 size += 1 // m.Group.NSrcs
527 size += 4 // m.Group.SwIfIndex
528 size += 1 * 4 // m.Group.Gaddr
529 for j2 := 0; j2 < len(m.Group.Saddrs); j2++ {
530 var s2 ip_types.IP4Address
532 if j2 < len(m.Group.Saddrs) {
533 s2 = m.Group.Saddrs[j2]
539 func (m *IgmpListen) Marshal(b []byte) ([]byte, error) {
541 b = make([]byte, m.Size())
543 buf := codec.NewBuffer(b)
544 buf.EncodeUint32(uint32(m.Group.Filter))
545 buf.EncodeUint8(uint8(len(m.Group.Saddrs)))
546 buf.EncodeUint32(uint32(m.Group.SwIfIndex))
547 buf.EncodeBytes(m.Group.Gaddr[:], 4)
548 for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
549 var v1 ip_types.IP4Address // Saddrs
550 if j1 < len(m.Group.Saddrs) {
551 v1 = m.Group.Saddrs[j1]
553 buf.EncodeBytes(v1[:], 4)
555 return buf.Bytes(), nil
557 func (m *IgmpListen) Unmarshal(b []byte) error {
558 buf := codec.NewBuffer(b)
559 m.Group.Filter = FilterMode(buf.DecodeUint32())
560 m.Group.NSrcs = buf.DecodeUint8()
561 m.Group.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
562 copy(m.Group.Gaddr[:], buf.DecodeBytes(4))
563 m.Group.Saddrs = make([]ip_types.IP4Address, m.Group.NSrcs)
564 for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
565 copy(m.Group.Saddrs[j1][:], buf.DecodeBytes(4))
570 // IgmpListenReply defines message 'igmp_listen_reply'.
571 type IgmpListenReply struct {
572 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
575 func (m *IgmpListenReply) Reset() { *m = IgmpListenReply{} }
576 func (*IgmpListenReply) GetMessageName() string { return "igmp_listen_reply" }
577 func (*IgmpListenReply) GetCrcString() string { return "e8d4e804" }
578 func (*IgmpListenReply) GetMessageType() api.MessageType {
579 return api.ReplyMessage
582 func (m *IgmpListenReply) Size() (size int) {
586 size += 4 // m.Retval
589 func (m *IgmpListenReply) Marshal(b []byte) ([]byte, error) {
591 b = make([]byte, m.Size())
593 buf := codec.NewBuffer(b)
594 buf.EncodeInt32(m.Retval)
595 return buf.Bytes(), nil
597 func (m *IgmpListenReply) Unmarshal(b []byte) error {
598 buf := codec.NewBuffer(b)
599 m.Retval = buf.DecodeInt32()
603 // IgmpProxyDeviceAddDel defines message 'igmp_proxy_device_add_del'.
604 type IgmpProxyDeviceAddDel struct {
605 Add uint8 `binapi:"u8,name=add" json:"add,omitempty"`
606 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
607 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
610 func (m *IgmpProxyDeviceAddDel) Reset() { *m = IgmpProxyDeviceAddDel{} }
611 func (*IgmpProxyDeviceAddDel) GetMessageName() string { return "igmp_proxy_device_add_del" }
612 func (*IgmpProxyDeviceAddDel) GetCrcString() string { return "0b9be9ce" }
613 func (*IgmpProxyDeviceAddDel) GetMessageType() api.MessageType {
614 return api.RequestMessage
617 func (m *IgmpProxyDeviceAddDel) Size() (size int) {
623 size += 4 // m.SwIfIndex
626 func (m *IgmpProxyDeviceAddDel) Marshal(b []byte) ([]byte, error) {
628 b = make([]byte, m.Size())
630 buf := codec.NewBuffer(b)
631 buf.EncodeUint8(m.Add)
632 buf.EncodeUint32(m.VrfID)
633 buf.EncodeUint32(uint32(m.SwIfIndex))
634 return buf.Bytes(), nil
636 func (m *IgmpProxyDeviceAddDel) Unmarshal(b []byte) error {
637 buf := codec.NewBuffer(b)
638 m.Add = buf.DecodeUint8()
639 m.VrfID = buf.DecodeUint32()
640 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
644 // IgmpProxyDeviceAddDelInterface defines message 'igmp_proxy_device_add_del_interface'.
645 type IgmpProxyDeviceAddDelInterface struct {
646 Add bool `binapi:"bool,name=add" json:"add,omitempty"`
647 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
648 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
651 func (m *IgmpProxyDeviceAddDelInterface) Reset() { *m = IgmpProxyDeviceAddDelInterface{} }
652 func (*IgmpProxyDeviceAddDelInterface) GetMessageName() string {
653 return "igmp_proxy_device_add_del_interface"
655 func (*IgmpProxyDeviceAddDelInterface) GetCrcString() string { return "1a9ec24a" }
656 func (*IgmpProxyDeviceAddDelInterface) GetMessageType() api.MessageType {
657 return api.RequestMessage
660 func (m *IgmpProxyDeviceAddDelInterface) Size() (size int) {
666 size += 4 // m.SwIfIndex
669 func (m *IgmpProxyDeviceAddDelInterface) Marshal(b []byte) ([]byte, error) {
671 b = make([]byte, m.Size())
673 buf := codec.NewBuffer(b)
674 buf.EncodeBool(m.Add)
675 buf.EncodeUint32(m.VrfID)
676 buf.EncodeUint32(uint32(m.SwIfIndex))
677 return buf.Bytes(), nil
679 func (m *IgmpProxyDeviceAddDelInterface) Unmarshal(b []byte) error {
680 buf := codec.NewBuffer(b)
681 m.Add = buf.DecodeBool()
682 m.VrfID = buf.DecodeUint32()
683 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
687 // IgmpProxyDeviceAddDelInterfaceReply defines message 'igmp_proxy_device_add_del_interface_reply'.
688 type IgmpProxyDeviceAddDelInterfaceReply struct {
689 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
692 func (m *IgmpProxyDeviceAddDelInterfaceReply) Reset() { *m = IgmpProxyDeviceAddDelInterfaceReply{} }
693 func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageName() string {
694 return "igmp_proxy_device_add_del_interface_reply"
696 func (*IgmpProxyDeviceAddDelInterfaceReply) GetCrcString() string { return "e8d4e804" }
697 func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageType() api.MessageType {
698 return api.ReplyMessage
701 func (m *IgmpProxyDeviceAddDelInterfaceReply) Size() (size int) {
705 size += 4 // m.Retval
708 func (m *IgmpProxyDeviceAddDelInterfaceReply) Marshal(b []byte) ([]byte, error) {
710 b = make([]byte, m.Size())
712 buf := codec.NewBuffer(b)
713 buf.EncodeInt32(m.Retval)
714 return buf.Bytes(), nil
716 func (m *IgmpProxyDeviceAddDelInterfaceReply) Unmarshal(b []byte) error {
717 buf := codec.NewBuffer(b)
718 m.Retval = buf.DecodeInt32()
722 // IgmpProxyDeviceAddDelReply defines message 'igmp_proxy_device_add_del_reply'.
723 type IgmpProxyDeviceAddDelReply struct {
724 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
727 func (m *IgmpProxyDeviceAddDelReply) Reset() { *m = IgmpProxyDeviceAddDelReply{} }
728 func (*IgmpProxyDeviceAddDelReply) GetMessageName() string { return "igmp_proxy_device_add_del_reply" }
729 func (*IgmpProxyDeviceAddDelReply) GetCrcString() string { return "e8d4e804" }
730 func (*IgmpProxyDeviceAddDelReply) GetMessageType() api.MessageType {
731 return api.ReplyMessage
734 func (m *IgmpProxyDeviceAddDelReply) Size() (size int) {
738 size += 4 // m.Retval
741 func (m *IgmpProxyDeviceAddDelReply) Marshal(b []byte) ([]byte, error) {
743 b = make([]byte, m.Size())
745 buf := codec.NewBuffer(b)
746 buf.EncodeInt32(m.Retval)
747 return buf.Bytes(), nil
749 func (m *IgmpProxyDeviceAddDelReply) Unmarshal(b []byte) error {
750 buf := codec.NewBuffer(b)
751 m.Retval = buf.DecodeInt32()
755 // WantIgmpEvents defines message 'want_igmp_events'.
756 type WantIgmpEvents struct {
757 Enable uint32 `binapi:"u32,name=enable" json:"enable,omitempty"`
758 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
761 func (m *WantIgmpEvents) Reset() { *m = WantIgmpEvents{} }
762 func (*WantIgmpEvents) GetMessageName() string { return "want_igmp_events" }
763 func (*WantIgmpEvents) GetCrcString() string { return "cfaccc1f" }
764 func (*WantIgmpEvents) GetMessageType() api.MessageType {
765 return api.RequestMessage
768 func (m *WantIgmpEvents) Size() (size int) {
772 size += 4 // m.Enable
776 func (m *WantIgmpEvents) Marshal(b []byte) ([]byte, error) {
778 b = make([]byte, m.Size())
780 buf := codec.NewBuffer(b)
781 buf.EncodeUint32(m.Enable)
782 buf.EncodeUint32(m.PID)
783 return buf.Bytes(), nil
785 func (m *WantIgmpEvents) Unmarshal(b []byte) error {
786 buf := codec.NewBuffer(b)
787 m.Enable = buf.DecodeUint32()
788 m.PID = buf.DecodeUint32()
792 // WantIgmpEventsReply defines message 'want_igmp_events_reply'.
793 type WantIgmpEventsReply struct {
794 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
797 func (m *WantIgmpEventsReply) Reset() { *m = WantIgmpEventsReply{} }
798 func (*WantIgmpEventsReply) GetMessageName() string { return "want_igmp_events_reply" }
799 func (*WantIgmpEventsReply) GetCrcString() string { return "e8d4e804" }
800 func (*WantIgmpEventsReply) GetMessageType() api.MessageType {
801 return api.ReplyMessage
804 func (m *WantIgmpEventsReply) Size() (size int) {
808 size += 4 // m.Retval
811 func (m *WantIgmpEventsReply) Marshal(b []byte) ([]byte, error) {
813 b = make([]byte, m.Size())
815 buf := codec.NewBuffer(b)
816 buf.EncodeInt32(m.Retval)
817 return buf.Bytes(), nil
819 func (m *WantIgmpEventsReply) Unmarshal(b []byte) error {
820 buf := codec.NewBuffer(b)
821 m.Retval = buf.DecodeInt32()
825 func init() { file_igmp_binapi_init() }
826 func file_igmp_binapi_init() {
827 api.RegisterMessage((*IgmpClearInterface)(nil), "igmp_clear_interface_f9e6675e")
828 api.RegisterMessage((*IgmpClearInterfaceReply)(nil), "igmp_clear_interface_reply_e8d4e804")
829 api.RegisterMessage((*IgmpDetails)(nil), "igmp_details_38f09929")
830 api.RegisterMessage((*IgmpDump)(nil), "igmp_dump_f9e6675e")
831 api.RegisterMessage((*IgmpEnableDisable)(nil), "igmp_enable_disable_b1edfb96")
832 api.RegisterMessage((*IgmpEnableDisableReply)(nil), "igmp_enable_disable_reply_e8d4e804")
833 api.RegisterMessage((*IgmpEvent)(nil), "igmp_event_85fe93ec")
834 api.RegisterMessage((*IgmpGroupPrefixDetails)(nil), "igmp_group_prefix_details_259ccd81")
835 api.RegisterMessage((*IgmpGroupPrefixDump)(nil), "igmp_group_prefix_dump_51077d14")
836 api.RegisterMessage((*IgmpGroupPrefixSet)(nil), "igmp_group_prefix_set_5b14a5ce")
837 api.RegisterMessage((*IgmpGroupPrefixSetReply)(nil), "igmp_group_prefix_set_reply_e8d4e804")
838 api.RegisterMessage((*IgmpListen)(nil), "igmp_listen_19a49f1e")
839 api.RegisterMessage((*IgmpListenReply)(nil), "igmp_listen_reply_e8d4e804")
840 api.RegisterMessage((*IgmpProxyDeviceAddDel)(nil), "igmp_proxy_device_add_del_0b9be9ce")
841 api.RegisterMessage((*IgmpProxyDeviceAddDelInterface)(nil), "igmp_proxy_device_add_del_interface_1a9ec24a")
842 api.RegisterMessage((*IgmpProxyDeviceAddDelInterfaceReply)(nil), "igmp_proxy_device_add_del_interface_reply_e8d4e804")
843 api.RegisterMessage((*IgmpProxyDeviceAddDelReply)(nil), "igmp_proxy_device_add_del_reply_e8d4e804")
844 api.RegisterMessage((*WantIgmpEvents)(nil), "want_igmp_events_cfaccc1f")
845 api.RegisterMessage((*WantIgmpEventsReply)(nil), "want_igmp_events_reply_e8d4e804")
848 // Messages returns list of all messages in this module.
849 func AllMessages() []api.Message {
850 return []api.Message{
851 (*IgmpClearInterface)(nil),
852 (*IgmpClearInterfaceReply)(nil),
855 (*IgmpEnableDisable)(nil),
856 (*IgmpEnableDisableReply)(nil),
858 (*IgmpGroupPrefixDetails)(nil),
859 (*IgmpGroupPrefixDump)(nil),
860 (*IgmpGroupPrefixSet)(nil),
861 (*IgmpGroupPrefixSetReply)(nil),
863 (*IgmpListenReply)(nil),
864 (*IgmpProxyDeviceAddDel)(nil),
865 (*IgmpProxyDeviceAddDelInterface)(nil),
866 (*IgmpProxyDeviceAddDelInterfaceReply)(nil),
867 (*IgmpProxyDeviceAddDelReply)(nil),
868 (*WantIgmpEvents)(nil),
869 (*WantIgmpEventsReply)(nil),