// Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.6.0-dev // VPP: 22.02-release // source: /usr/share/vpp/api/plugins/det44.api.json // Package det44 contains generated bindings for API file det44.api. // // Contents: // 38 messages // package det44 import ( api "go.fd.io/govpp/api" interface_types "go.fd.io/govpp/binapi/interface_types" ip_types "go.fd.io/govpp/binapi/ip_types" _ "go.fd.io/govpp/binapi/nat_types" codec "go.fd.io/govpp/codec" ) // 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 = "det44" APIVersion = "1.0.0" VersionCrc = 0x6d6e88dd ) // Det44AddDelMap defines message 'det44_add_del_map'. type Det44AddDelMap 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 *Det44AddDelMap) Reset() { *m = Det44AddDelMap{} } func (*Det44AddDelMap) GetMessageName() string { return "det44_add_del_map" } func (*Det44AddDelMap) GetCrcString() string { return "1150a190" } func (*Det44AddDelMap) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44AddDelMap) 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 *Det44AddDelMap) 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 *Det44AddDelMap) 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 } // Det44AddDelMapReply defines message 'det44_add_del_map_reply'. type Det44AddDelMapReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *Det44AddDelMapReply) Reset() { *m = Det44AddDelMapReply{} } func (*Det44AddDelMapReply) GetMessageName() string { return "det44_add_del_map_reply" } func (*Det44AddDelMapReply) GetCrcString() string { return "e8d4e804" } func (*Det44AddDelMapReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44AddDelMapReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Det44AddDelMapReply) 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 *Det44AddDelMapReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // Det44CloseSessionIn defines message 'det44_close_session_in'. type Det44CloseSessionIn 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 *Det44CloseSessionIn) Reset() { *m = Det44CloseSessionIn{} } func (*Det44CloseSessionIn) GetMessageName() string { return "det44_close_session_in" } func (*Det44CloseSessionIn) GetCrcString() string { return "3c68e073" } func (*Det44CloseSessionIn) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44CloseSessionIn) 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 *Det44CloseSessionIn) 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 *Det44CloseSessionIn) 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 } // Det44CloseSessionInReply defines message 'det44_close_session_in_reply'. type Det44CloseSessionInReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *Det44CloseSessionInReply) Reset() { *m = Det44CloseSessionInReply{} } func (*Det44CloseSessionInReply) GetMessageName() string { return "det44_close_session_in_reply" } func (*Det44CloseSessionInReply) GetCrcString() string { return "e8d4e804" } func (*Det44CloseSessionInReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44CloseSessionInReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Det44CloseSessionInReply) 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 *Det44CloseSessionInReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // Det44CloseSessionOut defines message 'det44_close_session_out'. type Det44CloseSessionOut 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 *Det44CloseSessionOut) Reset() { *m = Det44CloseSessionOut{} } func (*Det44CloseSessionOut) GetMessageName() string { return "det44_close_session_out" } func (*Det44CloseSessionOut) GetCrcString() string { return "f6b259d1" } func (*Det44CloseSessionOut) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44CloseSessionOut) 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 *Det44CloseSessionOut) 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 *Det44CloseSessionOut) 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 } // Det44CloseSessionOutReply defines message 'det44_close_session_out_reply'. type Det44CloseSessionOutReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *Det44CloseSessionOutReply) Reset() { *m = Det44CloseSessionOutReply{} } func (*Det44CloseSessionOutReply) GetMessageName() string { return "det44_close_session_out_reply" } func (*Det44CloseSessionOutReply) GetCrcString() string { return "e8d4e804" } func (*Det44CloseSessionOutReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44CloseSessionOutReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Det44CloseSessionOutReply) 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 *Det44CloseSessionOutReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // Det44Forward defines message 'det44_forward'. type Det44Forward struct { InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` } func (m *Det44Forward) Reset() { *m = Det44Forward{} } func (*Det44Forward) GetMessageName() string { return "det44_forward" } func (*Det44Forward) GetCrcString() string { return "7f8a89cd" } func (*Det44Forward) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44Forward) Size() (size int) { if m == nil { return 0 } size += 1 * 4 // m.InAddr return size } func (m *Det44Forward) 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 *Det44Forward) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) copy(m.InAddr[:], buf.DecodeBytes(4)) return nil } // Det44ForwardReply defines message 'det44_forward_reply'. type Det44ForwardReply 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 *Det44ForwardReply) Reset() { *m = Det44ForwardReply{} } func (*Det44ForwardReply) GetMessageName() string { return "det44_forward_reply" } func (*Det44ForwardReply) GetCrcString() string { return "a8ccbdc0" } func (*Det44ForwardReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44ForwardReply) 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 *Det44ForwardReply) 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 *Det44ForwardReply) 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 } // Det44GetTimeouts defines message 'det44_get_timeouts'. type Det44GetTimeouts struct{} func (m *Det44GetTimeouts) Reset() { *m = Det44GetTimeouts{} } func (*Det44GetTimeouts) GetMessageName() string { return "det44_get_timeouts" } func (*Det44GetTimeouts) GetCrcString() string { return "51077d14" } func (*Det44GetTimeouts) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44GetTimeouts) Size() (size int) { if m == nil { return 0 } return size } func (m *Det44GetTimeouts) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *Det44GetTimeouts) Unmarshal(b []byte) error { return nil } // Det44GetTimeoutsReply defines message 'det44_get_timeouts_reply'. // InProgress: the message form may change in the future versions type Det44GetTimeoutsReply 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 *Det44GetTimeoutsReply) Reset() { *m = Det44GetTimeoutsReply{} } func (*Det44GetTimeoutsReply) GetMessageName() string { return "det44_get_timeouts_reply" } func (*Det44GetTimeoutsReply) GetCrcString() string { return "3c4df4e1" } func (*Det44GetTimeoutsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44GetTimeoutsReply) 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 *Det44GetTimeoutsReply) 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 *Det44GetTimeoutsReply) 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 } // Det44InterfaceAddDelFeature defines message 'det44_interface_add_del_feature'. // InProgress: the message form may change in the future versions type Det44InterfaceAddDelFeature struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` IsInside bool `binapi:"bool,name=is_inside" json:"is_inside,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` } func (m *Det44InterfaceAddDelFeature) Reset() { *m = Det44InterfaceAddDelFeature{} } func (*Det44InterfaceAddDelFeature) GetMessageName() string { return "det44_interface_add_del_feature" } func (*Det44InterfaceAddDelFeature) GetCrcString() string { return "dc17a836" } func (*Det44InterfaceAddDelFeature) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44InterfaceAddDelFeature) Size() (size int) { if m == nil { return 0 } size += 1 // m.IsAdd size += 1 // m.IsInside size += 4 // m.SwIfIndex return size } func (m *Det44InterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeBool(m.IsAdd) buf.EncodeBool(m.IsInside) buf.EncodeUint32(uint32(m.SwIfIndex)) return buf.Bytes(), nil } func (m *Det44InterfaceAddDelFeature) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.IsAdd = buf.DecodeBool() m.IsInside = buf.DecodeBool() m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) return nil } // Det44InterfaceAddDelFeatureReply defines message 'det44_interface_add_del_feature_reply'. // InProgress: the message form may change in the future versions type Det44InterfaceAddDelFeatureReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *Det44InterfaceAddDelFeatureReply) Reset() { *m = Det44InterfaceAddDelFeatureReply{} } func (*Det44InterfaceAddDelFeatureReply) GetMessageName() string { return "det44_interface_add_del_feature_reply" } func (*Det44InterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" } func (*Det44InterfaceAddDelFeatureReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44InterfaceAddDelFeatureReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Det44InterfaceAddDelFeatureReply) 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 *Det44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // Det44InterfaceDetails defines message 'det44_interface_details'. // InProgress: the message form may change in the future versions type Det44InterfaceDetails struct { IsInside bool `binapi:"bool,name=is_inside" json:"is_inside,omitempty"` IsOutside bool `binapi:"bool,name=is_outside" json:"is_outside,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` } func (m *Det44InterfaceDetails) Reset() { *m = Det44InterfaceDetails{} } func (*Det44InterfaceDetails) GetMessageName() string { return "det44_interface_details" } func (*Det44InterfaceDetails) GetCrcString() string { return "e60cc5be" } func (*Det44InterfaceDetails) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44InterfaceDetails) Size() (size int) { if m == nil { return 0 } size += 1 // m.IsInside size += 1 // m.IsOutside size += 4 // m.SwIfIndex return size } func (m *Det44InterfaceDetails) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeBool(m.IsInside) buf.EncodeBool(m.IsOutside) buf.EncodeUint32(uint32(m.SwIfIndex)) return buf.Bytes(), nil } func (m *Det44InterfaceDetails) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.IsInside = buf.DecodeBool() m.IsOutside = buf.DecodeBool() m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) return nil } // Det44InterfaceDump defines message 'det44_interface_dump'. // InProgress: the message form may change in the future versions type Det44InterfaceDump struct{} func (m *Det44InterfaceDump) Reset() { *m = Det44InterfaceDump{} } func (*Det44InterfaceDump) GetMessageName() string { return "det44_interface_dump" } func (*Det44InterfaceDump) GetCrcString() string { return "51077d14" } func (*Det44InterfaceDump) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44InterfaceDump) Size() (size int) { if m == nil { return 0 } return size } func (m *Det44InterfaceDump) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *Det44InterfaceDump) Unmarshal(b []byte) error { return nil } // Det44MapDetails defines message 'det44_map_details'. type Det44MapDetails struct { 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"` 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 *Det44MapDetails) Reset() { *m = Det44MapDetails{} } func (*Det44MapDetails) GetMessageName() string { return "det44_map_details" } func (*Det44MapDetails) GetCrcString() string { return "ad91dc83" } func (*Det44MapDetails) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44MapDetails) 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 *Det44MapDetails) 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 *Det44MapDetails) 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 } // Det44MapDump defines message 'det44_map_dump'. type Det44MapDump struct{} func (m *Det44MapDump) Reset() { *m = Det44MapDump{} } func (*Det44MapDump) GetMessageName() string { return "det44_map_dump" } func (*Det44MapDump) GetCrcString() string { return "51077d14" } func (*Det44MapDump) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44MapDump) Size() (size int) { if m == nil { return 0 } return size } func (m *Det44MapDump) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *Det44MapDump) Unmarshal(b []byte) error { return nil } // Det44PluginEnableDisable defines message 'det44_plugin_enable_disable'. // InProgress: the message form may change in the future versions type Det44PluginEnableDisable struct { InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"` OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"` Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` } func (m *Det44PluginEnableDisable) Reset() { *m = Det44PluginEnableDisable{} } func (*Det44PluginEnableDisable) GetMessageName() string { return "det44_plugin_enable_disable" } func (*Det44PluginEnableDisable) GetCrcString() string { return "617b6bf8" } func (*Det44PluginEnableDisable) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44PluginEnableDisable) Size() (size int) { if m == nil { return 0 } size += 4 // m.InsideVrf size += 4 // m.OutsideVrf size += 1 // m.Enable return size } func (m *Det44PluginEnableDisable) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.InsideVrf) buf.EncodeUint32(m.OutsideVrf) buf.EncodeBool(m.Enable) return buf.Bytes(), nil } func (m *Det44PluginEnableDisable) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.InsideVrf = buf.DecodeUint32() m.OutsideVrf = buf.DecodeUint32() m.Enable = buf.DecodeBool() return nil } // Det44PluginEnableDisableReply defines message 'det44_plugin_enable_disable_reply'. // InProgress: the message form may change in the future versions type Det44PluginEnableDisableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *Det44PluginEnableDisableReply) Reset() { *m = Det44PluginEnableDisableReply{} } func (*Det44PluginEnableDisableReply) GetMessageName() string { return "det44_plugin_enable_disable_reply" } func (*Det44PluginEnableDisableReply) GetCrcString() string { return "e8d4e804" } func (*Det44PluginEnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44PluginEnableDisableReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Det44PluginEnableDisableReply) 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 *Det44PluginEnableDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // Det44Reverse defines message 'det44_reverse'. type Det44Reverse struct { OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"` OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"` } func (m *Det44Reverse) Reset() { *m = Det44Reverse{} } func (*Det44Reverse) GetMessageName() string { return "det44_reverse" } func (*Det44Reverse) GetCrcString() string { return "a7573fe1" } func (*Det44Reverse) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44Reverse) Size() (size int) { if m == nil { return 0 } size += 2 // m.OutPort size += 1 * 4 // m.OutAddr return size } func (m *Det44Reverse) 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 *Det44Reverse) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.OutPort = buf.DecodeUint16() copy(m.OutAddr[:], buf.DecodeBytes(4)) return nil } // Det44ReverseReply defines message 'det44_reverse_reply'. type Det44ReverseReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` } func (m *Det44ReverseReply) Reset() { *m = Det44ReverseReply{} } func (*Det44ReverseReply) GetMessageName() string { return "det44_reverse_reply" } func (*Det44ReverseReply) GetCrcString() string { return "34066d48" } func (*Det44ReverseReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44ReverseReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval size += 1 * 4 // m.InAddr return size } func (m *Det44ReverseReply) 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 *Det44ReverseReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() copy(m.InAddr[:], buf.DecodeBytes(4)) return nil } // Det44SessionDetails defines message 'det44_session_details'. type Det44SessionDetails struct { 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"` 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 *Det44SessionDetails) Reset() { *m = Det44SessionDetails{} } func (*Det44SessionDetails) GetMessageName() string { return "det44_session_details" } func (*Det44SessionDetails) GetCrcString() string { return "27f3c171" } func (*Det44SessionDetails) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44SessionDetails) 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 *Det44SessionDetails) 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 *Det44SessionDetails) 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 } // Det44SessionDump defines message 'det44_session_dump'. type Det44SessionDump struct { UserAddr ip_types.IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"` } func (m *Det44SessionDump) Reset() { *m = Det44SessionDump{} } func (*Det44SessionDump) GetMessageName() string { return "det44_session_dump" } func (*Det44SessionDump) GetCrcString() string { return "e45a3af7" } func (*Det44SessionDump) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44SessionDump) Size() (size int) { if m == nil { return 0 } size += 1 * 4 // m.UserAddr return size } func (m *Det44SessionDump) 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 *Det44SessionDump) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) copy(m.UserAddr[:], buf.DecodeBytes(4)) return nil } // Det44SetTimeouts defines message 'det44_set_timeouts'. // InProgress: the message form may change in the future versions type Det44SetTimeouts 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 *Det44SetTimeouts) Reset() { *m = Det44SetTimeouts{} } func (*Det44SetTimeouts) GetMessageName() string { return "det44_set_timeouts" } func (*Det44SetTimeouts) GetCrcString() string { return "d4746b16" } func (*Det44SetTimeouts) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Det44SetTimeouts) 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 *Det44SetTimeouts) 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 *Det44SetTimeouts) 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 } // Det44SetTimeoutsReply defines message 'det44_set_timeouts_reply'. // InProgress: the message form may change in the future versions type Det44SetTimeoutsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *Det44SetTimeoutsReply) Reset() { *m = Det44SetTimeoutsReply{} } func (*Det44SetTimeoutsReply) GetMessageName() string { return "det44_set_timeouts_reply" } func (*Det44SetTimeoutsReply) GetCrcString() string { return "e8d4e804" } func (*Det44SetTimeoutsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Det44SetTimeoutsReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Det44SetTimeoutsReply) 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 *Det44SetTimeoutsReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // NatDetAddDelMap defines message 'nat_det_add_del_map'. // Deprecated: the message will be removed in the future versions 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 "1150a190" } 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'. // Deprecated: the message will be removed in the future versions 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'. // Deprecated: the message will be removed in the future versions 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 "3c68e073" } 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'. // Deprecated: the message will be removed in the future versions 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'. // Deprecated: the message will be removed in the future versions 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 "f6b259d1" } 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'. // Deprecated: the message will be removed in the future versions 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'. // Deprecated: the message will be removed in the future versions 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'. // Deprecated: the message will be removed in the future versions 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 } 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'. // Deprecated: the message will be removed in the future versions type NatDetMapDetails struct { 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"` 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 "ad91dc83" } 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'. // Deprecated: the message will be removed in the future versions 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'. // Deprecated: the message will be removed in the future versions type NatDetReverse struct { OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"` OutAddr ip_types.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'. // Deprecated: the message will be removed in the future versions type NatDetReverseReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` InAddr ip_types.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'. // Deprecated: the message will be removed in the future versions type NatDetSessionDetails struct { 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"` 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'. // Deprecated: the message will be removed in the future versions type NatDetSessionDump struct { UserAddr ip_types.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 } func init() { file_det44_binapi_init() } func file_det44_binapi_init() { api.RegisterMessage((*Det44AddDelMap)(nil), "det44_add_del_map_1150a190") api.RegisterMessage((*Det44AddDelMapReply)(nil), "det44_add_del_map_reply_e8d4e804") api.RegisterMessage((*Det44CloseSessionIn)(nil), "det44_close_session_in_3c68e073") api.RegisterMessage((*Det44CloseSessionInReply)(nil), "det44_close_session_in_reply_e8d4e804") api.RegisterMessage((*Det44CloseSessionOut)(nil), "det44_close_session_out_f6b259d1") api.RegisterMessage((*Det44CloseSessionOutReply)(nil), "det44_close_session_out_reply_e8d4e804") api.RegisterMessage((*Det44Forward)(nil), "det44_forward_7f8a89cd") api.RegisterMessage((*Det44ForwardReply)(nil), "det44_forward_reply_a8ccbdc0") api.RegisterMessage((*Det44GetTimeouts)(nil), "det44_get_timeouts_51077d14") api.RegisterMessage((*Det44GetTimeoutsReply)(nil), "det44_get_timeouts_reply_3c4df4e1") api.RegisterMessage((*Det44InterfaceAddDelFeature)(nil), "det44_interface_add_del_feature_dc17a836") api.RegisterMessage((*Det44InterfaceAddDelFeatureReply)(nil), "det44_interface_add_del_feature_reply_e8d4e804") api.RegisterMessage((*Det44InterfaceDetails)(nil), "det44_interface_details_e60cc5be") api.RegisterMessage((*Det44InterfaceDump)(nil), "det44_interface_dump_51077d14") api.RegisterMessage((*Det44MapDetails)(nil), "det44_map_details_ad91dc83") api.RegisterMessage((*Det44MapDump)(nil), "det44_map_dump_51077d14") api.RegisterMessage((*Det44PluginEnableDisable)(nil), "det44_plugin_enable_disable_617b6bf8") api.RegisterMessage((*Det44PluginEnableDisableReply)(nil), "det44_plugin_enable_disable_reply_e8d4e804") api.RegisterMessage((*Det44Reverse)(nil), "det44_reverse_a7573fe1") api.RegisterMessage((*Det44ReverseReply)(nil), "det44_reverse_reply_34066d48") api.RegisterMessage((*Det44SessionDetails)(nil), "det44_session_details_27f3c171") api.RegisterMessage((*Det44SessionDump)(nil), "det44_session_dump_e45a3af7") api.RegisterMessage((*Det44SetTimeouts)(nil), "det44_set_timeouts_d4746b16") api.RegisterMessage((*Det44SetTimeoutsReply)(nil), "det44_set_timeouts_reply_e8d4e804") api.RegisterMessage((*NatDetAddDelMap)(nil), "nat_det_add_del_map_1150a190") api.RegisterMessage((*NatDetAddDelMapReply)(nil), "nat_det_add_del_map_reply_e8d4e804") api.RegisterMessage((*NatDetCloseSessionIn)(nil), "nat_det_close_session_in_3c68e073") api.RegisterMessage((*NatDetCloseSessionInReply)(nil), "nat_det_close_session_in_reply_e8d4e804") api.RegisterMessage((*NatDetCloseSessionOut)(nil), "nat_det_close_session_out_f6b259d1") 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_ad91dc83") 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") } // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ (*Det44AddDelMap)(nil), (*Det44AddDelMapReply)(nil), (*Det44CloseSessionIn)(nil), (*Det44CloseSessionInReply)(nil), (*Det44CloseSessionOut)(nil), (*Det44CloseSessionOutReply)(nil), (*Det44Forward)(nil), (*Det44ForwardReply)(nil), (*Det44GetTimeouts)(nil), (*Det44GetTimeoutsReply)(nil), (*Det44InterfaceAddDelFeature)(nil), (*Det44InterfaceAddDelFeatureReply)(nil), (*Det44InterfaceDetails)(nil), (*Det44InterfaceDump)(nil), (*Det44MapDetails)(nil), (*Det44MapDump)(nil), (*Det44PluginEnableDisable)(nil), (*Det44PluginEnableDisableReply)(nil), (*Det44Reverse)(nil), (*Det44ReverseReply)(nil), (*Det44SessionDetails)(nil), (*Det44SessionDump)(nil), (*Det44SetTimeouts)(nil), (*Det44SetTimeoutsReply)(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), } }