-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 ip_types.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 ip_types.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 ip_types.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 ip_types.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 ip_types.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 ip_types.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 interface_types.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 = interface_types.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 interface_types.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 = interface_types.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 ip_types.IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"`
- EndAddr ip_types.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 ip_types.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 ip_types.IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"`
- OAddr ip_types.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 ip_types.IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"`
- OAddr ip_types.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 interface_types.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 = interface_types.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 ip_types.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 ip_types.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 ip_types.IP6Address `binapi:"ip6_address,name=il_addr" json:"il_addr,omitempty"`
- OlAddr ip_types.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 ip_types.IP6Address `binapi:"ip6_address,name=ir_addr" json:"ir_addr,omitempty"`
- OrAddr ip_types.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 interface_types.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 = interface_types.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 ip_types.IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"`
- ExternalIPAddress ip_types.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 interface_types.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 = interface_types.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 ip_types.IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"`
- ExternalIPAddress ip_types.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 ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
- InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
- OutAddr ip_types.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 ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
- InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"`
- ExtAddr ip_types.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 ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
- OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
- ExtAddr ip_types.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 ip_types.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 ip_types.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