Documentation ¶
Index ¶
Constants ¶
View Source
const ( InitializeStatus int32 = iota InitializedStatus StartedStatus StoppedStatus )
View Source
const ( CoroutineGroupCollector1 = "DefragmentLIB-collector-scheduling" CoroutineGroupCollectorMgr1 = "DefragmentLIB-collectorMgr-checkFullPktQueueCapacityPeriodically" )
View Source
const ( EthDstLen = 6 EthSrcLen = 6 EthTypeLen = 2 EthHdrLen = EthDstLen + EthSrcLen + EthTypeLen )
View Source
const ( IPV4DifferentiatedSvcFieldLen = 1 IPV4TotalLengthFieldLen = 2 IPV4IdentificationLen = 2 IPV4FlagsFlagsLen = 2 IPV4TimeToLiveLen = 1 IPV4ProtocolLen = 1 IPV4HeaderChecksumLen = 2 IPV4SourceAddressLen = 4 IPV4DestinationAddressLen = 4 IPV4HdrLen = IPVersionLen + IPV4DifferentiatedSvcFieldLen + IPV4TotalLengthFieldLen + IPV4IdentificationLen + IPV4FlagsFlagsLen + IPV4TimeToLiveLen + IPV4ProtocolLen + IPV4HeaderChecksumLen + IPV4SourceAddressLen + IPV4DestinationAddressLen )
View Source
const ( IPV6TrafficClassFlowLabelLen = 3 IPV6PayloadLen = 2 IPV6NextHeaderLen = 1 IPV6HopLimitLen = 1 IPV6SrcAddrLen = 16 IPV6DstAddrLen = 16 IPV6HdrLen = IPVersionLen + IPV6TrafficClassFlowLabelLen + IPV6PayloadLen + IPV6NextHeaderLen + IPV6HopLimitLen + IPV6SrcAddrLen + IPV6DstAddrLen IPV6FragmentNextHeaderLen = 1 IPV6FragmentReservedOctetLen = 1 IPV6FlagsFlagsLen = 2 IPV6FragHdrIdentOffsetLen = 4 IPV6FragmentHdrLen = IPV6FragmentNextHeaderLen + IPV6FragmentReservedOctetLen + IPV6FlagsFlagsLen + IPV6FragHdrIdentOffsetLen IPV6FragLayerIdx = 2 FragOffsetMulNum = 8 )
View Source
const ( EthIPV4HdrLen = EthHdrLen + IPV4HdrLen EthIPV6HdrLen = EthHdrLen + IPV6HdrLen )
View Source
const (
IPVersionLen = 1
)
View Source
const (
ResultPacketProcessStepErr uint8 = iota
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectorOption ¶
type DetectionInfo ¶
type DetectionInfo struct {
SrcMAC, DstMAC []byte
EthType layers.EthernetType
EthPayload []byte
SrcIP, DstIP net.IP
TrafficClass uint8
FlowLabel uint32
TOS uint8
IPProtocol layers.IPProtocol
FragType FragType
FragOffset uint16
MoreFrags bool
Identification uint32
IPPayload []byte
InterfaceId InterfaceId
FragGroupId FragGroupID
}
func (*DetectionInfo) Reset ¶ added in v1.0.3
func (t *DetectionInfo) Reset()
type ErrResultType ¶
type ErrResultType uint16
const ( NonErrResultType ErrResultType = iota ErrResultTypeNewPacket ErrResultSerializeLayers ErrResultFullPacketBufAppendBytes ErrResultIPV4HdrLenInsufficient ErrResultIPV6NetworkLayerNil ErrResultIPV6HdrLenInsufficient ErrResultIPV6FragHdrLenInsufficient ErrResultUngroupedFrag )
type FragGroupID ¶ added in v1.0.1
type FragGroupID string
type FullPacket ¶
type FullPacket struct { InterfaceId InterfaceId FragGroupID FragGroupID Pkt gopacket.Packet FragElemsNum int }
func (*FullPacket) GetFragGroupID ¶
func (t *FullPacket) GetFragGroupID() FragGroupID
func (*FullPacket) GetInterfaceId ¶ added in v1.0.2
func (t *FullPacket) GetInterfaceId() InterfaceId
func (*FullPacket) GetPacket ¶
func (t *FullPacket) GetPacket() gopacket.Packet
type IPV6WorkerOption ¶
type InterfaceId ¶ added in v1.0.2
type InterfaceId uint16
type LayerHeaders ¶
type OnDetectCompleted ¶ added in v1.0.1
type OnDetectCompleted func(fragType FragType, fragGroupID FragGroupID)
type Option ¶
type Option struct { StatsOption StatsOption PickFragmentTypes []FragType CollectorOption CollectorOption }
type ReplyParse ¶
type StatsOption ¶
type StatsOption struct {
Enable bool
}
Click to show internal directories.
Click to hide internal directories.