Documentation
¶
Index ¶
- Constants
- func CleanCertificateTable()
- func CleanConntrackTable()
- func CleanSessionTable()
- func FindCertificate(finder string) (x509.Certificate, bool)
- func InsertCertificate(finder string, cert x509.Certificate)
- func InsertConntrackEntry(finder string, entry ConntrackEntry)
- func InsertSessionEntry(finder string, entry SessionEntry)
- func Int2Ip(value uint32) net.IP
- func LogMessage(level int, source string, format string, args ...interface{})
- func NextSessionID() uint64
- func RemoveCertificate(finder string)
- func RemoveConntrackEntry(finder string)
- func RemoveSessionEntry(finder string)
- func Startup()
- func Tuple2String(tuple Tuple) string
- type CertificateHolder
- type ConntrackEntry
- type LogWriter
- type NetloggerMessage
- type SessionEntry
- type TrafficMessage
- type Tuple
Constants ¶
const LogAlert = 1
LogAlert = stdlog.h/LOG_ALERT
const LogCrit = 2
LogCrit = stdlog.h/LOG_CRIT
const LogDebug = 7
LogDebug = stdlog.h/LOG_DEBUG
const LogEmerg = 0
LogEmerg = stdlog.h/LOG_EMERG
const LogErr = 3
LogErr = stdlog.h/LOG_ERR
const LogInfo = 6
LogInfo = stdlog.h/LOG_INFO
const LogNotice = 5
LogNotice = stdlog.h/LOG_NOTICE
const LogWarning = 4
LogWarning = stdlog.h/LOG_WARNING
Variables ¶
This section is empty.
Functions ¶
func CleanCertificateTable ¶
func CleanCertificateTable()
CleanCertificateTable cleans the certificate table by removing stale entries
func CleanConntrackTable ¶
func CleanConntrackTable()
CleanConntrackTable cleans the conntrack table by removing stale entries
func CleanSessionTable ¶
func CleanSessionTable()
CleanSessionTable cleans the session table by removing stale entries
func FindCertificate ¶
func FindCertificate(finder string) (x509.Certificate, bool)
FindCertificate fetches the cached certificate for the argumented address.
func InsertCertificate ¶
func InsertCertificate(finder string, cert x509.Certificate)
InsertCertificate adds a certificate to the cache
func InsertConntrackEntry ¶
func InsertConntrackEntry(finder string, entry ConntrackEntry)
InsertConntrackEntry adds an entry to the conntrack table
func InsertSessionEntry ¶
func InsertSessionEntry(finder string, entry SessionEntry)
InsertSessionEntry adds an entry to the session table
func LogMessage ¶
LogMessage is called to write messages to the system log
func NextSessionID ¶
func NextSessionID() uint64
NextSessionID returns the next sequential session ID value
func RemoveCertificate ¶
func RemoveCertificate(finder string)
RemoveCertificate removes a certificate from the cache
func RemoveConntrackEntry ¶
func RemoveConntrackEntry(finder string)
RemoveConntrackEntry removes an entry from the conntrack table
func RemoveSessionEntry ¶
func RemoveSessionEntry(finder string)
RemoveSessionEntry removes an entry from the session table
func Tuple2String ¶
Tuple2String generates a string from a Tuple for use as a map index
Types ¶
type CertificateHolder ¶
type CertificateHolder struct {
CreationTime time.Time
Certificate x509.Certificate
}
CertificateHolder is used to cache SSL/TLS certificates
type ConntrackEntry ¶
type ConntrackEntry struct {
ConntrackID uint
SessionID uint64
SessionCreation time.Time
SessionActivity time.Time
SessionTuple Tuple
UpdateCount uint64
C2Sbytes uint64
S2Cbytes uint64
TotalBytes uint64
C2Srate float32
S2Crate float32
TotalRate float32
PurgeFlag bool
}
ConntrackEntry stores the details of a conntrack entry
func FindConntrackEntry ¶
func FindConntrackEntry(finder string) (ConntrackEntry, bool)
FindConntrackEntry finds an entry in the conntrack table
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
LogWriter is used to send an output stream to the LogMessage facility
func NewLogWriter ¶
NewLogWriter creates an io Writer to steam output to the LogMessage facility
type NetloggerMessage ¶
type NetloggerMessage struct {
Protocol uint8
IcmpType uint16
SrcIntf uint8
DstIntf uint8
SrcAddr uint32
DstAddr uint32
SrcPort uint16
DstPort uint16
Mark uint32
Prefix string
}
NetloggerMessage is used to pass the details of NFLOG events to interested plugins
type SessionEntry ¶
type SessionEntry struct {
SessionID uint64
SessionCreation time.Time
SessionActivity time.Time
SessionTuple Tuple
UpdateCount uint64
ServerCertificate x509.Certificate
ClientLocation string
ServerLocation string
}
SessionEntry stores details related to a session
func FindSessionEntry ¶
func FindSessionEntry(finder string) (SessionEntry, bool)
FindSessionEntry searches for an entry in the session table