diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2020-07-22 04:40:55 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2020-07-22 04:40:55 +0200 |
commit | 58da9ac6e691a8c660eb8ca838a154e11da0db68 (patch) | |
tree | a1bbda04c6d0621ce0fc20779276620f1820190b /internal/testbinapi/binapi2001/nat | |
parent | a155cd438c6558da266c1c5931361ea088b35653 (diff) |
Fix binapigen decoding and minor improvements
- fixed allocating byte slices before copying decoded data
- simplified encoding functions
- several minor improvements
Change-Id: I6669424b89eb86333805cb1b57e4551169980cc2
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'internal/testbinapi/binapi2001/nat')
-rw-r--r-- | internal/testbinapi/binapi2001/nat/nat.ba.go | 6378 | ||||
-rw-r--r-- | internal/testbinapi/binapi2001/nat/nat_rpc.ba.go | 1273 |
2 files changed, 7651 insertions, 0 deletions
diff --git a/internal/testbinapi/binapi2001/nat/nat.ba.go b/internal/testbinapi/binapi2001/nat/nat.ba.go new file mode 100644 index 0000000..e6ef501 --- /dev/null +++ b/internal/testbinapi/binapi2001/nat/nat.ba.go @@ -0,0 +1,6378 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// versions: +// binapi-generator: v0.4.0-dev +// VPP: 20.01 +// source: .vppapi/plugins/nat.api.json + +// Package nat contains generated bindings for API file nat.api. +// +// Contents: +// 6 aliases +// 12 enums +// 7 structs +// 1 union +// 131 messages +// +package nat + +import ( + "fmt" + api "git.fd.io/govpp.git/api" + codec "git.fd.io/govpp.git/codec" + "net" + "strconv" + "strings" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the GoVPP api package it is being compiled against. +// A compilation error at this line likely means your copy of the +// GoVPP api package needs to be updated. +const _ = api.GoVppAPIPackageIsVersion2 + +const ( + APIFile = "nat" + APIVersion = "5.2.0" + VersionCrc = 0xef1a1c94 +) + +// AddressFamily defines enum 'address_family'. +type AddressFamily uint32 + +const ( + ADDRESS_IP4 AddressFamily = 0 + ADDRESS_IP6 AddressFamily = 1 +) + +var ( + AddressFamily_name = map[uint32]string{ + 0: "ADDRESS_IP4", + 1: "ADDRESS_IP6", + } + AddressFamily_value = map[string]uint32{ + "ADDRESS_IP4": 0, + "ADDRESS_IP6": 1, + } +) + +func (x AddressFamily) String() string { + s, ok := AddressFamily_name[uint32(x)] + if ok { + return s + } + return "AddressFamily(" + strconv.Itoa(int(x)) + ")" +} + +// IfStatusFlags defines enum 'if_status_flags'. +type IfStatusFlags uint32 + +const ( + IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1 + IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2 +) + +var ( + IfStatusFlags_name = map[uint32]string{ + 1: "IF_STATUS_API_FLAG_ADMIN_UP", + 2: "IF_STATUS_API_FLAG_LINK_UP", + } + IfStatusFlags_value = map[string]uint32{ + "IF_STATUS_API_FLAG_ADMIN_UP": 1, + "IF_STATUS_API_FLAG_LINK_UP": 2, + } +) + +func (x IfStatusFlags) String() string { + s, ok := IfStatusFlags_name[uint32(x)] + if ok { + return s + } + str := func(n uint32) string { + s, ok := IfStatusFlags_name[uint32(n)] + if ok { + return s + } + return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")" + } + for i := uint32(0); i <= 32; i++ { + val := uint32(x) + if val&(1<<i) != 0 { + if s != "" { + s += "|" + } + s += str(1 << i) + } + } + if s == "" { + return str(uint32(x)) + } + return s +} + +// IfType defines enum 'if_type'. +type IfType uint32 + +const ( + IF_API_TYPE_HARDWARE IfType = 1 + IF_API_TYPE_SUB IfType = 2 + IF_API_TYPE_P2P IfType = 3 + IF_API_TYPE_PIPE IfType = 4 +) + +var ( + IfType_name = map[uint32]string{ + 1: "IF_API_TYPE_HARDWARE", + 2: "IF_API_TYPE_SUB", + 3: "IF_API_TYPE_P2P", + 4: "IF_API_TYPE_PIPE", + } + IfType_value = map[string]uint32{ + "IF_API_TYPE_HARDWARE": 1, + "IF_API_TYPE_SUB": 2, + "IF_API_TYPE_P2P": 3, + "IF_API_TYPE_PIPE": 4, + } +) + +func (x IfType) String() string { + s, ok := IfType_name[uint32(x)] + if ok { + return s + } + return "IfType(" + strconv.Itoa(int(x)) + ")" +} + +// IPDscp defines enum 'ip_dscp'. +type IPDscp uint8 + +const ( + IP_API_DSCP_CS0 IPDscp = 0 + IP_API_DSCP_CS1 IPDscp = 8 + IP_API_DSCP_AF11 IPDscp = 10 + IP_API_DSCP_AF12 IPDscp = 12 + IP_API_DSCP_AF13 IPDscp = 14 + IP_API_DSCP_CS2 IPDscp = 16 + IP_API_DSCP_AF21 IPDscp = 18 + IP_API_DSCP_AF22 IPDscp = 20 + IP_API_DSCP_AF23 IPDscp = 22 + IP_API_DSCP_CS3 IPDscp = 24 + IP_API_DSCP_AF31 IPDscp = 26 + IP_API_DSCP_AF32 IPDscp = 28 + IP_API_DSCP_AF33 IPDscp = 30 + IP_API_DSCP_CS4 IPDscp = 32 + IP_API_DSCP_AF41 IPDscp = 34 + IP_API_DSCP_AF42 IPDscp = 36 + IP_API_DSCP_AF43 IPDscp = 38 + IP_API_DSCP_CS5 IPDscp = 40 + IP_API_DSCP_EF IPDscp = 46 + IP_API_DSCP_CS6 IPDscp = 48 + IP_API_DSCP_CS7 IPDscp = 50 +) + +var ( + IPDscp_name = map[uint8]string{ + 0: "IP_API_DSCP_CS0", + 8: "IP_API_DSCP_CS1", + 10: "IP_API_DSCP_AF11", + 12: "IP_API_DSCP_AF12", + 14: "IP_API_DSCP_AF13", + 16: "IP_API_DSCP_CS2", + 18: "IP_API_DSCP_AF21", + 20: "IP_API_DSCP_AF22", + 22: "IP_API_DSCP_AF23", + 24: "IP_API_DSCP_CS3", + 26: "IP_API_DSCP_AF31", + 28: "IP_API_DSCP_AF32", + 30: "IP_API_DSCP_AF33", + 32: "IP_API_DSCP_CS4", + 34: "IP_API_DSCP_AF41", + 36: "IP_API_DSCP_AF42", + 38: "IP_API_DSCP_AF43", + 40: "IP_API_DSCP_CS5", + 46: "IP_API_DSCP_EF", + 48: "IP_API_DSCP_CS6", + 50: "IP_API_DSCP_CS7", + } + IPDscp_value = map[string]uint8{ + "IP_API_DSCP_CS0": 0, + "IP_API_DSCP_CS1": 8, + "IP_API_DSCP_AF11": 10, + "IP_API_DSCP_AF12": 12, + "IP_API_DSCP_AF13": 14, + "IP_API_DSCP_CS2": 16, + "IP_API_DSCP_AF21": 18, + "IP_API_DSCP_AF22": 20, + "IP_API_DSCP_AF23": 22, + "IP_API_DSCP_CS3": 24, + "IP_API_DSCP_AF31": 26, + "IP_API_DSCP_AF32": 28, + "IP_API_DSCP_AF33": 30, + "IP_API_DSCP_CS4": 32, + "IP_API_DSCP_AF41": 34, + "IP_API_DSCP_AF42": 36, + "IP_API_DSCP_AF43": 38, + "IP_API_DSCP_CS5": 40, + "IP_API_DSCP_EF": 46, + "IP_API_DSCP_CS6": 48, + "IP_API_DSCP_CS7": 50, + } +) + +func (x IPDscp) String() string { + s, ok := IPDscp_name[uint8(x)] + if ok { + return s + } + return "IPDscp(" + strconv.Itoa(int(x)) + ")" +} + +// IPEcn defines enum 'ip_ecn'. +type IPEcn uint8 + +const ( + IP_API_ECN_NONE IPEcn = 0 + IP_API_ECN_ECT0 IPEcn = 1 + IP_API_ECN_ECT1 IPEcn = 2 + IP_API_ECN_CE IPEcn = 3 +) + +var ( + IPEcn_name = map[uint8]string{ + 0: "IP_API_ECN_NONE", + 1: "IP_API_ECN_ECT0", + 2: "IP_API_ECN_ECT1", + 3: "IP_API_ECN_CE", + } + IPEcn_value = map[string]uint8{ + "IP_API_ECN_NONE": 0, + "IP_API_ECN_ECT0": 1, + "IP_API_ECN_ECT1": 2, + "IP_API_ECN_CE": 3, + } +) + +func (x IPEcn) String() string { + s, ok := IPEcn_name[uint8(x)] + if ok { + return s + } + return "IPEcn(" + strconv.Itoa(int(x)) + ")" +} + +// IPProto defines enum 'ip_proto'. +type IPProto uint32 + +const ( + IP_API_PROTO_HOPOPT IPProto = 0 + IP_API_PROTO_ICMP IPProto = 1 + IP_API_PROTO_IGMP IPProto = 2 + IP_API_PROTO_TCP IPProto = 6 + IP_API_PROTO_UDP IPProto = 17 + IP_API_PROTO_GRE IPProto = 47 + IP_API_PROTO_AH IPProto = 50 + IP_API_PROTO_ESP IPProto = 51 + IP_API_PROTO_EIGRP IPProto = 88 + IP_API_PROTO_OSPF IPProto = 89 + IP_API_PROTO_SCTP IPProto = 132 + IP_API_PROTO_RESERVED IPProto = 255 +) + +var ( + IPProto_name = map[uint32]string{ + 0: "IP_API_PROTO_HOPOPT", + 1: "IP_API_PROTO_ICMP", + 2: "IP_API_PROTO_IGMP", + 6: "IP_API_PROTO_TCP", + 17: "IP_API_PROTO_UDP", + 47: "IP_API_PROTO_GRE", + 50: "IP_API_PROTO_AH", + 51: "IP_API_PROTO_ESP", + 88: "IP_API_PROTO_EIGRP", + 89: "IP_API_PROTO_OSPF", + 132: "IP_API_PROTO_SCTP", + 255: "IP_API_PROTO_RESERVED", + } + IPProto_value = map[string]uint32{ + "IP_API_PROTO_HOPOPT": 0, + "IP_API_PROTO_ICMP": 1, + "IP_API_PROTO_IGMP": 2, + "IP_API_PROTO_TCP": 6, + "IP_API_PROTO_UDP": 17, + "IP_API_PROTO_GRE": 47, + "IP_API_PROTO_AH": 50, + "IP_API_PROTO_ESP": 51, + "IP_API_PROTO_EIGRP": 88, + "IP_API_PROTO_OSPF": 89, + "IP_API_PROTO_SCTP": 132, + "IP_API_PROTO_RESERVED": 255, + } +) + +func (x IPProto) String() string { + s, ok := IPProto_name[uint32(x)] + if ok { + return s + } + return "IPProto(" + strconv.Itoa(int(x)) + ")" +} + +// LinkDuplex defines enum 'link_duplex'. +type LinkDuplex uint32 + +const ( + LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0 + LINK_DUPLEX_API_HALF LinkDuplex = 1 + LINK_DUPLEX_API_FULL LinkDuplex = 2 +) + +var ( + LinkDuplex_name = map[uint32]string{ + 0: "LINK_DUPLEX_API_UNKNOWN", + 1: "LINK_DUPLEX_API_HALF", + 2: "LINK_DUPLEX_API_FULL", + } + LinkDuplex_value = map[string]uint32{ + "LINK_DUPLEX_API_UNKNOWN": 0, + "LINK_DUPLEX_API_HALF": 1, + "LINK_DUPLEX_API_FULL": 2, + } +) + +func (x LinkDuplex) String() string { + s, ok := LinkDuplex_name[uint32(x)] + if ok { + return s + } + return "LinkDuplex(" + strconv.Itoa(int(x)) + ")" +} + +// MtuProto defines enum 'mtu_proto'. +type MtuProto uint32 + +const ( + MTU_PROTO_API_L3 MtuProto = 1 + MTU_PROTO_API_IP4 MtuProto = 2 + MTU_PROTO_API_IP6 MtuProto = 3 + MTU_PROTO_API_MPLS MtuProto = 4 + MTU_PROTO_API_N MtuProto = 5 +) + +var ( + MtuProto_name = map[uint32]string{ + 1: "MTU_PROTO_API_L3", + 2: "MTU_PROTO_API_IP4", + 3: "MTU_PROTO_API_IP6", + 4: "MTU_PROTO_API_MPLS", + 5: "MTU_PROTO_API_N", + } + MtuProto_value = map[string]uint32{ + "MTU_PROTO_API_L3": 1, + "MTU_PROTO_API_IP4": 2, + "MTU_PROTO_API_IP6": 3, + "MTU_PROTO_API_MPLS": 4, + "MTU_PROTO_API_N": 5, + } +) + +func (x MtuProto) String() string { + s, ok := MtuProto_name[uint32(x)] + if ok { + return s + } + return "MtuProto(" + strconv.Itoa(int(x)) + ")" +} + +// NatConfigFlags defines enum 'nat_config_flags'. +type NatConfigFlags uint8 + +const ( + NAT_IS_NONE NatConfigFlags = 0 + NAT_IS_TWICE_NAT NatConfigFlags = 1 + NAT_IS_SELF_TWICE_NAT NatConfigFlags = 2 + NAT_IS_OUT2IN_ONLY NatConfigFlags = 4 + NAT_IS_ADDR_ONLY NatConfigFlags = 8 + NAT_IS_OUTSIDE NatConfigFlags = 16 + NAT_IS_INSIDE NatConfigFlags = 32 + NAT_IS_STATIC NatConfigFlags = 64 + NAT_IS_EXT_HOST_VALID NatConfigFlags = 128 +) + +var ( + NatConfigFlags_name = map[uint8]string{ + 0: "NAT_IS_NONE", + 1: "NAT_IS_TWICE_NAT", + 2: "NAT_IS_SELF_TWICE_NAT", + 4: "NAT_IS_OUT2IN_ONLY", + 8: "NAT_IS_ADDR_ONLY", + 16: "NAT_IS_OUTSIDE", + 32: "NAT_IS_INSIDE", + 64: "NAT_IS_STATIC", + 128: "NAT_IS_EXT_HOST_VALID", + } + NatConfigFlags_value = map[string]uint8{ + "NAT_IS_NONE": 0, + "NAT_IS_TWICE_NAT": 1, + "NAT_IS_SELF_TWICE_NAT": 2, + "NAT_IS_OUT2IN_ONLY": 4, + "NAT_IS_ADDR_ONLY": 8, + "NAT_IS_OUTSIDE": 16, + "NAT_IS_INSIDE": 32, + "NAT_IS_STATIC": 64, + "NAT_IS_EXT_HOST_VALID": 128, + } +) + +func (x NatConfigFlags) String() string { + s, ok := NatConfigFlags_name[uint8(x)] + if ok { + return s + } + str := func(n uint8) string { + s, ok := NatConfigFlags_name[uint8(n)] + if ok { + return s + } + return "NatConfigFlags(" + strconv.Itoa(int(n)) + ")" + } + for i := uint8(0); i <= 8; i++ { + val := uint8(x) + if val&(1<<i) != 0 { + if s != "" { + s += "|" + } + s += str(1 << i) + } + } + if s == "" { + return str(uint8(x)) + } + return s +} + +// NatLogLevel defines enum 'nat_log_level'. +type NatLogLevel uint8 + +const ( + NAT_LOG_NONE NatLogLevel = 0 + NAT_LOG_ERROR NatLogLevel = 1 + NAT_LOG_WARNING NatLogLevel = 2 + NAT_LOG_NOTICE NatLogLevel = 3 + NAT_LOG_INFO NatLogLevel = 4 + NAT_LOG_DEBUG NatLogLevel = 5 +) + +var ( + NatLogLevel_name = map[uint8]string{ + 0: "NAT_LOG_NONE", + 1: "NAT_LOG_ERROR", + 2: "NAT_LOG_WARNING", + 3: "NAT_LOG_NOTICE", + 4: "NAT_LOG_INFO", + 5: "NAT_LOG_DEBUG", + } + NatLogLevel_value = map[string]uint8{ + "NAT_LOG_NONE": 0, + "NAT_LOG_ERROR": 1, + "NAT_LOG_WARNING": 2, + "NAT_LOG_NOTICE": 3, + "NAT_LOG_INFO": 4, + "NAT_LOG_DEBUG": 5, + } +) + +func (x NatLogLevel) String() string { + s, ok := NatLogLevel_name[uint8(x)] + if ok { + return s + } + return "NatLogLevel(" + strconv.Itoa(int(x)) + ")" +} + +// RxMode defines enum 'rx_mode'. +type RxMode uint32 + +const ( + RX_MODE_API_UNKNOWN RxMode = 0 + RX_MODE_API_POLLING RxMode = 1 + RX_MODE_API_INTERRUPT RxMode = 2 + RX_MODE_API_ADAPTIVE RxMode = 3 + RX_MODE_API_DEFAULT RxMode = 4 +) + +var ( + RxMode_name = map[uint32]string{ + 0: "RX_MODE_API_UNKNOWN", + 1: "RX_MODE_API_POLLING", + 2: "RX_MODE_API_INTERRUPT", + 3: "RX_MODE_API_ADAPTIVE", + 4: "RX_MODE_API_DEFAULT", + } + RxMode_value = map[string]uint32{ + "RX_MODE_API_UNKNOWN": 0, + "RX_MODE_API_POLLING": 1, + "RX_MODE_API_INTERRUPT": 2, + "RX_MODE_API_ADAPTIVE": 3, + "RX_MODE_API_DEFAULT": 4, + } +) + +func (x RxMode) String() string { + s, ok := RxMode_name[uint32(x)] + if ok { + return s + } + return "RxMode(" + strconv.Itoa(int(x)) + ")" +} + +// SubIfFlags defines enum 'sub_if_flags'. +type SubIfFlags uint32 + +const ( + SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1 + SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2 + SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4 + SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8 + SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16 + SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32 + SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64 + SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128 + SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254 + SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256 +) + +var ( + SubIfFlags_name = map[uint32]string{ + 1: "SUB_IF_API_FLAG_NO_TAGS", + 2: "SUB_IF_API_FLAG_ONE_TAG", + 4: "SUB_IF_API_FLAG_TWO_TAGS", + 8: "SUB_IF_API_FLAG_DOT1AD", + 16: "SUB_IF_API_FLAG_EXACT_MATCH", + 32: "SUB_IF_API_FLAG_DEFAULT", + 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY", + 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY", + 254: "SUB_IF_API_FLAG_MASK_VNET", + 256: "SUB_IF_API_FLAG_DOT1AH", + } + SubIfFlags_value = map[string]uint32{ + "SUB_IF_API_FLAG_NO_TAGS": 1, + "SUB_IF_API_FLAG_ONE_TAG": 2, + "SUB_IF_API_FLAG_TWO_TAGS": 4, + "SUB_IF_API_FLAG_DOT1AD": 8, + "SUB_IF_API_FLAG_EXACT_MATCH": 16, + "SUB_IF_API_FLAG_DEFAULT": 32, + "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64, + "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128, + "SUB_IF_API_FLAG_MASK_VNET": 254, + "SUB_IF_API_FLAG_DOT1AH": 256, + } +) + +func (x SubIfFlags) String() string { + s, ok := SubIfFlags_name[uint32(x)] + if ok { + return s + } + str := func(n uint32) string { + s, ok := SubIfFlags_name[uint32(n)] + if ok { + return s + } + return "SubIfFlags(" + strconv.Itoa(int(n)) + ")" + } + for i := uint32(0); i <= 32; i++ { + val := uint32(x) + if val&(1<<i) != 0 { + if s != "" { + s += "|" + } + s += str(1 << i) + } + } + if s == "" { + return str(uint32(x)) + } + return s +} + +// AddressWithPrefix defines alias 'address_with_prefix'. +type AddressWithPrefix Prefix + +func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { + prefix, err := ParsePrefix(s) + if err != nil { + return AddressWithPrefix{}, err + } + return AddressWithPrefix(prefix), nil +} +func (x AddressWithPrefix) String() string { + return Prefix(x).String() +} +func (x *AddressWithPrefix) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} +func (x *AddressWithPrefix) UnmarshalText(text []byte) error { + prefix, err := ParseAddressWithPrefix(string(text)) + if err != nil { + return err + } + *x = prefix + return nil +} + +// InterfaceIndex defines alias 'interface_index'. +type InterfaceIndex uint32 + +// IP4Address defines alias 'ip4_address'. +type IP4Address [4]uint8 + +func ParseIP4Address(s string) (IP4Address, error) { + ip := net.ParseIP(s).To4() + if ip == nil { + return IP4Address{}, fmt.Errorf("invalid IP address: %s", s) + } + var ipaddr IP4Address + copy(ipaddr[:], ip.To4()) + return ipaddr, nil +} + +func (x IP4Address) ToIP() net.IP { + return net.IP(x[:]).To4() +} +func (x IP4Address) String() string { + return x.ToIP().String() +} +func (x *IP4Address) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} +func (x *IP4Address) UnmarshalText(text []byte) error { + ipaddr, err := ParseIP4Address(string(text)) + if err != nil { + return err + } + *x = ipaddr + return nil +} + +// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'. +type IP4AddressWithPrefix IP4Prefix + +// IP6Address defines alias 'ip6_address'. +type IP6Address [16]uint8 + +func ParseIP6Address(s string) (IP6Address, error) { + ip := net.ParseIP(s).To16() + if ip == nil { + return IP6Address{}, fmt.Errorf("invalid IP address: %s", s) + } + var ipaddr IP6Address + copy(ipaddr[:], ip.To16()) + return ipaddr, nil +} + +func (x IP6Address) ToIP() net.IP { + return net.IP(x[:]).To16() +} +func (x IP6Address) String() string { + return x.ToIP().String() +} +func (x *IP6Address) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} +func (x *IP6Address) UnmarshalText(text []byte) error { + ipaddr, err := ParseIP6Address(string(text)) + if err != nil { + return err + } + *x = ipaddr + return nil +} + +// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'. +type IP6AddressWithPrefix IP6Prefix + +// Address defines type 'address'. +type Address struct { + Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` + Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"` +} + +func ParseAddress(s string) (Address, error) { + ip := net.ParseIP(s) + if ip == nil { + return Address{}, fmt.Errorf("invalid address: %s", s) + } + var addr Address + if ip.To4() == nil { + addr.Af = ADDRESS_IP6 + var ip6 IP6Address + copy(ip6[:], ip.To16()) + addr.Un.SetIP6(ip6) + } else { + addr.Af = ADDRESS_IP4 + var ip4 IP4Address + copy(ip4[:], ip.To4()) + addr.Un.SetIP4(ip4) + } + return addr, nil +} +func (x Address) ToIP() net.IP { + if x.Af == ADDRESS_IP6 { + ip6 := x.Un.GetIP6() + return net.IP(ip6[:]).To16() + } else { + ip4 := x.Un.GetIP4() + return net.IP(ip4[:]).To4() + } +} +func (x Address) String() string { + return x.ToIP().String() +} +func (x *Address) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} +func (x *Address) UnmarshalText(text []byte) error { + addr, err := ParseAddress(string(text)) + if err != nil { + return err + } + *x = addr + return nil +} + +// IP4Prefix defines type 'ip4_prefix'. +type IP4Prefix struct { + Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"` + Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` +} + +func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { + hasPrefix := strings.Contains(s, "/") + if hasPrefix { + ip, network, err := net.ParseCIDR(s) + if err != nil { + return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + } + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address, err = ParseIP4Address(ip.String()) + if err != nil { + return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + } + } else { + ip := net.ParseIP(s) + defaultMaskSize, _ := net.CIDRMask(32, 32).Size() + if ip.To4() == nil { + defaultMaskSize, _ = net.CIDRMask(128, 128).Size() + } + prefix.Len = byte(defaultMaskSize) + prefix.Address, err = ParseIP4Address(ip.String()) + if err != nil { + return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + } + } + return prefix, nil +} +func (x IP4Prefix) ToIPNet() *net.IPNet { + mask := net.CIDRMask(int(x.Len), 32) + ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask} + return ipnet +} +func (x IP4Prefix) String() string { + ip := x.Address.String() + return ip + "/" + strconv.Itoa(int(x.Len)) +} +func (x *IP4Prefix) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} +func (x *IP4Prefix) UnmarshalText(text []byte) error { + prefix, err := ParseIP4Prefix(string(text)) + if err != nil { + return err + } + *x = prefix + return nil +} + +// IP6Prefix defines type 'ip6_prefix'. +type IP6Prefix struct { + Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"` + Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` +} + +func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { + hasPrefix := strings.Contains(s, "/") + if hasPrefix { + ip, network, err := net.ParseCIDR(s) + if err != nil { + return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + } + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address, err = ParseIP6Address(ip.String()) + if err != nil { + return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + } + } else { + ip := net.ParseIP(s) + defaultMaskSize, _ := net.CIDRMask(32, 32).Size() + if ip.To4() == nil { + defaultMaskSize, _ = net.CIDRMask(128, 128).Size() + } + prefix.Len = byte(defaultMaskSize) + prefix.Address, err = ParseIP6Address(ip.String()) + if err != nil { + return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + } + } + return prefix, nil +} +func (x IP6Prefix) ToIPNet() *net.IPNet { + mask := net.CIDRMask(int(x.Len), 128) + ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask} + return ipnet +} +func (x IP6Prefix) String() string { + ip := x.Address.String() + return ip + "/" + strconv.Itoa(int(x.Len)) +} +func (x *IP6Prefix) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} +func (x *IP6Prefix) UnmarshalText(text []byte) error { + prefix, err := ParseIP6Prefix(string(text)) + if err != nil { + return err + } + *x = prefix + return nil +} + +// Mprefix defines type 'mprefix'. +type Mprefix struct { + Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` + GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"` + GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"` + SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"` +} + +// Nat44LbAddrPort defines type 'nat44_lb_addr_port'. +type Nat44LbAddrPort struct { + Addr IP4Address `binapi:"ip4_address,name=addr" json:"addr,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + Probability uint8 `binapi:"u8,name=probability" json:"probability,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` +} + +// Prefix defines type 'prefix'. +type Prefix struct { + Address Address `binapi:"address,name=address" json:"address,omitempty"` + Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` +} + +func ParsePrefix(ip string) (prefix Prefix, err error) { + hasPrefix := strings.Contains(ip, "/") + if hasPrefix { + netIP, network, err := net.ParseCIDR(ip) + if err != nil { + return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err) + } + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address, err = ParseAddress(netIP.String()) + if err != nil { + return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err) + } + } else { + netIP := net.ParseIP(ip) + defaultMaskSize, _ := net.CIDRMask(32, 32).Size() + if netIP.To4() == nil { + defaultMaskSize, _ = net.CIDRMask(128, 128).Size() + } + prefix.Len = byte(defaultMaskSize) + prefix.Address, err = ParseAddress(netIP.String()) + if err != nil { + return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err) + } + } + return prefix, nil +} +func (x Prefix) ToIPNet() *net.IPNet { + var mask net.IPMask + if x.Address.Af == ADDRESS_IP4 { + mask = net.CIDRMask(int(x.Len), 32) + } else { + mask = net.CIDRMask(int(x.Len), 128) + } + ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask} + return ipnet +} +func (x Prefix) String() string { + ip := x.Address.String() + return ip + "/" + strconv.Itoa(int(x.Len)) +} +func (x *Prefix) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} +func (x *Prefix) UnmarshalText(text []byte) error { + prefix, err := ParsePrefix(string(text)) + if err != nil { + return err + } + *x = prefix + return nil +} + +// PrefixMatcher defines type 'prefix_matcher'. +type PrefixMatcher struct { + Le uint8 `binapi:"u8,name=le" json:"le,omitempty"` + Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"` +} + +// AddressUnion defines union 'address_union'. +type AddressUnion struct { + // IP4 *IP4Address + // IP6 *IP6Address + XXX_UnionData [16]byte +} + +func AddressUnionIP4(a IP4Address) (u AddressUnion) { + u.SetIP4(a) + return +} +func (u *AddressUnion) SetIP4(a IP4Address) { + buf := codec.NewBuffer(u.XXX_UnionData[:]) + buf.EncodeBytes(a[:], 4) +} +func (u *AddressUnion) GetIP4() (a IP4Address) { + buf := codec.NewBuffer(u.XXX_UnionData[:]) + copy(a[:], buf.DecodeBytes(4)) + return +} + +func AddressUnionIP6(a IP6Address) (u AddressUnion) { + u.SetIP6(a) + return +} +func (u *AddressUnion) SetIP6(a IP6Address) { + buf := codec.NewBuffer(u.XXX_UnionData[:]) + buf.EncodeBytes(a[:], 16) +} +func (u *AddressUnion) GetIP6() (a IP6Address) { + buf := codec.NewBuffer(u.XXX_UnionData[:]) + copy(a[:], buf.DecodeBytes(16)) + return +} + +// DsliteAddDelPoolAddrRange defines message 'dslite_add_del_pool_addr_range'. +type DsliteAddDelPoolAddrRange struct { + StartAddr IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"` + EndAddr IP4Address `binapi:"ip4_address,name=end_addr" json:"end_addr,omitempty"` + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` +} + +func (m *DsliteAddDelPoolAddrRange) Reset() { *m = DsliteAddDelPoolAddrRange{} } +func (*DsliteAddDelPoolAddrRange) GetMessageName() string { return "dslite_add_del_pool_addr_range" } +func (*DsliteAddDelPoolAddrRange) GetCrcString() string { return "c448457a" } +func (*DsliteAddDelPoolAddrRange) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *DsliteAddDelPoolAddrRange) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.StartAddr + size += 1 * 4 // m.EndAddr + size += 1 // m.IsAdd + return size +} +func (m *DsliteAddDelPoolAddrRange) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.StartAddr[:], 4) + buf.EncodeBytes(m.EndAddr[:], 4) + buf.EncodeBool(m.IsAdd) + return buf.Bytes(), nil +} +func (m *DsliteAddDelPoolAddrRange) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.StartAddr[:], buf.DecodeBytes(4)) + copy(m.EndAddr[:], buf.DecodeBytes(4)) + m.IsAdd = buf.DecodeBool() + return nil +} + +// DsliteAddDelPoolAddrRangeReply defines message 'dslite_add_del_pool_addr_range_reply'. +type DsliteAddDelPoolAddrRangeReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *DsliteAddDelPoolAddrRangeReply) Reset() { *m = DsliteAddDelPoolAddrRangeReply{} } +func (*DsliteAddDelPoolAddrRangeReply) GetMessageName() string { + return "dslite_add_del_pool_addr_range_reply" +} +func (*DsliteAddDelPoolAddrRangeReply) GetCrcString() string { return "e8d4e804" } +func (*DsliteAddDelPoolAddrRangeReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *DsliteAddDelPoolAddrRangeReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *DsliteAddDelPoolAddrRangeReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *DsliteAddDelPoolAddrRangeReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// DsliteAddressDetails defines message 'dslite_address_details'. +type DsliteAddressDetails struct { + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` +} + +func (m *DsliteAddressDetails) Reset() { *m = DsliteAddressDetails{} } +func (*DsliteAddressDetails) GetMessageName() string { return "dslite_address_details" } +func (*DsliteAddressDetails) GetCrcString() string { return "ec26d648" } +func (*DsliteAddressDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *DsliteAddressDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.IPAddress + return size +} +func (m *DsliteAddressDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IPAddress[:], 4) + return buf.Bytes(), nil +} +func (m *DsliteAddressDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IPAddress[:], buf.DecodeBytes(4)) + return nil +} + +// DsliteAddressDump defines message 'dslite_address_dump'. +type DsliteAddressDump struct{} + +func (m *DsliteAddressDump) Reset() { *m = DsliteAddressDump{} } +func (*DsliteAddressDump) GetMessageName() string { return "dslite_address_dump" } +func (*DsliteAddressDump) GetCrcString() string { return "51077d14" } +func (*DsliteAddressDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *DsliteAddressDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *DsliteAddressDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *DsliteAddressDump) Unmarshal(b []byte) error { + return nil +} + +// DsliteGetAftrAddr defines message 'dslite_get_aftr_addr'. +type DsliteGetAftrAddr struct{} + +func (m *DsliteGetAftrAddr) Reset() { *m = DsliteGetAftrAddr{} } +func (*DsliteGetAftrAddr) GetMessageName() string { return "dslite_get_aftr_addr" } +func (*DsliteGetAftrAddr) GetCrcString() string { return "51077d14" } +func (*DsliteGetAftrAddr) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *DsliteGetAftrAddr) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *DsliteGetAftrAddr) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *DsliteGetAftrAddr) Unmarshal(b []byte) error { + return nil +} + +// DsliteGetAftrAddrReply defines message 'dslite_get_aftr_addr_reply'. +type DsliteGetAftrAddrReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"` + IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"` +} + +func (m *DsliteGetAftrAddrReply) Reset() { *m = DsliteGetAftrAddrReply{} } +func (*DsliteGetAftrAddrReply) GetMessageName() string { return "dslite_get_aftr_addr_reply" } +func (*DsliteGetAftrAddrReply) GetCrcString() string { return "38e30db1" } +func (*DsliteGetAftrAddrReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *DsliteGetAftrAddrReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 1 * 4 // m.IP4Addr + size += 1 * 16 // m.IP6Addr + return size +} +func (m *DsliteGetAftrAddrReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeBytes(m.IP4Addr[:], 4) + buf.EncodeBytes(m.IP6Addr[:], 16) + return buf.Bytes(), nil +} +func (m *DsliteGetAftrAddrReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + copy(m.IP4Addr[:], buf.DecodeBytes(4)) + copy(m.IP6Addr[:], buf.DecodeBytes(16)) + return nil +} + +// DsliteGetB4Addr defines message 'dslite_get_b4_addr'. +type DsliteGetB4Addr struct{} + +func (m *DsliteGetB4Addr) Reset() { *m = DsliteGetB4Addr{} } +func (*DsliteGetB4Addr) GetMessageName() string { return "dslite_get_b4_addr" } +func (*DsliteGetB4Addr) GetCrcString() string { return "51077d14" } +func (*DsliteGetB4Addr) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *DsliteGetB4Addr) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *DsliteGetB4Addr) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *DsliteGetB4Addr) Unmarshal(b []byte) error { + return nil +} + +// DsliteGetB4AddrReply defines message 'dslite_get_b4_addr_reply'. +type DsliteGetB4AddrReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"` + IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"` +} + +func (m *DsliteGetB4AddrReply) Reset() { *m = DsliteGetB4AddrReply{} } +func (*DsliteGetB4AddrReply) GetMessageName() string { return "dslite_get_b4_addr_reply" } +func (*DsliteGetB4AddrReply) GetCrcString() string { return "38e30db1" } +func (*DsliteGetB4AddrReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *DsliteGetB4AddrReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 1 * 4 // m.IP4Addr + size += 1 * 16 // m.IP6Addr + return size +} +func (m *DsliteGetB4AddrReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeBytes(m.IP4Addr[:], 4) + buf.EncodeBytes(m.IP6Addr[:], 16) + return buf.Bytes(), nil +} +func (m *DsliteGetB4AddrReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + copy(m.IP4Addr[:], buf.DecodeBytes(4)) + copy(m.IP6Addr[:], buf.DecodeBytes(16)) + return nil +} + +// DsliteSetAftrAddr defines message 'dslite_set_aftr_addr'. +type DsliteSetAftrAddr struct { + IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"` + IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"` +} + +func (m *DsliteSetAftrAddr) Reset() { *m = DsliteSetAftrAddr{} } +func (*DsliteSetAftrAddr) GetMessageName() string { return "dslite_set_aftr_addr" } +func (*DsliteSetAftrAddr) GetCrcString() string { return "1e955f8d" } +func (*DsliteSetAftrAddr) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *DsliteSetAftrAddr) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.IP4Addr + size += 1 * 16 // m.IP6Addr + return size +} +func (m *DsliteSetAftrAddr) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IP4Addr[:], 4) + buf.EncodeBytes(m.IP6Addr[:], 16) + return buf.Bytes(), nil +} +func (m *DsliteSetAftrAddr) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IP4Addr[:], buf.DecodeBytes(4)) + copy(m.IP6Addr[:], buf.DecodeBytes(16)) + return nil +} + +// DsliteSetAftrAddrReply defines message 'dslite_set_aftr_addr_reply'. +type DsliteSetAftrAddrReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *DsliteSetAftrAddrReply) Reset() { *m = DsliteSetAftrAddrReply{} } +func (*DsliteSetAftrAddrReply) GetMessageName() string { return "dslite_set_aftr_addr_reply" } +func (*DsliteSetAftrAddrReply) GetCrcString() string { return "e8d4e804" } +func (*DsliteSetAftrAddrReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *DsliteSetAftrAddrReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *DsliteSetAftrAddrReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *DsliteSetAftrAddrReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// DsliteSetB4Addr defines message 'dslite_set_b4_addr'. +type DsliteSetB4Addr struct { + IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"` + IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"` +} + +func (m *DsliteSetB4Addr) Reset() { *m = DsliteSetB4Addr{} } +func (*DsliteSetB4Addr) GetMessageName() string { return "dslite_set_b4_addr" } +func (*DsliteSetB4Addr) GetCrcString() string { return "1e955f8d" } +func (*DsliteSetB4Addr) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *DsliteSetB4Addr) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.IP4Addr + size += 1 * 16 // m.IP6Addr + return size +} +func (m *DsliteSetB4Addr) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IP4Addr[:], 4) + buf.EncodeBytes(m.IP6Addr[:], 16) + return buf.Bytes(), nil +} +func (m *DsliteSetB4Addr) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IP4Addr[:], buf.DecodeBytes(4)) + copy(m.IP6Addr[:], buf.DecodeBytes(16)) + return nil +} + +// DsliteSetB4AddrReply defines message 'dslite_set_b4_addr_reply'. +type DsliteSetB4AddrReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *DsliteSetB4AddrReply) Reset() { *m = DsliteSetB4AddrReply{} } +func (*DsliteSetB4AddrReply) GetMessageName() string { return "dslite_set_b4_addr_reply" } +func (*DsliteSetB4AddrReply) GetCrcString() string { return "e8d4e804" } +func (*DsliteSetB4AddrReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *DsliteSetB4AddrReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *DsliteSetB4AddrReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *DsliteSetB4AddrReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44AddDelAddressRange defines message 'nat44_add_del_address_range'. +type Nat44AddDelAddressRange struct { + FirstIPAddress IP4Address `binapi:"ip4_address,name=first_ip_address" json:"first_ip_address,omitempty"` + LastIPAddress IP4Address `binapi:"ip4_address,name=last_ip_address" json:"last_ip_address,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` +} + +func (m *Nat44AddDelAddressRange) Reset() { *m = Nat44AddDelAddressRange{} } +func (*Nat44AddDelAddressRange) GetMessageName() string { return "nat44_add_del_address_range" } +func (*Nat44AddDelAddressRange) GetCrcString() string { return "d4c7568c" } +func (*Nat44AddDelAddressRange) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44AddDelAddressRange) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.FirstIPAddress + size += 1 * 4 // m.LastIPAddress + size += 4 // m.VrfID + size += 1 // m.IsAdd + size += 1 // m.Flags + return size +} +func (m *Nat44AddDelAddressRange) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.FirstIPAddress[:], 4) + buf.EncodeBytes(m.LastIPAddress[:], 4) + buf.EncodeUint32(m.VrfID) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint8(uint8(m.Flags)) + return buf.Bytes(), nil +} +func (m *Nat44AddDelAddressRange) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.FirstIPAddress[:], buf.DecodeBytes(4)) + copy(m.LastIPAddress[:], buf.DecodeBytes(4)) + m.VrfID = buf.DecodeUint32() + m.IsAdd = buf.DecodeBool() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + return nil +} + +// Nat44AddDelAddressRangeReply defines message 'nat44_add_del_address_range_reply'. +type Nat44AddDelAddressRangeReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44AddDelAddressRangeReply) Reset() { *m = Nat44AddDelAddressRangeReply{} } +func (*Nat44AddDelAddressRangeReply) GetMessageName() string { + return "nat44_add_del_address_range_reply" +} +func (*Nat44AddDelAddressRangeReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44AddDelAddressRangeReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44AddDelAddressRangeReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44AddDelAddressRangeReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44AddDelAddressRangeReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44AddDelIdentityMapping defines message 'nat44_add_del_identity_mapping'. +type Nat44AddDelIdentityMapping struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` +} + +func (m *Nat44AddDelIdentityMapping) Reset() { *m = Nat44AddDelIdentityMapping{} } +func (*Nat44AddDelIdentityMapping) GetMessageName() string { return "nat44_add_del_identity_mapping" } +func (*Nat44AddDelIdentityMapping) GetCrcString() string { return "8e12743f" } +func (*Nat44AddDelIdentityMapping) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44AddDelIdentityMapping) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 // m.Flags + size += 1 * 4 // m.IPAddress + size += 1 // m.Protocol + size += 2 // m.Port + size += 4 // m.SwIfIndex + size += 4 // m.VrfID + size += 64 // m.Tag + return size +} +func (m *Nat44AddDelIdentityMapping) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint8(m.Protocol) + buf.EncodeUint16(m.Port) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint32(m.VrfID) + buf.EncodeString(m.Tag, 64) + return buf.Bytes(), nil +} +func (m *Nat44AddDelIdentityMapping) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.Protocol = buf.DecodeUint8() + m.Port = buf.DecodeUint16() + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + m.VrfID = buf.DecodeUint32() + m.Tag = buf.DecodeString(64) + return nil +} + +// Nat44AddDelIdentityMappingReply defines message 'nat44_add_del_identity_mapping_reply'. +type Nat44AddDelIdentityMappingReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44AddDelIdentityMappingReply) Reset() { *m = Nat44AddDelIdentityMappingReply{} } +func (*Nat44AddDelIdentityMappingReply) GetMessageName() string { + return "nat44_add_del_identity_mapping_reply" +} +func (*Nat44AddDelIdentityMappingReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44AddDelIdentityMappingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44AddDelIdentityMappingReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44AddDelIdentityMappingReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44AddDelIdentityMappingReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44AddDelInterfaceAddr defines message 'nat44_add_del_interface_addr'. +type Nat44AddDelInterfaceAddr struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` +} + +func (m *Nat44AddDelInterfaceAddr) Reset() { *m = Nat44AddDelInterfaceAddr{} } +func (*Nat44AddDelInterfaceAddr) GetMessageName() string { return "nat44_add_del_interface_addr" } +func (*Nat44AddDelInterfaceAddr) GetCrcString() string { return "fc835325" } +func (*Nat44AddDelInterfaceAddr) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44AddDelInterfaceAddr) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 4 // m.SwIfIndex + size += 1 // m.Flags + return size +} +func (m *Nat44AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint8(uint8(m.Flags)) + return buf.Bytes(), nil +} +func (m *Nat44AddDelInterfaceAddr) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + return nil +} + +// Nat44AddDelInterfaceAddrReply defines message 'nat44_add_del_interface_addr_reply'. +type Nat44AddDelInterfaceAddrReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44AddDelInterfaceAddrReply) Reset() { *m = Nat44AddDelInterfaceAddrReply{} } +func (*Nat44AddDelInterfaceAddrReply) GetMessageName() string { + return "nat44_add_del_interface_addr_reply" +} +func (*Nat44AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44AddDelInterfaceAddrReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44AddDelInterfaceAddrReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44AddDelInterfaceAddrReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44AddDelInterfaceAddrReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44AddDelLbStaticMapping defines message 'nat44_add_del_lb_static_mapping'. +type Nat44AddDelLbStaticMapping struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + ExternalAddr IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"` + ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` + Affinity uint32 `binapi:"u32,name=affinity" json:"affinity,omitempty"` + Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` + LocalNum uint32 `binapi:"u32,name=local_num" json:"-"` + Locals []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"` +} + +func (m *Nat44AddDelLbStaticMapping) Reset() { *m = Nat44AddDelLbStaticMapping{} } +func (*Nat44AddDelLbStaticMapping) GetMessageName() string { return "nat44_add_del_lb_static_mapping" } +func (*Nat44AddDelLbStaticMapping) GetCrcString() string { return "53b24611" } +func (*Nat44AddDelLbStaticMapping) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44AddDelLbStaticMapping) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 // m.Flags + size += 1 * 4 // m.ExternalAddr + size += 2 // m.ExternalPort + size += 1 // m.Protocol + size += 4 // m.Affinity + size += 64 // m.Tag + size += 4 // m.LocalNum + for j1 := 0; j1 < len(m.Locals); j1++ { + var s1 Nat44LbAddrPort + _ = s1 + if j1 < len(m.Locals) { + s1 = m.Locals[j1] + } + size += 1 * 4 // s1.Addr + size += 2 // s1.Port + size += 1 // s1.Probability + size += 4 // s1.VrfID + } + return size +} +func (m *Nat44AddDelLbStaticMapping) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeBytes(m.ExternalAddr[:], 4) + buf.EncodeUint16(m.ExternalPort) + buf.EncodeUint8(m.Protocol) + buf.EncodeUint32(m.Affinity) + buf.EncodeString(m.Tag, 64) + buf.EncodeUint32(uint32(len(m.Locals))) + for j0 := 0; j0 < len(m.Locals); j0++ { + var v0 Nat44LbAddrPort // Locals + if j0 < len(m.Locals) { + v0 = m.Locals[j0] + } + buf.EncodeBytes(v0.Addr[:], 4) + buf.EncodeUint16(v0.Port) + buf.EncodeUint8(v0.Probability) + buf.EncodeUint32(v0.VrfID) + } + return buf.Bytes(), nil +} +func (m *Nat44AddDelLbStaticMapping) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + copy(m.ExternalAddr[:], buf.DecodeBytes(4)) + m.ExternalPort = buf.DecodeUint16() + m.Protocol = buf.DecodeUint8() + m.Affinity = buf.DecodeUint32() + m.Tag = buf.DecodeString(64) + m.LocalNum = buf.DecodeUint32() + m.Locals = make([]Nat44LbAddrPort, m.LocalNum) + for j0 := 0; j0 < len(m.Locals); j0++ { + copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4)) + m.Locals[j0].Port = buf.DecodeUint16() + m.Locals[j0].Probability = buf.DecodeUint8() + m.Locals[j0].VrfID = buf.DecodeUint32() + } + return nil +} + +// Nat44AddDelLbStaticMappingReply defines message 'nat44_add_del_lb_static_mapping_reply'. +type Nat44AddDelLbStaticMappingReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44AddDelLbStaticMappingReply) Reset() { *m = Nat44AddDelLbStaticMappingReply{} } +func (*Nat44AddDelLbStaticMappingReply) GetMessageName() string { + return "nat44_add_del_lb_static_mapping_reply" +} +func (*Nat44AddDelLbStaticMappingReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44AddDelLbStaticMappingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44AddDelLbStaticMappingReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44AddDelLbStaticMappingReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44AddDelLbStaticMappingReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44AddDelStaticMapping defines message 'nat44_add_del_static_mapping'. +type Nat44AddDelStaticMapping struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + LocalIPAddress IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"` + ExternalIPAddress IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` + LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` + ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` + ExternalSwIfIndex InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` +} + +func (m *Nat44AddDelStaticMapping) Reset() { *m = Nat44AddDelStaticMapping{} } +func (*Nat44AddDelStaticMapping) GetMessageName() string { return "nat44_add_del_static_mapping" } +func (*Nat44AddDelStaticMapping) GetCrcString() string { return "e165e83b" } +func (*Nat44AddDelStaticMapping) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44AddDelStaticMapping) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 // m.Flags + size += 1 * 4 // m.LocalIPAddress + size += 1 * 4 // m.ExternalIPAddress + size += 1 // m.Protocol + size += 2 // m.LocalPort + size += 2 // m.ExternalPort + size += 4 // m.ExternalSwIfIndex + size += 4 // m.VrfID + size += 64 // m.Tag + return size +} +func (m *Nat44AddDelStaticMapping) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeBytes(m.LocalIPAddress[:], 4) + buf.EncodeBytes(m.ExternalIPAddress[:], 4) + buf.EncodeUint8(m.Protocol) + buf.EncodeUint16(m.LocalPort) + buf.EncodeUint16(m.ExternalPort) + buf.EncodeUint32(uint32(m.ExternalSwIfIndex)) + buf.EncodeUint32(m.VrfID) + buf.EncodeString(m.Tag, 64) + return buf.Bytes(), nil +} +func (m *Nat44AddDelStaticMapping) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + copy(m.LocalIPAddress[:], buf.DecodeBytes(4)) + copy(m.ExternalIPAddress[:], buf.DecodeBytes(4)) + m.Protocol = buf.DecodeUint8() + m.LocalPort = buf.DecodeUint16() + m.ExternalPort = buf.DecodeUint16() + m.ExternalSwIfIndex = InterfaceIndex(buf.DecodeUint32()) + m.VrfID = buf.DecodeUint32() + m.Tag = buf.DecodeString(64) + return nil +} + +// Nat44AddDelStaticMappingReply defines message 'nat44_add_del_static_mapping_reply'. +type Nat44AddDelStaticMappingReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44AddDelStaticMappingReply) Reset() { *m = Nat44AddDelStaticMappingReply{} } +func (*Nat44AddDelStaticMappingReply) GetMessageName() string { + return "nat44_add_del_static_mapping_reply" +} +func (*Nat44AddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44AddDelStaticMappingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44AddDelStaticMappingReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44AddDelStaticMappingReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44AddDelStaticMappingReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44AddressDetails defines message 'nat44_address_details'. +type Nat44AddressDetails struct { + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` +} + +func (m *Nat44AddressDetails) Reset() { *m = Nat44AddressDetails{} } +func (*Nat44AddressDetails) GetMessageName() string { return "nat44_address_details" } +func (*Nat44AddressDetails) GetCrcString() string { return "45410ac4" } +func (*Nat44AddressDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44AddressDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.IPAddress + size += 1 // m.Flags + size += 4 // m.VrfID + return size +} +func (m *Nat44AddressDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(m.VrfID) + return buf.Bytes(), nil +} +func (m *Nat44AddressDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.VrfID = buf.DecodeUint32() + return nil +} + +// Nat44AddressDump defines message 'nat44_address_dump'. +type Nat44AddressDump struct{} + +func (m *Nat44AddressDump) Reset() { *m = Nat44AddressDump{} } +func (*Nat44AddressDump) GetMessageName() string { return "nat44_address_dump" } +func (*Nat44AddressDump) GetCrcString() string { return "51077d14" } +func (*Nat44AddressDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44AddressDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44AddressDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44AddressDump) Unmarshal(b []byte) error { + return nil +} + +// Nat44DelSession defines message 'nat44_del_session'. +type Nat44DelSession struct { + Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + ExtHostAddress IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"` + ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"` +} + +func (m *Nat44DelSession) Reset() { *m = Nat44DelSession{} } +func (*Nat44DelSession) GetMessageName() string { return "nat44_del_session" } +func (*Nat44DelSession) GetCrcString() string { return "4c49c387" } +func (*Nat44DelSession) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44DelSession) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.Address + size += 1 // m.Protocol + size += 2 // m.Port + size += 4 // m.VrfID + size += 1 // m.Flags + size += 1 * 4 // m.ExtHostAddress + size += 2 // m.ExtHostPort + return size +} +func (m *Nat44DelSession) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.Address[:], 4) + buf.EncodeUint8(m.Protocol) + buf.EncodeUint16(m.Port) + buf.EncodeUint32(m.VrfID) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeBytes(m.ExtHostAddress[:], 4) + buf.EncodeUint16(m.ExtHostPort) + return buf.Bytes(), nil +} +func (m *Nat44DelSession) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.Address[:], buf.DecodeBytes(4)) + m.Protocol = buf.DecodeUint8() + m.Port = buf.DecodeUint16() + m.VrfID = buf.DecodeUint32() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + copy(m.ExtHostAddress[:], buf.DecodeBytes(4)) + m.ExtHostPort = buf.DecodeUint16() + return nil +} + +// Nat44DelSessionReply defines message 'nat44_del_session_reply'. +type Nat44DelSessionReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44DelSessionReply) Reset() { *m = Nat44DelSessionReply{} } +func (*Nat44DelSessionReply) GetMessageName() string { return "nat44_del_session_reply" } +func (*Nat44DelSessionReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44DelSessionReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44DelSessionReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44DelSessionReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44DelSessionReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44ForwardingEnableDisable defines message 'nat44_forwarding_enable_disable'. +type Nat44ForwardingEnableDisable struct { + Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` +} + +func (m *Nat44ForwardingEnableDisable) Reset() { *m = Nat44ForwardingEnableDisable{} } +func (*Nat44ForwardingEnableDisable) GetMessageName() string { + return "nat44_forwarding_enable_disable" +} +func (*Nat44ForwardingEnableDisable) GetCrcString() string { return "b3e225d2" } +func (*Nat44ForwardingEnableDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44ForwardingEnableDisable) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Enable + return size +} +func (m *Nat44ForwardingEnableDisable) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.Enable) + return buf.Bytes(), nil +} +func (m *Nat44ForwardingEnableDisable) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Enable = buf.DecodeBool() + return nil +} + +// Nat44ForwardingEnableDisableReply defines message 'nat44_forwarding_enable_disable_reply'. +type Nat44ForwardingEnableDisableReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44ForwardingEnableDisableReply) Reset() { *m = Nat44ForwardingEnableDisableReply{} } +func (*Nat44ForwardingEnableDisableReply) GetMessageName() string { + return "nat44_forwarding_enable_disable_reply" +} +func (*Nat44ForwardingEnableDisableReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44ForwardingEnableDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44ForwardingEnableDisableReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44ForwardingEnableDisableReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44ForwardingEnableDisableReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44ForwardingIsEnabled defines message 'nat44_forwarding_is_enabled'. +type Nat44ForwardingIsEnabled struct{} + +func (m *Nat44ForwardingIsEnabled) Reset() { *m = Nat44ForwardingIsEnabled{} } +func (*Nat44ForwardingIsEnabled) GetMessageName() string { return "nat44_forwarding_is_enabled" } +func (*Nat44ForwardingIsEnabled) GetCrcString() string { return "51077d14" } +func (*Nat44ForwardingIsEnabled) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44ForwardingIsEnabled) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44ForwardingIsEnabled) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44ForwardingIsEnabled) Unmarshal(b []byte) error { + return nil +} + +// Nat44ForwardingIsEnabledReply defines message 'nat44_forwarding_is_enabled_reply'. +type Nat44ForwardingIsEnabledReply struct { + Enabled bool `binapi:"bool,name=enabled" json:"enabled,omitempty"` +} + +func (m *Nat44ForwardingIsEnabledReply) Reset() { *m = Nat44ForwardingIsEnabledReply{} } +func (*Nat44ForwardingIsEnabledReply) GetMessageName() string { + return "nat44_forwarding_is_enabled_reply" +} +func (*Nat44ForwardingIsEnabledReply) GetCrcString() string { return "46924a06" } +func (*Nat44ForwardingIsEnabledReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44ForwardingIsEnabledReply) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Enabled + return size +} +func (m *Nat44ForwardingIsEnabledReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.Enabled) + return buf.Bytes(), nil +} +func (m *Nat44ForwardingIsEnabledReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Enabled = buf.DecodeBool() + return nil +} + +// Nat44IdentityMappingDetails defines message 'nat44_identity_mapping_details'. +type Nat44IdentityMappingDetails struct { + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` +} + +func (m *Nat44IdentityMappingDetails) Reset() { *m = Nat44IdentityMappingDetails{} } +func (*Nat44IdentityMappingDetails) GetMessageName() string { return "nat44_identity_mapping_details" } +func (*Nat44IdentityMappingDetails) GetCrcString() string { return "36d21351" } +func (*Nat44IdentityMappingDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44IdentityMappingDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Flags + size += 1 * 4 // m.IPAddress + size += 1 // m.Protocol + size += 2 // m.Port + size += 4 // m.SwIfIndex + size += 4 // m.VrfID + size += 64 // m.Tag + return size +} +func (m *Nat44IdentityMappingDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint8(m.Protocol) + buf.EncodeUint16(m.Port) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint32(m.VrfID) + buf.EncodeString(m.Tag, 64) + return buf.Bytes(), nil +} +func (m *Nat44IdentityMappingDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.Protocol = buf.DecodeUint8() + m.Port = buf.DecodeUint16() + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + m.VrfID = buf.DecodeUint32() + m.Tag = buf.DecodeString(64) + return nil +} + +// Nat44IdentityMappingDump defines message 'nat44_identity_mapping_dump'. +type Nat44IdentityMappingDump struct{} + +func (m *Nat44IdentityMappingDump) Reset() { *m = Nat44IdentityMappingDump{} } +func (*Nat44IdentityMappingDump) GetMessageName() string { return "nat44_identity_mapping_dump" } +func (*Nat44IdentityMappingDump) GetCrcString() string { return "51077d14" } +func (*Nat44IdentityMappingDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44IdentityMappingDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44IdentityMappingDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44IdentityMappingDump) Unmarshal(b []byte) error { + return nil +} + +// Nat44InterfaceAddDelFeature defines message 'nat44_interface_add_del_feature'. +type Nat44InterfaceAddDelFeature struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat44InterfaceAddDelFeature) Reset() { *m = Nat44InterfaceAddDelFeature{} } +func (*Nat44InterfaceAddDelFeature) GetMessageName() string { return "nat44_interface_add_del_feature" } +func (*Nat44InterfaceAddDelFeature) GetCrcString() string { return "f3699b83" } +func (*Nat44InterfaceAddDelFeature) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44InterfaceAddDelFeature) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 // m.Flags + size += 4 // m.SwIfIndex + return size +} +func (m *Nat44InterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceAddDelFeature) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat44InterfaceAddDelFeatureReply defines message 'nat44_interface_add_del_feature_reply'. +type Nat44InterfaceAddDelFeatureReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44InterfaceAddDelFeatureReply) Reset() { *m = Nat44InterfaceAddDelFeatureReply{} } +func (*Nat44InterfaceAddDelFeatureReply) GetMessageName() string { + return "nat44_interface_add_del_feature_reply" +} +func (*Nat44InterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44InterfaceAddDelFeatureReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44InterfaceAddDelFeatureReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44InterfaceAddDelFeatureReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44InterfaceAddDelOutputFeature defines message 'nat44_interface_add_del_output_feature'. +type Nat44InterfaceAddDelOutputFeature struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat44InterfaceAddDelOutputFeature) Reset() { *m = Nat44InterfaceAddDelOutputFeature{} } +func (*Nat44InterfaceAddDelOutputFeature) GetMessageName() string { + return "nat44_interface_add_del_output_feature" +} +func (*Nat44InterfaceAddDelOutputFeature) GetCrcString() string { return "f3699b83" } +func (*Nat44InterfaceAddDelOutputFeature) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44InterfaceAddDelOutputFeature) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 // m.Flags + size += 4 // m.SwIfIndex + return size +} +func (m *Nat44InterfaceAddDelOutputFeature) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceAddDelOutputFeature) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat44InterfaceAddDelOutputFeatureReply defines message 'nat44_interface_add_del_output_feature_reply'. +type Nat44InterfaceAddDelOutputFeatureReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44InterfaceAddDelOutputFeatureReply) Reset() { + *m = Nat44InterfaceAddDelOutputFeatureReply{} +} +func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageName() string { + return "nat44_interface_add_del_output_feature_reply" +} +func (*Nat44InterfaceAddDelOutputFeatureReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44InterfaceAddDelOutputFeatureReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44InterfaceAddDelOutputFeatureReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceAddDelOutputFeatureReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44InterfaceAddrDetails defines message 'nat44_interface_addr_details'. +type Nat44InterfaceAddrDetails struct { + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` +} + +func (m *Nat44InterfaceAddrDetails) Reset() { *m = Nat44InterfaceAddrDetails{} } +func (*Nat44InterfaceAddrDetails) GetMessageName() string { return "nat44_interface_addr_details" } +func (*Nat44InterfaceAddrDetails) GetCrcString() string { return "3e687514" } +func (*Nat44InterfaceAddrDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44InterfaceAddrDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 1 // m.Flags + return size +} +func (m *Nat44InterfaceAddrDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint8(uint8(m.Flags)) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceAddrDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + return nil +} + +// Nat44InterfaceAddrDump defines message 'nat44_interface_addr_dump'. +type Nat44InterfaceAddrDump struct{} + +func (m *Nat44InterfaceAddrDump) Reset() { *m = Nat44InterfaceAddrDump{} } +func (*Nat44InterfaceAddrDump) GetMessageName() string { return "nat44_interface_addr_dump" } +func (*Nat44InterfaceAddrDump) GetCrcString() string { return "51077d14" } +func (*Nat44InterfaceAddrDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44InterfaceAddrDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44InterfaceAddrDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceAddrDump) Unmarshal(b []byte) error { + return nil +} + +// Nat44InterfaceDetails defines message 'nat44_interface_details'. +type Nat44InterfaceDetails struct { + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat44InterfaceDetails) Reset() { *m = Nat44InterfaceDetails{} } +func (*Nat44InterfaceDetails) GetMessageName() string { return "nat44_interface_details" } +func (*Nat44InterfaceDetails) GetCrcString() string { return "5d286289" } +func (*Nat44InterfaceDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44InterfaceDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Flags + size += 4 // m.SwIfIndex + return size +} +func (m *Nat44InterfaceDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat44InterfaceDump defines message 'nat44_interface_dump'. +type Nat44InterfaceDump struct{} + +func (m *Nat44InterfaceDump) Reset() { *m = Nat44InterfaceDump{} } +func (*Nat44InterfaceDump) GetMessageName() string { return "nat44_interface_dump" } +func (*Nat44InterfaceDump) GetCrcString() string { return "51077d14" } +func (*Nat44InterfaceDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44InterfaceDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44InterfaceDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceDump) Unmarshal(b []byte) error { + return nil +} + +// Nat44InterfaceOutputFeatureDetails defines message 'nat44_interface_output_feature_details'. +type Nat44InterfaceOutputFeatureDetails struct { + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat44InterfaceOutputFeatureDetails) Reset() { *m = Nat44InterfaceOutputFeatureDetails{} } +func (*Nat44InterfaceOutputFeatureDetails) GetMessageName() string { + return "nat44_interface_output_feature_details" +} +func (*Nat44InterfaceOutputFeatureDetails) GetCrcString() string { return "5d286289" } +func (*Nat44InterfaceOutputFeatureDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44InterfaceOutputFeatureDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Flags + size += 4 // m.SwIfIndex + return size +} +func (m *Nat44InterfaceOutputFeatureDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceOutputFeatureDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat44InterfaceOutputFeatureDump defines message 'nat44_interface_output_feature_dump'. +type Nat44InterfaceOutputFeatureDump struct{} + +func (m *Nat44InterfaceOutputFeatureDump) Reset() { *m = Nat44InterfaceOutputFeatureDump{} } +func (*Nat44InterfaceOutputFeatureDump) GetMessageName() string { + return "nat44_interface_output_feature_dump" +} +func (*Nat44InterfaceOutputFeatureDump) GetCrcString() string { return "51077d14" } +func (*Nat44InterfaceOutputFeatureDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44InterfaceOutputFeatureDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44InterfaceOutputFeatureDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44InterfaceOutputFeatureDump) Unmarshal(b []byte) error { + return nil +} + +// Nat44LbStaticMappingAddDelLocal defines message 'nat44_lb_static_mapping_add_del_local'. +type Nat44LbStaticMappingAddDelLocal struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + ExternalAddr IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"` + ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` + Local Nat44LbAddrPort `binapi:"nat44_lb_addr_port,name=local" json:"local,omitempty"` +} + +func (m *Nat44LbStaticMappingAddDelLocal) Reset() { *m = Nat44LbStaticMappingAddDelLocal{} } +func (*Nat44LbStaticMappingAddDelLocal) GetMessageName() string { + return "nat44_lb_static_mapping_add_del_local" +} +func (*Nat44LbStaticMappingAddDelLocal) GetCrcString() string { return "2910a151" } +func (*Nat44LbStaticMappingAddDelLocal) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44LbStaticMappingAddDelLocal) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 * 4 // m.ExternalAddr + size += 2 // m.ExternalPort + size += 1 // m.Protocol + size += 1 * 4 // m.Local.Addr + size += 2 // m.Local.Port + size += 1 // m.Local.Probability + size += 4 // m.Local.VrfID + return size +} +func (m *Nat44LbStaticMappingAddDelLocal) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeBytes(m.ExternalAddr[:], 4) + buf.EncodeUint16(m.ExternalPort) + buf.EncodeUint8(m.Protocol) + buf.EncodeBytes(m.Local.Addr[:], 4) + buf.EncodeUint16(m.Local.Port) + buf.EncodeUint8(m.Local.Probability) + buf.EncodeUint32(m.Local.VrfID) + return buf.Bytes(), nil +} +func (m *Nat44LbStaticMappingAddDelLocal) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + copy(m.ExternalAddr[:], buf.DecodeBytes(4)) + m.ExternalPort = buf.DecodeUint16() + m.Protocol = buf.DecodeUint8() + copy(m.Local.Addr[:], buf.DecodeBytes(4)) + m.Local.Port = buf.DecodeUint16() + m.Local.Probability = buf.DecodeUint8() + m.Local.VrfID = buf.DecodeUint32() + return nil +} + +// Nat44LbStaticMappingAddDelLocalReply defines message 'nat44_lb_static_mapping_add_del_local_reply'. +type Nat44LbStaticMappingAddDelLocalReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat44LbStaticMappingAddDelLocalReply) Reset() { *m = Nat44LbStaticMappingAddDelLocalReply{} } +func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageName() string { + return "nat44_lb_static_mapping_add_del_local_reply" +} +func (*Nat44LbStaticMappingAddDelLocalReply) GetCrcString() string { return "e8d4e804" } +func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44LbStaticMappingAddDelLocalReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat44LbStaticMappingAddDelLocalReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat44LbStaticMappingAddDelLocalReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat44LbStaticMappingDetails defines message 'nat44_lb_static_mapping_details'. +type Nat44LbStaticMappingDetails struct { + ExternalAddr IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"` + ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + Affinity uint32 `binapi:"u32,name=affinity" json:"affinity,omitempty"` + Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` + LocalNum uint32 `binapi:"u32,name=local_num" json:"-"` + Locals []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"` +} + +func (m *Nat44LbStaticMappingDetails) Reset() { *m = Nat44LbStaticMappingDetails{} } +func (*Nat44LbStaticMappingDetails) GetMessageName() string { return "nat44_lb_static_mapping_details" } +func (*Nat44LbStaticMappingDetails) GetCrcString() string { return "2267b9e8" } +func (*Nat44LbStaticMappingDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44LbStaticMappingDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.ExternalAddr + size += 2 // m.ExternalPort + size += 1 // m.Protocol + size += 1 // m.Flags + size += 4 // m.Affinity + size += 64 // m.Tag + size += 4 // m.LocalNum + for j1 := 0; j1 < len(m.Locals); j1++ { + var s1 Nat44LbAddrPort + _ = s1 + if j1 < len(m.Locals) { + s1 = m.Locals[j1] + } + size += 1 * 4 // s1.Addr + size += 2 // s1.Port + size += 1 // s1.Probability + size += 4 // s1.VrfID + } + return size +} +func (m *Nat44LbStaticMappingDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.ExternalAddr[:], 4) + buf.EncodeUint16(m.ExternalPort) + buf.EncodeUint8(m.Protocol) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(m.Affinity) + buf.EncodeString(m.Tag, 64) + buf.EncodeUint32(uint32(len(m.Locals))) + for j0 := 0; j0 < len(m.Locals); j0++ { + var v0 Nat44LbAddrPort // Locals + if j0 < len(m.Locals) { + v0 = m.Locals[j0] + } + buf.EncodeBytes(v0.Addr[:], 4) + buf.EncodeUint16(v0.Port) + buf.EncodeUint8(v0.Probability) + buf.EncodeUint32(v0.VrfID) + } + return buf.Bytes(), nil +} +func (m *Nat44LbStaticMappingDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.ExternalAddr[:], buf.DecodeBytes(4)) + m.ExternalPort = buf.DecodeUint16() + m.Protocol = buf.DecodeUint8() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.Affinity = buf.DecodeUint32() + m.Tag = buf.DecodeString(64) + m.LocalNum = buf.DecodeUint32() + m.Locals = make([]Nat44LbAddrPort, m.LocalNum) + for j0 := 0; j0 < len(m.Locals); j0++ { + copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4)) + m.Locals[j0].Port = buf.DecodeUint16() + m.Locals[j0].Probability = buf.DecodeUint8() + m.Locals[j0].VrfID = buf.DecodeUint32() + } + return nil +} + +// Nat44LbStaticMappingDump defines message 'nat44_lb_static_mapping_dump'. +type Nat44LbStaticMappingDump struct{} + +func (m *Nat44LbStaticMappingDump) Reset() { *m = Nat44LbStaticMappingDump{} } +func (*Nat44LbStaticMappingDump) GetMessageName() string { return "nat44_lb_static_mapping_dump" } +func (*Nat44LbStaticMappingDump) GetCrcString() string { return "51077d14" } +func (*Nat44LbStaticMappingDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44LbStaticMappingDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44LbStaticMappingDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44LbStaticMappingDump) Unmarshal(b []byte) error { + return nil +} + +// Nat44StaticMappingDetails defines message 'nat44_static_mapping_details'. +type Nat44StaticMappingDetails struct { + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + LocalIPAddress IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"` + ExternalIPAddress IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` + LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` + ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"` + ExternalSwIfIndex InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` +} + +func (m *Nat44StaticMappingDetails) Reset() { *m = Nat44StaticMappingDetails{} } +func (*Nat44StaticMappingDetails) GetMessageName() string { return "nat44_static_mapping_details" } +func (*Nat44StaticMappingDetails) GetCrcString() string { return "1a433ef7" } +func (*Nat44StaticMappingDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44StaticMappingDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Flags + size += 1 * 4 // m.LocalIPAddress + size += 1 * 4 // m.ExternalIPAddress + size += 1 // m.Protocol + size += 2 // m.LocalPort + size += 2 // m.ExternalPort + size += 4 // m.ExternalSwIfIndex + size += 4 // m.VrfID + size += 64 // m.Tag + return size +} +func (m *Nat44StaticMappingDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeBytes(m.LocalIPAddress[:], 4) + buf.EncodeBytes(m.ExternalIPAddress[:], 4) + buf.EncodeUint8(m.Protocol) + buf.EncodeUint16(m.LocalPort) + buf.EncodeUint16(m.ExternalPort) + buf.EncodeUint32(uint32(m.ExternalSwIfIndex)) + buf.EncodeUint32(m.VrfID) + buf.EncodeString(m.Tag, 64) + return buf.Bytes(), nil +} +func (m *Nat44StaticMappingDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + copy(m.LocalIPAddress[:], buf.DecodeBytes(4)) + copy(m.ExternalIPAddress[:], buf.DecodeBytes(4)) + m.Protocol = buf.DecodeUint8() + m.LocalPort = buf.DecodeUint16() + m.ExternalPort = buf.DecodeUint16() + m.ExternalSwIfIndex = InterfaceIndex(buf.DecodeUint32()) + m.VrfID = buf.DecodeUint32() + m.Tag = buf.DecodeString(64) + return nil +} + +// Nat44StaticMappingDump defines message 'nat44_static_mapping_dump'. +type Nat44StaticMappingDump struct{} + +func (m *Nat44StaticMappingDump) Reset() { *m = Nat44StaticMappingDump{} } +func (*Nat44StaticMappingDump) GetMessageName() string { return "nat44_static_mapping_dump" } +func (*Nat44StaticMappingDump) GetCrcString() string { return "51077d14" } +func (*Nat44StaticMappingDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44StaticMappingDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44StaticMappingDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44StaticMappingDump) Unmarshal(b []byte) error { + return nil +} + +// Nat44UserDetails defines message 'nat44_user_details'. +type Nat44UserDetails struct { + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + Nsessions uint32 `binapi:"u32,name=nsessions" json:"nsessions,omitempty"` + Nstaticsessions uint32 `binapi:"u32,name=nstaticsessions" json:"nstaticsessions,omitempty"` +} + +func (m *Nat44UserDetails) Reset() { *m = Nat44UserDetails{} } +func (*Nat44UserDetails) GetMessageName() string { return "nat44_user_details" } +func (*Nat44UserDetails) GetCrcString() string { return "355896c2" } +func (*Nat44UserDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44UserDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.VrfID + size += 1 * 4 // m.IPAddress + size += 4 // m.Nsessions + size += 4 // m.Nstaticsessions + return size +} +func (m *Nat44UserDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.VrfID) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint32(m.Nsessions) + buf.EncodeUint32(m.Nstaticsessions) + return buf.Bytes(), nil +} +func (m *Nat44UserDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.VrfID = buf.DecodeUint32() + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.Nsessions = buf.DecodeUint32() + m.Nstaticsessions = buf.DecodeUint32() + return nil +} + +// Nat44UserDump defines message 'nat44_user_dump'. +type Nat44UserDump struct{} + +func (m *Nat44UserDump) Reset() { *m = Nat44UserDump{} } +func (*Nat44UserDump) GetMessageName() string { return "nat44_user_dump" } +func (*Nat44UserDump) GetCrcString() string { return "51077d14" } +func (*Nat44UserDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44UserDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44UserDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44UserDump) Unmarshal(b []byte) error { + return nil +} + +// Nat44UserSessionDetails defines message 'nat44_user_session_details'. +type Nat44UserSessionDetails struct { + OutsideIPAddress IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"` + OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"` + InsideIPAddress IP4Address `binapi:"ip4_address,name=inside_ip_address" json:"inside_ip_address,omitempty"` + InsidePort uint16 `binapi:"u16,name=inside_port" json:"inside_port,omitempty"` + Protocol uint16 `binapi:"u16,name=protocol" json:"protocol,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + LastHeard uint64 `binapi:"u64,name=last_heard" json:"last_heard,omitempty"` + TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"` + TotalPkts uint32 `binapi:"u32,name=total_pkts" json:"total_pkts,omitempty"` + ExtHostAddress IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"` + ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"` + ExtHostNatAddress IP4Address `binapi:"ip4_address,name=ext_host_nat_address" json:"ext_host_nat_address,omitempty"` + ExtHostNatPort uint16 `binapi:"u16,name=ext_host_nat_port" json:"ext_host_nat_port,omitempty"` +} + +func (m *Nat44UserSessionDetails) Reset() { *m = Nat44UserSessionDetails{} } +func (*Nat44UserSessionDetails) GetMessageName() string { return "nat44_user_session_details" } +func (*Nat44UserSessionDetails) GetCrcString() string { return "1965fd69" } +func (*Nat44UserSessionDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44UserSessionDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.OutsideIPAddress + size += 2 // m.OutsidePort + size += 1 * 4 // m.InsideIPAddress + size += 2 // m.InsidePort + size += 2 // m.Protocol + size += 1 // m.Flags + size += 8 // m.LastHeard + size += 8 // m.TotalBytes + size += 4 // m.TotalPkts + size += 1 * 4 // m.ExtHostAddress + size += 2 // m.ExtHostPort + size += 1 * 4 // m.ExtHostNatAddress + size += 2 // m.ExtHostNatPort + return size +} +func (m *Nat44UserSessionDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.OutsideIPAddress[:], 4) + buf.EncodeUint16(m.OutsidePort) + buf.EncodeBytes(m.InsideIPAddress[:], 4) + buf.EncodeUint16(m.InsidePort) + buf.EncodeUint16(m.Protocol) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint64(m.LastHeard) + buf.EncodeUint64(m.TotalBytes) + buf.EncodeUint32(m.TotalPkts) + buf.EncodeBytes(m.ExtHostAddress[:], 4) + buf.EncodeUint16(m.ExtHostPort) + buf.EncodeBytes(m.ExtHostNatAddress[:], 4) + buf.EncodeUint16(m.ExtHostNatPort) + return buf.Bytes(), nil +} +func (m *Nat44UserSessionDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.OutsideIPAddress[:], buf.DecodeBytes(4)) + m.OutsidePort = buf.DecodeUint16() + copy(m.InsideIPAddress[:], buf.DecodeBytes(4)) + m.InsidePort = buf.DecodeUint16() + m.Protocol = buf.DecodeUint16() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.LastHeard = buf.DecodeUint64() + m.TotalBytes = buf.DecodeUint64() + m.TotalPkts = buf.DecodeUint32() + copy(m.ExtHostAddress[:], buf.DecodeBytes(4)) + m.ExtHostPort = buf.DecodeUint16() + copy(m.ExtHostNatAddress[:], buf.DecodeBytes(4)) + m.ExtHostNatPort = buf.DecodeUint16() + return nil +} + +// Nat44UserSessionDump defines message 'nat44_user_session_dump'. +type Nat44UserSessionDump struct { + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` +} + +func (m *Nat44UserSessionDump) Reset() { *m = Nat44UserSessionDump{} } +func (*Nat44UserSessionDump) GetMessageName() string { return "nat44_user_session_dump" } +func (*Nat44UserSessionDump) GetCrcString() string { return "e1899c98" } +func (*Nat44UserSessionDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44UserSessionDump) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.IPAddress + size += 4 // m.VrfID + return size +} +func (m *Nat44UserSessionDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint32(m.VrfID) + return buf.Bytes(), nil +} +func (m *Nat44UserSessionDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.VrfID = buf.DecodeUint32() + return nil +} + +// Nat64AddDelInterface defines message 'nat64_add_del_interface'. +type Nat64AddDelInterface struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat64AddDelInterface) Reset() { *m = Nat64AddDelInterface{} } +func (*Nat64AddDelInterface) GetMessageName() string { return "nat64_add_del_interface" } +func (*Nat64AddDelInterface) GetCrcString() string { return "f3699b83" } +func (*Nat64AddDelInterface) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64AddDelInterface) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 // m.Flags + size += 4 // m.SwIfIndex + return size +} +func (m *Nat64AddDelInterface) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat64AddDelInterface) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat64AddDelInterfaceAddr defines message 'nat64_add_del_interface_addr'. +type Nat64AddDelInterfaceAddr struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat64AddDelInterfaceAddr) Reset() { *m = Nat64AddDelInterfaceAddr{} } +func (*Nat64AddDelInterfaceAddr) GetMessageName() string { return "nat64_add_del_interface_addr" } +func (*Nat64AddDelInterfaceAddr) GetCrcString() string { return "47d6e753" } +func (*Nat64AddDelInterfaceAddr) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64AddDelInterfaceAddr) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 4 // m.SwIfIndex + return size +} +func (m *Nat64AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat64AddDelInterfaceAddr) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat64AddDelInterfaceAddrReply defines message 'nat64_add_del_interface_addr_reply'. +type Nat64AddDelInterfaceAddrReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat64AddDelInterfaceAddrReply) Reset() { *m = Nat64AddDelInterfaceAddrReply{} } +func (*Nat64AddDelInterfaceAddrReply) GetMessageName() string { + return "nat64_add_del_interface_addr_reply" +} +func (*Nat64AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" } +func (*Nat64AddDelInterfaceAddrReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64AddDelInterfaceAddrReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat64AddDelInterfaceAddrReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat64AddDelInterfaceAddrReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat64AddDelInterfaceReply defines message 'nat64_add_del_interface_reply'. +type Nat64AddDelInterfaceReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat64AddDelInterfaceReply) Reset() { *m = Nat64AddDelInterfaceReply{} } +func (*Nat64AddDelInterfaceReply) GetMessageName() string { return "nat64_add_del_interface_reply" } +func (*Nat64AddDelInterfaceReply) GetCrcString() string { return "e8d4e804" } +func (*Nat64AddDelInterfaceReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64AddDelInterfaceReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat64AddDelInterfaceReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat64AddDelInterfaceReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat64AddDelPoolAddrRange defines message 'nat64_add_del_pool_addr_range'. +type Nat64AddDelPoolAddrRange struct { + StartAddr IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"` + EndAddr IP4Address `binapi:"ip4_address,name=end_addr" json:"end_addr,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` +} + +func (m *Nat64AddDelPoolAddrRange) Reset() { *m = Nat64AddDelPoolAddrRange{} } +func (*Nat64AddDelPoolAddrRange) GetMessageName() string { return "nat64_add_del_pool_addr_range" } +func (*Nat64AddDelPoolAddrRange) GetCrcString() string { return "21234ef3" } +func (*Nat64AddDelPoolAddrRange) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64AddDelPoolAddrRange) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.StartAddr + size += 1 * 4 // m.EndAddr + size += 4 // m.VrfID + size += 1 // m.IsAdd + return size +} +func (m *Nat64AddDelPoolAddrRange) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.StartAddr[:], 4) + buf.EncodeBytes(m.EndAddr[:], 4) + buf.EncodeUint32(m.VrfID) + buf.EncodeBool(m.IsAdd) + return buf.Bytes(), nil +} +func (m *Nat64AddDelPoolAddrRange) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.StartAddr[:], buf.DecodeBytes(4)) + copy(m.EndAddr[:], buf.DecodeBytes(4)) + m.VrfID = buf.DecodeUint32() + m.IsAdd = buf.DecodeBool() + return nil +} + +// Nat64AddDelPoolAddrRangeReply defines message 'nat64_add_del_pool_addr_range_reply'. +type Nat64AddDelPoolAddrRangeReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat64AddDelPoolAddrRangeReply) Reset() { *m = Nat64AddDelPoolAddrRangeReply{} } +func (*Nat64AddDelPoolAddrRangeReply) GetMessageName() string { + return "nat64_add_del_pool_addr_range_reply" +} +func (*Nat64AddDelPoolAddrRangeReply) GetCrcString() string { return "e8d4e804" } +func (*Nat64AddDelPoolAddrRangeReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64AddDelPoolAddrRangeReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat64AddDelPoolAddrRangeReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat64AddDelPoolAddrRangeReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat64AddDelPrefix defines message 'nat64_add_del_prefix'. +type Nat64AddDelPrefix struct { + Prefix IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` +} + +func (m *Nat64AddDelPrefix) Reset() { *m = Nat64AddDelPrefix{} } +func (*Nat64AddDelPrefix) GetMessageName() string { return "nat64_add_del_prefix" } +func (*Nat64AddDelPrefix) GetCrcString() string { return "727b2f4c" } +func (*Nat64AddDelPrefix) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64AddDelPrefix) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.Prefix.Address + size += 1 // m.Prefix.Len + size += 4 // m.VrfID + size += 1 // m.IsAdd + return size +} +func (m *Nat64AddDelPrefix) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.Prefix.Address[:], 16) + buf.EncodeUint8(m.Prefix.Len) + buf.EncodeUint32(m.VrfID) + buf.EncodeBool(m.IsAdd) + return buf.Bytes(), nil +} +func (m *Nat64AddDelPrefix) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.Prefix.Address[:], buf.DecodeBytes(16)) + m.Prefix.Len = buf.DecodeUint8() + m.VrfID = buf.DecodeUint32() + m.IsAdd = buf.DecodeBool() + return nil +} + +// Nat64AddDelPrefixReply defines message 'nat64_add_del_prefix_reply'. +type Nat64AddDelPrefixReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat64AddDelPrefixReply) Reset() { *m = Nat64AddDelPrefixReply{} } +func (*Nat64AddDelPrefixReply) GetMessageName() string { return "nat64_add_del_prefix_reply" } +func (*Nat64AddDelPrefixReply) GetCrcString() string { return "e8d4e804" } +func (*Nat64AddDelPrefixReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64AddDelPrefixReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat64AddDelPrefixReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat64AddDelPrefixReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat64AddDelStaticBib defines message 'nat64_add_del_static_bib'. +type Nat64AddDelStaticBib struct { + IAddr IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"` + OAddr IP4Address `binapi:"ip4_address,name=o_addr" json:"o_addr,omitempty"` + IPort uint16 `binapi:"u16,name=i_port" json:"i_port,omitempty"` + OPort uint16 `binapi:"u16,name=o_port" json:"o_port,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"` + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` +} + +func (m *Nat64AddDelStaticBib) Reset() { *m = Nat64AddDelStaticBib{} } +func (*Nat64AddDelStaticBib) GetMessageName() string { return "nat64_add_del_static_bib" } +func (*Nat64AddDelStaticBib) GetCrcString() string { return "90fae58a" } +func (*Nat64AddDelStaticBib) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64AddDelStaticBib) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.IAddr + size += 1 * 4 // m.OAddr + size += 2 // m.IPort + size += 2 // m.OPort + size += 4 // m.VrfID + size += 1 // m.Proto + size += 1 // m.IsAdd + return size +} +func (m *Nat64AddDelStaticBib) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IAddr[:], 16) + buf.EncodeBytes(m.OAddr[:], 4) + buf.EncodeUint16(m.IPort) + buf.EncodeUint16(m.OPort) + buf.EncodeUint32(m.VrfID) + buf.EncodeUint8(m.Proto) + buf.EncodeBool(m.IsAdd) + return buf.Bytes(), nil +} +func (m *Nat64AddDelStaticBib) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IAddr[:], buf.DecodeBytes(16)) + copy(m.OAddr[:], buf.DecodeBytes(4)) + m.IPort = buf.DecodeUint16() + m.OPort = buf.DecodeUint16() + m.VrfID = buf.DecodeUint32() + m.Proto = buf.DecodeUint8() + m.IsAdd = buf.DecodeBool() + return nil +} + +// Nat64AddDelStaticBibReply defines message 'nat64_add_del_static_bib_reply'. +type Nat64AddDelStaticBibReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat64AddDelStaticBibReply) Reset() { *m = Nat64AddDelStaticBibReply{} } +func (*Nat64AddDelStaticBibReply) GetMessageName() string { return "nat64_add_del_static_bib_reply" } +func (*Nat64AddDelStaticBibReply) GetCrcString() string { return "e8d4e804" } +func (*Nat64AddDelStaticBibReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64AddDelStaticBibReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat64AddDelStaticBibReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat64AddDelStaticBibReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat64BibDetails defines message 'nat64_bib_details'. +type Nat64BibDetails struct { + IAddr IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"` + OAddr IP4Address `binapi:"ip4_address,name=o_addr" json:"o_addr,omitempty"` + IPort uint16 `binapi:"u16,name=i_port" json:"i_port,omitempty"` + OPort uint16 `binapi:"u16,name=o_port" json:"o_port,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SesNum uint32 `binapi:"u32,name=ses_num" json:"ses_num,omitempty"` +} + +func (m *Nat64BibDetails) Reset() { *m = Nat64BibDetails{} } +func (*Nat64BibDetails) GetMessageName() string { return "nat64_bib_details" } +func (*Nat64BibDetails) GetCrcString() string { return "62c8541d" } +func (*Nat64BibDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64BibDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.IAddr + size += 1 * 4 // m.OAddr + size += 2 // m.IPort + size += 2 // m.OPort + size += 4 // m.VrfID + size += 1 // m.Proto + size += 1 // m.Flags + size += 4 // m.SesNum + return size +} +func (m *Nat64BibDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IAddr[:], 16) + buf.EncodeBytes(m.OAddr[:], 4) + buf.EncodeUint16(m.IPort) + buf.EncodeUint16(m.OPort) + buf.EncodeUint32(m.VrfID) + buf.EncodeUint8(m.Proto) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(m.SesNum) + return buf.Bytes(), nil +} +func (m *Nat64BibDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IAddr[:], buf.DecodeBytes(16)) + copy(m.OAddr[:], buf.DecodeBytes(4)) + m.IPort = buf.DecodeUint16() + m.OPort = buf.DecodeUint16() + m.VrfID = buf.DecodeUint32() + m.Proto = buf.DecodeUint8() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SesNum = buf.DecodeUint32() + return nil +} + +// Nat64BibDump defines message 'nat64_bib_dump'. +type Nat64BibDump struct { + Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"` +} + +func (m *Nat64BibDump) Reset() { *m = Nat64BibDump{} } +func (*Nat64BibDump) GetMessageName() string { return "nat64_bib_dump" } +func (*Nat64BibDump) GetCrcString() string { return "cfcb6b75" } +func (*Nat64BibDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64BibDump) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Proto + return size +} +func (m *Nat64BibDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(m.Proto) + return buf.Bytes(), nil +} +func (m *Nat64BibDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Proto = buf.DecodeUint8() + return nil +} + +// Nat64InterfaceDetails defines message 'nat64_interface_details'. +type Nat64InterfaceDetails struct { + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat64InterfaceDetails) Reset() { *m = Nat64InterfaceDetails{} } +func (*Nat64InterfaceDetails) GetMessageName() string { return "nat64_interface_details" } +func (*Nat64InterfaceDetails) GetCrcString() string { return "5d286289" } +func (*Nat64InterfaceDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64InterfaceDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Flags + size += 4 // m.SwIfIndex + return size +} +func (m *Nat64InterfaceDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat64InterfaceDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat64InterfaceDump defines message 'nat64_interface_dump'. +type Nat64InterfaceDump struct{} + +func (m *Nat64InterfaceDump) Reset() { *m = Nat64InterfaceDump{} } +func (*Nat64InterfaceDump) GetMessageName() string { return "nat64_interface_dump" } +func (*Nat64InterfaceDump) GetCrcString() string { return "51077d14" } +func (*Nat64InterfaceDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64InterfaceDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat64InterfaceDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat64InterfaceDump) Unmarshal(b []byte) error { + return nil +} + +// Nat64PoolAddrDetails defines message 'nat64_pool_addr_details'. +type Nat64PoolAddrDetails struct { + Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` +} + +func (m *Nat64PoolAddrDetails) Reset() { *m = Nat64PoolAddrDetails{} } +func (*Nat64PoolAddrDetails) GetMessageName() string { return "nat64_pool_addr_details" } +func (*Nat64PoolAddrDetails) GetCrcString() string { return "9bb99cdb" } +func (*Nat64PoolAddrDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64PoolAddrDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.Address + size += 4 // m.VrfID + return size +} +func (m *Nat64PoolAddrDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.Address[:], 4) + buf.EncodeUint32(m.VrfID) + return buf.Bytes(), nil +} +func (m *Nat64PoolAddrDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.Address[:], buf.DecodeBytes(4)) + m.VrfID = buf.DecodeUint32() + return nil +} + +// Nat64PoolAddrDump defines message 'nat64_pool_addr_dump'. +type Nat64PoolAddrDump struct{} + +func (m *Nat64PoolAddrDump) Reset() { *m = Nat64PoolAddrDump{} } +func (*Nat64PoolAddrDump) GetMessageName() string { return "nat64_pool_addr_dump" } +func (*Nat64PoolAddrDump) GetCrcString() string { return "51077d14" } +func (*Nat64PoolAddrDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64PoolAddrDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat64PoolAddrDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat64PoolAddrDump) Unmarshal(b []byte) error { + return nil +} + +// Nat64PrefixDetails defines message 'nat64_prefix_details'. +type Nat64PrefixDetails struct { + Prefix IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` +} + +func (m *Nat64PrefixDetails) Reset() { *m = Nat64PrefixDetails{} } +func (*Nat64PrefixDetails) GetMessageName() string { return "nat64_prefix_details" } +func (*Nat64PrefixDetails) GetCrcString() string { return "20568de3" } +func (*Nat64PrefixDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64PrefixDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.Prefix.Address + size += 1 // m.Prefix.Len + size += 4 // m.VrfID + return size +} +func (m *Nat64PrefixDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.Prefix.Address[:], 16) + buf.EncodeUint8(m.Prefix.Len) + buf.EncodeUint32(m.VrfID) + return buf.Bytes(), nil +} +func (m *Nat64PrefixDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.Prefix.Address[:], buf.DecodeBytes(16)) + m.Prefix.Len = buf.DecodeUint8() + m.VrfID = buf.DecodeUint32() + return nil +} + +// Nat64PrefixDump defines message 'nat64_prefix_dump'. +type Nat64PrefixDump struct{} + +func (m *Nat64PrefixDump) Reset() { *m = Nat64PrefixDump{} } +func (*Nat64PrefixDump) GetMessageName() string { return "nat64_prefix_dump" } +func (*Nat64PrefixDump) GetCrcString() string { return "51077d14" } +func (*Nat64PrefixDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64PrefixDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat64PrefixDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat64PrefixDump) Unmarshal(b []byte) error { + return nil +} + +// Nat64StDetails defines message 'nat64_st_details'. +type Nat64StDetails struct { + IlAddr IP6Address `binapi:"ip6_address,name=il_addr" json:"il_addr,omitempty"` + OlAddr IP4Address `binapi:"ip4_address,name=ol_addr" json:"ol_addr,omitempty"` + IlPort uint16 `binapi:"u16,name=il_port" json:"il_port,omitempty"` + OlPort uint16 `binapi:"u16,name=ol_port" json:"ol_port,omitempty"` + IrAddr IP6Address `binapi:"ip6_address,name=ir_addr" json:"ir_addr,omitempty"` + OrAddr IP4Address `binapi:"ip4_address,name=or_addr" json:"or_addr,omitempty"` + RPort uint16 `binapi:"u16,name=r_port" json:"r_port,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"` +} + +func (m *Nat64StDetails) Reset() { *m = Nat64StDetails{} } +func (*Nat64StDetails) GetMessageName() string { return "nat64_st_details" } +func (*Nat64StDetails) GetCrcString() string { return "c770d620" } +func (*Nat64StDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat64StDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.IlAddr + size += 1 * 4 // m.OlAddr + size += 2 // m.IlPort + size += 2 // m.OlPort + size += 1 * 16 // m.IrAddr + size += 1 * 4 // m.OrAddr + size += 2 // m.RPort + size += 4 // m.VrfID + size += 1 // m.Proto + return size +} +func (m *Nat64StDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IlAddr[:], 16) + buf.EncodeBytes(m.OlAddr[:], 4) + buf.EncodeUint16(m.IlPort) + buf.EncodeUint16(m.OlPort) + buf.EncodeBytes(m.IrAddr[:], 16) + buf.EncodeBytes(m.OrAddr[:], 4) + buf.EncodeUint16(m.RPort) + buf.EncodeUint32(m.VrfID) + buf.EncodeUint8(m.Proto) + return buf.Bytes(), nil +} +func (m *Nat64StDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IlAddr[:], buf.DecodeBytes(16)) + copy(m.OlAddr[:], buf.DecodeBytes(4)) + m.IlPort = buf.DecodeUint16() + m.OlPort = buf.DecodeUint16() + copy(m.IrAddr[:], buf.DecodeBytes(16)) + copy(m.OrAddr[:], buf.DecodeBytes(4)) + m.RPort = buf.DecodeUint16() + m.VrfID = buf.DecodeUint32() + m.Proto = buf.DecodeUint8() + return nil +} + +// Nat64StDump defines message 'nat64_st_dump'. +type Nat64StDump struct { + Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"` +} + +func (m *Nat64StDump) Reset() { *m = Nat64StDump{} } +func (*Nat64StDump) GetMessageName() string { return "nat64_st_dump" } +func (*Nat64StDump) GetCrcString() string { return "cfcb6b75" } +func (*Nat64StDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat64StDump) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Proto + return size +} +func (m *Nat64StDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(m.Proto) + return buf.Bytes(), nil +} +func (m *Nat64StDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Proto = buf.DecodeUint8() + return nil +} + +// Nat66AddDelInterface defines message 'nat66_add_del_interface'. +type Nat66AddDelInterface struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat66AddDelInterface) Reset() { *m = Nat66AddDelInterface{} } +func (*Nat66AddDelInterface) GetMessageName() string { return "nat66_add_del_interface" } +func (*Nat66AddDelInterface) GetCrcString() string { return "f3699b83" } +func (*Nat66AddDelInterface) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat66AddDelInterface) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 // m.Flags + size += 4 // m.SwIfIndex + return size +} +func (m *Nat66AddDelInterface) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat66AddDelInterface) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat66AddDelInterfaceReply defines message 'nat66_add_del_interface_reply'. +type Nat66AddDelInterfaceReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat66AddDelInterfaceReply) Reset() { *m = Nat66AddDelInterfaceReply{} } +func (*Nat66AddDelInterfaceReply) GetMessageName() string { return "nat66_add_del_interface_reply" } +func (*Nat66AddDelInterfaceReply) GetCrcString() string { return "e8d4e804" } +func (*Nat66AddDelInterfaceReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat66AddDelInterfaceReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat66AddDelInterfaceReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat66AddDelInterfaceReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat66AddDelStaticMapping defines message 'nat66_add_del_static_mapping'. +type Nat66AddDelStaticMapping struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + LocalIPAddress IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"` + ExternalIPAddress IP6Address `binapi:"ip6_address,name=external_ip_address" json:"external_ip_address,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` +} + +func (m *Nat66AddDelStaticMapping) Reset() { *m = Nat66AddDelStaticMapping{} } +func (*Nat66AddDelStaticMapping) GetMessageName() string { return "nat66_add_del_static_mapping" } +func (*Nat66AddDelStaticMapping) GetCrcString() string { return "fb64e50b" } +func (*Nat66AddDelStaticMapping) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat66AddDelStaticMapping) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 * 16 // m.LocalIPAddress + size += 1 * 16 // m.ExternalIPAddress + size += 4 // m.VrfID + return size +} +func (m *Nat66AddDelStaticMapping) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeBytes(m.LocalIPAddress[:], 16) + buf.EncodeBytes(m.ExternalIPAddress[:], 16) + buf.EncodeUint32(m.VrfID) + return buf.Bytes(), nil +} +func (m *Nat66AddDelStaticMapping) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + copy(m.LocalIPAddress[:], buf.DecodeBytes(16)) + copy(m.ExternalIPAddress[:], buf.DecodeBytes(16)) + m.VrfID = buf.DecodeUint32() + return nil +} + +// Nat66AddDelStaticMappingReply defines message 'nat66_add_del_static_mapping_reply'. +type Nat66AddDelStaticMappingReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Nat66AddDelStaticMappingReply) Reset() { *m = Nat66AddDelStaticMappingReply{} } +func (*Nat66AddDelStaticMappingReply) GetMessageName() string { + return "nat66_add_del_static_mapping_reply" +} +func (*Nat66AddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" } +func (*Nat66AddDelStaticMappingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat66AddDelStaticMappingReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Nat66AddDelStaticMappingReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *Nat66AddDelStaticMappingReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Nat66InterfaceDetails defines message 'nat66_interface_details'. +type Nat66InterfaceDetails struct { + Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` + SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Nat66InterfaceDetails) Reset() { *m = Nat66InterfaceDetails{} } +func (*Nat66InterfaceDetails) GetMessageName() string { return "nat66_interface_details" } +func (*Nat66InterfaceDetails) GetCrcString() string { return "5d286289" } +func (*Nat66InterfaceDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat66InterfaceDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Flags + size += 4 // m.SwIfIndex + return size +} +func (m *Nat66InterfaceDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Nat66InterfaceDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Flags = NatConfigFlags(buf.DecodeUint8()) + m.SwIfIndex = InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Nat66InterfaceDump defines message 'nat66_interface_dump'. +type Nat66InterfaceDump struct{} + +func (m *Nat66InterfaceDump) Reset() { *m = Nat66InterfaceDump{} } +func (*Nat66InterfaceDump) GetMessageName() string { return "nat66_interface_dump" } +func (*Nat66InterfaceDump) GetCrcString() string { return "51077d14" } +func (*Nat66InterfaceDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat66InterfaceDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat66InterfaceDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat66InterfaceDump) Unmarshal(b []byte) error { + return nil +} + +// Nat66StaticMappingDetails defines message 'nat66_static_mapping_details'. +type Nat66StaticMappingDetails struct { + LocalIPAddress IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"` + ExternalIPAddress IP6Address `binapi:"ip6_address,name=external_ip_address" json:"external_ip_address,omitempty"` + VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` + TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"` + TotalPkts uint64 `binapi:"u64,name=total_pkts" json:"total_pkts,omitempty"` +} + +func (m *Nat66StaticMappingDetails) Reset() { *m = Nat66StaticMappingDetails{} } +func (*Nat66StaticMappingDetails) GetMessageName() string { return "nat66_static_mapping_details" } +func (*Nat66StaticMappingDetails) GetCrcString() string { return "5c568448" } +func (*Nat66StaticMappingDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat66StaticMappingDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.LocalIPAddress + size += 1 * 16 // m.ExternalIPAddress + size += 4 // m.VrfID + size += 8 // m.TotalBytes + size += 8 // m.TotalPkts + return size +} +func (m *Nat66StaticMappingDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.LocalIPAddress[:], 16) + buf.EncodeBytes(m.ExternalIPAddress[:], 16) + buf.EncodeUint32(m.VrfID) + buf.EncodeUint64(m.TotalBytes) + buf.EncodeUint64(m.TotalPkts) + return buf.Bytes(), nil +} +func (m *Nat66StaticMappingDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.LocalIPAddress[:], buf.DecodeBytes(16)) + copy(m.ExternalIPAddress[:], buf.DecodeBytes(16)) + m.VrfID = buf.DecodeUint32() + m.TotalBytes = buf.DecodeUint64() + m.TotalPkts = buf.DecodeUint64() + return nil +} + +// Nat66StaticMappingDump defines message 'nat66_static_mapping_dump'. +type Nat66StaticMappingDump struct{} + +func (m *Nat66StaticMappingDump) Reset() { *m = Nat66StaticMappingDump{} } +func (*Nat66StaticMappingDump) GetMessageName() string { return "nat66_static_mapping_dump" } +func (*Nat66StaticMappingDump) GetCrcString() string { return "51077d14" } +func (*Nat66StaticMappingDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat66StaticMappingDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat66StaticMappingDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat66StaticMappingDump) Unmarshal(b []byte) error { + return nil +} + +// NatControlPing defines message 'nat_control_ping'. +type NatControlPing struct{} + +func (m *NatControlPing) Reset() { *m = NatControlPing{} } +func (*NatControlPing) GetMessageName() string { return "nat_control_ping" } +func (*NatControlPing) GetCrcString() string { return "51077d14" } +func (*NatControlPing) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatControlPing) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatControlPing) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatControlPing) Unmarshal(b []byte) error { + return nil +} + +// NatControlPingReply defines message 'nat_control_ping_reply'. +type NatControlPingReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"` + VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"` +} + +func (m *NatControlPingReply) Reset() { *m = NatControlPingReply{} } +func (*NatControlPingReply) GetMessageName() string { return "nat_control_ping_reply" } +func (*NatControlPingReply) GetCrcString() string { return "f6b0b8ca" } +func (*NatControlPingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatControlPingReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.ClientIndex + size += 4 // m.VpePID + return size +} +func (m *NatControlPingReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.ClientIndex) + buf.EncodeUint32(m.VpePID) + return buf.Bytes(), nil +} +func (m *NatControlPingReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.ClientIndex = buf.DecodeUint32() + m.VpePID = buf.DecodeUint32() + return nil +} + +// NatDetAddDelMap defines message 'nat_det_add_del_map'. +type NatDetAddDelMap struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` + InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"` + OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"` + OutPlen uint8 `binapi:"u8,name=out_plen" json:"out_plen,omitempty"` +} + +func (m *NatDetAddDelMap) Reset() { *m = NatDetAddDelMap{} } +func (*NatDetAddDelMap) GetMessageName() string { return "nat_det_add_del_map" } +func (*NatDetAddDelMap) GetCrcString() string { return "112fde05" } +func (*NatDetAddDelMap) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatDetAddDelMap) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 * 4 // m.InAddr + size += 1 // m.InPlen + size += 1 * 4 // m.OutAddr + size += 1 // m.OutPlen + return size +} +func (m *NatDetAddDelMap) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeBytes(m.InAddr[:], 4) + buf.EncodeUint8(m.InPlen) + buf.EncodeBytes(m.OutAddr[:], 4) + buf.EncodeUint8(m.OutPlen) + return buf.Bytes(), nil +} +func (m *NatDetAddDelMap) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + copy(m.InAddr[:], buf.DecodeBytes(4)) + m.InPlen = buf.DecodeUint8() + copy(m.OutAddr[:], buf.DecodeBytes(4)) + m.OutPlen = buf.DecodeUint8() + return nil +} + +// NatDetAddDelMapReply defines message 'nat_det_add_del_map_reply'. +type NatDetAddDelMapReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatDetAddDelMapReply) Reset() { *m = NatDetAddDelMapReply{} } +func (*NatDetAddDelMapReply) GetMessageName() string { return "nat_det_add_del_map_reply" } +func (*NatDetAddDelMapReply) GetCrcString() string { return "e8d4e804" } +func (*NatDetAddDelMapReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatDetAddDelMapReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatDetAddDelMapReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatDetAddDelMapReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatDetCloseSessionIn defines message 'nat_det_close_session_in'. +type NatDetCloseSessionIn struct { + InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` + InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"` + ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"` + ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"` +} + +func (m *NatDetCloseSessionIn) Reset() { *m = NatDetCloseSessionIn{} } +func (*NatDetCloseSessionIn) GetMessageName() string { return "nat_det_close_session_in" } +func (*NatDetCloseSessionIn) GetCrcString() string { return "0a10ef64" } +func (*NatDetCloseSessionIn) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatDetCloseSessionIn) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.InAddr + size += 2 // m.InPort + size += 1 * 4 // m.ExtAddr + size += 2 // m.ExtPort + return size +} +func (m *NatDetCloseSessionIn) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.InAddr[:], 4) + buf.EncodeUint16(m.InPort) + buf.EncodeBytes(m.ExtAddr[:], 4) + buf.EncodeUint16(m.ExtPort) + return buf.Bytes(), nil +} +func (m *NatDetCloseSessionIn) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.InAddr[:], buf.DecodeBytes(4)) + m.InPort = buf.DecodeUint16() + copy(m.ExtAddr[:], buf.DecodeBytes(4)) + m.ExtPort = buf.DecodeUint16() + return nil +} + +// NatDetCloseSessionInReply defines message 'nat_det_close_session_in_reply'. +type NatDetCloseSessionInReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatDetCloseSessionInReply) Reset() { *m = NatDetCloseSessionInReply{} } +func (*NatDetCloseSessionInReply) GetMessageName() string { return "nat_det_close_session_in_reply" } +func (*NatDetCloseSessionInReply) GetCrcString() string { return "e8d4e804" } +func (*NatDetCloseSessionInReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatDetCloseSessionInReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatDetCloseSessionInReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatDetCloseSessionInReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatDetCloseSessionOut defines message 'nat_det_close_session_out'. +type NatDetCloseSessionOut struct { + OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"` + OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"` + ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"` + ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"` +} + +func (m *NatDetCloseSessionOut) Reset() { *m = NatDetCloseSessionOut{} } +func (*NatDetCloseSessionOut) GetMessageName() string { return "nat_det_close_session_out" } +func (*NatDetCloseSessionOut) GetCrcString() string { return "c1b6cbfb" } +func (*NatDetCloseSessionOut) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatDetCloseSessionOut) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.OutAddr + size += 2 // m.OutPort + size += 1 * 4 // m.ExtAddr + size += 2 // m.ExtPort + return size +} +func (m *NatDetCloseSessionOut) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.OutAddr[:], 4) + buf.EncodeUint16(m.OutPort) + buf.EncodeBytes(m.ExtAddr[:], 4) + buf.EncodeUint16(m.ExtPort) + return buf.Bytes(), nil +} +func (m *NatDetCloseSessionOut) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.OutAddr[:], buf.DecodeBytes(4)) + m.OutPort = buf.DecodeUint16() + copy(m.ExtAddr[:], buf.DecodeBytes(4)) + m.ExtPort = buf.DecodeUint16() + return nil +} + +// NatDetCloseSessionOutReply defines message 'nat_det_close_session_out_reply'. +type NatDetCloseSessionOutReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatDetCloseSessionOutReply) Reset() { *m = NatDetCloseSessionOutReply{} } +func (*NatDetCloseSessionOutReply) GetMessageName() string { return "nat_det_close_session_out_reply" } +func (*NatDetCloseSessionOutReply) GetCrcString() string { return "e8d4e804" } +func (*NatDetCloseSessionOutReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatDetCloseSessionOutReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatDetCloseSessionOutReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatDetCloseSessionOutReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatDetForward defines message 'nat_det_forward'. +type NatDetForward struct { + InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` +} + +func (m *NatDetForward) Reset() { *m = NatDetForward{} } +func (*NatDetForward) GetMessageName() string { return "nat_det_forward" } +func (*NatDetForward) GetCrcString() string { return "7f8a89cd" } +func (*NatDetForward) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatDetForward) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.InAddr + return size +} +func (m *NatDetForward) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.InAddr[:], 4) + return buf.Bytes(), nil +} +func (m *NatDetForward) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.InAddr[:], buf.DecodeBytes(4)) + return nil +} + +// NatDetForwardReply defines message 'nat_det_forward_reply'. +type NatDetForwardReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + OutPortLo uint16 `binapi:"u16,name=out_port_lo" json:"out_port_lo,omitempty"` + OutPortHi uint16 `binapi:"u16,name=out_port_hi" json:"out_port_hi,omitempty"` + OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"` +} + +func (m *NatDetForwardReply) Reset() { *m = NatDetForwardReply{} } +func (*NatDetForwardReply) GetMessageName() string { return "nat_det_forward_reply" } +func (*NatDetForwardReply) GetCrcString() string { return "a8ccbdc0" } +func (*NatDetForwardReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatDetForwardReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 2 // m.OutPortLo + size += 2 // m.OutPortHi + size += 1 * 4 // m.OutAddr + return size +} +func (m *NatDetForwardReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint16(m.OutPortLo) + buf.EncodeUint16(m.OutPortHi) + buf.EncodeBytes(m.OutAddr[:], 4) + return buf.Bytes(), nil +} +func (m *NatDetForwardReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.OutPortLo = buf.DecodeUint16() + m.OutPortHi = buf.DecodeUint16() + copy(m.OutAddr[:], buf.DecodeBytes(4)) + return nil +} + +// NatDetMapDetails defines message 'nat_det_map_details'. +type NatDetMapDetails struct { + InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` + InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"` + OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"` + OutPlen uint8 `binapi:"u8,name=out_plen" json:"out_plen,omitempty"` + SharingRatio uint32 `binapi:"u32,name=sharing_ratio" json:"sharing_ratio,omitempty"` + PortsPerHost uint16 `binapi:"u16,name=ports_per_host" json:"ports_per_host,omitempty"` + SesNum uint32 `binapi:"u32,name=ses_num" json:"ses_num,omitempty"` +} + +func (m *NatDetMapDetails) Reset() { *m = NatDetMapDetails{} } +func (*NatDetMapDetails) GetMessageName() string { return "nat_det_map_details" } +func (*NatDetMapDetails) GetCrcString() string { return "88000ee1" } +func (*NatDetMapDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatDetMapDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.InAddr + size += 1 // m.InPlen + size += 1 * 4 // m.OutAddr + size += 1 // m.OutPlen + size += 4 // m.SharingRatio + size += 2 // m.PortsPerHost + size += 4 // m.SesNum + return size +} +func (m *NatDetMapDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.InAddr[:], 4) + buf.EncodeUint8(m.InPlen) + buf.EncodeBytes(m.OutAddr[:], 4) + buf.EncodeUint8(m.OutPlen) + buf.EncodeUint32(m.SharingRatio) + buf.EncodeUint16(m.PortsPerHost) + buf.EncodeUint32(m.SesNum) + return buf.Bytes(), nil +} +func (m *NatDetMapDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.InAddr[:], buf.DecodeBytes(4)) + m.InPlen = buf.DecodeUint8() + copy(m.OutAddr[:], buf.DecodeBytes(4)) + m.OutPlen = buf.DecodeUint8() + m.SharingRatio = buf.DecodeUint32() + m.PortsPerHost = buf.DecodeUint16() + m.SesNum = buf.DecodeUint32() + return nil +} + +// NatDetMapDump defines message 'nat_det_map_dump'. +type NatDetMapDump struct{} + +func (m *NatDetMapDump) Reset() { *m = NatDetMapDump{} } +func (*NatDetMapDump) GetMessageName() string { return "nat_det_map_dump" } +func (*NatDetMapDump) GetCrcString() string { return "51077d14" } +func (*NatDetMapDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatDetMapDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatDetMapDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatDetMapDump) Unmarshal(b []byte) error { + return nil +} + +// NatDetReverse defines message 'nat_det_reverse'. +type NatDetReverse struct { + OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"` + OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"` +} + +func (m *NatDetReverse) Reset() { *m = NatDetReverse{} } +func (*NatDetReverse) GetMessageName() string { return "nat_det_reverse" } +func (*NatDetReverse) GetCrcString() string { return "a7573fe1" } +func (*NatDetReverse) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatDetReverse) Size() (size int) { + if m == nil { + return 0 + } + size += 2 // m.OutPort + size += 1 * 4 // m.OutAddr + return size +} +func (m *NatDetReverse) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint16(m.OutPort) + buf.EncodeBytes(m.OutAddr[:], 4) + return buf.Bytes(), nil +} +func (m *NatDetReverse) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.OutPort = buf.DecodeUint16() + copy(m.OutAddr[:], buf.DecodeBytes(4)) + return nil +} + +// NatDetReverseReply defines message 'nat_det_reverse_reply'. +type NatDetReverseReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` +} + +func (m *NatDetReverseReply) Reset() { *m = NatDetReverseReply{} } +func (*NatDetReverseReply) GetMessageName() string { return "nat_det_reverse_reply" } +func (*NatDetReverseReply) GetCrcString() string { return "34066d48" } +func (*NatDetReverseReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatDetReverseReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 1 * 4 // m.InAddr + return size +} +func (m *NatDetReverseReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeBytes(m.InAddr[:], 4) + return buf.Bytes(), nil +} +func (m *NatDetReverseReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + copy(m.InAddr[:], buf.DecodeBytes(4)) + return nil +} + +// NatDetSessionDetails defines message 'nat_det_session_details'. +type NatDetSessionDetails struct { + InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"` + ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"` + ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"` + OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"` + State uint8 `binapi:"u8,name=state" json:"state,omitempty"` + Expire uint32 `binapi:"u32,name=expire" json:"expire,omitempty"` +} + +func (m *NatDetSessionDetails) Reset() { *m = NatDetSessionDetails{} } +func (*NatDetSessionDetails) GetMessageName() string { return "nat_det_session_details" } +func (*NatDetSessionDetails) GetCrcString() string { return "27f3c171" } +func (*NatDetSessionDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatDetSessionDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 2 // m.InPort + size += 1 * 4 // m.ExtAddr + size += 2 // m.ExtPort + size += 2 // m.OutPort + size += 1 // m.State + size += 4 // m.Expire + return size +} +func (m *NatDetSessionDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint16(m.InPort) + buf.EncodeBytes(m.ExtAddr[:], 4) + buf.EncodeUint16(m.ExtPort) + buf.EncodeUint16(m.OutPort) + buf.EncodeUint8(m.State) + buf.EncodeUint32(m.Expire) + return buf.Bytes(), nil +} +func (m *NatDetSessionDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.InPort = buf.DecodeUint16() + copy(m.ExtAddr[:], buf.DecodeBytes(4)) + m.ExtPort = buf.DecodeUint16() + m.OutPort = buf.DecodeUint16() + m.State = buf.DecodeUint8() + m.Expire = buf.DecodeUint32() + return nil +} + +// NatDetSessionDump defines message 'nat_det_session_dump'. +type NatDetSessionDump struct { + UserAddr IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"` +} + +func (m *NatDetSessionDump) Reset() { *m = NatDetSessionDump{} } +func (*NatDetSessionDump) GetMessageName() string { return "nat_det_session_dump" } +func (*NatDetSessionDump) GetCrcString() string { return "e45a3af7" } +func (*NatDetSessionDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatDetSessionDump) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.UserAddr + return size +} +func (m *NatDetSessionDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.UserAddr[:], 4) + return buf.Bytes(), nil +} +func (m *NatDetSessionDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.UserAddr[:], buf.DecodeBytes(4)) + return nil +} + +// NatGetAddrAndPortAllocAlg defines message 'nat_get_addr_and_port_alloc_alg'. +type NatGetAddrAndPortAllocAlg struct{} + +func (m *NatGetAddrAndPortAllocAlg) Reset() { *m = NatGetAddrAndPortAllocAlg{} } +func (*NatGetAddrAndPortAllocAlg) GetMessageName() string { return "nat_get_addr_and_port_alloc_alg" } +func (*NatGetAddrAndPortAllocAlg) GetCrcString() string { return "51077d14" } +func (*NatGetAddrAndPortAllocAlg) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatGetAddrAndPortAllocAlg) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatGetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatGetAddrAndPortAllocAlg) Unmarshal(b []byte) error { + return nil +} + +// NatGetAddrAndPortAllocAlgReply defines message 'nat_get_addr_and_port_alloc_alg_reply'. +type NatGetAddrAndPortAllocAlgReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"` + PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"` + PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"` + Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"` + StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"` + EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"` +} + +func (m *NatGetAddrAndPortAllocAlgReply) Reset() { *m = NatGetAddrAndPortAllocAlgReply{} } +func (*NatGetAddrAndPortAllocAlgReply) GetMessageName() string { + return "nat_get_addr_and_port_alloc_alg_reply" +} +func (*NatGetAddrAndPortAllocAlgReply) GetCrcString() string { return "3607a7d0" } +func (*NatGetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatGetAddrAndPortAllocAlgReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 1 // m.Alg + size += 1 // m.PsidOffset + size += 1 // m.PsidLength + size += 2 // m.Psid + size += 2 // m.StartPort + size += 2 // m.EndPort + return size +} +func (m *NatGetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint8(m.Alg) + buf.EncodeUint8(m.PsidOffset) + buf.EncodeUint8(m.PsidLength) + buf.EncodeUint16(m.Psid) + buf.EncodeUint16(m.StartPort) + buf.EncodeUint16(m.EndPort) + return buf.Bytes(), nil +} +func (m *NatGetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Alg = buf.DecodeUint8() + m.PsidOffset = buf.DecodeUint8() + m.PsidLength = buf.DecodeUint8() + m.Psid = buf.DecodeUint16() + m.StartPort = buf.DecodeUint16() + m.EndPort = buf.DecodeUint16() + return nil +} + +// NatGetMssClamping defines message 'nat_get_mss_clamping'. +type NatGetMssClamping struct{} + +func (m *NatGetMssClamping) Reset() { *m = NatGetMssClamping{} } +func (*NatGetMssClamping) GetMessageName() string { return "nat_get_mss_clamping" } +func (*NatGetMssClamping) GetCrcString() string { return "51077d14" } +func (*NatGetMssClamping) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatGetMssClamping) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatGetMssClamping) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatGetMssClamping) Unmarshal(b []byte) error { + return nil +} + +// NatGetMssClampingReply defines message 'nat_get_mss_clamping_reply'. +type NatGetMssClampingReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"` + Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` +} + +func (m *NatGetMssClampingReply) Reset() { *m = NatGetMssClampingReply{} } +func (*NatGetMssClampingReply) GetMessageName() string { return "nat_get_mss_clamping_reply" } +func (*NatGetMssClampingReply) GetCrcString() string { return "1c0b2a78" } +func (*NatGetMssClampingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatGetMssClampingReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 2 // m.MssValue + size += 1 // m.Enable + return size +} +func (m *NatGetMssClampingReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint16(m.MssValue) + buf.EncodeBool(m.Enable) + return buf.Bytes(), nil +} +func (m *NatGetMssClampingReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.MssValue = buf.DecodeUint16() + m.Enable = buf.DecodeBool() + return nil +} + +// NatGetTimeouts defines message 'nat_get_timeouts'. +type NatGetTimeouts struct{} + +func (m *NatGetTimeouts) Reset() { *m = NatGetTimeouts{} } +func (*NatGetTimeouts) GetMessageName() string { return "nat_get_timeouts" } +func (*NatGetTimeouts) GetCrcString() string { return "51077d14" } +func (*NatGetTimeouts) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatGetTimeouts) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatGetTimeouts) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatGetTimeouts) Unmarshal(b []byte) error { + return nil +} + +// NatGetTimeoutsReply defines message 'nat_get_timeouts_reply'. +type NatGetTimeoutsReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"` + TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"` + TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"` + ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"` +} + +func (m *NatGetTimeoutsReply) Reset() { *m = NatGetTimeoutsReply{} } +func (*NatGetTimeoutsReply) GetMessageName() string { return "nat_get_timeouts_reply" } +func (*NatGetTimeoutsReply) GetCrcString() string { return "3c4df4e1" } +func (*NatGetTimeoutsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatGetTimeoutsReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.UDP + size += 4 // m.TCPEstablished + size += 4 // m.TCPTransitory + size += 4 // m.ICMP + return size +} +func (m *NatGetTimeoutsReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.UDP) + buf.EncodeUint32(m.TCPEstablished) + buf.EncodeUint32(m.TCPTransitory) + buf.EncodeUint32(m.ICMP) + return buf.Bytes(), nil +} +func (m *NatGetTimeoutsReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.UDP = buf.DecodeUint32() + m.TCPEstablished = buf.DecodeUint32() + m.TCPTransitory = buf.DecodeUint32() + m.ICMP = buf.DecodeUint32() + return nil +} + +// NatHaFlush defines message 'nat_ha_flush'. +type NatHaFlush struct{} + +func (m *NatHaFlush) Reset() { *m = NatHaFlush{} } +func (*NatHaFlush) GetMessageName() string { return "nat_ha_flush" } +func (*NatHaFlush) GetCrcString() string { return "51077d14" } +func (*NatHaFlush) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatHaFlush) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatHaFlush) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatHaFlush) Unmarshal(b []byte) error { + return nil +} + +// NatHaFlushReply defines message 'nat_ha_flush_reply'. +type NatHaFlushReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatHaFlushReply) Reset() { *m = NatHaFlushReply{} } +func (*NatHaFlushReply) GetMessageName() string { return "nat_ha_flush_reply" } +func (*NatHaFlushReply) GetCrcString() string { return "e8d4e804" } +func (*NatHaFlushReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatHaFlushReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatHaFlushReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatHaFlushReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatHaGetFailover defines message 'nat_ha_get_failover'. +type NatHaGetFailover struct{} + +func (m *NatHaGetFailover) Reset() { *m = NatHaGetFailover{} } +func (*NatHaGetFailover) GetMessageName() string { return "nat_ha_get_failover" } +func (*NatHaGetFailover) GetCrcString() string { return "51077d14" } +func (*NatHaGetFailover) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatHaGetFailover) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatHaGetFailover) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatHaGetFailover) Unmarshal(b []byte) error { + return nil +} + +// NatHaGetFailoverReply defines message 'nat_ha_get_failover_reply'. +type NatHaGetFailoverReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"` +} + +func (m *NatHaGetFailoverReply) Reset() { *m = NatHaGetFailoverReply{} } +func (*NatHaGetFailoverReply) GetMessageName() string { return "nat_ha_get_failover_reply" } +func (*NatHaGetFailoverReply) GetCrcString() string { return "a67d8752" } +func (*NatHaGetFailoverReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatHaGetFailoverReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 1 * 4 // m.IPAddress + size += 2 // m.Port + size += 4 // m.SessionRefreshInterval + return size +} +func (m *NatHaGetFailoverReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint16(m.Port) + buf.EncodeUint32(m.SessionRefreshInterval) + return buf.Bytes(), nil +} +func (m *NatHaGetFailoverReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.Port = buf.DecodeUint16() + m.SessionRefreshInterval = buf.DecodeUint32() + return nil +} + +// NatHaGetListener defines message 'nat_ha_get_listener'. +type NatHaGetListener struct{} + +func (m *NatHaGetListener) Reset() { *m = NatHaGetListener{} } +func (*NatHaGetListener) GetMessageName() string { return "nat_ha_get_listener" } +func (*NatHaGetListener) GetCrcString() string { return "51077d14" } +func (*NatHaGetListener) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatHaGetListener) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatHaGetListener) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatHaGetListener) Unmarshal(b []byte) error { + return nil +} + +// NatHaGetListenerReply defines message 'nat_ha_get_listener_reply'. +type NatHaGetListenerReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"` +} + +func (m *NatHaGetListenerReply) Reset() { *m = NatHaGetListenerReply{} } +func (*NatHaGetListenerReply) GetMessageName() string { return "nat_ha_get_listener_reply" } +func (*NatHaGetListenerReply) GetCrcString() string { return "123ea41f" } +func (*NatHaGetListenerReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatHaGetListenerReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 1 * 4 // m.IPAddress + size += 2 // m.Port + size += 4 // m.PathMtu + return size +} +func (m *NatHaGetListenerReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint16(m.Port) + buf.EncodeUint32(m.PathMtu) + return buf.Bytes(), nil +} +func (m *NatHaGetListenerReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.Port = buf.DecodeUint16() + m.PathMtu = buf.DecodeUint32() + return nil +} + +// NatHaResync defines message 'nat_ha_resync'. +type NatHaResync struct { + WantResyncEvent uint8 `binapi:"u8,name=want_resync_event" json:"want_resync_event,omitempty"` + PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` +} + +func (m *NatHaResync) Reset() { *m = NatHaResync{} } +func (*NatHaResync) GetMessageName() string { return "nat_ha_resync" } +func (*NatHaResync) GetCrcString() string { return "c8ab9e03" } +func (*NatHaResync) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatHaResync) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.WantResyncEvent + size += 4 // m.PID + return size +} +func (m *NatHaResync) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(m.WantResyncEvent) + buf.EncodeUint32(m.PID) + return buf.Bytes(), nil +} +func (m *NatHaResync) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.WantResyncEvent = buf.DecodeUint8() + m.PID = buf.DecodeUint32() + return nil +} + +// NatHaResyncCompletedEvent defines message 'nat_ha_resync_completed_event'. +type NatHaResyncCompletedEvent struct { + PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` + MissedCount uint32 `binapi:"u32,name=missed_count" json:"missed_count,omitempty"` +} + +func (m *NatHaResyncCompletedEvent) Reset() { *m = NatHaResyncCompletedEvent{} } +func (*NatHaResyncCompletedEvent) GetMessageName() string { return "nat_ha_resync_completed_event" } +func (*NatHaResyncCompletedEvent) GetCrcString() string { return "fdc598fb" } +func (*NatHaResyncCompletedEvent) GetMessageType() api.MessageType { + return api.EventMessage +} + +func (m *NatHaResyncCompletedEvent) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PID + size += 4 // m.MissedCount + return size +} +func (m *NatHaResyncCompletedEvent) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PID) + buf.EncodeUint32(m.MissedCount) + return buf.Bytes(), nil +} +func (m *NatHaResyncCompletedEvent) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PID = buf.DecodeUint32() + m.MissedCount = buf.DecodeUint32() + return nil +} + +// NatHaResyncReply defines message 'nat_ha_resync_reply'. +type NatHaResyncReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatHaResyncReply) Reset() { *m = NatHaResyncReply{} } +func (*NatHaResyncReply) GetMessageName() string { return "nat_ha_resync_reply" } +func (*NatHaResyncReply) GetCrcString() string { return "e8d4e804" } +func (*NatHaResyncReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatHaResyncReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatHaResyncReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatHaResyncReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatHaSetFailover defines message 'nat_ha_set_failover'. +type NatHaSetFailover struct { + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"` +} + +func (m *NatHaSetFailover) Reset() { *m = NatHaSetFailover{} } +func (*NatHaSetFailover) GetMessageName() string { return "nat_ha_set_failover" } +func (*NatHaSetFailover) GetCrcString() string { return "718246af" } +func (*NatHaSetFailover) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatHaSetFailover) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.IPAddress + size += 2 // m.Port + size += 4 // m.SessionRefreshInterval + return size +} +func (m *NatHaSetFailover) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint16(m.Port) + buf.EncodeUint32(m.SessionRefreshInterval) + return buf.Bytes(), nil +} +func (m *NatHaSetFailover) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.Port = buf.DecodeUint16() + m.SessionRefreshInterval = buf.DecodeUint32() + return nil +} + +// NatHaSetFailoverReply defines message 'nat_ha_set_failover_reply'. +type NatHaSetFailoverReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatHaSetFailoverReply) Reset() { *m = NatHaSetFailoverReply{} } +func (*NatHaSetFailoverReply) GetMessageName() string { return "nat_ha_set_failover_reply" } +func (*NatHaSetFailoverReply) GetCrcString() string { return "e8d4e804" } +func (*NatHaSetFailoverReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatHaSetFailoverReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatHaSetFailoverReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatHaSetFailoverReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatHaSetListener defines message 'nat_ha_set_listener'. +type NatHaSetListener struct { + IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"` +} + +func (m *NatHaSetListener) Reset() { *m = NatHaSetListener{} } +func (*NatHaSetListener) GetMessageName() string { return "nat_ha_set_listener" } +func (*NatHaSetListener) GetCrcString() string { return "e4a8cb4e" } +func (*NatHaSetListener) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatHaSetListener) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 4 // m.IPAddress + size += 2 // m.Port + size += 4 // m.PathMtu + return size +} +func (m *NatHaSetListener) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.IPAddress[:], 4) + buf.EncodeUint16(m.Port) + buf.EncodeUint32(m.PathMtu) + return buf.Bytes(), nil +} +func (m *NatHaSetListener) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.IPAddress[:], buf.DecodeBytes(4)) + m.Port = buf.DecodeUint16() + m.PathMtu = buf.DecodeUint32() + return nil +} + +// NatHaSetListenerReply defines message 'nat_ha_set_listener_reply'. +type NatHaSetListenerReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatHaSetListenerReply) Reset() { *m = NatHaSetListenerReply{} } +func (*NatHaSetListenerReply) GetMessageName() string { return "nat_ha_set_listener_reply" } +func (*NatHaSetListenerReply) GetCrcString() string { return "e8d4e804" } +func (*NatHaSetListenerReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatHaSetListenerReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatHaSetListenerReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatHaSetListenerReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatIpfixEnableDisable defines message 'nat_ipfix_enable_disable'. +type NatIpfixEnableDisable struct { + DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"` + SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"` + Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` +} + +func (m *NatIpfixEnableDisable) Reset() { *m = NatIpfixEnableDisable{} } +func (*NatIpfixEnableDisable) GetMessageName() string { return "nat_ipfix_enable_disable" } +func (*NatIpfixEnableDisable) GetCrcString() string { return "9af4a2d2" } +func (*NatIpfixEnableDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatIpfixEnableDisable) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.DomainID + size += 2 // m.SrcPort + size += 1 // m.Enable + return size +} +func (m *NatIpfixEnableDisable) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.DomainID) + buf.EncodeUint16(m.SrcPort) + buf.EncodeBool(m.Enable) + return buf.Bytes(), nil +} +func (m *NatIpfixEnableDisable) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.DomainID = buf.DecodeUint32() + m.SrcPort = buf.DecodeUint16() + m.Enable = buf.DecodeBool() + return nil +} + +// NatIpfixEnableDisableReply defines message 'nat_ipfix_enable_disable_reply'. +type NatIpfixEnableDisableReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatIpfixEnableDisableReply) Reset() { *m = NatIpfixEnableDisableReply{} } +func (*NatIpfixEnableDisableReply) GetMessageName() string { return "nat_ipfix_enable_disable_reply" } +func (*NatIpfixEnableDisableReply) GetCrcString() string { return "e8d4e804" } +func (*NatIpfixEnableDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatIpfixEnableDisableReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatIpfixEnableDisableReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatIpfixEnableDisableReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatSetAddrAndPortAllocAlg defines message 'nat_set_addr_and_port_alloc_alg'. +type NatSetAddrAndPortAllocAlg struct { + Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"` + PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"` + PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"` + Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"` + StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"` + EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"` +} + +func (m *NatSetAddrAndPortAllocAlg) Reset() { *m = NatSetAddrAndPortAllocAlg{} } +func (*NatSetAddrAndPortAllocAlg) GetMessageName() string { return "nat_set_addr_and_port_alloc_alg" } +func (*NatSetAddrAndPortAllocAlg) GetCrcString() string { return "deeb746f" } +func (*NatSetAddrAndPortAllocAlg) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatSetAddrAndPortAllocAlg) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Alg + size += 1 // m.PsidOffset + size += 1 // m.PsidLength + size += 2 // m.Psid + size += 2 // m.StartPort + size += 2 // m.EndPort + return size +} +func (m *NatSetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(m.Alg) + buf.EncodeUint8(m.PsidOffset) + buf.EncodeUint8(m.PsidLength) + buf.EncodeUint16(m.Psid) + buf.EncodeUint16(m.StartPort) + buf.EncodeUint16(m.EndPort) + return buf.Bytes(), nil +} +func (m *NatSetAddrAndPortAllocAlg) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Alg = buf.DecodeUint8() + m.PsidOffset = buf.DecodeUint8() + m.PsidLength = buf.DecodeUint8() + m.Psid = buf.DecodeUint16() + m.StartPort = buf.DecodeUint16() + m.EndPort = buf.DecodeUint16() + return nil +} + +// NatSetAddrAndPortAllocAlgReply defines message 'nat_set_addr_and_port_alloc_alg_reply'. +type NatSetAddrAndPortAllocAlgReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatSetAddrAndPortAllocAlgReply) Reset() { *m = NatSetAddrAndPortAllocAlgReply{} } +func (*NatSetAddrAndPortAllocAlgReply) GetMessageName() string { + return "nat_set_addr_and_port_alloc_alg_reply" +} +func (*NatSetAddrAndPortAllocAlgReply) GetCrcString() string { return "e8d4e804" } +func (*NatSetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatSetAddrAndPortAllocAlgReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatSetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatSetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatSetLogLevel defines message 'nat_set_log_level'. +type NatSetLogLevel struct { + LogLevel NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"` +} + +func (m *NatSetLogLevel) Reset() { *m = NatSetLogLevel{} } +func (*NatSetLogLevel) GetMessageName() string { return "nat_set_log_level" } +func (*NatSetLogLevel) GetCrcString() string { return "70076bfe" } +func (*NatSetLogLevel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatSetLogLevel) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.LogLevel + return size +} +func (m *NatSetLogLevel) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.LogLevel)) + return buf.Bytes(), nil +} +func (m *NatSetLogLevel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.LogLevel = NatLogLevel(buf.DecodeUint8()) + return nil +} + +// NatSetLogLevelReply defines message 'nat_set_log_level_reply'. +type NatSetLogLevelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatSetLogLevelReply) Reset() { *m = NatSetLogLevelReply{} } +func (*NatSetLogLevelReply) GetMessageName() string { return "nat_set_log_level_reply" } +func (*NatSetLogLevelReply) GetCrcString() string { return "e8d4e804" } +func (*NatSetLogLevelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatSetLogLevelReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatSetLogLevelReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatSetLogLevelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatSetMssClamping defines message 'nat_set_mss_clamping'. +type NatSetMssClamping struct { + MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"` + Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` +} + +func (m *NatSetMssClamping) Reset() { *m = NatSetMssClamping{} } +func (*NatSetMssClamping) GetMessageName() string { return "nat_set_mss_clamping" } +func (*NatSetMssClamping) GetCrcString() string { return "25e90abb" } +func (*NatSetMssClamping) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatSetMssClamping) Size() (size int) { + if m == nil { + return 0 + } + size += 2 // m.MssValue + size += 1 // m.Enable + return size +} +func (m *NatSetMssClamping) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint16(m.MssValue) + buf.EncodeBool(m.Enable) + return buf.Bytes(), nil +} +func (m *NatSetMssClamping) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.MssValue = buf.DecodeUint16() + m.Enable = buf.DecodeBool() + return nil +} + +// NatSetMssClampingReply defines message 'nat_set_mss_clamping_reply'. +type NatSetMssClampingReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatSetMssClampingReply) Reset() { *m = NatSetMssClampingReply{} } +func (*NatSetMssClampingReply) GetMessageName() string { return "nat_set_mss_clamping_reply" } +func (*NatSetMssClampingReply) GetCrcString() string { return "e8d4e804" } +func (*NatSetMssClampingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatSetMssClampingReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatSetMssClampingReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatSetMssClampingReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatSetTimeouts defines message 'nat_set_timeouts'. +type NatSetTimeouts struct { + UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"` + TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"` + TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"` + ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"` +} + +func (m *NatSetTimeouts) Reset() { *m = NatSetTimeouts{} } +func (*NatSetTimeouts) GetMessageName() string { return "nat_set_timeouts" } +func (*NatSetTimeouts) GetCrcString() string { return "d4746b16" } +func (*NatSetTimeouts) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatSetTimeouts) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.UDP + size += 4 // m.TCPEstablished + size += 4 // m.TCPTransitory + size += 4 // m.ICMP + return size +} +func (m *NatSetTimeouts) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.UDP) + buf.EncodeUint32(m.TCPEstablished) + buf.EncodeUint32(m.TCPTransitory) + buf.EncodeUint32(m.ICMP) + return buf.Bytes(), nil +} +func (m *NatSetTimeouts) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.UDP = buf.DecodeUint32() + m.TCPEstablished = buf.DecodeUint32() + m.TCPTransitory = buf.DecodeUint32() + m.ICMP = buf.DecodeUint32() + return nil +} + +// NatSetTimeoutsReply defines message 'nat_set_timeouts_reply'. +type NatSetTimeoutsReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatSetTimeoutsReply) Reset() { *m = NatSetTimeoutsReply{} } +func (*NatSetTimeoutsReply) GetMessageName() string { return "nat_set_timeouts_reply" } +func (*NatSetTimeoutsReply) GetCrcString() string { return "e8d4e804" } +func (*NatSetTimeoutsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatSetTimeoutsReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatSetTimeoutsReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatSetTimeoutsReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatSetWorkers defines message 'nat_set_workers'. +type NatSetWorkers struct { + WorkerMask uint64 `binapi:"u64,name=worker_mask" json:"worker_mask,omitempty"` +} + +func (m *NatSetWorkers) Reset() { *m = NatSetWorkers{} } +func (*NatSetWorkers) GetMessageName() string { return "nat_set_workers" } +func (*NatSetWorkers) GetCrcString() string { return "da926638" } +func (*NatSetWorkers) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatSetWorkers) Size() (size int) { + if m == nil { + return 0 + } + size += 8 // m.WorkerMask + return size +} +func (m *NatSetWorkers) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint64(m.WorkerMask) + return buf.Bytes(), nil +} +func (m *NatSetWorkers) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.WorkerMask = buf.DecodeUint64() + return nil +} + +// NatSetWorkersReply defines message 'nat_set_workers_reply'. +type NatSetWorkersReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *NatSetWorkersReply) Reset() { *m = NatSetWorkersReply{} } +func (*NatSetWorkersReply) GetMessageName() string { return "nat_set_workers_reply" } +func (*NatSetWorkersReply) GetCrcString() string { return "e8d4e804" } +func (*NatSetWorkersReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatSetWorkersReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *NatSetWorkersReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *NatSetWorkersReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// NatShowConfig defines message 'nat_show_config'. +type NatShowConfig struct{} + +func (m *NatShowConfig) Reset() { *m = NatShowConfig{} } +func (*NatShowConfig) GetMessageName() string { return "nat_show_config" } +func (*NatShowConfig) GetCrcString() string { return "51077d14" } +func (*NatShowConfig) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatShowConfig) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatShowConfig) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatShowConfig) Unmarshal(b []byte) error { + return nil +} + +// NatShowConfigReply defines message 'nat_show_config_reply'. +type NatShowConfigReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + StaticMappingOnly bool `binapi:"bool,name=static_mapping_only" json:"static_mapping_only,omitempty"` + StaticMappingConnectionTracking bool `binapi:"bool,name=static_mapping_connection_tracking" json:"static_mapping_connection_tracking,omitempty"` + Deterministic bool `binapi:"bool,name=deterministic" json:"deterministic,omitempty"` + EndpointDependent bool `binapi:"bool,name=endpoint_dependent" json:"endpoint_dependent,omitempty"` + Out2inDpo bool `binapi:"bool,name=out2in_dpo" json:"out2in_dpo,omitempty"` + DsliteCe bool `binapi:"bool,name=dslite_ce" json:"dslite_ce,omitempty"` + TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"` + TranslationMemorySize uint32 `binapi:"u32,name=translation_memory_size" json:"translation_memory_size,omitempty"` + UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"` + UserMemorySize uint32 `binapi:"u32,name=user_memory_size" json:"user_memory_size,omitempty"` + MaxTranslationsPerUser uint32 `binapi:"u32,name=max_translations_per_user" json:"max_translations_per_user,omitempty"` + OutsideVrfID uint32 `binapi:"u32,name=outside_vrf_id" json:"outside_vrf_id,omitempty"` + InsideVrfID uint32 `binapi:"u32,name=inside_vrf_id" json:"inside_vrf_id,omitempty"` + Nat64BibBuckets uint32 `binapi:"u32,name=nat64_bib_buckets" json:"nat64_bib_buckets,omitempty"` + Nat64BibMemorySize uint32 `binapi:"u32,name=nat64_bib_memory_size" json:"nat64_bib_memory_size,omitempty"` + Nat64StBuckets uint32 `binapi:"u32,name=nat64_st_buckets" json:"nat64_st_buckets,omitempty"` + Nat64StMemorySize uint32 `binapi:"u32,name=nat64_st_memory_size" json:"nat64_st_memory_size,omitempty"` +} + +func (m *NatShowConfigReply) Reset() { *m = NatShowConfigReply{} } +func (*NatShowConfigReply) GetMessageName() string { return "nat_show_config_reply" } +func (*NatShowConfigReply) GetCrcString() string { return "006a0786" } +func (*NatShowConfigReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatShowConfigReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 1 // m.StaticMappingOnly + size += 1 // m.StaticMappingConnectionTracking + size += 1 // m.Deterministic + size += 1 // m.EndpointDependent + size += 1 // m.Out2inDpo + size += 1 // m.DsliteCe + size += 4 // m.TranslationBuckets + size += 4 // m.TranslationMemorySize + size += 4 // m.UserBuckets + size += 4 // m.UserMemorySize + size += 4 // m.MaxTranslationsPerUser + size += 4 // m.OutsideVrfID + size += 4 // m.InsideVrfID + size += 4 // m.Nat64BibBuckets + size += 4 // m.Nat64BibMemorySize + size += 4 // m.Nat64StBuckets + size += 4 // m.Nat64StMemorySize + return size +} +func (m *NatShowConfigReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeBool(m.StaticMappingOnly) + buf.EncodeBool(m.StaticMappingConnectionTracking) + buf.EncodeBool(m.Deterministic) + buf.EncodeBool(m.EndpointDependent) + buf.EncodeBool(m.Out2inDpo) + buf.EncodeBool(m.DsliteCe) + buf.EncodeUint32(m.TranslationBuckets) + buf.EncodeUint32(m.TranslationMemorySize) + buf.EncodeUint32(m.UserBuckets) + buf.EncodeUint32(m.UserMemorySize) + buf.EncodeUint32(m.MaxTranslationsPerUser) + buf.EncodeUint32(m.OutsideVrfID) + buf.EncodeUint32(m.InsideVrfID) + buf.EncodeUint32(m.Nat64BibBuckets) + buf.EncodeUint32(m.Nat64BibMemorySize) + buf.EncodeUint32(m.Nat64StBuckets) + buf.EncodeUint32(m.Nat64StMemorySize) + return buf.Bytes(), nil +} +func (m *NatShowConfigReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.StaticMappingOnly = buf.DecodeBool() + m.StaticMappingConnectionTracking = buf.DecodeBool() + m.Deterministic = buf.DecodeBool() + m.EndpointDependent = buf.DecodeBool() + m.Out2inDpo = buf.DecodeBool() + m.DsliteCe = buf.DecodeBool() + m.TranslationBuckets = buf.DecodeUint32() + m.TranslationMemorySize = buf.DecodeUint32() + m.UserBuckets = buf.DecodeUint32() + m.UserMemorySize = buf.DecodeUint32() + m.MaxTranslationsPerUser = buf.DecodeUint32() + m.OutsideVrfID = buf.DecodeUint32() + m.InsideVrfID = buf.DecodeUint32() + m.Nat64BibBuckets = buf.DecodeUint32() + m.Nat64BibMemorySize = buf.DecodeUint32() + m.Nat64StBuckets = buf.DecodeUint32() + m.Nat64StMemorySize = buf.DecodeUint32() + return nil +} + +// NatWorkerDetails defines message 'nat_worker_details'. +type NatWorkerDetails struct { + WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"` + LcoreID uint32 `binapi:"u32,name=lcore_id" json:"lcore_id,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` +} + +func (m *NatWorkerDetails) Reset() { *m = NatWorkerDetails{} } +func (*NatWorkerDetails) GetMessageName() string { return "nat_worker_details" } +func (*NatWorkerDetails) GetCrcString() string { return "84bf06fc" } +func (*NatWorkerDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *NatWorkerDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.WorkerIndex + size += 4 // m.LcoreID + size += 64 // m.Name + return size +} +func (m *NatWorkerDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.WorkerIndex) + buf.EncodeUint32(m.LcoreID) + buf.EncodeString(m.Name, 64) + return buf.Bytes(), nil +} +func (m *NatWorkerDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.WorkerIndex = buf.DecodeUint32() + m.LcoreID = buf.DecodeUint32() + m.Name = buf.DecodeString(64) + return nil +} + +// NatWorkerDump defines message 'nat_worker_dump'. +type NatWorkerDump struct{} + +func (m *NatWorkerDump) Reset() { *m = NatWorkerDump{} } +func (*NatWorkerDump) GetMessageName() string { return "nat_worker_dump" } +func (*NatWorkerDump) GetCrcString() string { return "51077d14" } +func (*NatWorkerDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *NatWorkerDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *NatWorkerDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *NatWorkerDump) Unmarshal(b []byte) error { + return nil +} + +func init() { file_nat_binapi_init() } +func file_nat_binapi_init() { + api.RegisterMessage((*DsliteAddDelPoolAddrRange)(nil), "dslite_add_del_pool_addr_range_c448457a") + api.RegisterMessage((*DsliteAddDelPoolAddrRangeReply)(nil), "dslite_add_del_pool_addr_range_reply_e8d4e804") + api.RegisterMessage((*DsliteAddressDetails)(nil), "dslite_address_details_ec26d648") + api.RegisterMessage((*DsliteAddressDump)(nil), "dslite_address_dump_51077d14") + api.RegisterMessage((*DsliteGetAftrAddr)(nil), "dslite_get_aftr_addr_51077d14") + api.RegisterMessage((*DsliteGetAftrAddrReply)(nil), "dslite_get_aftr_addr_reply_38e30db1") + api.RegisterMessage((*DsliteGetB4Addr)(nil), "dslite_get_b4_addr_51077d14") + api.RegisterMessage((*DsliteGetB4AddrReply)(nil), "dslite_get_b4_addr_reply_38e30db1") + api.RegisterMessage((*DsliteSetAftrAddr)(nil), "dslite_set_aftr_addr_1e955f8d") + api.RegisterMessage((*DsliteSetAftrAddrReply)(nil), "dslite_set_aftr_addr_reply_e8d4e804") + api.RegisterMessage((*DsliteSetB4Addr)(nil), "dslite_set_b4_addr_1e955f8d") + api.RegisterMessage((*DsliteSetB4AddrReply)(nil), "dslite_set_b4_addr_reply_e8d4e804") + api.RegisterMessage((*Nat44AddDelAddressRange)(nil), "nat44_add_del_address_range_d4c7568c") + api.RegisterMessage((*Nat44AddDelAddressRangeReply)(nil), "nat44_add_del_address_range_reply_e8d4e804") + api.RegisterMessage((*Nat44AddDelIdentityMapping)(nil), "nat44_add_del_identity_mapping_8e12743f") + api.RegisterMessage((*Nat44AddDelIdentityMappingReply)(nil), "nat44_add_del_identity_mapping_reply_e8d4e804") + api.RegisterMessage((*Nat44AddDelInterfaceAddr)(nil), "nat44_add_del_interface_addr_fc835325") + api.RegisterMessage((*Nat44AddDelInterfaceAddrReply)(nil), "nat44_add_del_interface_addr_reply_e8d4e804") + api.RegisterMessage((*Nat44AddDelLbStaticMapping)(nil), "nat44_add_del_lb_static_mapping_53b24611") + api.RegisterMessage((*Nat44AddDelLbStaticMappingReply)(nil), "nat44_add_del_lb_static_mapping_reply_e8d4e804") + api.RegisterMessage((*Nat44AddDelStaticMapping)(nil), "nat44_add_del_static_mapping_e165e83b") + api.RegisterMessage((*Nat44AddDelStaticMappingReply)(nil), "nat44_add_del_static_mapping_reply_e8d4e804") + api.RegisterMessage((*Nat44AddressDetails)(nil), "nat44_address_details_45410ac4") + api.RegisterMessage((*Nat44AddressDump)(nil), "nat44_address_dump_51077d14") + api.RegisterMessage((*Nat44DelSession)(nil), "nat44_del_session_4c49c387") + api.RegisterMessage((*Nat44DelSessionReply)(nil), "nat44_del_session_reply_e8d4e804") + api.RegisterMessage((*Nat44ForwardingEnableDisable)(nil), "nat44_forwarding_enable_disable_b3e225d2") + api.RegisterMessage((*Nat44ForwardingEnableDisableReply)(nil), "nat44_forwarding_enable_disable_reply_e8d4e804") + api.RegisterMessage((*Nat44ForwardingIsEnabled)(nil), "nat44_forwarding_is_enabled_51077d14") + api.RegisterMessage((*Nat44ForwardingIsEnabledReply)(nil), "nat44_forwarding_is_enabled_reply_46924a06") + api.RegisterMessage((*Nat44IdentityMappingDetails)(nil), "nat44_identity_mapping_details_36d21351") + api.RegisterMessage((*Nat44IdentityMappingDump)(nil), "nat44_identity_mapping_dump_51077d14") + api.RegisterMessage((*Nat44InterfaceAddDelFeature)(nil), "nat44_interface_add_del_feature_f3699b83") + api.RegisterMessage((*Nat44InterfaceAddDelFeatureReply)(nil), "nat44_interface_add_del_feature_reply_e8d4e804") + api.RegisterMessage((*Nat44InterfaceAddDelOutputFeature)(nil), "nat44_interface_add_del_output_feature_f3699b83") + api.RegisterMessage((*Nat44InterfaceAddDelOutputFeatureReply)(nil), "nat44_interface_add_del_output_feature_reply_e8d4e804") + api.RegisterMessage((*Nat44InterfaceAddrDetails)(nil), "nat44_interface_addr_details_3e687514") + api.RegisterMessage((*Nat44InterfaceAddrDump)(nil), "nat44_interface_addr_dump_51077d14") + api.RegisterMessage((*Nat44InterfaceDetails)(nil), "nat44_interface_details_5d286289") + api.RegisterMessage((*Nat44InterfaceDump)(nil), "nat44_interface_dump_51077d14") + api.RegisterMessage((*Nat44InterfaceOutputFeatureDetails)(nil), "nat44_interface_output_feature_details_5d286289") + api.RegisterMessage((*Nat44InterfaceOutputFeatureDump)(nil), "nat44_interface_output_feature_dump_51077d14") + api.RegisterMessage((*Nat44LbStaticMappingAddDelLocal)(nil), "nat44_lb_static_mapping_add_del_local_2910a151") + api.RegisterMessage((*Nat44LbStaticMappingAddDelLocalReply)(nil), "nat44_lb_static_mapping_add_del_local_reply_e8d4e804") + api.RegisterMessage((*Nat44LbStaticMappingDetails)(nil), "nat44_lb_static_mapping_details_2267b9e8") + api.RegisterMessage((*Nat44LbStaticMappingDump)(nil), "nat44_lb_static_mapping_dump_51077d14") + api.RegisterMessage((*Nat44StaticMappingDetails)(nil), "nat44_static_mapping_details_1a433ef7") + api.RegisterMessage((*Nat44StaticMappingDump)(nil), "nat44_static_mapping_dump_51077d14") + api.RegisterMessage((*Nat44UserDetails)(nil), "nat44_user_details_355896c2") + api.RegisterMessage((*Nat44UserDump)(nil), "nat44_user_dump_51077d14") + api.RegisterMessage((*Nat44UserSessionDetails)(nil), "nat44_user_session_details_1965fd69") + api.RegisterMessage((*Nat44UserSessionDump)(nil), "nat44_user_session_dump_e1899c98") + api.RegisterMessage((*Nat64AddDelInterface)(nil), "nat64_add_del_interface_f3699b83") + api.RegisterMessage((*Nat64AddDelInterfaceAddr)(nil), "nat64_add_del_interface_addr_47d6e753") + api.RegisterMessage((*Nat64AddDelInterfaceAddrReply)(nil), "nat64_add_del_interface_addr_reply_e8d4e804") + api.RegisterMessage((*Nat64AddDelInterfaceReply)(nil), "nat64_add_del_interface_reply_e8d4e804") + api.RegisterMessage((*Nat64AddDelPoolAddrRange)(nil), "nat64_add_del_pool_addr_range_21234ef3") + api.RegisterMessage((*Nat64AddDelPoolAddrRangeReply)(nil), "nat64_add_del_pool_addr_range_reply_e8d4e804") + api.RegisterMessage((*Nat64AddDelPrefix)(nil), "nat64_add_del_prefix_727b2f4c") + api.RegisterMessage((*Nat64AddDelPrefixReply)(nil), "nat64_add_del_prefix_reply_e8d4e804") + api.RegisterMessage((*Nat64AddDelStaticBib)(nil), "nat64_add_del_static_bib_90fae58a") + api.RegisterMessage((*Nat64AddDelStaticBibReply)(nil), "nat64_add_del_static_bib_reply_e8d4e804") + api.RegisterMessage((*Nat64BibDetails)(nil), "nat64_bib_details_62c8541d") + api.RegisterMessage((*Nat64BibDump)(nil), "nat64_bib_dump_cfcb6b75") + api.RegisterMessage((*Nat64InterfaceDetails)(nil), "nat64_interface_details_5d286289") + api.RegisterMessage((*Nat64InterfaceDump)(nil), "nat64_interface_dump_51077d14") + api.RegisterMessage((*Nat64PoolAddrDetails)(nil), "nat64_pool_addr_details_9bb99cdb") + api.RegisterMessage((*Nat64PoolAddrDump)(nil), "nat64_pool_addr_dump_51077d14") + api.RegisterMessage((*Nat64PrefixDetails)(nil), "nat64_prefix_details_20568de3") + api.RegisterMessage((*Nat64PrefixDump)(nil), "nat64_prefix_dump_51077d14") + api.RegisterMessage((*Nat64StDetails)(nil), "nat64_st_details_c770d620") + api.RegisterMessage((*Nat64StDump)(nil), "nat64_st_dump_cfcb6b75") + api.RegisterMessage((*Nat66AddDelInterface)(nil), "nat66_add_del_interface_f3699b83") + api.RegisterMessage((*Nat66AddDelInterfaceReply)(nil), "nat66_add_del_interface_reply_e8d4e804") + api.RegisterMessage((*Nat66AddDelStaticMapping)(nil), "nat66_add_del_static_mapping_fb64e50b") + api.RegisterMessage((*Nat66AddDelStaticMappingReply)(nil), "nat66_add_del_static_mapping_reply_e8d4e804") + api.RegisterMessage((*Nat66InterfaceDetails)(nil), "nat66_interface_details_5d286289") + api.RegisterMessage((*Nat66InterfaceDump)(nil), "nat66_interface_dump_51077d14") + api.RegisterMessage((*Nat66StaticMappingDetails)(nil), "nat66_static_mapping_details_5c568448") + api.RegisterMessage((*Nat66StaticMappingDump)(nil), "nat66_static_mapping_dump_51077d14") + api.RegisterMessage((*NatControlPing)(nil), "nat_control_ping_51077d14") + api.RegisterMessage((*NatControlPingReply)(nil), "nat_control_ping_reply_f6b0b8ca") + api.RegisterMessage((*NatDetAddDelMap)(nil), "nat_det_add_del_map_112fde05") + api.RegisterMessage((*NatDetAddDelMapReply)(nil), "nat_det_add_del_map_reply_e8d4e804") + api.RegisterMessage((*NatDetCloseSessionIn)(nil), "nat_det_close_session_in_0a10ef64") + api.RegisterMessage((*NatDetCloseSessionInReply)(nil), "nat_det_close_session_in_reply_e8d4e804") + api.RegisterMessage((*NatDetCloseSessionOut)(nil), "nat_det_close_session_out_c1b6cbfb") + api.RegisterMessage((*NatDetCloseSessionOutReply)(nil), "nat_det_close_session_out_reply_e8d4e804") + api.RegisterMessage((*NatDetForward)(nil), "nat_det_forward_7f8a89cd") + api.RegisterMessage((*NatDetForwardReply)(nil), "nat_det_forward_reply_a8ccbdc0") + api.RegisterMessage((*NatDetMapDetails)(nil), "nat_det_map_details_88000ee1") + api.RegisterMessage((*NatDetMapDump)(nil), "nat_det_map_dump_51077d14") + api.RegisterMessage((*NatDetReverse)(nil), "nat_det_reverse_a7573fe1") + api.RegisterMessage((*NatDetReverseReply)(nil), "nat_det_reverse_reply_34066d48") + api.RegisterMessage((*NatDetSessionDetails)(nil), "nat_det_session_details_27f3c171") + api.RegisterMessage((*NatDetSessionDump)(nil), "nat_det_session_dump_e45a3af7") + api.RegisterMessage((*NatGetAddrAndPortAllocAlg)(nil), "nat_get_addr_and_port_alloc_alg_51077d14") + api.RegisterMessage((*NatGetAddrAndPortAllocAlgReply)(nil), "nat_get_addr_and_port_alloc_alg_reply_3607a7d0") + api.RegisterMessage((*NatGetMssClamping)(nil), "nat_get_mss_clamping_51077d14") + api.RegisterMessage((*NatGetMssClampingReply)(nil), "nat_get_mss_clamping_reply_1c0b2a78") + api.RegisterMessage((*NatGetTimeouts)(nil), "nat_get_timeouts_51077d14") + api.RegisterMessage((*NatGetTimeoutsReply)(nil), "nat_get_timeouts_reply_3c4df4e1") + api.RegisterMessage((*NatHaFlush)(nil), "nat_ha_flush_51077d14") + api.RegisterMessage((*NatHaFlushReply)(nil), "nat_ha_flush_reply_e8d4e804") + api.RegisterMessage((*NatHaGetFailover)(nil), "nat_ha_get_failover_51077d14") + api.RegisterMessage((*NatHaGetFailoverReply)(nil), "nat_ha_get_failover_reply_a67d8752") + api.RegisterMessage((*NatHaGetListener)(nil), "nat_ha_get_listener_51077d14") + api.RegisterMessage((*NatHaGetListenerReply)(nil), "nat_ha_get_listener_reply_123ea41f") + api.RegisterMessage((*NatHaResync)(nil), "nat_ha_resync_c8ab9e03") + api.RegisterMessage((*NatHaResyncCompletedEvent)(nil), "nat_ha_resync_completed_event_fdc598fb") + api.RegisterMessage((*NatHaResyncReply)(nil), "nat_ha_resync_reply_e8d4e804") + api.RegisterMessage((*NatHaSetFailover)(nil), "nat_ha_set_failover_718246af") + api.RegisterMessage((*NatHaSetFailoverReply)(nil), "nat_ha_set_failover_reply_e8d4e804") + api.RegisterMessage((*NatHaSetListener)(nil), "nat_ha_set_listener_e4a8cb4e") + api.RegisterMessage((*NatHaSetListenerReply)(nil), "nat_ha_set_listener_reply_e8d4e804") + api.RegisterMessage((*NatIpfixEnableDisable)(nil), "nat_ipfix_enable_disable_9af4a2d2") + api.RegisterMessage((*NatIpfixEnableDisableReply)(nil), "nat_ipfix_enable_disable_reply_e8d4e804") + api.RegisterMessage((*NatSetAddrAndPortAllocAlg)(nil), "nat_set_addr_and_port_alloc_alg_deeb746f") + api.RegisterMessage((*NatSetAddrAndPortAllocAlgReply)(nil), "nat_set_addr_and_port_alloc_alg_reply_e8d4e804") + api.RegisterMessage((*NatSetLogLevel)(nil), "nat_set_log_level_70076bfe") + api.RegisterMessage((*NatSetLogLevelReply)(nil), "nat_set_log_level_reply_e8d4e804") + api.RegisterMessage((*NatSetMssClamping)(nil), "nat_set_mss_clamping_25e90abb") + api.RegisterMessage((*NatSetMssClampingReply)(nil), "nat_set_mss_clamping_reply_e8d4e804") + api.RegisterMessage((*NatSetTimeouts)(nil), "nat_set_timeouts_d4746b16") + api.RegisterMessage((*NatSetTimeoutsReply)(nil), "nat_set_timeouts_reply_e8d4e804") + api.RegisterMessage((*NatSetWorkers)(nil), "nat_set_workers_da926638") + api.RegisterMessage((*NatSetWorkersReply)(nil), "nat_set_workers_reply_e8d4e804") + api.RegisterMessage((*NatShowConfig)(nil), "nat_show_config_51077d14") + api.RegisterMessage((*NatShowConfigReply)(nil), "nat_show_config_reply_006a0786") + api.RegisterMessage((*NatWorkerDetails)(nil), "nat_worker_details_84bf06fc") + api.RegisterMessage((*NatWorkerDump)(nil), "nat_worker_dump_51077d14") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*DsliteAddDelPoolAddrRange)(nil), + (*DsliteAddDelPoolAddrRangeReply)(nil), + (*DsliteAddressDetails)(nil), + (*DsliteAddressDump)(nil), + (*DsliteGetAftrAddr)(nil), + (*DsliteGetAftrAddrReply)(nil), + (*DsliteGetB4Addr)(nil), + (*DsliteGetB4AddrReply)(nil), + (*DsliteSetAftrAddr)(nil), + (*DsliteSetAftrAddrReply)(nil), + (*DsliteSetB4Addr)(nil), + (*DsliteSetB4AddrReply)(nil), + (*Nat44AddDelAddressRange)(nil), + (*Nat44AddDelAddressRangeReply)(nil), + (*Nat44AddDelIdentityMapping)(nil), + (*Nat44AddDelIdentityMappingReply)(nil), + (*Nat44AddDelInterfaceAddr)(nil), + (*Nat44AddDelInterfaceAddrReply)(nil), + (*Nat44AddDelLbStaticMapping)(nil), + (*Nat44AddDelLbStaticMappingReply)(nil), + (*Nat44AddDelStaticMapping)(nil), + (*Nat44AddDelStaticMappingReply)(nil), + (*Nat44AddressDetails)(nil), + (*Nat44AddressDump)(nil), + (*Nat44DelSession)(nil), + (*Nat44DelSessionReply)(nil), + (*Nat44ForwardingEnableDisable)(nil), + (*Nat44ForwardingEnableDisableReply)(nil), + (*Nat44ForwardingIsEnabled)(nil), + (*Nat44ForwardingIsEnabledReply)(nil), + (*Nat44IdentityMappingDetails)(nil), + (*Nat44IdentityMappingDump)(nil), + (*Nat44InterfaceAddDelFeature)(nil), + (*Nat44InterfaceAddDelFeatureReply)(nil), + (*Nat44InterfaceAddDelOutputFeature)(nil), + (*Nat44InterfaceAddDelOutputFeatureReply)(nil), + (*Nat44InterfaceAddrDetails)(nil), + (*Nat44InterfaceAddrDump)(nil), + (*Nat44InterfaceDetails)(nil), + (*Nat44InterfaceDump)(nil), + (*Nat44InterfaceOutputFeatureDetails)(nil), + (*Nat44InterfaceOutputFeatureDump)(nil), + (*Nat44LbStaticMappingAddDelLocal)(nil), + (*Nat44LbStaticMappingAddDelLocalReply)(nil), + (*Nat44LbStaticMappingDetails)(nil), + (*Nat44LbStaticMappingDump)(nil), + (*Nat44StaticMappingDetails)(nil), + (*Nat44StaticMappingDump)(nil), + (*Nat44UserDetails)(nil), + (*Nat44UserDump)(nil), + (*Nat44UserSessionDetails)(nil), + (*Nat44UserSessionDump)(nil), + (*Nat64AddDelInterface)(nil), + (*Nat64AddDelInterfaceAddr)(nil), + (*Nat64AddDelInterfaceAddrReply)(nil), + (*Nat64AddDelInterfaceReply)(nil), + (*Nat64AddDelPoolAddrRange)(nil), + (*Nat64AddDelPoolAddrRangeReply)(nil), + (*Nat64AddDelPrefix)(nil), + (*Nat64AddDelPrefixReply)(nil), + (*Nat64AddDelStaticBib)(nil), + (*Nat64AddDelStaticBibReply)(nil), + (*Nat64BibDetails)(nil), + (*Nat64BibDump)(nil), + (*Nat64InterfaceDetails)(nil), + (*Nat64InterfaceDump)(nil), + (*Nat64PoolAddrDetails)(nil), + (*Nat64PoolAddrDump)(nil), + (*Nat64PrefixDetails)(nil), + (*Nat64PrefixDump)(nil), + (*Nat64StDetails)(nil), + (*Nat64StDump)(nil), + (*Nat66AddDelInterface)(nil), + (*Nat66AddDelInterfaceReply)(nil), + (*Nat66AddDelStaticMapping)(nil), + (*Nat66AddDelStaticMappingReply)(nil), + (*Nat66InterfaceDetails)(nil), + (*Nat66InterfaceDump)(nil), + (*Nat66StaticMappingDetails)(nil), + (*Nat66StaticMappingDump)(nil), + (*NatControlPing)(nil), + (*NatControlPingReply)(nil), + (*NatDetAddDelMap)(nil), + (*NatDetAddDelMapReply)(nil), + (*NatDetCloseSessionIn)(nil), + (*NatDetCloseSessionInReply)(nil), + (*NatDetCloseSessionOut)(nil), + (*NatDetCloseSessionOutReply)(nil), + (*NatDetForward)(nil), + (*NatDetForwardReply)(nil), + (*NatDetMapDetails)(nil), + (*NatDetMapDump)(nil), + (*NatDetReverse)(nil), + (*NatDetReverseReply)(nil), + (*NatDetSessionDetails)(nil), + (*NatDetSessionDump)(nil), + (*NatGetAddrAndPortAllocAlg)(nil), + (*NatGetAddrAndPortAllocAlgReply)(nil), + (*NatGetMssClamping)(nil), + (*NatGetMssClampingReply)(nil), + (*NatGetTimeouts)(nil), + (*NatGetTimeoutsReply)(nil), + (*NatHaFlush)(nil), + (*NatHaFlushReply)(nil), + (*NatHaGetFailover)(nil), + (*NatHaGetFailoverReply)(nil), + (*NatHaGetListener)(nil), + (*NatHaGetListenerReply)(nil), + (*NatHaResync)(nil), + (*NatHaResyncCompletedEvent)(nil), + (*NatHaResyncReply)(nil), + (*NatHaSetFailover)(nil), + (*NatHaSetFailoverReply)(nil), + (*NatHaSetListener)(nil), + (*NatHaSetListenerReply)(nil), + (*NatIpfixEnableDisable)(nil), + (*NatIpfixEnableDisableReply)(nil), + (*NatSetAddrAndPortAllocAlg)(nil), + (*NatSetAddrAndPortAllocAlgReply)(nil), + (*NatSetLogLevel)(nil), + (*NatSetLogLevelReply)(nil), + (*NatSetMssClamping)(nil), + (*NatSetMssClampingReply)(nil), + (*NatSetTimeouts)(nil), + (*NatSetTimeoutsReply)(nil), + (*NatSetWorkers)(nil), + (*NatSetWorkersReply)(nil), + (*NatShowConfig)(nil), + (*NatShowConfigReply)(nil), + (*NatWorkerDetails)(nil), + (*NatWorkerDump)(nil), + } +} diff --git a/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go b/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go new file mode 100644 index 0000000..f6069ec --- /dev/null +++ b/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go @@ -0,0 +1,1273 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. + +package nat + +import ( + "context" + "fmt" + api "git.fd.io/govpp.git/api" + vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe" + "io" +) + +// RPCService defines RPC service nat. +type RPCService interface { + DsliteAddDelPoolAddrRange(ctx context.Context, in *DsliteAddDelPoolAddrRange) (*DsliteAddDelPoolAddrRangeReply, error) + DsliteAddressDump(ctx context.Context, in *DsliteAddressDump) (RPCService_DsliteAddressDumpClient, error) + DsliteGetAftrAddr(ctx context.Context, in *DsliteGetAftrAddr) (*DsliteGetAftrAddrReply, error) + DsliteGetB4Addr(ctx context.Context, in *DsliteGetB4Addr) (*DsliteGetB4AddrReply, error) + DsliteSetAftrAddr(ctx context.Context, in *DsliteSetAftrAddr) (*DsliteSetAftrAddrReply, error) + DsliteSetB4Addr(ctx context.Context, in *DsliteSetB4Addr) (*DsliteSetB4AddrReply, error) + Nat44AddDelAddressRange(ctx context.Context, in *Nat44AddDelAddressRange) (*Nat44AddDelAddressRangeReply, error) + Nat44AddDelIdentityMapping(ctx context.Context, in *Nat44AddDelIdentityMapping) (*Nat44AddDelIdentityMappingReply, error) + Nat44AddDelInterfaceAddr(ctx context.Context, in *Nat44AddDelInterfaceAddr) (*Nat44AddDelInterfaceAddrReply, error) + Nat44AddDelLbStaticMapping(ctx context.Context, in *Nat44AddDelLbStaticMapping) (*Nat44AddDelLbStaticMappingReply, error) + Nat44AddDelStaticMapping(ctx context.Context, in *Nat44AddDelStaticMapping) (*Nat44AddDelStaticMappingReply, error) + Nat44AddressDump(ctx context.Context, in *Nat44AddressDump) (RPCService_Nat44AddressDumpClient, error) + Nat44DelSession(ctx context.Context, in *Nat44DelSession) (*Nat44DelSessionReply, error) + Nat44ForwardingEnableDisable(ctx context.Context, in *Nat44ForwardingEnableDisable) (*Nat44ForwardingEnableDisableReply, error) + Nat44ForwardingIsEnabled(ctx context.Context, in *Nat44ForwardingIsEnabled) (*Nat44ForwardingIsEnabledReply, error) + Nat44IdentityMappingDump(ctx context.Context, in *Nat44IdentityMappingDump) (RPCService_Nat44IdentityMappingDumpClient, error) + Nat44InterfaceAddDelFeature(ctx context.Context, in *Nat44InterfaceAddDelFeature) (*Nat44InterfaceAddDelFeatureReply, error) + Nat44InterfaceAddDelOutputFeature(ctx context.Context, in *Nat44InterfaceAddDelOutputFeature) (*Nat44InterfaceAddDelOutputFeatureReply, error) + Nat44InterfaceAddrDump(ctx context.Context, in *Nat44InterfaceAddrDump) (RPCService_Nat44InterfaceAddrDumpClient, error) + Nat44InterfaceDump(ctx context.Context, in *Nat44InterfaceDump) (RPCService_Nat44InterfaceDumpClient, error) + Nat44InterfaceOutputFeatureDump(ctx context.Context, in *Nat44InterfaceOutputFeatureDump) (RPCService_Nat44InterfaceOutputFeatureDumpClient, error) + Nat44LbStaticMappingAddDelLocal(ctx context.Context, in *Nat44LbStaticMappingAddDelLocal) (*Nat44LbStaticMappingAddDelLocalReply, error) + Nat44LbStaticMappingDump(ctx context.Context, in *Nat44LbStaticMappingDump) (RPCService_Nat44LbStaticMappingDumpClient, error) + Nat44StaticMappingDump(ctx context.Context, in *Nat44StaticMappingDump) (RPCService_Nat44StaticMappingDumpClient, error) + Nat44UserDump(ctx context.Context, in *Nat44UserDump) (RPCService_Nat44UserDumpClient, error) + Nat44UserSessionDump(ctx context.Context, in *Nat44UserSessionDump) (RPCService_Nat44UserSessionDumpClient, error) + Nat64AddDelInterface(ctx context.Context, in *Nat64AddDelInterface) (*Nat64AddDelInterfaceReply, error) + Nat64AddDelInterfaceAddr(ctx context.Context, in *Nat64AddDelInterfaceAddr) (*Nat64AddDelInterfaceAddrReply, error) + Nat64AddDelPoolAddrRange(ctx context.Context, in *Nat64AddDelPoolAddrRange) (*Nat64AddDelPoolAddrRangeReply, error) + Nat64AddDelPrefix(ctx context.Context, in *Nat64AddDelPrefix) (*Nat64AddDelPrefixReply, error) + Nat64AddDelStaticBib(ctx context.Context, in *Nat64AddDelStaticBib) (*Nat64AddDelStaticBibReply, error) + Nat64BibDump(ctx context.Context, in *Nat64BibDump) (RPCService_Nat64BibDumpClient, error) + Nat64InterfaceDump(ctx context.Context, in *Nat64InterfaceDump) (RPCService_Nat64InterfaceDumpClient, error) + Nat64PoolAddrDump(ctx context.Context, in *Nat64PoolAddrDump) (RPCService_Nat64PoolAddrDumpClient, error) + Nat64PrefixDump(ctx context.Context, in *Nat64PrefixDump) (RPCService_Nat64PrefixDumpClient, error) + Nat64StDump(ctx context.Context, in *Nat64StDump) (RPCService_Nat64StDumpClient, error) + Nat66AddDelInterface(ctx context.Context, in *Nat66AddDelInterface) (*Nat66AddDelInterfaceReply, error) + Nat66AddDelStaticMapping(ctx context.Context, in *Nat66AddDelStaticMapping) (*Nat66AddDelStaticMappingReply, error) + Nat66InterfaceDump(ctx context.Context, in *Nat66InterfaceDump) (RPCService_Nat66InterfaceDumpClient, error) + Nat66StaticMappingDump(ctx context.Context, in *Nat66StaticMappingDump) (RPCService_Nat66StaticMappingDumpClient, error) + NatControlPing(ctx context.Context, in *NatControlPing) (*NatControlPingReply, error) + NatDetAddDelMap(ctx context.Context, in *NatDetAddDelMap) (*NatDetAddDelMapReply, error) + NatDetCloseSessionIn(ctx context.Context, in *NatDetCloseSessionIn) (*NatDetCloseSessionInReply, error) + NatDetCloseSessionOut(ctx context.Context, in *NatDetCloseSessionOut) (*NatDetCloseSessionOutReply, error) + NatDetForward(ctx context.Context, in *NatDetForward) (*NatDetForwardReply, error) + NatDetMapDump(ctx context.Context, in *NatDetMapDump) (RPCService_NatDetMapDumpClient, error) + NatDetReverse(ctx context.Context, in *NatDetReverse) (*NatDetReverseReply, error) + NatDetSessionDump(ctx context.Context, in *NatDetSessionDump) (RPCService_NatDetSessionDumpClient, error) + NatGetAddrAndPortAllocAlg(ctx context.Context, in *NatGetAddrAndPortAllocAlg) (*NatGetAddrAndPortAllocAlgReply, error) + NatGetMssClamping(ctx context.Context, in *NatGetMssClamping) (*NatGetMssClampingReply, error) + NatGetTimeouts(ctx context.Context, in *NatGetTimeouts) (*NatGetTimeoutsReply, error) + NatHaFlush(ctx context.Context, in *NatHaFlush) (*NatHaFlushReply, error) + NatHaGetFailover(ctx context.Context, in *NatHaGetFailover) (*NatHaGetFailoverReply, error) + NatHaGetListener(ctx context.Context, in *NatHaGetListener) (*NatHaGetListenerReply, error) + NatHaResync(ctx context.Context, in *NatHaResync) (*NatHaResyncReply, error) + NatHaSetFailover(ctx context.Context, in *NatHaSetFailover) (*NatHaSetFailoverReply, error) + NatHaSetListener(ctx context.Context, in *NatHaSetListener) (*NatHaSetListenerReply, error) + NatIpfixEnableDisable(ctx context.Context, in *NatIpfixEnableDisable) (*NatIpfixEnableDisableReply, error) + NatSetAddrAndPortAllocAlg(ctx context.Context, in *NatSetAddrAndPortAllocAlg) (*NatSetAddrAndPortAllocAlgReply, error) + NatSetLogLevel(ctx context.Context, in *NatSetLogLevel) (*NatSetLogLevelReply, error) + NatSetMssClamping(ctx context.Context, in *NatSetMssClamping) (*NatSetMssClampingReply, error) + NatSetTimeouts(ctx context.Context, in *NatSetTimeouts) (*NatSetTimeoutsReply, error) + NatSetWorkers(ctx context.Context, in *NatSetWorkers) (*NatSetWorkersReply, error) + NatShowConfig(ctx context.Context, in *NatShowConfig) (*NatShowConfigReply, error) + NatWorkerDump(ctx context.Context, in *NatWorkerDump) (RPCService_NatWorkerDumpClient, error) +} + +type serviceClient struct { + conn api.Connection +} + +func NewServiceClient(conn api.Connection) RPCService { + return &serviceClient{conn} +} + +func (c *serviceClient) DsliteAddDelPoolAddrRange(ctx context.Context, in *DsliteAddDelPoolAddrRange) (*DsliteAddDelPoolAddrRangeReply, error) { + out := new(DsliteAddDelPoolAddrRangeReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) DsliteAddressDump(ctx context.Context, in *DsliteAddressDump) (RPCService_DsliteAddressDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_DsliteAddressDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_DsliteAddressDumpClient interface { + Recv() (*DsliteAddressDetails, error) + api.Stream +} + +type serviceClient_DsliteAddressDumpClient struct { + api.Stream +} + +func (c *serviceClient_DsliteAddressDumpClient) Recv() (*DsliteAddressDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *DsliteAddressDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) DsliteGetAftrAddr(ctx context.Context, in *DsliteGetAftrAddr) (*DsliteGetAftrAddrReply, error) { + out := new(DsliteGetAftrAddrReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) DsliteGetB4Addr(ctx context.Context, in *DsliteGetB4Addr) (*DsliteGetB4AddrReply, error) { + out := new(DsliteGetB4AddrReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) DsliteSetAftrAddr(ctx context.Context, in *DsliteSetAftrAddr) (*DsliteSetAftrAddrReply, error) { + out := new(DsliteSetAftrAddrReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) DsliteSetB4Addr(ctx context.Context, in *DsliteSetB4Addr) (*DsliteSetB4AddrReply, error) { + out := new(DsliteSetB4AddrReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44AddDelAddressRange(ctx context.Context, in *Nat44AddDelAddressRange) (*Nat44AddDelAddressRangeReply, error) { + out := new(Nat44AddDelAddressRangeReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44AddDelIdentityMapping(ctx context.Context, in *Nat44AddDelIdentityMapping) (*Nat44AddDelIdentityMappingReply, error) { + out := new(Nat44AddDelIdentityMappingReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44AddDelInterfaceAddr(ctx context.Context, in *Nat44AddDelInterfaceAddr) (*Nat44AddDelInterfaceAddrReply, error) { + out := new(Nat44AddDelInterfaceAddrReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44AddDelLbStaticMapping(ctx context.Context, in *Nat44AddDelLbStaticMapping) (*Nat44AddDelLbStaticMappingReply, error) { + out := new(Nat44AddDelLbStaticMappingReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44AddDelStaticMapping(ctx context.Context, in *Nat44AddDelStaticMapping) (*Nat44AddDelStaticMappingReply, error) { + out := new(Nat44AddDelStaticMappingReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44AddressDump(ctx context.Context, in *Nat44AddressDump) (RPCService_Nat44AddressDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44AddressDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44AddressDumpClient interface { + Recv() (*Nat44AddressDetails, error) + api.Stream +} + +type serviceClient_Nat44AddressDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44AddressDumpClient) Recv() (*Nat44AddressDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44AddressDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat44DelSession(ctx context.Context, in *Nat44DelSession) (*Nat44DelSessionReply, error) { + out := new(Nat44DelSessionReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44ForwardingEnableDisable(ctx context.Context, in *Nat44ForwardingEnableDisable) (*Nat44ForwardingEnableDisableReply, error) { + out := new(Nat44ForwardingEnableDisableReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44ForwardingIsEnabled(ctx context.Context, in *Nat44ForwardingIsEnabled) (*Nat44ForwardingIsEnabledReply, error) { + out := new(Nat44ForwardingIsEnabledReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44IdentityMappingDump(ctx context.Context, in *Nat44IdentityMappingDump) (RPCService_Nat44IdentityMappingDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44IdentityMappingDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44IdentityMappingDumpClient interface { + Recv() (*Nat44IdentityMappingDetails, error) + api.Stream +} + +type serviceClient_Nat44IdentityMappingDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44IdentityMappingDumpClient) Recv() (*Nat44IdentityMappingDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44IdentityMappingDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat44InterfaceAddDelFeature(ctx context.Context, in *Nat44InterfaceAddDelFeature) (*Nat44InterfaceAddDelFeatureReply, error) { + out := new(Nat44InterfaceAddDelFeatureReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44InterfaceAddDelOutputFeature(ctx context.Context, in *Nat44InterfaceAddDelOutputFeature) (*Nat44InterfaceAddDelOutputFeatureReply, error) { + out := new(Nat44InterfaceAddDelOutputFeatureReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44InterfaceAddrDump(ctx context.Context, in *Nat44InterfaceAddrDump) (RPCService_Nat44InterfaceAddrDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44InterfaceAddrDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44InterfaceAddrDumpClient interface { + Recv() (*Nat44InterfaceAddrDetails, error) + api.Stream +} + +type serviceClient_Nat44InterfaceAddrDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44InterfaceAddrDumpClient) Recv() (*Nat44InterfaceAddrDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44InterfaceAddrDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat44InterfaceDump(ctx context.Context, in *Nat44InterfaceDump) (RPCService_Nat44InterfaceDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44InterfaceDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44InterfaceDumpClient interface { + Recv() (*Nat44InterfaceDetails, error) + api.Stream +} + +type serviceClient_Nat44InterfaceDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44InterfaceDumpClient) Recv() (*Nat44InterfaceDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44InterfaceDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat44InterfaceOutputFeatureDump(ctx context.Context, in *Nat44InterfaceOutputFeatureDump) (RPCService_Nat44InterfaceOutputFeatureDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44InterfaceOutputFeatureDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44InterfaceOutputFeatureDumpClient interface { + Recv() (*Nat44InterfaceOutputFeatureDetails, error) + api.Stream +} + +type serviceClient_Nat44InterfaceOutputFeatureDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44InterfaceOutputFeatureDumpClient) Recv() (*Nat44InterfaceOutputFeatureDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44InterfaceOutputFeatureDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat44LbStaticMappingAddDelLocal(ctx context.Context, in *Nat44LbStaticMappingAddDelLocal) (*Nat44LbStaticMappingAddDelLocalReply, error) { + out := new(Nat44LbStaticMappingAddDelLocalReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat44LbStaticMappingDump(ctx context.Context, in *Nat44LbStaticMappingDump) (RPCService_Nat44LbStaticMappingDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44LbStaticMappingDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44LbStaticMappingDumpClient interface { + Recv() (*Nat44LbStaticMappingDetails, error) + api.Stream +} + +type serviceClient_Nat44LbStaticMappingDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44LbStaticMappingDumpClient) Recv() (*Nat44LbStaticMappingDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44LbStaticMappingDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat44StaticMappingDump(ctx context.Context, in *Nat44StaticMappingDump) (RPCService_Nat44StaticMappingDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44StaticMappingDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44StaticMappingDumpClient interface { + Recv() (*Nat44StaticMappingDetails, error) + api.Stream +} + +type serviceClient_Nat44StaticMappingDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44StaticMappingDumpClient) Recv() (*Nat44StaticMappingDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44StaticMappingDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat44UserDump(ctx context.Context, in *Nat44UserDump) (RPCService_Nat44UserDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44UserDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44UserDumpClient interface { + Recv() (*Nat44UserDetails, error) + api.Stream +} + +type serviceClient_Nat44UserDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44UserDumpClient) Recv() (*Nat44UserDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44UserDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat44UserSessionDump(ctx context.Context, in *Nat44UserSessionDump) (RPCService_Nat44UserSessionDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44UserSessionDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat44UserSessionDumpClient interface { + Recv() (*Nat44UserSessionDetails, error) + api.Stream +} + +type serviceClient_Nat44UserSessionDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44UserSessionDumpClient) Recv() (*Nat44UserSessionDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44UserSessionDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat64AddDelInterface(ctx context.Context, in *Nat64AddDelInterface) (*Nat64AddDelInterfaceReply, error) { + out := new(Nat64AddDelInterfaceReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat64AddDelInterfaceAddr(ctx context.Context, in *Nat64AddDelInterfaceAddr) (*Nat64AddDelInterfaceAddrReply, error) { + out := new(Nat64AddDelInterfaceAddrReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat64AddDelPoolAddrRange(ctx context.Context, in *Nat64AddDelPoolAddrRange) (*Nat64AddDelPoolAddrRangeReply, error) { + out := new(Nat64AddDelPoolAddrRangeReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat64AddDelPrefix(ctx context.Context, in *Nat64AddDelPrefix) (*Nat64AddDelPrefixReply, error) { + out := new(Nat64AddDelPrefixReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat64AddDelStaticBib(ctx context.Context, in *Nat64AddDelStaticBib) (*Nat64AddDelStaticBibReply, error) { + out := new(Nat64AddDelStaticBibReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat64BibDump(ctx context.Context, in *Nat64BibDump) (RPCService_Nat64BibDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat64BibDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat64BibDumpClient interface { + Recv() (*Nat64BibDetails, error) + api.Stream +} + +type serviceClient_Nat64BibDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat64BibDumpClient) Recv() (*Nat64BibDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat64BibDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat64InterfaceDump(ctx context.Context, in *Nat64InterfaceDump) (RPCService_Nat64InterfaceDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat64InterfaceDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat64InterfaceDumpClient interface { + Recv() (*Nat64InterfaceDetails, error) + api.Stream +} + +type serviceClient_Nat64InterfaceDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat64InterfaceDumpClient) Recv() (*Nat64InterfaceDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat64InterfaceDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat64PoolAddrDump(ctx context.Context, in *Nat64PoolAddrDump) (RPCService_Nat64PoolAddrDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat64PoolAddrDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat64PoolAddrDumpClient interface { + Recv() (*Nat64PoolAddrDetails, error) + api.Stream +} + +type serviceClient_Nat64PoolAddrDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat64PoolAddrDumpClient) Recv() (*Nat64PoolAddrDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat64PoolAddrDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat64PrefixDump(ctx context.Context, in *Nat64PrefixDump) (RPCService_Nat64PrefixDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat64PrefixDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat64PrefixDumpClient interface { + Recv() (*Nat64PrefixDetails, error) + api.Stream +} + +type serviceClient_Nat64PrefixDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat64PrefixDumpClient) Recv() (*Nat64PrefixDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat64PrefixDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat64StDump(ctx context.Context, in *Nat64StDump) (RPCService_Nat64StDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat64StDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat64StDumpClient interface { + Recv() (*Nat64StDetails, error) + api.Stream +} + +type serviceClient_Nat64StDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat64StDumpClient) Recv() (*Nat64StDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat64StDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat66AddDelInterface(ctx context.Context, in *Nat66AddDelInterface) (*Nat66AddDelInterfaceReply, error) { + out := new(Nat66AddDelInterfaceReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat66AddDelStaticMapping(ctx context.Context, in *Nat66AddDelStaticMapping) (*Nat66AddDelStaticMappingReply, error) { + out := new(Nat66AddDelStaticMappingReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) Nat66InterfaceDump(ctx context.Context, in *Nat66InterfaceDump) (RPCService_Nat66InterfaceDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat66InterfaceDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat66InterfaceDumpClient interface { + Recv() (*Nat66InterfaceDetails, error) + api.Stream +} + +type serviceClient_Nat66InterfaceDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat66InterfaceDumpClient) Recv() (*Nat66InterfaceDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat66InterfaceDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) Nat66StaticMappingDump(ctx context.Context, in *Nat66StaticMappingDump) (RPCService_Nat66StaticMappingDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat66StaticMappingDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Nat66StaticMappingDumpClient interface { + Recv() (*Nat66StaticMappingDetails, error) + api.Stream +} + +type serviceClient_Nat66StaticMappingDumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat66StaticMappingDumpClient) Recv() (*Nat66StaticMappingDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat66StaticMappingDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) NatControlPing(ctx context.Context, in *NatControlPing) (*NatControlPingReply, error) { + out := new(NatControlPingReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatDetAddDelMap(ctx context.Context, in *NatDetAddDelMap) (*NatDetAddDelMapReply, error) { + out := new(NatDetAddDelMapReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatDetCloseSessionIn(ctx context.Context, in *NatDetCloseSessionIn) (*NatDetCloseSessionInReply, error) { + out := new(NatDetCloseSessionInReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatDetCloseSessionOut(ctx context.Context, in *NatDetCloseSessionOut) (*NatDetCloseSessionOutReply, error) { + out := new(NatDetCloseSessionOutReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatDetForward(ctx context.Context, in *NatDetForward) (*NatDetForwardReply, error) { + out := new(NatDetForwardReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatDetMapDump(ctx context.Context, in *NatDetMapDump) (RPCService_NatDetMapDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_NatDetMapDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_NatDetMapDumpClient interface { + Recv() (*NatDetMapDetails, error) + api.Stream +} + +type serviceClient_NatDetMapDumpClient struct { + api.Stream +} + +func (c *serviceClient_NatDetMapDumpClient) Recv() (*NatDetMapDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *NatDetMapDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) NatDetReverse(ctx context.Context, in *NatDetReverse) (*NatDetReverseReply, error) { + out := new(NatDetReverseReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatDetSessionDump(ctx context.Context, in *NatDetSessionDump) (RPCService_NatDetSessionDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_NatDetSessionDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_NatDetSessionDumpClient interface { + Recv() (*NatDetSessionDetails, error) + api.Stream +} + +type serviceClient_NatDetSessionDumpClient struct { + api.Stream +} + +func (c *serviceClient_NatDetSessionDumpClient) Recv() (*NatDetSessionDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *NatDetSessionDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) NatGetAddrAndPortAllocAlg(ctx context.Context, in *NatGetAddrAndPortAllocAlg) (*NatGetAddrAndPortAllocAlgReply, error) { + out := new(NatGetAddrAndPortAllocAlgReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatGetMssClamping(ctx context.Context, in *NatGetMssClamping) (*NatGetMssClampingReply, error) { + out := new(NatGetMssClampingReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatGetTimeouts(ctx context.Context, in *NatGetTimeouts) (*NatGetTimeoutsReply, error) { + out := new(NatGetTimeoutsReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatHaFlush(ctx context.Context, in *NatHaFlush) (*NatHaFlushReply, error) { + out := new(NatHaFlushReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatHaGetFailover(ctx context.Context, in *NatHaGetFailover) (*NatHaGetFailoverReply, error) { + out := new(NatHaGetFailoverReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatHaGetListener(ctx context.Context, in *NatHaGetListener) (*NatHaGetListenerReply, error) { + out := new(NatHaGetListenerReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatHaResync(ctx context.Context, in *NatHaResync) (*NatHaResyncReply, error) { + out := new(NatHaResyncReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatHaSetFailover(ctx context.Context, in *NatHaSetFailover) (*NatHaSetFailoverReply, error) { + out := new(NatHaSetFailoverReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatHaSetListener(ctx context.Context, in *NatHaSetListener) (*NatHaSetListenerReply, error) { + out := new(NatHaSetListenerReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatIpfixEnableDisable(ctx context.Context, in *NatIpfixEnableDisable) (*NatIpfixEnableDisableReply, error) { + out := new(NatIpfixEnableDisableReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatSetAddrAndPortAllocAlg(ctx context.Context, in *NatSetAddrAndPortAllocAlg) (*NatSetAddrAndPortAllocAlgReply, error) { + out := new(NatSetAddrAndPortAllocAlgReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatSetLogLevel(ctx context.Context, in *NatSetLogLevel) (*NatSetLogLevelReply, error) { + out := new(NatSetLogLevelReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatSetMssClamping(ctx context.Context, in *NatSetMssClamping) (*NatSetMssClampingReply, error) { + out := new(NatSetMssClampingReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatSetTimeouts(ctx context.Context, in *NatSetTimeouts) (*NatSetTimeoutsReply, error) { + out := new(NatSetTimeoutsReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatSetWorkers(ctx context.Context, in *NatSetWorkers) (*NatSetWorkersReply, error) { + out := new(NatSetWorkersReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatShowConfig(ctx context.Context, in *NatShowConfig) (*NatShowConfigReply, error) { + out := new(NatShowConfigReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) NatWorkerDump(ctx context.Context, in *NatWorkerDump) (RPCService_NatWorkerDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_NatWorkerDumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_NatWorkerDumpClient interface { + Recv() (*NatWorkerDetails, error) + api.Stream +} + +type serviceClient_NatWorkerDumpClient struct { + api.Stream +} + +func (c *serviceClient_NatWorkerDumpClient) Recv() (*NatWorkerDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *NatWorkerDetails: + return m, nil + case *vpe.ControlPingReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} |