Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CounterError ¶
func CounterError(t CounterType, err error) error
CounterError is a convinence function which returns error as well as increments the counter.
func GetErrorCounters ¶
GetErrorCounters returns the error counters and resets the counters to zero
func IncrementCounter ¶
func IncrementCounter(err CounterType)
IncrementCounter increments counters for a given PU
Types ¶
type CounterType ¶
type CounterType int
CounterType custom counter error type.
const ( ErrUnknownError CounterType = iota ErrNonPUTraffic ErrNoConnFound ErrRejectPacket ErrMarkNotFound ErrPortNotFound ErrContextIDNotFound ErrInvalidProtocol ErrConnectionsProcessed ErrEncrConnectionsProcessed ErrUDPDropFin ErrUDPSynDroppedInvalidToken ErrUDPSynAckInvalidToken ErrUDPAckInvalidToken ErrUDPConnectionsProcessed ErrUDPContextIDNotFound ErrUDPDropQueueFull ErrUDPDropInNfQueue ErrAppServicePreProcessorFailed ErrAppServicePostProcessorFailed ErrNetServicePreProcessorFailed ErrNetServicePostProcessorFailed ErrSynTokenFailed ErrSynDroppedInvalidToken ErrSynDroppedTCPOption ErrSynDroppedInvalidFormat ErrSynRejectPacket ErrSynUnexpectedPacket ErrInvalidNetSynState ErrNetSynNotSeen ErrSynToExtNetAccept ErrSynFromExtNetAccept ErrSynToExtNetReject ErrSynFromExtNetReject ErrSynAckTokenFailed ErrOutOfOrderSynAck ErrInvalidSynAck ErrSynAckInvalidToken ErrSynAckMissingToken ErrSynAckNoTCPAuthOption ErrSynAckInvalidFormat ErrSynAckEncryptionMismatch ErrSynAckRejected ErrSynAckToExtNetAccept ErrSynAckFromExtNetAccept ErrSynAckFromExtNetReject ErrAckTokenFailed ErrAckRejected ErrAckTCPNoTCPAuthOption //50 ErrAckInvalidFormat ErrAckInvalidToken ErrAckInUnknownState ErrAckFromExtNetAccept ErrAckFromExtNetReject ErrUDPAppPreProcessingFailed ErrUDPAppPostProcessingFailed ErrUDPNetPreProcessingFailed ErrUDPNetPostProcessingFailed ErrUDPSynInvalidToken ErrUDPSynMissingClaims ErrUDPSynDroppedPolicy ErrUDPSynAckNoConnection ErrUDPSynAckPolicy ErrDroppedTCPPackets ErrDroppedUDPPackets ErrDroppedICMPPackets ErrDroppedDNSPackets ErrDroppedDHCPPackets ErrDroppedNTPPackets ErrTCPConnectionsExpired ErrUDPConnectionsExpired ErrSynTokenEncodeFailed ErrSynTokenHashFailed ErrSynTokenSignFailed ErrSynInvalidSecret ErrSynInvalidTokenLength ErrSynMissingSignature ErrSynInvalidSignature ErrSynCompressedTagMismatch ErrSynDatapathVersionMismatch ErrSynTokenDecodeFailed ErrSynTokenExpired ErrSynPublicKeyFailed ErrSynAckTokenEncodeFailed ErrSynAckTokenHashFailed ErrSynAckTokenSignFailed ErrSynAckInvalidSecret ErrSynAckInvalidTokenLength ErrSynAckMissingSignature ErrSynAckInvalidSignature ErrSynAckCompressedTagMismatch ErrSynAckDatapathVersionMismatch ErrSynAckTokenDecodeFailed ErrSynAckTokenExpired ErrSynAckPublicKeyFailed ErrAckTokenEncodeFailed ErrAckTokenHashFailed ErrAckTokenSignFailed ErrAckInvalidSecret ErrAckInvalidTokenLength ErrAckMissingSignature ErrAckCompressedTagMismatch ErrAckDatapathVersionMismatch ErrAckTokenDecodeFailed ErrAckTokenExpired ErrAckSignatureMismatch ErrUDPSynTokenFailed ErrUDPSynTokenEncodeFailed ErrUDPSynTokenHashFailed ErrUDPSynTokenSignFailed ErrUDPSynInvalidSecret ErrUDPSynInvalidTokenLength ErrUDPSynMissingSignature ErrUDPSynInvalidSignature ErrUDPSynCompressedTagMismatch ErrUDPSynDatapathVersionMismatch ErrUDPSynTokenDecodeFailed ErrUDPSynTokenExpired ErrUDPSynPublicKeyFailed ErrUDPSynAckTokenFailed ErrUDPSynAckTokenEncodeFailed ErrUDPSynAckTokenHashFailed ErrUDPSynAckTokenSignFailed ErrUDPSynAckInvalidSecret ErrUDPSynAckInvalidTokenLength ErrUDPSynAckMissingSignature ErrUDPSynAckInvalidSignature ErrUDPSynAckCompressedTagMismatch ErrUDPSynAckDatapathVersionMismatch ErrUDPSynAckTokenDecodeFailed ErrUDPSynAckTokenExpired ErrUDPSynAckPublicKeyFailed ErrUDPAckTokenFailed ErrUDPAckTokenEncodeFailed ErrUDPAckTokenHashFailed ErrUDPAckInvalidSecret ErrUDPAckInvalidTokenLength ErrUDPAckMissingSignature ErrUDPAckCompressedTagMismatch ErrUDPAckDatapathVersionMismatch ErrUDPAckTokenDecodeFailed ErrUDPAckTokenExpired ErrUDPAckSignatureMismatch ErrAppSynAuthOptionSet ErrAckToFinAck ErrIgnoreFin ErrInvalidNetState ErrInvalidNetAckState ErrAppSynAckAuthOptionSet ErrDuplicateAckDrop ErrNfLogError )
WARNING: Append any new counters at the end of the list. DO NOT CHANGE EXISTING ORDER. Also ensure that the list doesn't exceed current totalCounters, If it does, increase the totalCounters by multiples of 10.
type Counters ¶
Counters holds the counters value.
func NewCounters ¶
func NewCounters() *Counters
NewCounters initializes new counters handler. Thread safe.
func (*Counters) CounterError ¶
func (c *Counters) CounterError(t CounterType, err error) error
CounterError is a convinence function which returns error as well as increments the counter.
func (*Counters) GetErrorCounters ¶
GetErrorCounters returns the error counters and resets the counters to zero
func (*Counters) IncrementCounter ¶
func (c *Counters) IncrementCounter(t CounterType)
IncrementCounter increments counters for a given PU