Documentation
¶
Overview ¶
Copyright (c) 2020 RethinkDNS and its authors.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Code relicensed from opensnitch with permissions from evilsocket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcNetCache ¶
type ProcNetCache struct {
// contains filtered or unexported fields
}
func NewProcNetCache ¶
func NewProcNetCache() ProcNetCache
type ProcNetEntry ¶
type ProcNetEntry struct { Protocol string SrcIP netip.Addr SrcPort int DstIP netip.Addr DstPort int UserID int INode int // contains filtered or unexported fields }
ProcNetEntry represents a single line as fetched from /proc/net/*
func FindProcNetEntry ¶
func FindProcNetEntry(protocol string, src, dst netip.AddrPort) *ProcNetEntry
FindProcNetEntry searches for netstat entries in v4 and v6 tables.
func NewProcNetEntry ¶
func NewProcNetEntry(protocol string, srcIP netip.Addr, srcPort int, dstIP netip.Addr, dstPort int, userID int, iNode int) ProcNetEntry
NewProcNetEntry creates an Entry
func ParseProcNet ¶
func ParseProcNet(protocol string) ([]ProcNetEntry, error)
ParseProcNet scans /proc/net/* returns a list of entries, one entry per line scanned
func (*ProcNetEntry) Same ¶
func (p *ProcNetEntry) Same(q *ProcNetEntry) bool
func (*ProcNetEntry) String ¶
func (p *ProcNetEntry) String() string
Click to show internal directories.
Click to hide internal directories.