1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/plugins/map.api.json
7 // Package maps contains generated bindings for API file map.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
36 VersionCrc = 0x42c84657
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 // IfStatusFlags defines enum 'if_status_flags'.
67 type IfStatusFlags uint32
70 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
71 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
75 IfStatusFlags_name = map[uint32]string{
76 1: "IF_STATUS_API_FLAG_ADMIN_UP",
77 2: "IF_STATUS_API_FLAG_LINK_UP",
79 IfStatusFlags_value = map[string]uint32{
80 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
81 "IF_STATUS_API_FLAG_LINK_UP": 2,
85 func (x IfStatusFlags) String() string {
86 s, ok := IfStatusFlags_name[uint32(x)]
90 str := func(n uint32) string {
91 s, ok := IfStatusFlags_name[uint32(n)]
95 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
97 for i := uint32(0); i <= 32; i++ {
107 return str(uint32(x))
112 // IfType defines enum 'if_type'.
116 IF_API_TYPE_HARDWARE IfType = 1
117 IF_API_TYPE_SUB IfType = 2
118 IF_API_TYPE_P2P IfType = 3
119 IF_API_TYPE_PIPE IfType = 4
123 IfType_name = map[uint32]string{
124 1: "IF_API_TYPE_HARDWARE",
125 2: "IF_API_TYPE_SUB",
126 3: "IF_API_TYPE_P2P",
127 4: "IF_API_TYPE_PIPE",
129 IfType_value = map[string]uint32{
130 "IF_API_TYPE_HARDWARE": 1,
131 "IF_API_TYPE_SUB": 2,
132 "IF_API_TYPE_P2P": 3,
133 "IF_API_TYPE_PIPE": 4,
137 func (x IfType) String() string {
138 s, ok := IfType_name[uint32(x)]
142 return "IfType(" + strconv.Itoa(int(x)) + ")"
145 // IPDscp defines enum 'ip_dscp'.
149 IP_API_DSCP_CS0 IPDscp = 0
150 IP_API_DSCP_CS1 IPDscp = 8
151 IP_API_DSCP_AF11 IPDscp = 10
152 IP_API_DSCP_AF12 IPDscp = 12
153 IP_API_DSCP_AF13 IPDscp = 14
154 IP_API_DSCP_CS2 IPDscp = 16
155 IP_API_DSCP_AF21 IPDscp = 18
156 IP_API_DSCP_AF22 IPDscp = 20
157 IP_API_DSCP_AF23 IPDscp = 22
158 IP_API_DSCP_CS3 IPDscp = 24
159 IP_API_DSCP_AF31 IPDscp = 26
160 IP_API_DSCP_AF32 IPDscp = 28
161 IP_API_DSCP_AF33 IPDscp = 30
162 IP_API_DSCP_CS4 IPDscp = 32
163 IP_API_DSCP_AF41 IPDscp = 34
164 IP_API_DSCP_AF42 IPDscp = 36
165 IP_API_DSCP_AF43 IPDscp = 38
166 IP_API_DSCP_CS5 IPDscp = 40
167 IP_API_DSCP_EF IPDscp = 46
168 IP_API_DSCP_CS6 IPDscp = 48
169 IP_API_DSCP_CS7 IPDscp = 50
173 IPDscp_name = map[uint8]string{
174 0: "IP_API_DSCP_CS0",
175 8: "IP_API_DSCP_CS1",
176 10: "IP_API_DSCP_AF11",
177 12: "IP_API_DSCP_AF12",
178 14: "IP_API_DSCP_AF13",
179 16: "IP_API_DSCP_CS2",
180 18: "IP_API_DSCP_AF21",
181 20: "IP_API_DSCP_AF22",
182 22: "IP_API_DSCP_AF23",
183 24: "IP_API_DSCP_CS3",
184 26: "IP_API_DSCP_AF31",
185 28: "IP_API_DSCP_AF32",
186 30: "IP_API_DSCP_AF33",
187 32: "IP_API_DSCP_CS4",
188 34: "IP_API_DSCP_AF41",
189 36: "IP_API_DSCP_AF42",
190 38: "IP_API_DSCP_AF43",
191 40: "IP_API_DSCP_CS5",
192 46: "IP_API_DSCP_EF",
193 48: "IP_API_DSCP_CS6",
194 50: "IP_API_DSCP_CS7",
196 IPDscp_value = map[string]uint8{
197 "IP_API_DSCP_CS0": 0,
198 "IP_API_DSCP_CS1": 8,
199 "IP_API_DSCP_AF11": 10,
200 "IP_API_DSCP_AF12": 12,
201 "IP_API_DSCP_AF13": 14,
202 "IP_API_DSCP_CS2": 16,
203 "IP_API_DSCP_AF21": 18,
204 "IP_API_DSCP_AF22": 20,
205 "IP_API_DSCP_AF23": 22,
206 "IP_API_DSCP_CS3": 24,
207 "IP_API_DSCP_AF31": 26,
208 "IP_API_DSCP_AF32": 28,
209 "IP_API_DSCP_AF33": 30,
210 "IP_API_DSCP_CS4": 32,
211 "IP_API_DSCP_AF41": 34,
212 "IP_API_DSCP_AF42": 36,
213 "IP_API_DSCP_AF43": 38,
214 "IP_API_DSCP_CS5": 40,
215 "IP_API_DSCP_EF": 46,
216 "IP_API_DSCP_CS6": 48,
217 "IP_API_DSCP_CS7": 50,
221 func (x IPDscp) String() string {
222 s, ok := IPDscp_name[uint8(x)]
226 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
229 // IPEcn defines enum 'ip_ecn'.
233 IP_API_ECN_NONE IPEcn = 0
234 IP_API_ECN_ECT0 IPEcn = 1
235 IP_API_ECN_ECT1 IPEcn = 2
236 IP_API_ECN_CE IPEcn = 3
240 IPEcn_name = map[uint8]string{
241 0: "IP_API_ECN_NONE",
242 1: "IP_API_ECN_ECT0",
243 2: "IP_API_ECN_ECT1",
246 IPEcn_value = map[string]uint8{
247 "IP_API_ECN_NONE": 0,
248 "IP_API_ECN_ECT0": 1,
249 "IP_API_ECN_ECT1": 2,
254 func (x IPEcn) String() string {
255 s, ok := IPEcn_name[uint8(x)]
259 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
262 // IPProto defines enum 'ip_proto'.
266 IP_API_PROTO_HOPOPT IPProto = 0
267 IP_API_PROTO_ICMP IPProto = 1
268 IP_API_PROTO_IGMP IPProto = 2
269 IP_API_PROTO_TCP IPProto = 6
270 IP_API_PROTO_UDP IPProto = 17
271 IP_API_PROTO_GRE IPProto = 47
272 IP_API_PROTO_AH IPProto = 50
273 IP_API_PROTO_ESP IPProto = 51
274 IP_API_PROTO_EIGRP IPProto = 88
275 IP_API_PROTO_OSPF IPProto = 89
276 IP_API_PROTO_SCTP IPProto = 132
277 IP_API_PROTO_RESERVED IPProto = 255
281 IPProto_name = map[uint32]string{
282 0: "IP_API_PROTO_HOPOPT",
283 1: "IP_API_PROTO_ICMP",
284 2: "IP_API_PROTO_IGMP",
285 6: "IP_API_PROTO_TCP",
286 17: "IP_API_PROTO_UDP",
287 47: "IP_API_PROTO_GRE",
288 50: "IP_API_PROTO_AH",
289 51: "IP_API_PROTO_ESP",
290 88: "IP_API_PROTO_EIGRP",
291 89: "IP_API_PROTO_OSPF",
292 132: "IP_API_PROTO_SCTP",
293 255: "IP_API_PROTO_RESERVED",
295 IPProto_value = map[string]uint32{
296 "IP_API_PROTO_HOPOPT": 0,
297 "IP_API_PROTO_ICMP": 1,
298 "IP_API_PROTO_IGMP": 2,
299 "IP_API_PROTO_TCP": 6,
300 "IP_API_PROTO_UDP": 17,
301 "IP_API_PROTO_GRE": 47,
302 "IP_API_PROTO_AH": 50,
303 "IP_API_PROTO_ESP": 51,
304 "IP_API_PROTO_EIGRP": 88,
305 "IP_API_PROTO_OSPF": 89,
306 "IP_API_PROTO_SCTP": 132,
307 "IP_API_PROTO_RESERVED": 255,
311 func (x IPProto) String() string {
312 s, ok := IPProto_name[uint32(x)]
316 return "IPProto(" + strconv.Itoa(int(x)) + ")"
319 // LinkDuplex defines enum 'link_duplex'.
320 type LinkDuplex uint32
323 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
324 LINK_DUPLEX_API_HALF LinkDuplex = 1
325 LINK_DUPLEX_API_FULL LinkDuplex = 2
329 LinkDuplex_name = map[uint32]string{
330 0: "LINK_DUPLEX_API_UNKNOWN",
331 1: "LINK_DUPLEX_API_HALF",
332 2: "LINK_DUPLEX_API_FULL",
334 LinkDuplex_value = map[string]uint32{
335 "LINK_DUPLEX_API_UNKNOWN": 0,
336 "LINK_DUPLEX_API_HALF": 1,
337 "LINK_DUPLEX_API_FULL": 2,
341 func (x LinkDuplex) String() string {
342 s, ok := LinkDuplex_name[uint32(x)]
346 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
349 // MtuProto defines enum 'mtu_proto'.
353 MTU_PROTO_API_L3 MtuProto = 1
354 MTU_PROTO_API_IP4 MtuProto = 2
355 MTU_PROTO_API_IP6 MtuProto = 3
356 MTU_PROTO_API_MPLS MtuProto = 4
357 MTU_PROTO_API_N MtuProto = 5
361 MtuProto_name = map[uint32]string{
362 1: "MTU_PROTO_API_L3",
363 2: "MTU_PROTO_API_IP4",
364 3: "MTU_PROTO_API_IP6",
365 4: "MTU_PROTO_API_MPLS",
366 5: "MTU_PROTO_API_N",
368 MtuProto_value = map[string]uint32{
369 "MTU_PROTO_API_L3": 1,
370 "MTU_PROTO_API_IP4": 2,
371 "MTU_PROTO_API_IP6": 3,
372 "MTU_PROTO_API_MPLS": 4,
373 "MTU_PROTO_API_N": 5,
377 func (x MtuProto) String() string {
378 s, ok := MtuProto_name[uint32(x)]
382 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
385 // RxMode defines enum 'rx_mode'.
389 RX_MODE_API_UNKNOWN RxMode = 0
390 RX_MODE_API_POLLING RxMode = 1
391 RX_MODE_API_INTERRUPT RxMode = 2
392 RX_MODE_API_ADAPTIVE RxMode = 3
393 RX_MODE_API_DEFAULT RxMode = 4
397 RxMode_name = map[uint32]string{
398 0: "RX_MODE_API_UNKNOWN",
399 1: "RX_MODE_API_POLLING",
400 2: "RX_MODE_API_INTERRUPT",
401 3: "RX_MODE_API_ADAPTIVE",
402 4: "RX_MODE_API_DEFAULT",
404 RxMode_value = map[string]uint32{
405 "RX_MODE_API_UNKNOWN": 0,
406 "RX_MODE_API_POLLING": 1,
407 "RX_MODE_API_INTERRUPT": 2,
408 "RX_MODE_API_ADAPTIVE": 3,
409 "RX_MODE_API_DEFAULT": 4,
413 func (x RxMode) String() string {
414 s, ok := RxMode_name[uint32(x)]
418 return "RxMode(" + strconv.Itoa(int(x)) + ")"
421 // SubIfFlags defines enum 'sub_if_flags'.
422 type SubIfFlags uint32
425 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
426 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
427 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
428 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
429 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
430 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
431 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
432 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
433 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
434 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
438 SubIfFlags_name = map[uint32]string{
439 1: "SUB_IF_API_FLAG_NO_TAGS",
440 2: "SUB_IF_API_FLAG_ONE_TAG",
441 4: "SUB_IF_API_FLAG_TWO_TAGS",
442 8: "SUB_IF_API_FLAG_DOT1AD",
443 16: "SUB_IF_API_FLAG_EXACT_MATCH",
444 32: "SUB_IF_API_FLAG_DEFAULT",
445 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
446 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
447 254: "SUB_IF_API_FLAG_MASK_VNET",
448 256: "SUB_IF_API_FLAG_DOT1AH",
450 SubIfFlags_value = map[string]uint32{
451 "SUB_IF_API_FLAG_NO_TAGS": 1,
452 "SUB_IF_API_FLAG_ONE_TAG": 2,
453 "SUB_IF_API_FLAG_TWO_TAGS": 4,
454 "SUB_IF_API_FLAG_DOT1AD": 8,
455 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
456 "SUB_IF_API_FLAG_DEFAULT": 32,
457 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
458 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
459 "SUB_IF_API_FLAG_MASK_VNET": 254,
460 "SUB_IF_API_FLAG_DOT1AH": 256,
464 func (x SubIfFlags) String() string {
465 s, ok := SubIfFlags_name[uint32(x)]
469 str := func(n uint32) string {
470 s, ok := SubIfFlags_name[uint32(n)]
474 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
476 for i := uint32(0); i <= 32; i++ {
486 return str(uint32(x))
491 // AddressWithPrefix defines alias 'address_with_prefix'.
492 type AddressWithPrefix Prefix
494 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
495 prefix, err := ParsePrefix(s)
497 return AddressWithPrefix{}, err
499 return AddressWithPrefix(prefix), nil
501 func (x AddressWithPrefix) String() string {
502 return Prefix(x).String()
504 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
505 return []byte(x.String()), nil
507 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
508 prefix, err := ParseAddressWithPrefix(string(text))
516 // InterfaceIndex defines alias 'interface_index'.
517 type InterfaceIndex uint32
519 // IP4Address defines alias 'ip4_address'.
520 type IP4Address [4]uint8
522 func ParseIP4Address(s string) (IP4Address, error) {
523 ip := net.ParseIP(s).To4()
525 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
527 var ipaddr IP4Address
528 copy(ipaddr[:], ip.To4())
532 func (x IP4Address) ToIP() net.IP {
533 return net.IP(x[:]).To4()
535 func (x IP4Address) String() string {
536 return x.ToIP().String()
538 func (x *IP4Address) MarshalText() ([]byte, error) {
539 return []byte(x.String()), nil
541 func (x *IP4Address) UnmarshalText(text []byte) error {
542 ipaddr, err := ParseIP4Address(string(text))
550 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
551 type IP4AddressWithPrefix IP4Prefix
553 // IP6Address defines alias 'ip6_address'.
554 type IP6Address [16]uint8
556 func ParseIP6Address(s string) (IP6Address, error) {
557 ip := net.ParseIP(s).To16()
559 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
561 var ipaddr IP6Address
562 copy(ipaddr[:], ip.To16())
566 func (x IP6Address) ToIP() net.IP {
567 return net.IP(x[:]).To16()
569 func (x IP6Address) String() string {
570 return x.ToIP().String()
572 func (x *IP6Address) MarshalText() ([]byte, error) {
573 return []byte(x.String()), nil
575 func (x *IP6Address) UnmarshalText(text []byte) error {
576 ipaddr, err := ParseIP6Address(string(text))
584 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
585 type IP6AddressWithPrefix IP6Prefix
587 // Address defines type 'address'.
588 type Address struct {
589 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
590 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
593 func ParseAddress(s string) (Address, error) {
596 return Address{}, fmt.Errorf("invalid address: %s", s)
600 addr.Af = ADDRESS_IP6
602 copy(ip6[:], ip.To16())
605 addr.Af = ADDRESS_IP4
607 copy(ip4[:], ip.To4())
612 func (x Address) ToIP() net.IP {
613 if x.Af == ADDRESS_IP6 {
615 return net.IP(ip6[:]).To16()
618 return net.IP(ip4[:]).To4()
621 func (x Address) String() string {
622 return x.ToIP().String()
624 func (x *Address) MarshalText() ([]byte, error) {
625 return []byte(x.String()), nil
627 func (x *Address) UnmarshalText(text []byte) error {
628 addr, err := ParseAddress(string(text))
636 // IP4Prefix defines type 'ip4_prefix'.
637 type IP4Prefix struct {
638 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
639 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
642 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
643 hasPrefix := strings.Contains(s, "/")
645 ip, network, err := net.ParseCIDR(s)
647 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
649 maskSize, _ := network.Mask.Size()
650 prefix.Len = byte(maskSize)
651 prefix.Address, err = ParseIP4Address(ip.String())
653 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
657 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
659 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
661 prefix.Len = byte(defaultMaskSize)
662 prefix.Address, err = ParseIP4Address(ip.String())
664 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
669 func (x IP4Prefix) ToIPNet() *net.IPNet {
670 mask := net.CIDRMask(int(x.Len), 32)
671 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
674 func (x IP4Prefix) String() string {
675 ip := x.Address.String()
676 return ip + "/" + strconv.Itoa(int(x.Len))
678 func (x *IP4Prefix) MarshalText() ([]byte, error) {
679 return []byte(x.String()), nil
681 func (x *IP4Prefix) UnmarshalText(text []byte) error {
682 prefix, err := ParseIP4Prefix(string(text))
690 // IP6Prefix defines type 'ip6_prefix'.
691 type IP6Prefix struct {
692 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
693 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
696 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
697 hasPrefix := strings.Contains(s, "/")
699 ip, network, err := net.ParseCIDR(s)
701 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
703 maskSize, _ := network.Mask.Size()
704 prefix.Len = byte(maskSize)
705 prefix.Address, err = ParseIP6Address(ip.String())
707 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
711 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
713 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
715 prefix.Len = byte(defaultMaskSize)
716 prefix.Address, err = ParseIP6Address(ip.String())
718 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
723 func (x IP6Prefix) ToIPNet() *net.IPNet {
724 mask := net.CIDRMask(int(x.Len), 128)
725 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
728 func (x IP6Prefix) String() string {
729 ip := x.Address.String()
730 return ip + "/" + strconv.Itoa(int(x.Len))
732 func (x *IP6Prefix) MarshalText() ([]byte, error) {
733 return []byte(x.String()), nil
735 func (x *IP6Prefix) UnmarshalText(text []byte) error {
736 prefix, err := ParseIP6Prefix(string(text))
744 // Mprefix defines type 'mprefix'.
745 type Mprefix struct {
746 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
747 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
748 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
749 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
752 // Prefix defines type 'prefix'.
754 Address Address `binapi:"address,name=address" json:"address,omitempty"`
755 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
758 func ParsePrefix(ip string) (prefix Prefix, err error) {
759 hasPrefix := strings.Contains(ip, "/")
761 netIP, network, err := net.ParseCIDR(ip)
763 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
765 maskSize, _ := network.Mask.Size()
766 prefix.Len = byte(maskSize)
767 prefix.Address, err = ParseAddress(netIP.String())
769 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
772 netIP := net.ParseIP(ip)
773 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
774 if netIP.To4() == nil {
775 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
777 prefix.Len = byte(defaultMaskSize)
778 prefix.Address, err = ParseAddress(netIP.String())
780 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
785 func (x Prefix) ToIPNet() *net.IPNet {
787 if x.Address.Af == ADDRESS_IP4 {
788 mask = net.CIDRMask(int(x.Len), 32)
790 mask = net.CIDRMask(int(x.Len), 128)
792 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
795 func (x Prefix) String() string {
796 ip := x.Address.String()
797 return ip + "/" + strconv.Itoa(int(x.Len))
799 func (x *Prefix) MarshalText() ([]byte, error) {
800 return []byte(x.String()), nil
802 func (x *Prefix) UnmarshalText(text []byte) error {
803 prefix, err := ParsePrefix(string(text))
811 // PrefixMatcher defines type 'prefix_matcher'.
812 type PrefixMatcher struct {
813 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
814 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
817 // AddressUnion defines union 'address_union'.
818 type AddressUnion struct {
821 XXX_UnionData [16]byte
824 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
828 func (u *AddressUnion) SetIP4(a IP4Address) {
829 buf := codec.NewBuffer(u.XXX_UnionData[:])
830 buf.EncodeBytes(a[:], 4)
832 func (u *AddressUnion) GetIP4() (a IP4Address) {
833 buf := codec.NewBuffer(u.XXX_UnionData[:])
834 copy(a[:], buf.DecodeBytes(4))
838 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
842 func (u *AddressUnion) SetIP6(a IP6Address) {
843 buf := codec.NewBuffer(u.XXX_UnionData[:])
844 buf.EncodeBytes(a[:], 16)
846 func (u *AddressUnion) GetIP6() (a IP6Address) {
847 buf := codec.NewBuffer(u.XXX_UnionData[:])
848 copy(a[:], buf.DecodeBytes(16))
852 // MapAddDelRule defines message 'map_add_del_rule'.
853 type MapAddDelRule struct {
854 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
855 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
856 IP6Dst IP6Address `binapi:"ip6_address,name=ip6_dst" json:"ip6_dst,omitempty"`
857 Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
860 func (m *MapAddDelRule) Reset() { *m = MapAddDelRule{} }
861 func (*MapAddDelRule) GetMessageName() string { return "map_add_del_rule" }
862 func (*MapAddDelRule) GetCrcString() string { return "c65b32f7" }
863 func (*MapAddDelRule) GetMessageType() api.MessageType {
864 return api.RequestMessage
867 func (m *MapAddDelRule) Size() (size int) {
873 size += 1 * 16 // m.IP6Dst
877 func (m *MapAddDelRule) Marshal(b []byte) ([]byte, error) {
879 b = make([]byte, m.Size())
881 buf := codec.NewBuffer(b)
882 buf.EncodeUint32(m.Index)
883 buf.EncodeBool(m.IsAdd)
884 buf.EncodeBytes(m.IP6Dst[:], 16)
885 buf.EncodeUint16(m.Psid)
886 return buf.Bytes(), nil
888 func (m *MapAddDelRule) Unmarshal(b []byte) error {
889 buf := codec.NewBuffer(b)
890 m.Index = buf.DecodeUint32()
891 m.IsAdd = buf.DecodeBool()
892 copy(m.IP6Dst[:], buf.DecodeBytes(16))
893 m.Psid = buf.DecodeUint16()
897 // MapAddDelRuleReply defines message 'map_add_del_rule_reply'.
898 type MapAddDelRuleReply struct {
899 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
902 func (m *MapAddDelRuleReply) Reset() { *m = MapAddDelRuleReply{} }
903 func (*MapAddDelRuleReply) GetMessageName() string { return "map_add_del_rule_reply" }
904 func (*MapAddDelRuleReply) GetCrcString() string { return "e8d4e804" }
905 func (*MapAddDelRuleReply) GetMessageType() api.MessageType {
906 return api.ReplyMessage
909 func (m *MapAddDelRuleReply) Size() (size int) {
913 size += 4 // m.Retval
916 func (m *MapAddDelRuleReply) Marshal(b []byte) ([]byte, error) {
918 b = make([]byte, m.Size())
920 buf := codec.NewBuffer(b)
921 buf.EncodeInt32(m.Retval)
922 return buf.Bytes(), nil
924 func (m *MapAddDelRuleReply) Unmarshal(b []byte) error {
925 buf := codec.NewBuffer(b)
926 m.Retval = buf.DecodeInt32()
930 // MapAddDomain defines message 'map_add_domain'.
931 type MapAddDomain struct {
932 IP6Prefix IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
933 IP4Prefix IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
934 IP6Src IP6Prefix `binapi:"ip6_prefix,name=ip6_src" json:"ip6_src,omitempty"`
935 EaBitsLen uint8 `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
936 PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
937 PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
938 Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
939 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
942 func (m *MapAddDomain) Reset() { *m = MapAddDomain{} }
943 func (*MapAddDomain) GetMessageName() string { return "map_add_domain" }
944 func (*MapAddDomain) GetCrcString() string { return "7a5a18c9" }
945 func (*MapAddDomain) GetMessageType() api.MessageType {
946 return api.RequestMessage
949 func (m *MapAddDomain) Size() (size int) {
953 size += 1 * 16 // m.IP6Prefix.Address
954 size += 1 // m.IP6Prefix.Len
955 size += 1 * 4 // m.IP4Prefix.Address
956 size += 1 // m.IP4Prefix.Len
957 size += 1 * 16 // m.IP6Src.Address
958 size += 1 // m.IP6Src.Len
959 size += 1 // m.EaBitsLen
960 size += 1 // m.PsidOffset
961 size += 1 // m.PsidLength
966 func (m *MapAddDomain) Marshal(b []byte) ([]byte, error) {
968 b = make([]byte, m.Size())
970 buf := codec.NewBuffer(b)
971 buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
972 buf.EncodeUint8(m.IP6Prefix.Len)
973 buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
974 buf.EncodeUint8(m.IP4Prefix.Len)
975 buf.EncodeBytes(m.IP6Src.Address[:], 16)
976 buf.EncodeUint8(m.IP6Src.Len)
977 buf.EncodeUint8(m.EaBitsLen)
978 buf.EncodeUint8(m.PsidOffset)
979 buf.EncodeUint8(m.PsidLength)
980 buf.EncodeUint16(m.Mtu)
981 buf.EncodeString(m.Tag, 64)
982 return buf.Bytes(), nil
984 func (m *MapAddDomain) Unmarshal(b []byte) error {
985 buf := codec.NewBuffer(b)
986 copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
987 m.IP6Prefix.Len = buf.DecodeUint8()
988 copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
989 m.IP4Prefix.Len = buf.DecodeUint8()
990 copy(m.IP6Src.Address[:], buf.DecodeBytes(16))
991 m.IP6Src.Len = buf.DecodeUint8()
992 m.EaBitsLen = buf.DecodeUint8()
993 m.PsidOffset = buf.DecodeUint8()
994 m.PsidLength = buf.DecodeUint8()
995 m.Mtu = buf.DecodeUint16()
996 m.Tag = buf.DecodeString(64)
1000 // MapAddDomainReply defines message 'map_add_domain_reply'.
1001 type MapAddDomainReply struct {
1002 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
1003 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1006 func (m *MapAddDomainReply) Reset() { *m = MapAddDomainReply{} }
1007 func (*MapAddDomainReply) GetMessageName() string { return "map_add_domain_reply" }
1008 func (*MapAddDomainReply) GetCrcString() string { return "3e6d4e2c" }
1009 func (*MapAddDomainReply) GetMessageType() api.MessageType {
1010 return api.ReplyMessage
1013 func (m *MapAddDomainReply) Size() (size int) {
1017 size += 4 // m.Index
1018 size += 4 // m.Retval
1021 func (m *MapAddDomainReply) Marshal(b []byte) ([]byte, error) {
1023 b = make([]byte, m.Size())
1025 buf := codec.NewBuffer(b)
1026 buf.EncodeUint32(m.Index)
1027 buf.EncodeInt32(m.Retval)
1028 return buf.Bytes(), nil
1030 func (m *MapAddDomainReply) Unmarshal(b []byte) error {
1031 buf := codec.NewBuffer(b)
1032 m.Index = buf.DecodeUint32()
1033 m.Retval = buf.DecodeInt32()
1037 // MapDelDomain defines message 'map_del_domain'.
1038 type MapDelDomain struct {
1039 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
1042 func (m *MapDelDomain) Reset() { *m = MapDelDomain{} }
1043 func (*MapDelDomain) GetMessageName() string { return "map_del_domain" }
1044 func (*MapDelDomain) GetCrcString() string { return "8ac76db6" }
1045 func (*MapDelDomain) GetMessageType() api.MessageType {
1046 return api.RequestMessage
1049 func (m *MapDelDomain) Size() (size int) {
1053 size += 4 // m.Index
1056 func (m *MapDelDomain) Marshal(b []byte) ([]byte, error) {
1058 b = make([]byte, m.Size())
1060 buf := codec.NewBuffer(b)
1061 buf.EncodeUint32(m.Index)
1062 return buf.Bytes(), nil
1064 func (m *MapDelDomain) Unmarshal(b []byte) error {
1065 buf := codec.NewBuffer(b)
1066 m.Index = buf.DecodeUint32()
1070 // MapDelDomainReply defines message 'map_del_domain_reply'.
1071 type MapDelDomainReply struct {
1072 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1075 func (m *MapDelDomainReply) Reset() { *m = MapDelDomainReply{} }
1076 func (*MapDelDomainReply) GetMessageName() string { return "map_del_domain_reply" }
1077 func (*MapDelDomainReply) GetCrcString() string { return "e8d4e804" }
1078 func (*MapDelDomainReply) GetMessageType() api.MessageType {
1079 return api.ReplyMessage
1082 func (m *MapDelDomainReply) Size() (size int) {
1086 size += 4 // m.Retval
1089 func (m *MapDelDomainReply) Marshal(b []byte) ([]byte, error) {
1091 b = make([]byte, m.Size())
1093 buf := codec.NewBuffer(b)
1094 buf.EncodeInt32(m.Retval)
1095 return buf.Bytes(), nil
1097 func (m *MapDelDomainReply) Unmarshal(b []byte) error {
1098 buf := codec.NewBuffer(b)
1099 m.Retval = buf.DecodeInt32()
1103 // MapDomainDetails defines message 'map_domain_details'.
1104 type MapDomainDetails struct {
1105 DomainIndex uint32 `binapi:"u32,name=domain_index" json:"domain_index,omitempty"`
1106 IP6Prefix IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
1107 IP4Prefix IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
1108 IP6Src IP6Prefix `binapi:"ip6_prefix,name=ip6_src" json:"ip6_src,omitempty"`
1109 EaBitsLen uint8 `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
1110 PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
1111 PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
1112 Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
1113 Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
1114 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
1117 func (m *MapDomainDetails) Reset() { *m = MapDomainDetails{} }
1118 func (*MapDomainDetails) GetMessageName() string { return "map_domain_details" }
1119 func (*MapDomainDetails) GetCrcString() string { return "fc1859dd" }
1120 func (*MapDomainDetails) GetMessageType() api.MessageType {
1121 return api.ReplyMessage
1124 func (m *MapDomainDetails) Size() (size int) {
1128 size += 4 // m.DomainIndex
1129 size += 1 * 16 // m.IP6Prefix.Address
1130 size += 1 // m.IP6Prefix.Len
1131 size += 1 * 4 // m.IP4Prefix.Address
1132 size += 1 // m.IP4Prefix.Len
1133 size += 1 * 16 // m.IP6Src.Address
1134 size += 1 // m.IP6Src.Len
1135 size += 1 // m.EaBitsLen
1136 size += 1 // m.PsidOffset
1137 size += 1 // m.PsidLength
1138 size += 1 // m.Flags
1143 func (m *MapDomainDetails) Marshal(b []byte) ([]byte, error) {
1145 b = make([]byte, m.Size())
1147 buf := codec.NewBuffer(b)
1148 buf.EncodeUint32(m.DomainIndex)
1149 buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
1150 buf.EncodeUint8(m.IP6Prefix.Len)
1151 buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
1152 buf.EncodeUint8(m.IP4Prefix.Len)
1153 buf.EncodeBytes(m.IP6Src.Address[:], 16)
1154 buf.EncodeUint8(m.IP6Src.Len)
1155 buf.EncodeUint8(m.EaBitsLen)
1156 buf.EncodeUint8(m.PsidOffset)
1157 buf.EncodeUint8(m.PsidLength)
1158 buf.EncodeUint8(m.Flags)
1159 buf.EncodeUint16(m.Mtu)
1160 buf.EncodeString(m.Tag, 64)
1161 return buf.Bytes(), nil
1163 func (m *MapDomainDetails) Unmarshal(b []byte) error {
1164 buf := codec.NewBuffer(b)
1165 m.DomainIndex = buf.DecodeUint32()
1166 copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
1167 m.IP6Prefix.Len = buf.DecodeUint8()
1168 copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
1169 m.IP4Prefix.Len = buf.DecodeUint8()
1170 copy(m.IP6Src.Address[:], buf.DecodeBytes(16))
1171 m.IP6Src.Len = buf.DecodeUint8()
1172 m.EaBitsLen = buf.DecodeUint8()
1173 m.PsidOffset = buf.DecodeUint8()
1174 m.PsidLength = buf.DecodeUint8()
1175 m.Flags = buf.DecodeUint8()
1176 m.Mtu = buf.DecodeUint16()
1177 m.Tag = buf.DecodeString(64)
1181 // MapDomainDump defines message 'map_domain_dump'.
1182 type MapDomainDump struct{}
1184 func (m *MapDomainDump) Reset() { *m = MapDomainDump{} }
1185 func (*MapDomainDump) GetMessageName() string { return "map_domain_dump" }
1186 func (*MapDomainDump) GetCrcString() string { return "51077d14" }
1187 func (*MapDomainDump) GetMessageType() api.MessageType {
1188 return api.RequestMessage
1191 func (m *MapDomainDump) Size() (size int) {
1197 func (m *MapDomainDump) Marshal(b []byte) ([]byte, error) {
1199 b = make([]byte, m.Size())
1201 buf := codec.NewBuffer(b)
1202 return buf.Bytes(), nil
1204 func (m *MapDomainDump) Unmarshal(b []byte) error {
1208 // MapIfEnableDisable defines message 'map_if_enable_disable'.
1209 type MapIfEnableDisable struct {
1210 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1211 IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
1212 IsTranslation bool `binapi:"bool,name=is_translation" json:"is_translation,omitempty"`
1215 func (m *MapIfEnableDisable) Reset() { *m = MapIfEnableDisable{} }
1216 func (*MapIfEnableDisable) GetMessageName() string { return "map_if_enable_disable" }
1217 func (*MapIfEnableDisable) GetCrcString() string { return "59bb32f4" }
1218 func (*MapIfEnableDisable) GetMessageType() api.MessageType {
1219 return api.RequestMessage
1222 func (m *MapIfEnableDisable) Size() (size int) {
1226 size += 4 // m.SwIfIndex
1227 size += 1 // m.IsEnable
1228 size += 1 // m.IsTranslation
1231 func (m *MapIfEnableDisable) Marshal(b []byte) ([]byte, error) {
1233 b = make([]byte, m.Size())
1235 buf := codec.NewBuffer(b)
1236 buf.EncodeUint32(uint32(m.SwIfIndex))
1237 buf.EncodeBool(m.IsEnable)
1238 buf.EncodeBool(m.IsTranslation)
1239 return buf.Bytes(), nil
1241 func (m *MapIfEnableDisable) Unmarshal(b []byte) error {
1242 buf := codec.NewBuffer(b)
1243 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1244 m.IsEnable = buf.DecodeBool()
1245 m.IsTranslation = buf.DecodeBool()
1249 // MapIfEnableDisableReply defines message 'map_if_enable_disable_reply'.
1250 type MapIfEnableDisableReply struct {
1251 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1254 func (m *MapIfEnableDisableReply) Reset() { *m = MapIfEnableDisableReply{} }
1255 func (*MapIfEnableDisableReply) GetMessageName() string { return "map_if_enable_disable_reply" }
1256 func (*MapIfEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1257 func (*MapIfEnableDisableReply) GetMessageType() api.MessageType {
1258 return api.ReplyMessage
1261 func (m *MapIfEnableDisableReply) Size() (size int) {
1265 size += 4 // m.Retval
1268 func (m *MapIfEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1270 b = make([]byte, m.Size())
1272 buf := codec.NewBuffer(b)
1273 buf.EncodeInt32(m.Retval)
1274 return buf.Bytes(), nil
1276 func (m *MapIfEnableDisableReply) Unmarshal(b []byte) error {
1277 buf := codec.NewBuffer(b)
1278 m.Retval = buf.DecodeInt32()
1282 // MapParamAddDelPreResolve defines message 'map_param_add_del_pre_resolve'.
1283 type MapParamAddDelPreResolve struct {
1284 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1285 IP4NhAddress IP4Address `binapi:"ip4_address,name=ip4_nh_address" json:"ip4_nh_address,omitempty"`
1286 IP6NhAddress IP6Address `binapi:"ip6_address,name=ip6_nh_address" json:"ip6_nh_address,omitempty"`
1289 func (m *MapParamAddDelPreResolve) Reset() { *m = MapParamAddDelPreResolve{} }
1290 func (*MapParamAddDelPreResolve) GetMessageName() string { return "map_param_add_del_pre_resolve" }
1291 func (*MapParamAddDelPreResolve) GetCrcString() string { return "17008c66" }
1292 func (*MapParamAddDelPreResolve) GetMessageType() api.MessageType {
1293 return api.RequestMessage
1296 func (m *MapParamAddDelPreResolve) Size() (size int) {
1300 size += 1 // m.IsAdd
1301 size += 1 * 4 // m.IP4NhAddress
1302 size += 1 * 16 // m.IP6NhAddress
1305 func (m *MapParamAddDelPreResolve) Marshal(b []byte) ([]byte, error) {
1307 b = make([]byte, m.Size())
1309 buf := codec.NewBuffer(b)
1310 buf.EncodeBool(m.IsAdd)
1311 buf.EncodeBytes(m.IP4NhAddress[:], 4)
1312 buf.EncodeBytes(m.IP6NhAddress[:], 16)
1313 return buf.Bytes(), nil
1315 func (m *MapParamAddDelPreResolve) Unmarshal(b []byte) error {
1316 buf := codec.NewBuffer(b)
1317 m.IsAdd = buf.DecodeBool()
1318 copy(m.IP4NhAddress[:], buf.DecodeBytes(4))
1319 copy(m.IP6NhAddress[:], buf.DecodeBytes(16))
1323 // MapParamAddDelPreResolveReply defines message 'map_param_add_del_pre_resolve_reply'.
1324 type MapParamAddDelPreResolveReply struct {
1325 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1328 func (m *MapParamAddDelPreResolveReply) Reset() { *m = MapParamAddDelPreResolveReply{} }
1329 func (*MapParamAddDelPreResolveReply) GetMessageName() string {
1330 return "map_param_add_del_pre_resolve_reply"
1332 func (*MapParamAddDelPreResolveReply) GetCrcString() string { return "e8d4e804" }
1333 func (*MapParamAddDelPreResolveReply) GetMessageType() api.MessageType {
1334 return api.ReplyMessage
1337 func (m *MapParamAddDelPreResolveReply) Size() (size int) {
1341 size += 4 // m.Retval
1344 func (m *MapParamAddDelPreResolveReply) Marshal(b []byte) ([]byte, error) {
1346 b = make([]byte, m.Size())
1348 buf := codec.NewBuffer(b)
1349 buf.EncodeInt32(m.Retval)
1350 return buf.Bytes(), nil
1352 func (m *MapParamAddDelPreResolveReply) Unmarshal(b []byte) error {
1353 buf := codec.NewBuffer(b)
1354 m.Retval = buf.DecodeInt32()
1358 // MapParamGet defines message 'map_param_get'.
1359 type MapParamGet struct{}
1361 func (m *MapParamGet) Reset() { *m = MapParamGet{} }
1362 func (*MapParamGet) GetMessageName() string { return "map_param_get" }
1363 func (*MapParamGet) GetCrcString() string { return "51077d14" }
1364 func (*MapParamGet) GetMessageType() api.MessageType {
1365 return api.RequestMessage
1368 func (m *MapParamGet) Size() (size int) {
1374 func (m *MapParamGet) Marshal(b []byte) ([]byte, error) {
1376 b = make([]byte, m.Size())
1378 buf := codec.NewBuffer(b)
1379 return buf.Bytes(), nil
1381 func (m *MapParamGet) Unmarshal(b []byte) error {
1385 // MapParamGetReply defines message 'map_param_get_reply'.
1386 type MapParamGetReply struct {
1387 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1388 FragInner uint8 `binapi:"u8,name=frag_inner" json:"frag_inner,omitempty"`
1389 FragIgnoreDf uint8 `binapi:"u8,name=frag_ignore_df" json:"frag_ignore_df,omitempty"`
1390 ICMPIP4ErrRelaySrc IP4Address `binapi:"ip4_address,name=icmp_ip4_err_relay_src" json:"icmp_ip4_err_relay_src,omitempty"`
1391 ICMP6EnableUnreachable bool `binapi:"bool,name=icmp6_enable_unreachable" json:"icmp6_enable_unreachable,omitempty"`
1392 IP4NhAddress IP4Address `binapi:"ip4_address,name=ip4_nh_address" json:"ip4_nh_address,omitempty"`
1393 IP6NhAddress IP6Address `binapi:"ip6_address,name=ip6_nh_address" json:"ip6_nh_address,omitempty"`
1394 IP4LifetimeMs uint16 `binapi:"u16,name=ip4_lifetime_ms" json:"ip4_lifetime_ms,omitempty"`
1395 IP4PoolSize uint16 `binapi:"u16,name=ip4_pool_size" json:"ip4_pool_size,omitempty"`
1396 IP4Buffers uint32 `binapi:"u32,name=ip4_buffers" json:"ip4_buffers,omitempty"`
1397 IP4HtRatio float64 `binapi:"f64,name=ip4_ht_ratio" json:"ip4_ht_ratio,omitempty"`
1398 SecCheckEnable bool `binapi:"bool,name=sec_check_enable" json:"sec_check_enable,omitempty"`
1399 SecCheckFragments bool `binapi:"bool,name=sec_check_fragments" json:"sec_check_fragments,omitempty"`
1400 TcCopy bool `binapi:"bool,name=tc_copy" json:"tc_copy,omitempty"`
1401 TcClass uint8 `binapi:"u8,name=tc_class" json:"tc_class,omitempty"`
1404 func (m *MapParamGetReply) Reset() { *m = MapParamGetReply{} }
1405 func (*MapParamGetReply) GetMessageName() string { return "map_param_get_reply" }
1406 func (*MapParamGetReply) GetCrcString() string { return "28092156" }
1407 func (*MapParamGetReply) GetMessageType() api.MessageType {
1408 return api.ReplyMessage
1411 func (m *MapParamGetReply) Size() (size int) {
1415 size += 4 // m.Retval
1416 size += 1 // m.FragInner
1417 size += 1 // m.FragIgnoreDf
1418 size += 1 * 4 // m.ICMPIP4ErrRelaySrc
1419 size += 1 // m.ICMP6EnableUnreachable
1420 size += 1 * 4 // m.IP4NhAddress
1421 size += 1 * 16 // m.IP6NhAddress
1422 size += 2 // m.IP4LifetimeMs
1423 size += 2 // m.IP4PoolSize
1424 size += 4 // m.IP4Buffers
1425 size += 8 // m.IP4HtRatio
1426 size += 1 // m.SecCheckEnable
1427 size += 1 // m.SecCheckFragments
1428 size += 1 // m.TcCopy
1429 size += 1 // m.TcClass
1432 func (m *MapParamGetReply) Marshal(b []byte) ([]byte, error) {
1434 b = make([]byte, m.Size())
1436 buf := codec.NewBuffer(b)
1437 buf.EncodeInt32(m.Retval)
1438 buf.EncodeUint8(m.FragInner)
1439 buf.EncodeUint8(m.FragIgnoreDf)
1440 buf.EncodeBytes(m.ICMPIP4ErrRelaySrc[:], 4)
1441 buf.EncodeBool(m.ICMP6EnableUnreachable)
1442 buf.EncodeBytes(m.IP4NhAddress[:], 4)
1443 buf.EncodeBytes(m.IP6NhAddress[:], 16)
1444 buf.EncodeUint16(m.IP4LifetimeMs)
1445 buf.EncodeUint16(m.IP4PoolSize)
1446 buf.EncodeUint32(m.IP4Buffers)
1447 buf.EncodeFloat64(m.IP4HtRatio)
1448 buf.EncodeBool(m.SecCheckEnable)
1449 buf.EncodeBool(m.SecCheckFragments)
1450 buf.EncodeBool(m.TcCopy)
1451 buf.EncodeUint8(m.TcClass)
1452 return buf.Bytes(), nil
1454 func (m *MapParamGetReply) Unmarshal(b []byte) error {
1455 buf := codec.NewBuffer(b)
1456 m.Retval = buf.DecodeInt32()
1457 m.FragInner = buf.DecodeUint8()
1458 m.FragIgnoreDf = buf.DecodeUint8()
1459 copy(m.ICMPIP4ErrRelaySrc[:], buf.DecodeBytes(4))
1460 m.ICMP6EnableUnreachable = buf.DecodeBool()
1461 copy(m.IP4NhAddress[:], buf.DecodeBytes(4))
1462 copy(m.IP6NhAddress[:], buf.DecodeBytes(16))
1463 m.IP4LifetimeMs = buf.DecodeUint16()
1464 m.IP4PoolSize = buf.DecodeUint16()
1465 m.IP4Buffers = buf.DecodeUint32()
1466 m.IP4HtRatio = buf.DecodeFloat64()
1467 m.SecCheckEnable = buf.DecodeBool()
1468 m.SecCheckFragments = buf.DecodeBool()
1469 m.TcCopy = buf.DecodeBool()
1470 m.TcClass = buf.DecodeUint8()
1474 // MapParamSetFragmentation defines message 'map_param_set_fragmentation'.
1475 type MapParamSetFragmentation struct {
1476 Inner bool `binapi:"bool,name=inner" json:"inner,omitempty"`
1477 IgnoreDf bool `binapi:"bool,name=ignore_df" json:"ignore_df,omitempty"`
1480 func (m *MapParamSetFragmentation) Reset() { *m = MapParamSetFragmentation{} }
1481 func (*MapParamSetFragmentation) GetMessageName() string { return "map_param_set_fragmentation" }
1482 func (*MapParamSetFragmentation) GetCrcString() string { return "9ff54d90" }
1483 func (*MapParamSetFragmentation) GetMessageType() api.MessageType {
1484 return api.RequestMessage
1487 func (m *MapParamSetFragmentation) Size() (size int) {
1491 size += 1 // m.Inner
1492 size += 1 // m.IgnoreDf
1495 func (m *MapParamSetFragmentation) Marshal(b []byte) ([]byte, error) {
1497 b = make([]byte, m.Size())
1499 buf := codec.NewBuffer(b)
1500 buf.EncodeBool(m.Inner)
1501 buf.EncodeBool(m.IgnoreDf)
1502 return buf.Bytes(), nil
1504 func (m *MapParamSetFragmentation) Unmarshal(b []byte) error {
1505 buf := codec.NewBuffer(b)
1506 m.Inner = buf.DecodeBool()
1507 m.IgnoreDf = buf.DecodeBool()
1511 // MapParamSetFragmentationReply defines message 'map_param_set_fragmentation_reply'.
1512 type MapParamSetFragmentationReply struct {
1513 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1516 func (m *MapParamSetFragmentationReply) Reset() { *m = MapParamSetFragmentationReply{} }
1517 func (*MapParamSetFragmentationReply) GetMessageName() string {
1518 return "map_param_set_fragmentation_reply"
1520 func (*MapParamSetFragmentationReply) GetCrcString() string { return "e8d4e804" }
1521 func (*MapParamSetFragmentationReply) GetMessageType() api.MessageType {
1522 return api.ReplyMessage
1525 func (m *MapParamSetFragmentationReply) Size() (size int) {
1529 size += 4 // m.Retval
1532 func (m *MapParamSetFragmentationReply) Marshal(b []byte) ([]byte, error) {
1534 b = make([]byte, m.Size())
1536 buf := codec.NewBuffer(b)
1537 buf.EncodeInt32(m.Retval)
1538 return buf.Bytes(), nil
1540 func (m *MapParamSetFragmentationReply) Unmarshal(b []byte) error {
1541 buf := codec.NewBuffer(b)
1542 m.Retval = buf.DecodeInt32()
1546 // MapParamSetICMP defines message 'map_param_set_icmp'.
1547 type MapParamSetICMP struct {
1548 IP4ErrRelaySrc IP4Address `binapi:"ip4_address,name=ip4_err_relay_src" json:"ip4_err_relay_src,omitempty"`
1551 func (m *MapParamSetICMP) Reset() { *m = MapParamSetICMP{} }
1552 func (*MapParamSetICMP) GetMessageName() string { return "map_param_set_icmp" }
1553 func (*MapParamSetICMP) GetCrcString() string { return "58210cbf" }
1554 func (*MapParamSetICMP) GetMessageType() api.MessageType {
1555 return api.RequestMessage
1558 func (m *MapParamSetICMP) Size() (size int) {
1562 size += 1 * 4 // m.IP4ErrRelaySrc
1565 func (m *MapParamSetICMP) Marshal(b []byte) ([]byte, error) {
1567 b = make([]byte, m.Size())
1569 buf := codec.NewBuffer(b)
1570 buf.EncodeBytes(m.IP4ErrRelaySrc[:], 4)
1571 return buf.Bytes(), nil
1573 func (m *MapParamSetICMP) Unmarshal(b []byte) error {
1574 buf := codec.NewBuffer(b)
1575 copy(m.IP4ErrRelaySrc[:], buf.DecodeBytes(4))
1579 // MapParamSetICMP6 defines message 'map_param_set_icmp6'.
1580 type MapParamSetICMP6 struct {
1581 EnableUnreachable bool `binapi:"bool,name=enable_unreachable" json:"enable_unreachable,omitempty"`
1584 func (m *MapParamSetICMP6) Reset() { *m = MapParamSetICMP6{} }
1585 func (*MapParamSetICMP6) GetMessageName() string { return "map_param_set_icmp6" }
1586 func (*MapParamSetICMP6) GetCrcString() string { return "5d01f8c1" }
1587 func (*MapParamSetICMP6) GetMessageType() api.MessageType {
1588 return api.RequestMessage
1591 func (m *MapParamSetICMP6) Size() (size int) {
1595 size += 1 // m.EnableUnreachable
1598 func (m *MapParamSetICMP6) Marshal(b []byte) ([]byte, error) {
1600 b = make([]byte, m.Size())
1602 buf := codec.NewBuffer(b)
1603 buf.EncodeBool(m.EnableUnreachable)
1604 return buf.Bytes(), nil
1606 func (m *MapParamSetICMP6) Unmarshal(b []byte) error {
1607 buf := codec.NewBuffer(b)
1608 m.EnableUnreachable = buf.DecodeBool()
1612 // MapParamSetICMP6Reply defines message 'map_param_set_icmp6_reply'.
1613 type MapParamSetICMP6Reply struct {
1614 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1617 func (m *MapParamSetICMP6Reply) Reset() { *m = MapParamSetICMP6Reply{} }
1618 func (*MapParamSetICMP6Reply) GetMessageName() string { return "map_param_set_icmp6_reply" }
1619 func (*MapParamSetICMP6Reply) GetCrcString() string { return "e8d4e804" }
1620 func (*MapParamSetICMP6Reply) GetMessageType() api.MessageType {
1621 return api.ReplyMessage
1624 func (m *MapParamSetICMP6Reply) Size() (size int) {
1628 size += 4 // m.Retval
1631 func (m *MapParamSetICMP6Reply) Marshal(b []byte) ([]byte, error) {
1633 b = make([]byte, m.Size())
1635 buf := codec.NewBuffer(b)
1636 buf.EncodeInt32(m.Retval)
1637 return buf.Bytes(), nil
1639 func (m *MapParamSetICMP6Reply) Unmarshal(b []byte) error {
1640 buf := codec.NewBuffer(b)
1641 m.Retval = buf.DecodeInt32()
1645 // MapParamSetICMPReply defines message 'map_param_set_icmp_reply'.
1646 type MapParamSetICMPReply struct {
1647 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1650 func (m *MapParamSetICMPReply) Reset() { *m = MapParamSetICMPReply{} }
1651 func (*MapParamSetICMPReply) GetMessageName() string { return "map_param_set_icmp_reply" }
1652 func (*MapParamSetICMPReply) GetCrcString() string { return "e8d4e804" }
1653 func (*MapParamSetICMPReply) GetMessageType() api.MessageType {
1654 return api.ReplyMessage
1657 func (m *MapParamSetICMPReply) Size() (size int) {
1661 size += 4 // m.Retval
1664 func (m *MapParamSetICMPReply) Marshal(b []byte) ([]byte, error) {
1666 b = make([]byte, m.Size())
1668 buf := codec.NewBuffer(b)
1669 buf.EncodeInt32(m.Retval)
1670 return buf.Bytes(), nil
1672 func (m *MapParamSetICMPReply) Unmarshal(b []byte) error {
1673 buf := codec.NewBuffer(b)
1674 m.Retval = buf.DecodeInt32()
1678 // MapParamSetSecurityCheck defines message 'map_param_set_security_check'.
1679 type MapParamSetSecurityCheck struct {
1680 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
1681 Fragments bool `binapi:"bool,name=fragments" json:"fragments,omitempty"`
1684 func (m *MapParamSetSecurityCheck) Reset() { *m = MapParamSetSecurityCheck{} }
1685 func (*MapParamSetSecurityCheck) GetMessageName() string { return "map_param_set_security_check" }
1686 func (*MapParamSetSecurityCheck) GetCrcString() string { return "6abe9836" }
1687 func (*MapParamSetSecurityCheck) GetMessageType() api.MessageType {
1688 return api.RequestMessage
1691 func (m *MapParamSetSecurityCheck) Size() (size int) {
1695 size += 1 // m.Enable
1696 size += 1 // m.Fragments
1699 func (m *MapParamSetSecurityCheck) Marshal(b []byte) ([]byte, error) {
1701 b = make([]byte, m.Size())
1703 buf := codec.NewBuffer(b)
1704 buf.EncodeBool(m.Enable)
1705 buf.EncodeBool(m.Fragments)
1706 return buf.Bytes(), nil
1708 func (m *MapParamSetSecurityCheck) Unmarshal(b []byte) error {
1709 buf := codec.NewBuffer(b)
1710 m.Enable = buf.DecodeBool()
1711 m.Fragments = buf.DecodeBool()
1715 // MapParamSetSecurityCheckReply defines message 'map_param_set_security_check_reply'.
1716 type MapParamSetSecurityCheckReply struct {
1717 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1720 func (m *MapParamSetSecurityCheckReply) Reset() { *m = MapParamSetSecurityCheckReply{} }
1721 func (*MapParamSetSecurityCheckReply) GetMessageName() string {
1722 return "map_param_set_security_check_reply"
1724 func (*MapParamSetSecurityCheckReply) GetCrcString() string { return "e8d4e804" }
1725 func (*MapParamSetSecurityCheckReply) GetMessageType() api.MessageType {
1726 return api.ReplyMessage
1729 func (m *MapParamSetSecurityCheckReply) Size() (size int) {
1733 size += 4 // m.Retval
1736 func (m *MapParamSetSecurityCheckReply) Marshal(b []byte) ([]byte, error) {
1738 b = make([]byte, m.Size())
1740 buf := codec.NewBuffer(b)
1741 buf.EncodeInt32(m.Retval)
1742 return buf.Bytes(), nil
1744 func (m *MapParamSetSecurityCheckReply) Unmarshal(b []byte) error {
1745 buf := codec.NewBuffer(b)
1746 m.Retval = buf.DecodeInt32()
1750 // MapParamSetTCP defines message 'map_param_set_tcp'.
1751 type MapParamSetTCP struct {
1752 TCPMss uint16 `binapi:"u16,name=tcp_mss" json:"tcp_mss,omitempty"`
1755 func (m *MapParamSetTCP) Reset() { *m = MapParamSetTCP{} }
1756 func (*MapParamSetTCP) GetMessageName() string { return "map_param_set_tcp" }
1757 func (*MapParamSetTCP) GetCrcString() string { return "87a825d9" }
1758 func (*MapParamSetTCP) GetMessageType() api.MessageType {
1759 return api.RequestMessage
1762 func (m *MapParamSetTCP) Size() (size int) {
1766 size += 2 // m.TCPMss
1769 func (m *MapParamSetTCP) Marshal(b []byte) ([]byte, error) {
1771 b = make([]byte, m.Size())
1773 buf := codec.NewBuffer(b)
1774 buf.EncodeUint16(m.TCPMss)
1775 return buf.Bytes(), nil
1777 func (m *MapParamSetTCP) Unmarshal(b []byte) error {
1778 buf := codec.NewBuffer(b)
1779 m.TCPMss = buf.DecodeUint16()
1783 // MapParamSetTCPReply defines message 'map_param_set_tcp_reply'.
1784 type MapParamSetTCPReply struct {
1785 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1788 func (m *MapParamSetTCPReply) Reset() { *m = MapParamSetTCPReply{} }
1789 func (*MapParamSetTCPReply) GetMessageName() string { return "map_param_set_tcp_reply" }
1790 func (*MapParamSetTCPReply) GetCrcString() string { return "e8d4e804" }
1791 func (*MapParamSetTCPReply) GetMessageType() api.MessageType {
1792 return api.ReplyMessage
1795 func (m *MapParamSetTCPReply) Size() (size int) {
1799 size += 4 // m.Retval
1802 func (m *MapParamSetTCPReply) Marshal(b []byte) ([]byte, error) {
1804 b = make([]byte, m.Size())
1806 buf := codec.NewBuffer(b)
1807 buf.EncodeInt32(m.Retval)
1808 return buf.Bytes(), nil
1810 func (m *MapParamSetTCPReply) Unmarshal(b []byte) error {
1811 buf := codec.NewBuffer(b)
1812 m.Retval = buf.DecodeInt32()
1816 // MapParamSetTrafficClass defines message 'map_param_set_traffic_class'.
1817 type MapParamSetTrafficClass struct {
1818 Copy bool `binapi:"bool,name=copy" json:"copy,omitempty"`
1819 TcClass uint8 `binapi:"u8,name=tc_class" json:"tc_class,omitempty"`
1822 func (m *MapParamSetTrafficClass) Reset() { *m = MapParamSetTrafficClass{} }
1823 func (*MapParamSetTrafficClass) GetMessageName() string { return "map_param_set_traffic_class" }
1824 func (*MapParamSetTrafficClass) GetCrcString() string { return "9cac455c" }
1825 func (*MapParamSetTrafficClass) GetMessageType() api.MessageType {
1826 return api.RequestMessage
1829 func (m *MapParamSetTrafficClass) Size() (size int) {
1834 size += 1 // m.TcClass
1837 func (m *MapParamSetTrafficClass) Marshal(b []byte) ([]byte, error) {
1839 b = make([]byte, m.Size())
1841 buf := codec.NewBuffer(b)
1842 buf.EncodeBool(m.Copy)
1843 buf.EncodeUint8(m.TcClass)
1844 return buf.Bytes(), nil
1846 func (m *MapParamSetTrafficClass) Unmarshal(b []byte) error {
1847 buf := codec.NewBuffer(b)
1848 m.Copy = buf.DecodeBool()
1849 m.TcClass = buf.DecodeUint8()
1853 // MapParamSetTrafficClassReply defines message 'map_param_set_traffic_class_reply'.
1854 type MapParamSetTrafficClassReply struct {
1855 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1858 func (m *MapParamSetTrafficClassReply) Reset() { *m = MapParamSetTrafficClassReply{} }
1859 func (*MapParamSetTrafficClassReply) GetMessageName() string {
1860 return "map_param_set_traffic_class_reply"
1862 func (*MapParamSetTrafficClassReply) GetCrcString() string { return "e8d4e804" }
1863 func (*MapParamSetTrafficClassReply) GetMessageType() api.MessageType {
1864 return api.ReplyMessage
1867 func (m *MapParamSetTrafficClassReply) Size() (size int) {
1871 size += 4 // m.Retval
1874 func (m *MapParamSetTrafficClassReply) Marshal(b []byte) ([]byte, error) {
1876 b = make([]byte, m.Size())
1878 buf := codec.NewBuffer(b)
1879 buf.EncodeInt32(m.Retval)
1880 return buf.Bytes(), nil
1882 func (m *MapParamSetTrafficClassReply) Unmarshal(b []byte) error {
1883 buf := codec.NewBuffer(b)
1884 m.Retval = buf.DecodeInt32()
1888 // MapRuleDetails defines message 'map_rule_details'.
1889 type MapRuleDetails struct {
1890 IP6Dst IP6Address `binapi:"ip6_address,name=ip6_dst" json:"ip6_dst,omitempty"`
1891 Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
1894 func (m *MapRuleDetails) Reset() { *m = MapRuleDetails{} }
1895 func (*MapRuleDetails) GetMessageName() string { return "map_rule_details" }
1896 func (*MapRuleDetails) GetCrcString() string { return "c7cbeea5" }
1897 func (*MapRuleDetails) GetMessageType() api.MessageType {
1898 return api.ReplyMessage
1901 func (m *MapRuleDetails) Size() (size int) {
1905 size += 1 * 16 // m.IP6Dst
1909 func (m *MapRuleDetails) Marshal(b []byte) ([]byte, error) {
1911 b = make([]byte, m.Size())
1913 buf := codec.NewBuffer(b)
1914 buf.EncodeBytes(m.IP6Dst[:], 16)
1915 buf.EncodeUint16(m.Psid)
1916 return buf.Bytes(), nil
1918 func (m *MapRuleDetails) Unmarshal(b []byte) error {
1919 buf := codec.NewBuffer(b)
1920 copy(m.IP6Dst[:], buf.DecodeBytes(16))
1921 m.Psid = buf.DecodeUint16()
1925 // MapRuleDump defines message 'map_rule_dump'.
1926 type MapRuleDump struct {
1927 DomainIndex uint32 `binapi:"u32,name=domain_index" json:"domain_index,omitempty"`
1930 func (m *MapRuleDump) Reset() { *m = MapRuleDump{} }
1931 func (*MapRuleDump) GetMessageName() string { return "map_rule_dump" }
1932 func (*MapRuleDump) GetCrcString() string { return "e43e6ff6" }
1933 func (*MapRuleDump) GetMessageType() api.MessageType {
1934 return api.RequestMessage
1937 func (m *MapRuleDump) Size() (size int) {
1941 size += 4 // m.DomainIndex
1944 func (m *MapRuleDump) Marshal(b []byte) ([]byte, error) {
1946 b = make([]byte, m.Size())
1948 buf := codec.NewBuffer(b)
1949 buf.EncodeUint32(m.DomainIndex)
1950 return buf.Bytes(), nil
1952 func (m *MapRuleDump) Unmarshal(b []byte) error {
1953 buf := codec.NewBuffer(b)
1954 m.DomainIndex = buf.DecodeUint32()
1958 // MapSummaryStats defines message 'map_summary_stats'.
1959 type MapSummaryStats struct{}
1961 func (m *MapSummaryStats) Reset() { *m = MapSummaryStats{} }
1962 func (*MapSummaryStats) GetMessageName() string { return "map_summary_stats" }
1963 func (*MapSummaryStats) GetCrcString() string { return "51077d14" }
1964 func (*MapSummaryStats) GetMessageType() api.MessageType {
1965 return api.RequestMessage
1968 func (m *MapSummaryStats) Size() (size int) {
1974 func (m *MapSummaryStats) Marshal(b []byte) ([]byte, error) {
1976 b = make([]byte, m.Size())
1978 buf := codec.NewBuffer(b)
1979 return buf.Bytes(), nil
1981 func (m *MapSummaryStats) Unmarshal(b []byte) error {
1985 // MapSummaryStatsReply defines message 'map_summary_stats_reply'.
1986 type MapSummaryStatsReply struct {
1987 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1988 TotalBindings uint64 `binapi:"u64,name=total_bindings" json:"total_bindings,omitempty"`
1989 TotalPkts []uint64 `binapi:"u64[2],name=total_pkts" json:"total_pkts,omitempty"`
1990 TotalBytes []uint64 `binapi:"u64[2],name=total_bytes" json:"total_bytes,omitempty"`
1991 TotalIP4Fragments uint64 `binapi:"u64,name=total_ip4_fragments" json:"total_ip4_fragments,omitempty"`
1992 TotalSecurityCheck []uint64 `binapi:"u64[2],name=total_security_check" json:"total_security_check,omitempty"`
1995 func (m *MapSummaryStatsReply) Reset() { *m = MapSummaryStatsReply{} }
1996 func (*MapSummaryStatsReply) GetMessageName() string { return "map_summary_stats_reply" }
1997 func (*MapSummaryStatsReply) GetCrcString() string { return "0e4ace0e" }
1998 func (*MapSummaryStatsReply) GetMessageType() api.MessageType {
1999 return api.ReplyMessage
2002 func (m *MapSummaryStatsReply) Size() (size int) {
2006 size += 4 // m.Retval
2007 size += 8 // m.TotalBindings
2008 size += 8 * 2 // m.TotalPkts
2009 size += 8 * 2 // m.TotalBytes
2010 size += 8 // m.TotalIP4Fragments
2011 size += 8 * 2 // m.TotalSecurityCheck
2014 func (m *MapSummaryStatsReply) Marshal(b []byte) ([]byte, error) {
2016 b = make([]byte, m.Size())
2018 buf := codec.NewBuffer(b)
2019 buf.EncodeInt32(m.Retval)
2020 buf.EncodeUint64(m.TotalBindings)
2021 for i := 0; i < 2; i++ {
2023 if i < len(m.TotalPkts) {
2024 x = uint64(m.TotalPkts[i])
2028 for i := 0; i < 2; i++ {
2030 if i < len(m.TotalBytes) {
2031 x = uint64(m.TotalBytes[i])
2035 buf.EncodeUint64(m.TotalIP4Fragments)
2036 for i := 0; i < 2; i++ {
2038 if i < len(m.TotalSecurityCheck) {
2039 x = uint64(m.TotalSecurityCheck[i])
2043 return buf.Bytes(), nil
2045 func (m *MapSummaryStatsReply) Unmarshal(b []byte) error {
2046 buf := codec.NewBuffer(b)
2047 m.Retval = buf.DecodeInt32()
2048 m.TotalBindings = buf.DecodeUint64()
2049 m.TotalPkts = make([]uint64, 2)
2050 for i := 0; i < len(m.TotalPkts); i++ {
2051 m.TotalPkts[i] = buf.DecodeUint64()
2053 m.TotalBytes = make([]uint64, 2)
2054 for i := 0; i < len(m.TotalBytes); i++ {
2055 m.TotalBytes[i] = buf.DecodeUint64()
2057 m.TotalIP4Fragments = buf.DecodeUint64()
2058 m.TotalSecurityCheck = make([]uint64, 2)
2059 for i := 0; i < len(m.TotalSecurityCheck); i++ {
2060 m.TotalSecurityCheck[i] = buf.DecodeUint64()
2065 func init() { file_maps_binapi_init() }
2066 func file_maps_binapi_init() {
2067 api.RegisterMessage((*MapAddDelRule)(nil), "map_add_del_rule_c65b32f7")
2068 api.RegisterMessage((*MapAddDelRuleReply)(nil), "map_add_del_rule_reply_e8d4e804")
2069 api.RegisterMessage((*MapAddDomain)(nil), "map_add_domain_7a5a18c9")
2070 api.RegisterMessage((*MapAddDomainReply)(nil), "map_add_domain_reply_3e6d4e2c")
2071 api.RegisterMessage((*MapDelDomain)(nil), "map_del_domain_8ac76db6")
2072 api.RegisterMessage((*MapDelDomainReply)(nil), "map_del_domain_reply_e8d4e804")
2073 api.RegisterMessage((*MapDomainDetails)(nil), "map_domain_details_fc1859dd")
2074 api.RegisterMessage((*MapDomainDump)(nil), "map_domain_dump_51077d14")
2075 api.RegisterMessage((*MapIfEnableDisable)(nil), "map_if_enable_disable_59bb32f4")
2076 api.RegisterMessage((*MapIfEnableDisableReply)(nil), "map_if_enable_disable_reply_e8d4e804")
2077 api.RegisterMessage((*MapParamAddDelPreResolve)(nil), "map_param_add_del_pre_resolve_17008c66")
2078 api.RegisterMessage((*MapParamAddDelPreResolveReply)(nil), "map_param_add_del_pre_resolve_reply_e8d4e804")
2079 api.RegisterMessage((*MapParamGet)(nil), "map_param_get_51077d14")
2080 api.RegisterMessage((*MapParamGetReply)(nil), "map_param_get_reply_28092156")
2081 api.RegisterMessage((*MapParamSetFragmentation)(nil), "map_param_set_fragmentation_9ff54d90")
2082 api.RegisterMessage((*MapParamSetFragmentationReply)(nil), "map_param_set_fragmentation_reply_e8d4e804")
2083 api.RegisterMessage((*MapParamSetICMP)(nil), "map_param_set_icmp_58210cbf")
2084 api.RegisterMessage((*MapParamSetICMP6)(nil), "map_param_set_icmp6_5d01f8c1")
2085 api.RegisterMessage((*MapParamSetICMP6Reply)(nil), "map_param_set_icmp6_reply_e8d4e804")
2086 api.RegisterMessage((*MapParamSetICMPReply)(nil), "map_param_set_icmp_reply_e8d4e804")
2087 api.RegisterMessage((*MapParamSetSecurityCheck)(nil), "map_param_set_security_check_6abe9836")
2088 api.RegisterMessage((*MapParamSetSecurityCheckReply)(nil), "map_param_set_security_check_reply_e8d4e804")
2089 api.RegisterMessage((*MapParamSetTCP)(nil), "map_param_set_tcp_87a825d9")
2090 api.RegisterMessage((*MapParamSetTCPReply)(nil), "map_param_set_tcp_reply_e8d4e804")
2091 api.RegisterMessage((*MapParamSetTrafficClass)(nil), "map_param_set_traffic_class_9cac455c")
2092 api.RegisterMessage((*MapParamSetTrafficClassReply)(nil), "map_param_set_traffic_class_reply_e8d4e804")
2093 api.RegisterMessage((*MapRuleDetails)(nil), "map_rule_details_c7cbeea5")
2094 api.RegisterMessage((*MapRuleDump)(nil), "map_rule_dump_e43e6ff6")
2095 api.RegisterMessage((*MapSummaryStats)(nil), "map_summary_stats_51077d14")
2096 api.RegisterMessage((*MapSummaryStatsReply)(nil), "map_summary_stats_reply_0e4ace0e")
2099 // Messages returns list of all messages in this module.
2100 func AllMessages() []api.Message {
2101 return []api.Message{
2102 (*MapAddDelRule)(nil),
2103 (*MapAddDelRuleReply)(nil),
2104 (*MapAddDomain)(nil),
2105 (*MapAddDomainReply)(nil),
2106 (*MapDelDomain)(nil),
2107 (*MapDelDomainReply)(nil),
2108 (*MapDomainDetails)(nil),
2109 (*MapDomainDump)(nil),
2110 (*MapIfEnableDisable)(nil),
2111 (*MapIfEnableDisableReply)(nil),
2112 (*MapParamAddDelPreResolve)(nil),
2113 (*MapParamAddDelPreResolveReply)(nil),
2114 (*MapParamGet)(nil),
2115 (*MapParamGetReply)(nil),
2116 (*MapParamSetFragmentation)(nil),
2117 (*MapParamSetFragmentationReply)(nil),
2118 (*MapParamSetICMP)(nil),
2119 (*MapParamSetICMP6)(nil),
2120 (*MapParamSetICMP6Reply)(nil),
2121 (*MapParamSetICMPReply)(nil),
2122 (*MapParamSetSecurityCheck)(nil),
2123 (*MapParamSetSecurityCheckReply)(nil),
2124 (*MapParamSetTCP)(nil),
2125 (*MapParamSetTCPReply)(nil),
2126 (*MapParamSetTrafficClass)(nil),
2127 (*MapParamSetTrafficClassReply)(nil),
2128 (*MapRuleDetails)(nil),
2129 (*MapRuleDump)(nil),
2130 (*MapSummaryStats)(nil),
2131 (*MapSummaryStatsReply)(nil),