1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/ipfix_export.api.json
7 // Package ipfix_export contains generated bindings for API file ipfix_export.api.
24 api "git.fd.io/govpp.git/api"
25 codec "git.fd.io/govpp.git/codec"
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
35 APIFile = "ipfix_export"
37 VersionCrc = 0xee6ea488
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
44 ADDRESS_IP4 AddressFamily = 0
45 ADDRESS_IP6 AddressFamily = 1
49 AddressFamily_name = map[uint32]string{
53 AddressFamily_value = map[string]uint32{
59 func (x AddressFamily) String() string {
60 s, ok := AddressFamily_name[uint32(x)]
64 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
67 // IPDscp defines enum 'ip_dscp'.
71 IP_API_DSCP_CS0 IPDscp = 0
72 IP_API_DSCP_CS1 IPDscp = 8
73 IP_API_DSCP_AF11 IPDscp = 10
74 IP_API_DSCP_AF12 IPDscp = 12
75 IP_API_DSCP_AF13 IPDscp = 14
76 IP_API_DSCP_CS2 IPDscp = 16
77 IP_API_DSCP_AF21 IPDscp = 18
78 IP_API_DSCP_AF22 IPDscp = 20
79 IP_API_DSCP_AF23 IPDscp = 22
80 IP_API_DSCP_CS3 IPDscp = 24
81 IP_API_DSCP_AF31 IPDscp = 26
82 IP_API_DSCP_AF32 IPDscp = 28
83 IP_API_DSCP_AF33 IPDscp = 30
84 IP_API_DSCP_CS4 IPDscp = 32
85 IP_API_DSCP_AF41 IPDscp = 34
86 IP_API_DSCP_AF42 IPDscp = 36
87 IP_API_DSCP_AF43 IPDscp = 38
88 IP_API_DSCP_CS5 IPDscp = 40
89 IP_API_DSCP_EF IPDscp = 46
90 IP_API_DSCP_CS6 IPDscp = 48
91 IP_API_DSCP_CS7 IPDscp = 50
95 IPDscp_name = map[uint8]string{
98 10: "IP_API_DSCP_AF11",
99 12: "IP_API_DSCP_AF12",
100 14: "IP_API_DSCP_AF13",
101 16: "IP_API_DSCP_CS2",
102 18: "IP_API_DSCP_AF21",
103 20: "IP_API_DSCP_AF22",
104 22: "IP_API_DSCP_AF23",
105 24: "IP_API_DSCP_CS3",
106 26: "IP_API_DSCP_AF31",
107 28: "IP_API_DSCP_AF32",
108 30: "IP_API_DSCP_AF33",
109 32: "IP_API_DSCP_CS4",
110 34: "IP_API_DSCP_AF41",
111 36: "IP_API_DSCP_AF42",
112 38: "IP_API_DSCP_AF43",
113 40: "IP_API_DSCP_CS5",
114 46: "IP_API_DSCP_EF",
115 48: "IP_API_DSCP_CS6",
116 50: "IP_API_DSCP_CS7",
118 IPDscp_value = map[string]uint8{
119 "IP_API_DSCP_CS0": 0,
120 "IP_API_DSCP_CS1": 8,
121 "IP_API_DSCP_AF11": 10,
122 "IP_API_DSCP_AF12": 12,
123 "IP_API_DSCP_AF13": 14,
124 "IP_API_DSCP_CS2": 16,
125 "IP_API_DSCP_AF21": 18,
126 "IP_API_DSCP_AF22": 20,
127 "IP_API_DSCP_AF23": 22,
128 "IP_API_DSCP_CS3": 24,
129 "IP_API_DSCP_AF31": 26,
130 "IP_API_DSCP_AF32": 28,
131 "IP_API_DSCP_AF33": 30,
132 "IP_API_DSCP_CS4": 32,
133 "IP_API_DSCP_AF41": 34,
134 "IP_API_DSCP_AF42": 36,
135 "IP_API_DSCP_AF43": 38,
136 "IP_API_DSCP_CS5": 40,
137 "IP_API_DSCP_EF": 46,
138 "IP_API_DSCP_CS6": 48,
139 "IP_API_DSCP_CS7": 50,
143 func (x IPDscp) String() string {
144 s, ok := IPDscp_name[uint8(x)]
148 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
151 // IPEcn defines enum 'ip_ecn'.
155 IP_API_ECN_NONE IPEcn = 0
156 IP_API_ECN_ECT0 IPEcn = 1
157 IP_API_ECN_ECT1 IPEcn = 2
158 IP_API_ECN_CE IPEcn = 3
162 IPEcn_name = map[uint8]string{
163 0: "IP_API_ECN_NONE",
164 1: "IP_API_ECN_ECT0",
165 2: "IP_API_ECN_ECT1",
168 IPEcn_value = map[string]uint8{
169 "IP_API_ECN_NONE": 0,
170 "IP_API_ECN_ECT0": 1,
171 "IP_API_ECN_ECT1": 2,
176 func (x IPEcn) String() string {
177 s, ok := IPEcn_name[uint8(x)]
181 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
184 // IPProto defines enum 'ip_proto'.
188 IP_API_PROTO_HOPOPT IPProto = 0
189 IP_API_PROTO_ICMP IPProto = 1
190 IP_API_PROTO_IGMP IPProto = 2
191 IP_API_PROTO_TCP IPProto = 6
192 IP_API_PROTO_UDP IPProto = 17
193 IP_API_PROTO_GRE IPProto = 47
194 IP_API_PROTO_AH IPProto = 50
195 IP_API_PROTO_ESP IPProto = 51
196 IP_API_PROTO_EIGRP IPProto = 88
197 IP_API_PROTO_OSPF IPProto = 89
198 IP_API_PROTO_SCTP IPProto = 132
199 IP_API_PROTO_RESERVED IPProto = 255
203 IPProto_name = map[uint32]string{
204 0: "IP_API_PROTO_HOPOPT",
205 1: "IP_API_PROTO_ICMP",
206 2: "IP_API_PROTO_IGMP",
207 6: "IP_API_PROTO_TCP",
208 17: "IP_API_PROTO_UDP",
209 47: "IP_API_PROTO_GRE",
210 50: "IP_API_PROTO_AH",
211 51: "IP_API_PROTO_ESP",
212 88: "IP_API_PROTO_EIGRP",
213 89: "IP_API_PROTO_OSPF",
214 132: "IP_API_PROTO_SCTP",
215 255: "IP_API_PROTO_RESERVED",
217 IPProto_value = map[string]uint32{
218 "IP_API_PROTO_HOPOPT": 0,
219 "IP_API_PROTO_ICMP": 1,
220 "IP_API_PROTO_IGMP": 2,
221 "IP_API_PROTO_TCP": 6,
222 "IP_API_PROTO_UDP": 17,
223 "IP_API_PROTO_GRE": 47,
224 "IP_API_PROTO_AH": 50,
225 "IP_API_PROTO_ESP": 51,
226 "IP_API_PROTO_EIGRP": 88,
227 "IP_API_PROTO_OSPF": 89,
228 "IP_API_PROTO_SCTP": 132,
229 "IP_API_PROTO_RESERVED": 255,
233 func (x IPProto) String() string {
234 s, ok := IPProto_name[uint32(x)]
238 return "IPProto(" + strconv.Itoa(int(x)) + ")"
241 // AddressWithPrefix defines alias 'address_with_prefix'.
242 type AddressWithPrefix Prefix
244 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
245 prefix, err := ParsePrefix(s)
247 return AddressWithPrefix{}, err
249 return AddressWithPrefix(prefix), nil
252 func (x AddressWithPrefix) String() string {
253 return Prefix(x).String()
256 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
257 return []byte(x.String()), nil
260 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
261 prefix, err := ParseAddressWithPrefix(string(text))
269 // IP4Address defines alias 'ip4_address'.
270 type IP4Address [4]uint8
272 func ParseIP4Address(s string) (IP4Address, error) {
273 ip := net.ParseIP(s).To4()
275 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
277 var ipaddr IP4Address
278 copy(ipaddr[:], ip.To4())
282 func (x IP4Address) ToIP() net.IP {
283 return net.IP(x[:]).To4()
286 func (x IP4Address) String() string {
287 return x.ToIP().String()
290 func (x *IP4Address) MarshalText() ([]byte, error) {
291 return []byte(x.String()), nil
294 func (x *IP4Address) UnmarshalText(text []byte) error {
295 ipaddr, err := ParseIP4Address(string(text))
303 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
304 type IP4AddressWithPrefix IP4Prefix
306 // IP6Address defines alias 'ip6_address'.
307 type IP6Address [16]uint8
309 func ParseIP6Address(s string) (IP6Address, error) {
310 ip := net.ParseIP(s).To16()
312 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
314 var ipaddr IP6Address
315 copy(ipaddr[:], ip.To16())
319 func (x IP6Address) ToIP() net.IP {
320 return net.IP(x[:]).To16()
323 func (x IP6Address) String() string {
324 return x.ToIP().String()
327 func (x *IP6Address) MarshalText() ([]byte, error) {
328 return []byte(x.String()), nil
331 func (x *IP6Address) UnmarshalText(text []byte) error {
332 ipaddr, err := ParseIP6Address(string(text))
340 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
341 type IP6AddressWithPrefix IP6Prefix
343 // Address defines type 'address'.
344 type Address struct {
345 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
346 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
349 func ParseAddress(s string) (Address, error) {
352 return Address{}, fmt.Errorf("invalid address: %s", s)
354 return AddressFromIP(ip), nil
357 func AddressFromIP(ip net.IP) Address {
360 addr.Af = ADDRESS_IP6
362 copy(ip6[:], ip.To16())
365 addr.Af = ADDRESS_IP4
367 copy(ip4[:], ip.To4())
373 func (x Address) ToIP() net.IP {
374 if x.Af == ADDRESS_IP6 {
376 return net.IP(ip6[:]).To16()
379 return net.IP(ip4[:]).To4()
383 func (x Address) String() string {
384 return x.ToIP().String()
387 func (x *Address) MarshalText() ([]byte, error) {
388 return []byte(x.String()), nil
391 func (x *Address) UnmarshalText(text []byte) error {
392 addr, err := ParseAddress(string(text))
400 // IP4Prefix defines type 'ip4_prefix'.
401 type IP4Prefix struct {
402 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
403 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
406 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
407 hasPrefix := strings.Contains(s, "/")
409 ip, network, err := net.ParseCIDR(s)
411 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
413 maskSize, _ := network.Mask.Size()
414 prefix.Len = byte(maskSize)
415 prefix.Address, err = ParseIP4Address(ip.String())
417 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
421 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
423 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
425 prefix.Len = byte(defaultMaskSize)
426 prefix.Address, err = ParseIP4Address(ip.String())
428 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
434 func (x IP4Prefix) ToIPNet() *net.IPNet {
435 mask := net.CIDRMask(int(x.Len), 32)
436 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
440 func (x IP4Prefix) String() string {
441 ip := x.Address.String()
442 return ip + "/" + strconv.Itoa(int(x.Len))
445 func (x *IP4Prefix) MarshalText() ([]byte, error) {
446 return []byte(x.String()), nil
449 func (x *IP4Prefix) UnmarshalText(text []byte) error {
450 prefix, err := ParseIP4Prefix(string(text))
458 // IP6Prefix defines type 'ip6_prefix'.
459 type IP6Prefix struct {
460 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
461 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
464 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
465 hasPrefix := strings.Contains(s, "/")
467 ip, network, err := net.ParseCIDR(s)
469 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
471 maskSize, _ := network.Mask.Size()
472 prefix.Len = byte(maskSize)
473 prefix.Address, err = ParseIP6Address(ip.String())
475 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
479 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
481 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
483 prefix.Len = byte(defaultMaskSize)
484 prefix.Address, err = ParseIP6Address(ip.String())
486 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
492 func (x IP6Prefix) ToIPNet() *net.IPNet {
493 mask := net.CIDRMask(int(x.Len), 128)
494 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
498 func (x IP6Prefix) String() string {
499 ip := x.Address.String()
500 return ip + "/" + strconv.Itoa(int(x.Len))
503 func (x *IP6Prefix) MarshalText() ([]byte, error) {
504 return []byte(x.String()), nil
507 func (x *IP6Prefix) UnmarshalText(text []byte) error {
508 prefix, err := ParseIP6Prefix(string(text))
516 // Mprefix defines type 'mprefix'.
517 type Mprefix struct {
518 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
519 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
520 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
521 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
524 // Prefix defines type 'prefix'.
526 Address Address `binapi:"address,name=address" json:"address,omitempty"`
527 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
530 func ParsePrefix(ip string) (prefix Prefix, err error) {
531 hasPrefix := strings.Contains(ip, "/")
533 netIP, network, err := net.ParseCIDR(ip)
535 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
537 maskSize, _ := network.Mask.Size()
538 prefix.Len = byte(maskSize)
539 prefix.Address, err = ParseAddress(netIP.String())
541 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
544 netIP := net.ParseIP(ip)
545 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
546 if netIP.To4() == nil {
547 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
549 prefix.Len = byte(defaultMaskSize)
550 prefix.Address, err = ParseAddress(netIP.String())
552 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
558 func (x Prefix) ToIPNet() *net.IPNet {
560 if x.Address.Af == ADDRESS_IP4 {
561 mask = net.CIDRMask(int(x.Len), 32)
563 mask = net.CIDRMask(int(x.Len), 128)
565 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
569 func (x Prefix) String() string {
570 ip := x.Address.String()
571 return ip + "/" + strconv.Itoa(int(x.Len))
574 func (x *Prefix) MarshalText() ([]byte, error) {
575 return []byte(x.String()), nil
578 func (x *Prefix) UnmarshalText(text []byte) error {
579 prefix, err := ParsePrefix(string(text))
587 // PrefixMatcher defines type 'prefix_matcher'.
588 type PrefixMatcher struct {
589 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
590 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
593 // AddressUnion defines union 'address_union'.
594 type AddressUnion struct {
595 // AddressUnion can be one of:
598 XXX_UnionData [16]byte
601 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
605 func (u *AddressUnion) SetIP4(a IP4Address) {
606 buf := codec.NewBuffer(u.XXX_UnionData[:])
607 buf.EncodeBytes(a[:], 4)
609 func (u *AddressUnion) GetIP4() (a IP4Address) {
610 buf := codec.NewBuffer(u.XXX_UnionData[:])
611 copy(a[:], buf.DecodeBytes(4))
615 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
619 func (u *AddressUnion) SetIP6(a IP6Address) {
620 buf := codec.NewBuffer(u.XXX_UnionData[:])
621 buf.EncodeBytes(a[:], 16)
623 func (u *AddressUnion) GetIP6() (a IP6Address) {
624 buf := codec.NewBuffer(u.XXX_UnionData[:])
625 copy(a[:], buf.DecodeBytes(16))
629 // IpfixClassifyStreamDetails defines message 'ipfix_classify_stream_details'.
630 type IpfixClassifyStreamDetails struct {
631 DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
632 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
635 func (m *IpfixClassifyStreamDetails) Reset() { *m = IpfixClassifyStreamDetails{} }
636 func (*IpfixClassifyStreamDetails) GetMessageName() string { return "ipfix_classify_stream_details" }
637 func (*IpfixClassifyStreamDetails) GetCrcString() string { return "2903539d" }
638 func (*IpfixClassifyStreamDetails) GetMessageType() api.MessageType {
639 return api.ReplyMessage
642 func (m *IpfixClassifyStreamDetails) Size() (size int) {
646 size += 4 // m.DomainID
647 size += 2 // m.SrcPort
650 func (m *IpfixClassifyStreamDetails) Marshal(b []byte) ([]byte, error) {
652 b = make([]byte, m.Size())
654 buf := codec.NewBuffer(b)
655 buf.EncodeUint32(m.DomainID)
656 buf.EncodeUint16(m.SrcPort)
657 return buf.Bytes(), nil
659 func (m *IpfixClassifyStreamDetails) Unmarshal(b []byte) error {
660 buf := codec.NewBuffer(b)
661 m.DomainID = buf.DecodeUint32()
662 m.SrcPort = buf.DecodeUint16()
666 // IpfixClassifyStreamDump defines message 'ipfix_classify_stream_dump'.
667 type IpfixClassifyStreamDump struct{}
669 func (m *IpfixClassifyStreamDump) Reset() { *m = IpfixClassifyStreamDump{} }
670 func (*IpfixClassifyStreamDump) GetMessageName() string { return "ipfix_classify_stream_dump" }
671 func (*IpfixClassifyStreamDump) GetCrcString() string { return "51077d14" }
672 func (*IpfixClassifyStreamDump) GetMessageType() api.MessageType {
673 return api.RequestMessage
676 func (m *IpfixClassifyStreamDump) Size() (size int) {
682 func (m *IpfixClassifyStreamDump) Marshal(b []byte) ([]byte, error) {
684 b = make([]byte, m.Size())
686 buf := codec.NewBuffer(b)
687 return buf.Bytes(), nil
689 func (m *IpfixClassifyStreamDump) Unmarshal(b []byte) error {
693 // IpfixClassifyTableAddDel defines message 'ipfix_classify_table_add_del'.
694 type IpfixClassifyTableAddDel struct {
695 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
696 IPVersion AddressFamily `binapi:"address_family,name=ip_version" json:"ip_version,omitempty"`
697 TransportProtocol IPProto `binapi:"ip_proto,name=transport_protocol" json:"transport_protocol,omitempty"`
698 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
701 func (m *IpfixClassifyTableAddDel) Reset() { *m = IpfixClassifyTableAddDel{} }
702 func (*IpfixClassifyTableAddDel) GetMessageName() string { return "ipfix_classify_table_add_del" }
703 func (*IpfixClassifyTableAddDel) GetCrcString() string { return "5118bc5e" }
704 func (*IpfixClassifyTableAddDel) GetMessageType() api.MessageType {
705 return api.RequestMessage
708 func (m *IpfixClassifyTableAddDel) Size() (size int) {
712 size += 4 // m.TableID
713 size += 4 // m.IPVersion
714 size += 4 // m.TransportProtocol
718 func (m *IpfixClassifyTableAddDel) Marshal(b []byte) ([]byte, error) {
720 b = make([]byte, m.Size())
722 buf := codec.NewBuffer(b)
723 buf.EncodeUint32(m.TableID)
724 buf.EncodeUint32(uint32(m.IPVersion))
725 buf.EncodeUint32(uint32(m.TransportProtocol))
726 buf.EncodeBool(m.IsAdd)
727 return buf.Bytes(), nil
729 func (m *IpfixClassifyTableAddDel) Unmarshal(b []byte) error {
730 buf := codec.NewBuffer(b)
731 m.TableID = buf.DecodeUint32()
732 m.IPVersion = AddressFamily(buf.DecodeUint32())
733 m.TransportProtocol = IPProto(buf.DecodeUint32())
734 m.IsAdd = buf.DecodeBool()
738 // IpfixClassifyTableAddDelReply defines message 'ipfix_classify_table_add_del_reply'.
739 type IpfixClassifyTableAddDelReply struct {
740 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
743 func (m *IpfixClassifyTableAddDelReply) Reset() { *m = IpfixClassifyTableAddDelReply{} }
744 func (*IpfixClassifyTableAddDelReply) GetMessageName() string {
745 return "ipfix_classify_table_add_del_reply"
747 func (*IpfixClassifyTableAddDelReply) GetCrcString() string { return "e8d4e804" }
748 func (*IpfixClassifyTableAddDelReply) GetMessageType() api.MessageType {
749 return api.ReplyMessage
752 func (m *IpfixClassifyTableAddDelReply) Size() (size int) {
756 size += 4 // m.Retval
759 func (m *IpfixClassifyTableAddDelReply) Marshal(b []byte) ([]byte, error) {
761 b = make([]byte, m.Size())
763 buf := codec.NewBuffer(b)
764 buf.EncodeInt32(m.Retval)
765 return buf.Bytes(), nil
767 func (m *IpfixClassifyTableAddDelReply) Unmarshal(b []byte) error {
768 buf := codec.NewBuffer(b)
769 m.Retval = buf.DecodeInt32()
773 // IpfixClassifyTableDetails defines message 'ipfix_classify_table_details'.
774 type IpfixClassifyTableDetails struct {
775 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
776 IPVersion AddressFamily `binapi:"address_family,name=ip_version" json:"ip_version,omitempty"`
777 TransportProtocol IPProto `binapi:"ip_proto,name=transport_protocol" json:"transport_protocol,omitempty"`
780 func (m *IpfixClassifyTableDetails) Reset() { *m = IpfixClassifyTableDetails{} }
781 func (*IpfixClassifyTableDetails) GetMessageName() string { return "ipfix_classify_table_details" }
782 func (*IpfixClassifyTableDetails) GetCrcString() string { return "7c8351ec" }
783 func (*IpfixClassifyTableDetails) GetMessageType() api.MessageType {
784 return api.ReplyMessage
787 func (m *IpfixClassifyTableDetails) Size() (size int) {
791 size += 4 // m.TableID
792 size += 4 // m.IPVersion
793 size += 4 // m.TransportProtocol
796 func (m *IpfixClassifyTableDetails) Marshal(b []byte) ([]byte, error) {
798 b = make([]byte, m.Size())
800 buf := codec.NewBuffer(b)
801 buf.EncodeUint32(m.TableID)
802 buf.EncodeUint32(uint32(m.IPVersion))
803 buf.EncodeUint32(uint32(m.TransportProtocol))
804 return buf.Bytes(), nil
806 func (m *IpfixClassifyTableDetails) Unmarshal(b []byte) error {
807 buf := codec.NewBuffer(b)
808 m.TableID = buf.DecodeUint32()
809 m.IPVersion = AddressFamily(buf.DecodeUint32())
810 m.TransportProtocol = IPProto(buf.DecodeUint32())
814 // IpfixClassifyTableDump defines message 'ipfix_classify_table_dump'.
815 type IpfixClassifyTableDump struct{}
817 func (m *IpfixClassifyTableDump) Reset() { *m = IpfixClassifyTableDump{} }
818 func (*IpfixClassifyTableDump) GetMessageName() string { return "ipfix_classify_table_dump" }
819 func (*IpfixClassifyTableDump) GetCrcString() string { return "51077d14" }
820 func (*IpfixClassifyTableDump) GetMessageType() api.MessageType {
821 return api.RequestMessage
824 func (m *IpfixClassifyTableDump) Size() (size int) {
830 func (m *IpfixClassifyTableDump) Marshal(b []byte) ([]byte, error) {
832 b = make([]byte, m.Size())
834 buf := codec.NewBuffer(b)
835 return buf.Bytes(), nil
837 func (m *IpfixClassifyTableDump) Unmarshal(b []byte) error {
841 // IpfixExporterDetails defines message 'ipfix_exporter_details'.
842 type IpfixExporterDetails struct {
843 CollectorAddress Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
844 CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
845 SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
846 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
847 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
848 TemplateInterval uint32 `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
849 UDPChecksum bool `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
852 func (m *IpfixExporterDetails) Reset() { *m = IpfixExporterDetails{} }
853 func (*IpfixExporterDetails) GetMessageName() string { return "ipfix_exporter_details" }
854 func (*IpfixExporterDetails) GetCrcString() string { return "11e07413" }
855 func (*IpfixExporterDetails) GetMessageType() api.MessageType {
856 return api.ReplyMessage
859 func (m *IpfixExporterDetails) Size() (size int) {
863 size += 4 // m.CollectorAddress.Af
864 size += 1 * 16 // m.CollectorAddress.Un
865 size += 2 // m.CollectorPort
866 size += 4 // m.SrcAddress.Af
867 size += 1 * 16 // m.SrcAddress.Un
869 size += 4 // m.PathMtu
870 size += 4 // m.TemplateInterval
871 size += 1 // m.UDPChecksum
874 func (m *IpfixExporterDetails) Marshal(b []byte) ([]byte, error) {
876 b = make([]byte, m.Size())
878 buf := codec.NewBuffer(b)
879 buf.EncodeUint32(uint32(m.CollectorAddress.Af))
880 buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
881 buf.EncodeUint16(m.CollectorPort)
882 buf.EncodeUint32(uint32(m.SrcAddress.Af))
883 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
884 buf.EncodeUint32(m.VrfID)
885 buf.EncodeUint32(m.PathMtu)
886 buf.EncodeUint32(m.TemplateInterval)
887 buf.EncodeBool(m.UDPChecksum)
888 return buf.Bytes(), nil
890 func (m *IpfixExporterDetails) Unmarshal(b []byte) error {
891 buf := codec.NewBuffer(b)
892 m.CollectorAddress.Af = AddressFamily(buf.DecodeUint32())
893 copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
894 m.CollectorPort = buf.DecodeUint16()
895 m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
896 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
897 m.VrfID = buf.DecodeUint32()
898 m.PathMtu = buf.DecodeUint32()
899 m.TemplateInterval = buf.DecodeUint32()
900 m.UDPChecksum = buf.DecodeBool()
904 // IpfixExporterDump defines message 'ipfix_exporter_dump'.
905 type IpfixExporterDump struct{}
907 func (m *IpfixExporterDump) Reset() { *m = IpfixExporterDump{} }
908 func (*IpfixExporterDump) GetMessageName() string { return "ipfix_exporter_dump" }
909 func (*IpfixExporterDump) GetCrcString() string { return "51077d14" }
910 func (*IpfixExporterDump) GetMessageType() api.MessageType {
911 return api.RequestMessage
914 func (m *IpfixExporterDump) Size() (size int) {
920 func (m *IpfixExporterDump) Marshal(b []byte) ([]byte, error) {
922 b = make([]byte, m.Size())
924 buf := codec.NewBuffer(b)
925 return buf.Bytes(), nil
927 func (m *IpfixExporterDump) Unmarshal(b []byte) error {
931 // IpfixFlush defines message 'ipfix_flush'.
932 type IpfixFlush struct{}
934 func (m *IpfixFlush) Reset() { *m = IpfixFlush{} }
935 func (*IpfixFlush) GetMessageName() string { return "ipfix_flush" }
936 func (*IpfixFlush) GetCrcString() string { return "51077d14" }
937 func (*IpfixFlush) GetMessageType() api.MessageType {
938 return api.RequestMessage
941 func (m *IpfixFlush) Size() (size int) {
947 func (m *IpfixFlush) Marshal(b []byte) ([]byte, error) {
949 b = make([]byte, m.Size())
951 buf := codec.NewBuffer(b)
952 return buf.Bytes(), nil
954 func (m *IpfixFlush) Unmarshal(b []byte) error {
958 // IpfixFlushReply defines message 'ipfix_flush_reply'.
959 type IpfixFlushReply struct {
960 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
963 func (m *IpfixFlushReply) Reset() { *m = IpfixFlushReply{} }
964 func (*IpfixFlushReply) GetMessageName() string { return "ipfix_flush_reply" }
965 func (*IpfixFlushReply) GetCrcString() string { return "e8d4e804" }
966 func (*IpfixFlushReply) GetMessageType() api.MessageType {
967 return api.ReplyMessage
970 func (m *IpfixFlushReply) Size() (size int) {
974 size += 4 // m.Retval
977 func (m *IpfixFlushReply) Marshal(b []byte) ([]byte, error) {
979 b = make([]byte, m.Size())
981 buf := codec.NewBuffer(b)
982 buf.EncodeInt32(m.Retval)
983 return buf.Bytes(), nil
985 func (m *IpfixFlushReply) Unmarshal(b []byte) error {
986 buf := codec.NewBuffer(b)
987 m.Retval = buf.DecodeInt32()
991 // SetIpfixClassifyStream defines message 'set_ipfix_classify_stream'.
992 type SetIpfixClassifyStream struct {
993 DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
994 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
997 func (m *SetIpfixClassifyStream) Reset() { *m = SetIpfixClassifyStream{} }
998 func (*SetIpfixClassifyStream) GetMessageName() string { return "set_ipfix_classify_stream" }
999 func (*SetIpfixClassifyStream) GetCrcString() string { return "c9cbe053" }
1000 func (*SetIpfixClassifyStream) GetMessageType() api.MessageType {
1001 return api.RequestMessage
1004 func (m *SetIpfixClassifyStream) Size() (size int) {
1008 size += 4 // m.DomainID
1009 size += 2 // m.SrcPort
1012 func (m *SetIpfixClassifyStream) Marshal(b []byte) ([]byte, error) {
1014 b = make([]byte, m.Size())
1016 buf := codec.NewBuffer(b)
1017 buf.EncodeUint32(m.DomainID)
1018 buf.EncodeUint16(m.SrcPort)
1019 return buf.Bytes(), nil
1021 func (m *SetIpfixClassifyStream) Unmarshal(b []byte) error {
1022 buf := codec.NewBuffer(b)
1023 m.DomainID = buf.DecodeUint32()
1024 m.SrcPort = buf.DecodeUint16()
1028 // SetIpfixClassifyStreamReply defines message 'set_ipfix_classify_stream_reply'.
1029 type SetIpfixClassifyStreamReply struct {
1030 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1033 func (m *SetIpfixClassifyStreamReply) Reset() { *m = SetIpfixClassifyStreamReply{} }
1034 func (*SetIpfixClassifyStreamReply) GetMessageName() string { return "set_ipfix_classify_stream_reply" }
1035 func (*SetIpfixClassifyStreamReply) GetCrcString() string { return "e8d4e804" }
1036 func (*SetIpfixClassifyStreamReply) GetMessageType() api.MessageType {
1037 return api.ReplyMessage
1040 func (m *SetIpfixClassifyStreamReply) Size() (size int) {
1044 size += 4 // m.Retval
1047 func (m *SetIpfixClassifyStreamReply) Marshal(b []byte) ([]byte, error) {
1049 b = make([]byte, m.Size())
1051 buf := codec.NewBuffer(b)
1052 buf.EncodeInt32(m.Retval)
1053 return buf.Bytes(), nil
1055 func (m *SetIpfixClassifyStreamReply) Unmarshal(b []byte) error {
1056 buf := codec.NewBuffer(b)
1057 m.Retval = buf.DecodeInt32()
1061 // SetIpfixExporter defines message 'set_ipfix_exporter'.
1062 type SetIpfixExporter struct {
1063 CollectorAddress Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
1064 CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
1065 SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
1066 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1067 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
1068 TemplateInterval uint32 `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
1069 UDPChecksum bool `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
1072 func (m *SetIpfixExporter) Reset() { *m = SetIpfixExporter{} }
1073 func (*SetIpfixExporter) GetMessageName() string { return "set_ipfix_exporter" }
1074 func (*SetIpfixExporter) GetCrcString() string { return "69284e07" }
1075 func (*SetIpfixExporter) GetMessageType() api.MessageType {
1076 return api.RequestMessage
1079 func (m *SetIpfixExporter) Size() (size int) {
1083 size += 4 // m.CollectorAddress.Af
1084 size += 1 * 16 // m.CollectorAddress.Un
1085 size += 2 // m.CollectorPort
1086 size += 4 // m.SrcAddress.Af
1087 size += 1 * 16 // m.SrcAddress.Un
1088 size += 4 // m.VrfID
1089 size += 4 // m.PathMtu
1090 size += 4 // m.TemplateInterval
1091 size += 1 // m.UDPChecksum
1094 func (m *SetIpfixExporter) Marshal(b []byte) ([]byte, error) {
1096 b = make([]byte, m.Size())
1098 buf := codec.NewBuffer(b)
1099 buf.EncodeUint32(uint32(m.CollectorAddress.Af))
1100 buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
1101 buf.EncodeUint16(m.CollectorPort)
1102 buf.EncodeUint32(uint32(m.SrcAddress.Af))
1103 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
1104 buf.EncodeUint32(m.VrfID)
1105 buf.EncodeUint32(m.PathMtu)
1106 buf.EncodeUint32(m.TemplateInterval)
1107 buf.EncodeBool(m.UDPChecksum)
1108 return buf.Bytes(), nil
1110 func (m *SetIpfixExporter) Unmarshal(b []byte) error {
1111 buf := codec.NewBuffer(b)
1112 m.CollectorAddress.Af = AddressFamily(buf.DecodeUint32())
1113 copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1114 m.CollectorPort = buf.DecodeUint16()
1115 m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
1116 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1117 m.VrfID = buf.DecodeUint32()
1118 m.PathMtu = buf.DecodeUint32()
1119 m.TemplateInterval = buf.DecodeUint32()
1120 m.UDPChecksum = buf.DecodeBool()
1124 // SetIpfixExporterReply defines message 'set_ipfix_exporter_reply'.
1125 type SetIpfixExporterReply struct {
1126 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1129 func (m *SetIpfixExporterReply) Reset() { *m = SetIpfixExporterReply{} }
1130 func (*SetIpfixExporterReply) GetMessageName() string { return "set_ipfix_exporter_reply" }
1131 func (*SetIpfixExporterReply) GetCrcString() string { return "e8d4e804" }
1132 func (*SetIpfixExporterReply) GetMessageType() api.MessageType {
1133 return api.ReplyMessage
1136 func (m *SetIpfixExporterReply) Size() (size int) {
1140 size += 4 // m.Retval
1143 func (m *SetIpfixExporterReply) Marshal(b []byte) ([]byte, error) {
1145 b = make([]byte, m.Size())
1147 buf := codec.NewBuffer(b)
1148 buf.EncodeInt32(m.Retval)
1149 return buf.Bytes(), nil
1151 func (m *SetIpfixExporterReply) Unmarshal(b []byte) error {
1152 buf := codec.NewBuffer(b)
1153 m.Retval = buf.DecodeInt32()
1157 func init() { file_ipfix_export_binapi_init() }
1158 func file_ipfix_export_binapi_init() {
1159 api.RegisterMessage((*IpfixClassifyStreamDetails)(nil), "ipfix_classify_stream_details_2903539d")
1160 api.RegisterMessage((*IpfixClassifyStreamDump)(nil), "ipfix_classify_stream_dump_51077d14")
1161 api.RegisterMessage((*IpfixClassifyTableAddDel)(nil), "ipfix_classify_table_add_del_5118bc5e")
1162 api.RegisterMessage((*IpfixClassifyTableAddDelReply)(nil), "ipfix_classify_table_add_del_reply_e8d4e804")
1163 api.RegisterMessage((*IpfixClassifyTableDetails)(nil), "ipfix_classify_table_details_7c8351ec")
1164 api.RegisterMessage((*IpfixClassifyTableDump)(nil), "ipfix_classify_table_dump_51077d14")
1165 api.RegisterMessage((*IpfixExporterDetails)(nil), "ipfix_exporter_details_11e07413")
1166 api.RegisterMessage((*IpfixExporterDump)(nil), "ipfix_exporter_dump_51077d14")
1167 api.RegisterMessage((*IpfixFlush)(nil), "ipfix_flush_51077d14")
1168 api.RegisterMessage((*IpfixFlushReply)(nil), "ipfix_flush_reply_e8d4e804")
1169 api.RegisterMessage((*SetIpfixClassifyStream)(nil), "set_ipfix_classify_stream_c9cbe053")
1170 api.RegisterMessage((*SetIpfixClassifyStreamReply)(nil), "set_ipfix_classify_stream_reply_e8d4e804")
1171 api.RegisterMessage((*SetIpfixExporter)(nil), "set_ipfix_exporter_69284e07")
1172 api.RegisterMessage((*SetIpfixExporterReply)(nil), "set_ipfix_exporter_reply_e8d4e804")
1175 // Messages returns list of all messages in this module.
1176 func AllMessages() []api.Message {
1177 return []api.Message{
1178 (*IpfixClassifyStreamDetails)(nil),
1179 (*IpfixClassifyStreamDump)(nil),
1180 (*IpfixClassifyTableAddDel)(nil),
1181 (*IpfixClassifyTableAddDelReply)(nil),
1182 (*IpfixClassifyTableDetails)(nil),
1183 (*IpfixClassifyTableDump)(nil),
1184 (*IpfixExporterDetails)(nil),
1185 (*IpfixExporterDump)(nil),
1187 (*IpfixFlushReply)(nil),
1188 (*SetIpfixClassifyStream)(nil),
1189 (*SetIpfixClassifyStreamReply)(nil),
1190 (*SetIpfixExporter)(nil),
1191 (*SetIpfixExporterReply)(nil),