1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/core/ipfix_export.api.json
7 // Package ipfix_export contains generated bindings for API file ipfix_export.api.
20 api "git.fd.io/govpp.git/api"
21 codec "git.fd.io/govpp.git/codec"
27 // This is a compile-time assertion to ensure that this generated file
28 // is compatible with the GoVPP api package it is being compiled against.
29 // A compilation error at this line likely means your copy of the
30 // GoVPP api package needs to be updated.
31 const _ = api.GoVppAPIPackageIsVersion2
34 APIFile = "ipfix_export"
36 VersionCrc = 0xee6ea488
39 // AddressFamily defines enum 'address_family'.
40 type AddressFamily uint32
43 ADDRESS_IP4 AddressFamily = 0
44 ADDRESS_IP6 AddressFamily = 1
48 AddressFamily_name = map[uint32]string{
52 AddressFamily_value = map[string]uint32{
58 func (x AddressFamily) String() string {
59 s, ok := AddressFamily_name[uint32(x)]
63 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
66 // IPDscp defines enum 'ip_dscp'.
70 IP_API_DSCP_CS0 IPDscp = 0
71 IP_API_DSCP_CS1 IPDscp = 8
72 IP_API_DSCP_AF11 IPDscp = 10
73 IP_API_DSCP_AF12 IPDscp = 12
74 IP_API_DSCP_AF13 IPDscp = 14
75 IP_API_DSCP_CS2 IPDscp = 16
76 IP_API_DSCP_AF21 IPDscp = 18
77 IP_API_DSCP_AF22 IPDscp = 20
78 IP_API_DSCP_AF23 IPDscp = 22
79 IP_API_DSCP_CS3 IPDscp = 24
80 IP_API_DSCP_AF31 IPDscp = 26
81 IP_API_DSCP_AF32 IPDscp = 28
82 IP_API_DSCP_AF33 IPDscp = 30
83 IP_API_DSCP_CS4 IPDscp = 32
84 IP_API_DSCP_AF41 IPDscp = 34
85 IP_API_DSCP_AF42 IPDscp = 36
86 IP_API_DSCP_AF43 IPDscp = 38
87 IP_API_DSCP_CS5 IPDscp = 40
88 IP_API_DSCP_EF IPDscp = 46
89 IP_API_DSCP_CS6 IPDscp = 48
90 IP_API_DSCP_CS7 IPDscp = 50
94 IPDscp_name = map[uint8]string{
97 10: "IP_API_DSCP_AF11",
98 12: "IP_API_DSCP_AF12",
99 14: "IP_API_DSCP_AF13",
100 16: "IP_API_DSCP_CS2",
101 18: "IP_API_DSCP_AF21",
102 20: "IP_API_DSCP_AF22",
103 22: "IP_API_DSCP_AF23",
104 24: "IP_API_DSCP_CS3",
105 26: "IP_API_DSCP_AF31",
106 28: "IP_API_DSCP_AF32",
107 30: "IP_API_DSCP_AF33",
108 32: "IP_API_DSCP_CS4",
109 34: "IP_API_DSCP_AF41",
110 36: "IP_API_DSCP_AF42",
111 38: "IP_API_DSCP_AF43",
112 40: "IP_API_DSCP_CS5",
113 46: "IP_API_DSCP_EF",
114 48: "IP_API_DSCP_CS6",
115 50: "IP_API_DSCP_CS7",
117 IPDscp_value = map[string]uint8{
118 "IP_API_DSCP_CS0": 0,
119 "IP_API_DSCP_CS1": 8,
120 "IP_API_DSCP_AF11": 10,
121 "IP_API_DSCP_AF12": 12,
122 "IP_API_DSCP_AF13": 14,
123 "IP_API_DSCP_CS2": 16,
124 "IP_API_DSCP_AF21": 18,
125 "IP_API_DSCP_AF22": 20,
126 "IP_API_DSCP_AF23": 22,
127 "IP_API_DSCP_CS3": 24,
128 "IP_API_DSCP_AF31": 26,
129 "IP_API_DSCP_AF32": 28,
130 "IP_API_DSCP_AF33": 30,
131 "IP_API_DSCP_CS4": 32,
132 "IP_API_DSCP_AF41": 34,
133 "IP_API_DSCP_AF42": 36,
134 "IP_API_DSCP_AF43": 38,
135 "IP_API_DSCP_CS5": 40,
136 "IP_API_DSCP_EF": 46,
137 "IP_API_DSCP_CS6": 48,
138 "IP_API_DSCP_CS7": 50,
142 func (x IPDscp) String() string {
143 s, ok := IPDscp_name[uint8(x)]
147 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
150 // IPEcn defines enum 'ip_ecn'.
154 IP_API_ECN_NONE IPEcn = 0
155 IP_API_ECN_ECT0 IPEcn = 1
156 IP_API_ECN_ECT1 IPEcn = 2
157 IP_API_ECN_CE IPEcn = 3
161 IPEcn_name = map[uint8]string{
162 0: "IP_API_ECN_NONE",
163 1: "IP_API_ECN_ECT0",
164 2: "IP_API_ECN_ECT1",
167 IPEcn_value = map[string]uint8{
168 "IP_API_ECN_NONE": 0,
169 "IP_API_ECN_ECT0": 1,
170 "IP_API_ECN_ECT1": 2,
175 func (x IPEcn) String() string {
176 s, ok := IPEcn_name[uint8(x)]
180 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
183 // IPProto defines enum 'ip_proto'.
187 IP_API_PROTO_HOPOPT IPProto = 0
188 IP_API_PROTO_ICMP IPProto = 1
189 IP_API_PROTO_IGMP IPProto = 2
190 IP_API_PROTO_TCP IPProto = 6
191 IP_API_PROTO_UDP IPProto = 17
192 IP_API_PROTO_GRE IPProto = 47
193 IP_API_PROTO_AH IPProto = 50
194 IP_API_PROTO_ESP IPProto = 51
195 IP_API_PROTO_EIGRP IPProto = 88
196 IP_API_PROTO_OSPF IPProto = 89
197 IP_API_PROTO_SCTP IPProto = 132
198 IP_API_PROTO_RESERVED IPProto = 255
202 IPProto_name = map[uint32]string{
203 0: "IP_API_PROTO_HOPOPT",
204 1: "IP_API_PROTO_ICMP",
205 2: "IP_API_PROTO_IGMP",
206 6: "IP_API_PROTO_TCP",
207 17: "IP_API_PROTO_UDP",
208 47: "IP_API_PROTO_GRE",
209 50: "IP_API_PROTO_AH",
210 51: "IP_API_PROTO_ESP",
211 88: "IP_API_PROTO_EIGRP",
212 89: "IP_API_PROTO_OSPF",
213 132: "IP_API_PROTO_SCTP",
214 255: "IP_API_PROTO_RESERVED",
216 IPProto_value = map[string]uint32{
217 "IP_API_PROTO_HOPOPT": 0,
218 "IP_API_PROTO_ICMP": 1,
219 "IP_API_PROTO_IGMP": 2,
220 "IP_API_PROTO_TCP": 6,
221 "IP_API_PROTO_UDP": 17,
222 "IP_API_PROTO_GRE": 47,
223 "IP_API_PROTO_AH": 50,
224 "IP_API_PROTO_ESP": 51,
225 "IP_API_PROTO_EIGRP": 88,
226 "IP_API_PROTO_OSPF": 89,
227 "IP_API_PROTO_SCTP": 132,
228 "IP_API_PROTO_RESERVED": 255,
232 func (x IPProto) String() string {
233 s, ok := IPProto_name[uint32(x)]
237 return "IPProto(" + strconv.Itoa(int(x)) + ")"
240 // AddressWithPrefix defines alias 'address_with_prefix'.
241 type AddressWithPrefix Prefix
243 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
244 prefix, err := ParsePrefix(s)
246 return AddressWithPrefix{}, err
248 return AddressWithPrefix(prefix), nil
250 func (x AddressWithPrefix) String() string {
251 return Prefix(x).String()
253 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
254 return []byte(x.String()), nil
256 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
257 prefix, err := ParseAddressWithPrefix(string(text))
265 // IP4Address defines alias 'ip4_address'.
266 type IP4Address [4]uint8
268 func ParseIP4Address(s string) (IP4Address, error) {
269 ip := net.ParseIP(s).To4()
271 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
273 var ipaddr IP4Address
274 copy(ipaddr[:], ip.To4())
278 func (x IP4Address) ToIP() net.IP {
279 return net.IP(x[:]).To4()
281 func (x IP4Address) String() string {
282 return x.ToIP().String()
284 func (x *IP4Address) MarshalText() ([]byte, error) {
285 return []byte(x.String()), nil
287 func (x *IP4Address) UnmarshalText(text []byte) error {
288 ipaddr, err := ParseIP4Address(string(text))
296 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
297 type IP4AddressWithPrefix IP4Prefix
299 // IP6Address defines alias 'ip6_address'.
300 type IP6Address [16]uint8
302 func ParseIP6Address(s string) (IP6Address, error) {
303 ip := net.ParseIP(s).To16()
305 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
307 var ipaddr IP6Address
308 copy(ipaddr[:], ip.To16())
312 func (x IP6Address) ToIP() net.IP {
313 return net.IP(x[:]).To16()
315 func (x IP6Address) String() string {
316 return x.ToIP().String()
318 func (x *IP6Address) MarshalText() ([]byte, error) {
319 return []byte(x.String()), nil
321 func (x *IP6Address) UnmarshalText(text []byte) error {
322 ipaddr, err := ParseIP6Address(string(text))
330 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
331 type IP6AddressWithPrefix IP6Prefix
333 // Address defines type 'address'.
334 type Address struct {
335 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
336 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
339 func ParseAddress(s string) (Address, error) {
342 return Address{}, fmt.Errorf("invalid address: %s", s)
346 addr.Af = ADDRESS_IP6
348 copy(ip6[:], ip.To16())
351 addr.Af = ADDRESS_IP4
353 copy(ip4[:], ip.To4())
358 func (x Address) ToIP() net.IP {
359 if x.Af == ADDRESS_IP6 {
361 return net.IP(ip6[:]).To16()
364 return net.IP(ip4[:]).To4()
367 func (x Address) String() string {
368 return x.ToIP().String()
370 func (x *Address) MarshalText() ([]byte, error) {
371 return []byte(x.String()), nil
373 func (x *Address) UnmarshalText(text []byte) error {
374 addr, err := ParseAddress(string(text))
382 // IP4Prefix defines type 'ip4_prefix'.
383 type IP4Prefix struct {
384 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
385 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
388 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
389 hasPrefix := strings.Contains(s, "/")
391 ip, network, err := net.ParseCIDR(s)
393 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
395 maskSize, _ := network.Mask.Size()
396 prefix.Len = byte(maskSize)
397 prefix.Address, err = ParseIP4Address(ip.String())
399 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
403 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
405 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
407 prefix.Len = byte(defaultMaskSize)
408 prefix.Address, err = ParseIP4Address(ip.String())
410 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
415 func (x IP4Prefix) ToIPNet() *net.IPNet {
416 mask := net.CIDRMask(int(x.Len), 32)
417 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
420 func (x IP4Prefix) String() string {
421 ip := x.Address.String()
422 return ip + "/" + strconv.Itoa(int(x.Len))
424 func (x *IP4Prefix) MarshalText() ([]byte, error) {
425 return []byte(x.String()), nil
427 func (x *IP4Prefix) UnmarshalText(text []byte) error {
428 prefix, err := ParseIP4Prefix(string(text))
436 // IP6Prefix defines type 'ip6_prefix'.
437 type IP6Prefix struct {
438 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
439 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
442 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
443 hasPrefix := strings.Contains(s, "/")
445 ip, network, err := net.ParseCIDR(s)
447 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
449 maskSize, _ := network.Mask.Size()
450 prefix.Len = byte(maskSize)
451 prefix.Address, err = ParseIP6Address(ip.String())
453 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
457 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
459 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
461 prefix.Len = byte(defaultMaskSize)
462 prefix.Address, err = ParseIP6Address(ip.String())
464 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
469 func (x IP6Prefix) ToIPNet() *net.IPNet {
470 mask := net.CIDRMask(int(x.Len), 128)
471 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
474 func (x IP6Prefix) String() string {
475 ip := x.Address.String()
476 return ip + "/" + strconv.Itoa(int(x.Len))
478 func (x *IP6Prefix) MarshalText() ([]byte, error) {
479 return []byte(x.String()), nil
481 func (x *IP6Prefix) UnmarshalText(text []byte) error {
482 prefix, err := ParseIP6Prefix(string(text))
490 // Mprefix defines type 'mprefix'.
491 type Mprefix struct {
492 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
493 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
494 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
495 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
498 // Prefix defines type 'prefix'.
500 Address Address `binapi:"address,name=address" json:"address,omitempty"`
501 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
504 func ParsePrefix(ip string) (prefix Prefix, err error) {
505 hasPrefix := strings.Contains(ip, "/")
507 netIP, network, err := net.ParseCIDR(ip)
509 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
511 maskSize, _ := network.Mask.Size()
512 prefix.Len = byte(maskSize)
513 prefix.Address, err = ParseAddress(netIP.String())
515 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
518 netIP := net.ParseIP(ip)
519 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
520 if netIP.To4() == nil {
521 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
523 prefix.Len = byte(defaultMaskSize)
524 prefix.Address, err = ParseAddress(netIP.String())
526 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
531 func (x Prefix) ToIPNet() *net.IPNet {
533 if x.Address.Af == ADDRESS_IP4 {
534 mask = net.CIDRMask(int(x.Len), 32)
536 mask = net.CIDRMask(int(x.Len), 128)
538 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
541 func (x Prefix) String() string {
542 ip := x.Address.String()
543 return ip + "/" + strconv.Itoa(int(x.Len))
545 func (x *Prefix) MarshalText() ([]byte, error) {
546 return []byte(x.String()), nil
548 func (x *Prefix) UnmarshalText(text []byte) error {
549 prefix, err := ParsePrefix(string(text))
557 // PrefixMatcher defines type 'prefix_matcher'.
558 type PrefixMatcher struct {
559 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
560 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
563 // AddressUnion defines union 'address_union'.
564 type AddressUnion struct {
567 XXX_UnionData [16]byte
570 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
574 func (u *AddressUnion) SetIP4(a IP4Address) {
575 buf := codec.NewBuffer(u.XXX_UnionData[:])
576 buf.EncodeBytes(a[:], 4)
578 func (u *AddressUnion) GetIP4() (a IP4Address) {
579 buf := codec.NewBuffer(u.XXX_UnionData[:])
580 copy(a[:], buf.DecodeBytes(4))
584 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
588 func (u *AddressUnion) SetIP6(a IP6Address) {
589 buf := codec.NewBuffer(u.XXX_UnionData[:])
590 buf.EncodeBytes(a[:], 16)
592 func (u *AddressUnion) GetIP6() (a IP6Address) {
593 buf := codec.NewBuffer(u.XXX_UnionData[:])
594 copy(a[:], buf.DecodeBytes(16))
598 // IpfixClassifyStreamDetails defines message 'ipfix_classify_stream_details'.
599 type IpfixClassifyStreamDetails struct {
600 DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
601 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
604 func (m *IpfixClassifyStreamDetails) Reset() { *m = IpfixClassifyStreamDetails{} }
605 func (*IpfixClassifyStreamDetails) GetMessageName() string { return "ipfix_classify_stream_details" }
606 func (*IpfixClassifyStreamDetails) GetCrcString() string { return "2903539d" }
607 func (*IpfixClassifyStreamDetails) GetMessageType() api.MessageType {
608 return api.ReplyMessage
611 func (m *IpfixClassifyStreamDetails) Size() (size int) {
615 size += 4 // m.DomainID
616 size += 2 // m.SrcPort
619 func (m *IpfixClassifyStreamDetails) Marshal(b []byte) ([]byte, error) {
621 b = make([]byte, m.Size())
623 buf := codec.NewBuffer(b)
624 buf.EncodeUint32(m.DomainID)
625 buf.EncodeUint16(m.SrcPort)
626 return buf.Bytes(), nil
628 func (m *IpfixClassifyStreamDetails) Unmarshal(b []byte) error {
629 buf := codec.NewBuffer(b)
630 m.DomainID = buf.DecodeUint32()
631 m.SrcPort = buf.DecodeUint16()
635 // IpfixClassifyStreamDump defines message 'ipfix_classify_stream_dump'.
636 type IpfixClassifyStreamDump struct{}
638 func (m *IpfixClassifyStreamDump) Reset() { *m = IpfixClassifyStreamDump{} }
639 func (*IpfixClassifyStreamDump) GetMessageName() string { return "ipfix_classify_stream_dump" }
640 func (*IpfixClassifyStreamDump) GetCrcString() string { return "51077d14" }
641 func (*IpfixClassifyStreamDump) GetMessageType() api.MessageType {
642 return api.RequestMessage
645 func (m *IpfixClassifyStreamDump) Size() (size int) {
651 func (m *IpfixClassifyStreamDump) Marshal(b []byte) ([]byte, error) {
653 b = make([]byte, m.Size())
655 buf := codec.NewBuffer(b)
656 return buf.Bytes(), nil
658 func (m *IpfixClassifyStreamDump) Unmarshal(b []byte) error {
662 // IpfixClassifyTableAddDel defines message 'ipfix_classify_table_add_del'.
663 type IpfixClassifyTableAddDel struct {
664 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
665 IPVersion AddressFamily `binapi:"address_family,name=ip_version" json:"ip_version,omitempty"`
666 TransportProtocol IPProto `binapi:"ip_proto,name=transport_protocol" json:"transport_protocol,omitempty"`
667 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
670 func (m *IpfixClassifyTableAddDel) Reset() { *m = IpfixClassifyTableAddDel{} }
671 func (*IpfixClassifyTableAddDel) GetMessageName() string { return "ipfix_classify_table_add_del" }
672 func (*IpfixClassifyTableAddDel) GetCrcString() string { return "5118bc5e" }
673 func (*IpfixClassifyTableAddDel) GetMessageType() api.MessageType {
674 return api.RequestMessage
677 func (m *IpfixClassifyTableAddDel) Size() (size int) {
681 size += 4 // m.TableID
682 size += 4 // m.IPVersion
683 size += 4 // m.TransportProtocol
687 func (m *IpfixClassifyTableAddDel) Marshal(b []byte) ([]byte, error) {
689 b = make([]byte, m.Size())
691 buf := codec.NewBuffer(b)
692 buf.EncodeUint32(m.TableID)
693 buf.EncodeUint32(uint32(m.IPVersion))
694 buf.EncodeUint32(uint32(m.TransportProtocol))
695 buf.EncodeBool(m.IsAdd)
696 return buf.Bytes(), nil
698 func (m *IpfixClassifyTableAddDel) Unmarshal(b []byte) error {
699 buf := codec.NewBuffer(b)
700 m.TableID = buf.DecodeUint32()
701 m.IPVersion = AddressFamily(buf.DecodeUint32())
702 m.TransportProtocol = IPProto(buf.DecodeUint32())
703 m.IsAdd = buf.DecodeBool()
707 // IpfixClassifyTableAddDelReply defines message 'ipfix_classify_table_add_del_reply'.
708 type IpfixClassifyTableAddDelReply struct {
709 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
712 func (m *IpfixClassifyTableAddDelReply) Reset() { *m = IpfixClassifyTableAddDelReply{} }
713 func (*IpfixClassifyTableAddDelReply) GetMessageName() string {
714 return "ipfix_classify_table_add_del_reply"
716 func (*IpfixClassifyTableAddDelReply) GetCrcString() string { return "e8d4e804" }
717 func (*IpfixClassifyTableAddDelReply) GetMessageType() api.MessageType {
718 return api.ReplyMessage
721 func (m *IpfixClassifyTableAddDelReply) Size() (size int) {
725 size += 4 // m.Retval
728 func (m *IpfixClassifyTableAddDelReply) Marshal(b []byte) ([]byte, error) {
730 b = make([]byte, m.Size())
732 buf := codec.NewBuffer(b)
733 buf.EncodeInt32(m.Retval)
734 return buf.Bytes(), nil
736 func (m *IpfixClassifyTableAddDelReply) Unmarshal(b []byte) error {
737 buf := codec.NewBuffer(b)
738 m.Retval = buf.DecodeInt32()
742 // IpfixClassifyTableDetails defines message 'ipfix_classify_table_details'.
743 type IpfixClassifyTableDetails struct {
744 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
745 IPVersion AddressFamily `binapi:"address_family,name=ip_version" json:"ip_version,omitempty"`
746 TransportProtocol IPProto `binapi:"ip_proto,name=transport_protocol" json:"transport_protocol,omitempty"`
749 func (m *IpfixClassifyTableDetails) Reset() { *m = IpfixClassifyTableDetails{} }
750 func (*IpfixClassifyTableDetails) GetMessageName() string { return "ipfix_classify_table_details" }
751 func (*IpfixClassifyTableDetails) GetCrcString() string { return "7c8351ec" }
752 func (*IpfixClassifyTableDetails) GetMessageType() api.MessageType {
753 return api.ReplyMessage
756 func (m *IpfixClassifyTableDetails) Size() (size int) {
760 size += 4 // m.TableID
761 size += 4 // m.IPVersion
762 size += 4 // m.TransportProtocol
765 func (m *IpfixClassifyTableDetails) Marshal(b []byte) ([]byte, error) {
767 b = make([]byte, m.Size())
769 buf := codec.NewBuffer(b)
770 buf.EncodeUint32(m.TableID)
771 buf.EncodeUint32(uint32(m.IPVersion))
772 buf.EncodeUint32(uint32(m.TransportProtocol))
773 return buf.Bytes(), nil
775 func (m *IpfixClassifyTableDetails) Unmarshal(b []byte) error {
776 buf := codec.NewBuffer(b)
777 m.TableID = buf.DecodeUint32()
778 m.IPVersion = AddressFamily(buf.DecodeUint32())
779 m.TransportProtocol = IPProto(buf.DecodeUint32())
783 // IpfixClassifyTableDump defines message 'ipfix_classify_table_dump'.
784 type IpfixClassifyTableDump struct{}
786 func (m *IpfixClassifyTableDump) Reset() { *m = IpfixClassifyTableDump{} }
787 func (*IpfixClassifyTableDump) GetMessageName() string { return "ipfix_classify_table_dump" }
788 func (*IpfixClassifyTableDump) GetCrcString() string { return "51077d14" }
789 func (*IpfixClassifyTableDump) GetMessageType() api.MessageType {
790 return api.RequestMessage
793 func (m *IpfixClassifyTableDump) Size() (size int) {
799 func (m *IpfixClassifyTableDump) Marshal(b []byte) ([]byte, error) {
801 b = make([]byte, m.Size())
803 buf := codec.NewBuffer(b)
804 return buf.Bytes(), nil
806 func (m *IpfixClassifyTableDump) Unmarshal(b []byte) error {
810 // IpfixExporterDetails defines message 'ipfix_exporter_details'.
811 type IpfixExporterDetails struct {
812 CollectorAddress Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
813 CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
814 SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
815 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
816 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
817 TemplateInterval uint32 `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
818 UDPChecksum bool `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
821 func (m *IpfixExporterDetails) Reset() { *m = IpfixExporterDetails{} }
822 func (*IpfixExporterDetails) GetMessageName() string { return "ipfix_exporter_details" }
823 func (*IpfixExporterDetails) GetCrcString() string { return "11e07413" }
824 func (*IpfixExporterDetails) GetMessageType() api.MessageType {
825 return api.ReplyMessage
828 func (m *IpfixExporterDetails) Size() (size int) {
832 size += 4 // m.CollectorAddress.Af
833 size += 1 * 16 // m.CollectorAddress.Un
834 size += 2 // m.CollectorPort
835 size += 4 // m.SrcAddress.Af
836 size += 1 * 16 // m.SrcAddress.Un
838 size += 4 // m.PathMtu
839 size += 4 // m.TemplateInterval
840 size += 1 // m.UDPChecksum
843 func (m *IpfixExporterDetails) Marshal(b []byte) ([]byte, error) {
845 b = make([]byte, m.Size())
847 buf := codec.NewBuffer(b)
848 buf.EncodeUint32(uint32(m.CollectorAddress.Af))
849 buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
850 buf.EncodeUint16(m.CollectorPort)
851 buf.EncodeUint32(uint32(m.SrcAddress.Af))
852 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
853 buf.EncodeUint32(m.VrfID)
854 buf.EncodeUint32(m.PathMtu)
855 buf.EncodeUint32(m.TemplateInterval)
856 buf.EncodeBool(m.UDPChecksum)
857 return buf.Bytes(), nil
859 func (m *IpfixExporterDetails) Unmarshal(b []byte) error {
860 buf := codec.NewBuffer(b)
861 m.CollectorAddress.Af = AddressFamily(buf.DecodeUint32())
862 copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
863 m.CollectorPort = buf.DecodeUint16()
864 m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
865 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
866 m.VrfID = buf.DecodeUint32()
867 m.PathMtu = buf.DecodeUint32()
868 m.TemplateInterval = buf.DecodeUint32()
869 m.UDPChecksum = buf.DecodeBool()
873 // IpfixExporterDump defines message 'ipfix_exporter_dump'.
874 type IpfixExporterDump struct{}
876 func (m *IpfixExporterDump) Reset() { *m = IpfixExporterDump{} }
877 func (*IpfixExporterDump) GetMessageName() string { return "ipfix_exporter_dump" }
878 func (*IpfixExporterDump) GetCrcString() string { return "51077d14" }
879 func (*IpfixExporterDump) GetMessageType() api.MessageType {
880 return api.RequestMessage
883 func (m *IpfixExporterDump) Size() (size int) {
889 func (m *IpfixExporterDump) Marshal(b []byte) ([]byte, error) {
891 b = make([]byte, m.Size())
893 buf := codec.NewBuffer(b)
894 return buf.Bytes(), nil
896 func (m *IpfixExporterDump) Unmarshal(b []byte) error {
900 // IpfixFlush defines message 'ipfix_flush'.
901 type IpfixFlush struct{}
903 func (m *IpfixFlush) Reset() { *m = IpfixFlush{} }
904 func (*IpfixFlush) GetMessageName() string { return "ipfix_flush" }
905 func (*IpfixFlush) GetCrcString() string { return "51077d14" }
906 func (*IpfixFlush) GetMessageType() api.MessageType {
907 return api.RequestMessage
910 func (m *IpfixFlush) Size() (size int) {
916 func (m *IpfixFlush) Marshal(b []byte) ([]byte, error) {
918 b = make([]byte, m.Size())
920 buf := codec.NewBuffer(b)
921 return buf.Bytes(), nil
923 func (m *IpfixFlush) Unmarshal(b []byte) error {
927 // IpfixFlushReply defines message 'ipfix_flush_reply'.
928 type IpfixFlushReply struct {
929 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
932 func (m *IpfixFlushReply) Reset() { *m = IpfixFlushReply{} }
933 func (*IpfixFlushReply) GetMessageName() string { return "ipfix_flush_reply" }
934 func (*IpfixFlushReply) GetCrcString() string { return "e8d4e804" }
935 func (*IpfixFlushReply) GetMessageType() api.MessageType {
936 return api.ReplyMessage
939 func (m *IpfixFlushReply) Size() (size int) {
943 size += 4 // m.Retval
946 func (m *IpfixFlushReply) Marshal(b []byte) ([]byte, error) {
948 b = make([]byte, m.Size())
950 buf := codec.NewBuffer(b)
951 buf.EncodeInt32(m.Retval)
952 return buf.Bytes(), nil
954 func (m *IpfixFlushReply) Unmarshal(b []byte) error {
955 buf := codec.NewBuffer(b)
956 m.Retval = buf.DecodeInt32()
960 // SetIpfixClassifyStream defines message 'set_ipfix_classify_stream'.
961 type SetIpfixClassifyStream struct {
962 DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
963 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
966 func (m *SetIpfixClassifyStream) Reset() { *m = SetIpfixClassifyStream{} }
967 func (*SetIpfixClassifyStream) GetMessageName() string { return "set_ipfix_classify_stream" }
968 func (*SetIpfixClassifyStream) GetCrcString() string { return "c9cbe053" }
969 func (*SetIpfixClassifyStream) GetMessageType() api.MessageType {
970 return api.RequestMessage
973 func (m *SetIpfixClassifyStream) Size() (size int) {
977 size += 4 // m.DomainID
978 size += 2 // m.SrcPort
981 func (m *SetIpfixClassifyStream) Marshal(b []byte) ([]byte, error) {
983 b = make([]byte, m.Size())
985 buf := codec.NewBuffer(b)
986 buf.EncodeUint32(m.DomainID)
987 buf.EncodeUint16(m.SrcPort)
988 return buf.Bytes(), nil
990 func (m *SetIpfixClassifyStream) Unmarshal(b []byte) error {
991 buf := codec.NewBuffer(b)
992 m.DomainID = buf.DecodeUint32()
993 m.SrcPort = buf.DecodeUint16()
997 // SetIpfixClassifyStreamReply defines message 'set_ipfix_classify_stream_reply'.
998 type SetIpfixClassifyStreamReply struct {
999 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1002 func (m *SetIpfixClassifyStreamReply) Reset() { *m = SetIpfixClassifyStreamReply{} }
1003 func (*SetIpfixClassifyStreamReply) GetMessageName() string { return "set_ipfix_classify_stream_reply" }
1004 func (*SetIpfixClassifyStreamReply) GetCrcString() string { return "e8d4e804" }
1005 func (*SetIpfixClassifyStreamReply) GetMessageType() api.MessageType {
1006 return api.ReplyMessage
1009 func (m *SetIpfixClassifyStreamReply) Size() (size int) {
1013 size += 4 // m.Retval
1016 func (m *SetIpfixClassifyStreamReply) Marshal(b []byte) ([]byte, error) {
1018 b = make([]byte, m.Size())
1020 buf := codec.NewBuffer(b)
1021 buf.EncodeInt32(m.Retval)
1022 return buf.Bytes(), nil
1024 func (m *SetIpfixClassifyStreamReply) Unmarshal(b []byte) error {
1025 buf := codec.NewBuffer(b)
1026 m.Retval = buf.DecodeInt32()
1030 // SetIpfixExporter defines message 'set_ipfix_exporter'.
1031 type SetIpfixExporter struct {
1032 CollectorAddress Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
1033 CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
1034 SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
1035 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1036 PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
1037 TemplateInterval uint32 `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
1038 UDPChecksum bool `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
1041 func (m *SetIpfixExporter) Reset() { *m = SetIpfixExporter{} }
1042 func (*SetIpfixExporter) GetMessageName() string { return "set_ipfix_exporter" }
1043 func (*SetIpfixExporter) GetCrcString() string { return "69284e07" }
1044 func (*SetIpfixExporter) GetMessageType() api.MessageType {
1045 return api.RequestMessage
1048 func (m *SetIpfixExporter) Size() (size int) {
1052 size += 4 // m.CollectorAddress.Af
1053 size += 1 * 16 // m.CollectorAddress.Un
1054 size += 2 // m.CollectorPort
1055 size += 4 // m.SrcAddress.Af
1056 size += 1 * 16 // m.SrcAddress.Un
1057 size += 4 // m.VrfID
1058 size += 4 // m.PathMtu
1059 size += 4 // m.TemplateInterval
1060 size += 1 // m.UDPChecksum
1063 func (m *SetIpfixExporter) Marshal(b []byte) ([]byte, error) {
1065 b = make([]byte, m.Size())
1067 buf := codec.NewBuffer(b)
1068 buf.EncodeUint32(uint32(m.CollectorAddress.Af))
1069 buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
1070 buf.EncodeUint16(m.CollectorPort)
1071 buf.EncodeUint32(uint32(m.SrcAddress.Af))
1072 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
1073 buf.EncodeUint32(m.VrfID)
1074 buf.EncodeUint32(m.PathMtu)
1075 buf.EncodeUint32(m.TemplateInterval)
1076 buf.EncodeBool(m.UDPChecksum)
1077 return buf.Bytes(), nil
1079 func (m *SetIpfixExporter) Unmarshal(b []byte) error {
1080 buf := codec.NewBuffer(b)
1081 m.CollectorAddress.Af = AddressFamily(buf.DecodeUint32())
1082 copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1083 m.CollectorPort = buf.DecodeUint16()
1084 m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
1085 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1086 m.VrfID = buf.DecodeUint32()
1087 m.PathMtu = buf.DecodeUint32()
1088 m.TemplateInterval = buf.DecodeUint32()
1089 m.UDPChecksum = buf.DecodeBool()
1093 // SetIpfixExporterReply defines message 'set_ipfix_exporter_reply'.
1094 type SetIpfixExporterReply struct {
1095 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1098 func (m *SetIpfixExporterReply) Reset() { *m = SetIpfixExporterReply{} }
1099 func (*SetIpfixExporterReply) GetMessageName() string { return "set_ipfix_exporter_reply" }
1100 func (*SetIpfixExporterReply) GetCrcString() string { return "e8d4e804" }
1101 func (*SetIpfixExporterReply) GetMessageType() api.MessageType {
1102 return api.ReplyMessage
1105 func (m *SetIpfixExporterReply) Size() (size int) {
1109 size += 4 // m.Retval
1112 func (m *SetIpfixExporterReply) Marshal(b []byte) ([]byte, error) {
1114 b = make([]byte, m.Size())
1116 buf := codec.NewBuffer(b)
1117 buf.EncodeInt32(m.Retval)
1118 return buf.Bytes(), nil
1120 func (m *SetIpfixExporterReply) Unmarshal(b []byte) error {
1121 buf := codec.NewBuffer(b)
1122 m.Retval = buf.DecodeInt32()
1126 func init() { file_ipfix_export_binapi_init() }
1127 func file_ipfix_export_binapi_init() {
1128 api.RegisterMessage((*IpfixClassifyStreamDetails)(nil), "ipfix_classify_stream_details_2903539d")
1129 api.RegisterMessage((*IpfixClassifyStreamDump)(nil), "ipfix_classify_stream_dump_51077d14")
1130 api.RegisterMessage((*IpfixClassifyTableAddDel)(nil), "ipfix_classify_table_add_del_5118bc5e")
1131 api.RegisterMessage((*IpfixClassifyTableAddDelReply)(nil), "ipfix_classify_table_add_del_reply_e8d4e804")
1132 api.RegisterMessage((*IpfixClassifyTableDetails)(nil), "ipfix_classify_table_details_7c8351ec")
1133 api.RegisterMessage((*IpfixClassifyTableDump)(nil), "ipfix_classify_table_dump_51077d14")
1134 api.RegisterMessage((*IpfixExporterDetails)(nil), "ipfix_exporter_details_11e07413")
1135 api.RegisterMessage((*IpfixExporterDump)(nil), "ipfix_exporter_dump_51077d14")
1136 api.RegisterMessage((*IpfixFlush)(nil), "ipfix_flush_51077d14")
1137 api.RegisterMessage((*IpfixFlushReply)(nil), "ipfix_flush_reply_e8d4e804")
1138 api.RegisterMessage((*SetIpfixClassifyStream)(nil), "set_ipfix_classify_stream_c9cbe053")
1139 api.RegisterMessage((*SetIpfixClassifyStreamReply)(nil), "set_ipfix_classify_stream_reply_e8d4e804")
1140 api.RegisterMessage((*SetIpfixExporter)(nil), "set_ipfix_exporter_69284e07")
1141 api.RegisterMessage((*SetIpfixExporterReply)(nil), "set_ipfix_exporter_reply_e8d4e804")
1144 // Messages returns list of all messages in this module.
1145 func AllMessages() []api.Message {
1146 return []api.Message{
1147 (*IpfixClassifyStreamDetails)(nil),
1148 (*IpfixClassifyStreamDump)(nil),
1149 (*IpfixClassifyTableAddDel)(nil),
1150 (*IpfixClassifyTableAddDelReply)(nil),
1151 (*IpfixClassifyTableDetails)(nil),
1152 (*IpfixClassifyTableDump)(nil),
1153 (*IpfixExporterDetails)(nil),
1154 (*IpfixExporterDump)(nil),
1156 (*IpfixFlushReply)(nil),
1157 (*SetIpfixClassifyStream)(nil),
1158 (*SetIpfixClassifyStreamReply)(nil),
1159 (*SetIpfixExporter)(nil),
1160 (*SetIpfixExporterReply)(nil),