Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conntracker ¶
type Conntracker interface { GetTranslationForConn(ip string, port uint16) *IPTranslation ClearShortLived() GetStats() map[string]interface{} Close() }
Conntracker is a wrapper around go-conntracker that keeps a record of all connections in user space
func NewConntracker ¶
func NewConntracker(procRoot string, stbSize int) (Conntracker, error)
NewConntracker creates a new conntracker with a short term buffer capped at the given size
func NewNoOpConntracker ¶
func NewNoOpConntracker() Conntracker
NewNoOpConntracker creates a conntracker which always returns empty information
type IPTranslation ¶
type IPTranslation struct { ReplSrcIP string `json:"repl_src_ip"` ReplDstIP string `json:"repl_dst_ip"` ReplSrcPort uint16 `json:"repl_src_port"` ReplDstPort uint16 `json:"repl_dst_port"` }
IPTranslation can be associated with a connection to show show the connection is NAT'd
func (IPTranslation) MarshalEasyJSON ¶
func (v IPTranslation) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (IPTranslation) MarshalJSON ¶
func (v IPTranslation) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*IPTranslation) UnmarshalEasyJSON ¶
func (v *IPTranslation) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*IPTranslation) UnmarshalJSON ¶
func (v *IPTranslation) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.