1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package igmp contains generated bindings for API file igmp.api.
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"
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() (size int) {
121 size += 4 // m.SwIfIndex
124 func (m *IgmpClearInterface) Marshal(b []byte) ([]byte, error) {
126 b = make([]byte, m.Size())
128 buf := codec.NewBuffer(b)
129 buf.EncodeUint32(uint32(m.SwIfIndex))
130 return buf.Bytes(), nil
132 func (m *IgmpClearInterface) Unmarshal(b []byte) error {
133 buf := codec.NewBuffer(b)
134 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
138 // IgmpClearInterfaceReply defines message 'igmp_clear_interface_reply'.
139 type IgmpClearInterfaceReply struct {
140 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
150 func (m *IgmpClearInterfaceReply) Size() (size int) {
154 size += 4 // m.Retval
157 func (m *IgmpClearInterfaceReply) Marshal(b []byte) ([]byte, error) {
159 b = make([]byte, m.Size())
161 buf := codec.NewBuffer(b)
162 buf.EncodeInt32(m.Retval)
163 return buf.Bytes(), nil
165 func (m *IgmpClearInterfaceReply) Unmarshal(b []byte) error {
166 buf := codec.NewBuffer(b)
167 m.Retval = buf.DecodeInt32()
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"`
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
185 func (m *IgmpDetails) Size() (size int) {
189 size += 4 // m.SwIfIndex
190 size += 1 * 4 // m.Saddr
191 size += 1 * 4 // m.Gaddr
194 func (m *IgmpDetails) Marshal(b []byte) ([]byte, error) {
196 b = make([]byte, m.Size())
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
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))
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"`
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
224 func (m *IgmpDump) Size() (size int) {
228 size += 4 // m.SwIfIndex
231 func (m *IgmpDump) Marshal(b []byte) ([]byte, error) {
233 b = make([]byte, m.Size())
235 buf := codec.NewBuffer(b)
236 buf.EncodeUint32(uint32(m.SwIfIndex))
237 return buf.Bytes(), nil
239 func (m *IgmpDump) Unmarshal(b []byte) error {
240 buf := codec.NewBuffer(b)
241 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
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"`
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
259 func (m *IgmpEnableDisable) Size() (size int) {
263 size += 1 // m.Enable
265 size += 4 // m.SwIfIndex
268 func (m *IgmpEnableDisable) Marshal(b []byte) ([]byte, error) {
270 b = make([]byte, m.Size())
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
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())
286 // IgmpEnableDisableReply defines message 'igmp_enable_disable_reply'.
287 type IgmpEnableDisableReply struct {
288 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
298 func (m *IgmpEnableDisableReply) Size() (size int) {
302 size += 4 // m.Retval
305 func (m *IgmpEnableDisableReply) Marshal(b []byte) ([]byte, error) {
307 b = make([]byte, m.Size())
309 buf := codec.NewBuffer(b)
310 buf.EncodeInt32(m.Retval)
311 return buf.Bytes(), nil
313 func (m *IgmpEnableDisableReply) Unmarshal(b []byte) error {
314 buf := codec.NewBuffer(b)
315 m.Retval = buf.DecodeInt32()
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"`
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
334 func (m *IgmpEvent) Size() (size int) {
338 size += 4 // m.SwIfIndex
339 size += 4 // m.Filter
340 size += 1 * 4 // m.Saddr
341 size += 1 * 4 // m.Gaddr
344 func (m *IgmpEvent) Marshal(b []byte) ([]byte, error) {
346 b = make([]byte, m.Size())
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
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))
364 // IgmpGroupPrefixDetails defines message 'igmp_group_prefix_details'.
365 type IgmpGroupPrefixDetails struct {
366 Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
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
376 func (m *IgmpGroupPrefixDetails) Size() (size int) {
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
386 func (m *IgmpGroupPrefixDetails) Marshal(b []byte) ([]byte, error) {
388 b = make([]byte, m.Size())
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
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()
406 // IgmpGroupPrefixDump defines message 'igmp_group_prefix_dump'.
407 type IgmpGroupPrefixDump struct{}
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
416 func (m *IgmpGroupPrefixDump) Size() (size int) {
422 func (m *IgmpGroupPrefixDump) Marshal(b []byte) ([]byte, error) {
424 b = make([]byte, m.Size())
426 buf := codec.NewBuffer(b)
427 return buf.Bytes(), nil
429 func (m *IgmpGroupPrefixDump) Unmarshal(b []byte) error {
433 // IgmpGroupPrefixSet defines message 'igmp_group_prefix_set'.
434 type IgmpGroupPrefixSet struct {
435 Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
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
445 func (m *IgmpGroupPrefixSet) Size() (size int) {
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
455 func (m *IgmpGroupPrefixSet) Marshal(b []byte) ([]byte, error) {
457 b = make([]byte, m.Size())
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
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()
475 // IgmpGroupPrefixSetReply defines message 'igmp_group_prefix_set_reply'.
476 type IgmpGroupPrefixSetReply struct {
477 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
487 func (m *IgmpGroupPrefixSetReply) Size() (size int) {
491 size += 4 // m.Retval
494 func (m *IgmpGroupPrefixSetReply) Marshal(b []byte) ([]byte, error) {
496 b = make([]byte, m.Size())
498 buf := codec.NewBuffer(b)
499 buf.EncodeInt32(m.Retval)
500 return buf.Bytes(), nil
502 func (m *IgmpGroupPrefixSetReply) Unmarshal(b []byte) error {
503 buf := codec.NewBuffer(b)
504 m.Retval = buf.DecodeInt32()
508 // IgmpListen defines message 'igmp_listen'.
509 type IgmpListen struct {
510 Group IgmpGroup `binapi:"igmp_group,name=group" json:"group,omitempty"`
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
520 func (m *IgmpListen) Size() (size int) {
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
531 if j2 < len(m.Group.Saddrs) {
532 s2 = m.Group.Saddrs[j2]
538 func (m *IgmpListen) Marshal(b []byte) ([]byte, error) {
540 b = make([]byte, m.Size())
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]
552 buf.EncodeBytes(v1[:], 4)
554 return buf.Bytes(), nil
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))
569 // IgmpListenReply defines message 'igmp_listen_reply'.
570 type IgmpListenReply struct {
571 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
581 func (m *IgmpListenReply) Size() (size int) {
585 size += 4 // m.Retval
588 func (m *IgmpListenReply) Marshal(b []byte) ([]byte, error) {
590 b = make([]byte, m.Size())
592 buf := codec.NewBuffer(b)
593 buf.EncodeInt32(m.Retval)
594 return buf.Bytes(), nil
596 func (m *IgmpListenReply) Unmarshal(b []byte) error {
597 buf := codec.NewBuffer(b)
598 m.Retval = buf.DecodeInt32()
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"`
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
616 func (m *IgmpProxyDeviceAddDel) Size() (size int) {
622 size += 4 // m.SwIfIndex
625 func (m *IgmpProxyDeviceAddDel) Marshal(b []byte) ([]byte, error) {
627 b = make([]byte, m.Size())
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
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())
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"`
650 func (m *IgmpProxyDeviceAddDelInterface) Reset() { *m = IgmpProxyDeviceAddDelInterface{} }
651 func (*IgmpProxyDeviceAddDelInterface) GetMessageName() string {
652 return "igmp_proxy_device_add_del_interface"
654 func (*IgmpProxyDeviceAddDelInterface) GetCrcString() string { return "1a9ec24a" }
655 func (*IgmpProxyDeviceAddDelInterface) GetMessageType() api.MessageType {
656 return api.RequestMessage
659 func (m *IgmpProxyDeviceAddDelInterface) Size() (size int) {
665 size += 4 // m.SwIfIndex
668 func (m *IgmpProxyDeviceAddDelInterface) Marshal(b []byte) ([]byte, error) {
670 b = make([]byte, m.Size())
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
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())
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"`
691 func (m *IgmpProxyDeviceAddDelInterfaceReply) Reset() { *m = IgmpProxyDeviceAddDelInterfaceReply{} }
692 func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageName() string {
693 return "igmp_proxy_device_add_del_interface_reply"
695 func (*IgmpProxyDeviceAddDelInterfaceReply) GetCrcString() string { return "e8d4e804" }
696 func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageType() api.MessageType {
697 return api.ReplyMessage
700 func (m *IgmpProxyDeviceAddDelInterfaceReply) Size() (size int) {
704 size += 4 // m.Retval
707 func (m *IgmpProxyDeviceAddDelInterfaceReply) Marshal(b []byte) ([]byte, error) {
709 b = make([]byte, m.Size())
711 buf := codec.NewBuffer(b)
712 buf.EncodeInt32(m.Retval)
713 return buf.Bytes(), nil
715 func (m *IgmpProxyDeviceAddDelInterfaceReply) Unmarshal(b []byte) error {
716 buf := codec.NewBuffer(b)
717 m.Retval = buf.DecodeInt32()
721 // IgmpProxyDeviceAddDelReply defines message 'igmp_proxy_device_add_del_reply'.
722 type IgmpProxyDeviceAddDelReply struct {
723 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
733 func (m *IgmpProxyDeviceAddDelReply) Size() (size int) {
737 size += 4 // m.Retval
740 func (m *IgmpProxyDeviceAddDelReply) Marshal(b []byte) ([]byte, error) {
742 b = make([]byte, m.Size())
744 buf := codec.NewBuffer(b)
745 buf.EncodeInt32(m.Retval)
746 return buf.Bytes(), nil
748 func (m *IgmpProxyDeviceAddDelReply) Unmarshal(b []byte) error {
749 buf := codec.NewBuffer(b)
750 m.Retval = buf.DecodeInt32()
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"`
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
767 func (m *WantIgmpEvents) Size() (size int) {
771 size += 4 // m.Enable
775 func (m *WantIgmpEvents) Marshal(b []byte) ([]byte, error) {
777 b = make([]byte, m.Size())
779 buf := codec.NewBuffer(b)
780 buf.EncodeUint32(m.Enable)
781 buf.EncodeUint32(m.PID)
782 return buf.Bytes(), nil
784 func (m *WantIgmpEvents) Unmarshal(b []byte) error {
785 buf := codec.NewBuffer(b)
786 m.Enable = buf.DecodeUint32()
787 m.PID = buf.DecodeUint32()
791 // WantIgmpEventsReply defines message 'want_igmp_events_reply'.
792 type WantIgmpEventsReply struct {
793 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
803 func (m *WantIgmpEventsReply) Size() (size int) {
807 size += 4 // m.Retval
810 func (m *WantIgmpEventsReply) Marshal(b []byte) ([]byte, error) {
812 b = make([]byte, m.Size())
814 buf := codec.NewBuffer(b)
815 buf.EncodeInt32(m.Retval)
816 return buf.Bytes(), nil
818 func (m *WantIgmpEventsReply) Unmarshal(b []byte) error {
819 buf := codec.NewBuffer(b)
820 m.Retval = buf.DecodeInt32()
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")
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),
854 (*IgmpEnableDisable)(nil),
855 (*IgmpEnableDisableReply)(nil),
857 (*IgmpGroupPrefixDetails)(nil),
858 (*IgmpGroupPrefixDump)(nil),
859 (*IgmpGroupPrefixSet)(nil),
860 (*IgmpGroupPrefixSetReply)(nil),
862 (*IgmpListenReply)(nil),
863 (*IgmpProxyDeviceAddDel)(nil),
864 (*IgmpProxyDeviceAddDelInterface)(nil),
865 (*IgmpProxyDeviceAddDelInterfaceReply)(nil),
866 (*IgmpProxyDeviceAddDelReply)(nil),
867 (*WantIgmpEvents)(nil),
868 (*WantIgmpEventsReply)(nil),