{"modulePath":"github.com/celzero/firestack","version":"v0.0.0-20261126203528-ea10d50bc2a7","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package netstat\n\nCopyright (c) 2020 RethinkDNS and its authors.\n\nThis 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/](http://mozilla.org/MPL/2.0/).\n\nCode relicensed from opensnitch with permissions from evilsocket.\n\n## Types\n\n```go\ntype ProcNetCache struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewProcNetCache() ProcNetCache\n```\n\n```go\ntype ProcNetEntry struct {\n\tProtocol string\n\tSrcIP    netip.Addr\n\tSrcPort  int\n\tDstIP    netip.Addr\n\tDstPort  int\n\tUserID   int\n\tINode    int\n\t// contains filtered or unexported fields\n}\n```\nProcNetEntry represents a single line as fetched from /proc/net/\\*\n\n```go\nfunc FindProcNetEntry(protocol string, src, dst netip.AddrPort) *ProcNetEntry\n```\nFindProcNetEntry searches for netstat entries in v4 and v6 tables.\n\n```go\nfunc NewProcNetEntry(protocol string, srcIP netip.Addr, srcPort int, dstIP netip.Addr, dstPort int, userID int, iNode int) ProcNetEntry\n```\nNewProcNetEntry creates an Entry\n\n```go\nfunc ParseProcNet(protocol string) ([]ProcNetEntry, error)\n```\nParseProcNet scans /proc/net/\\* returns a list of entries, one entry per line scanned\n\n```go\nfunc (p *ProcNetEntry) Same(q *ProcNetEntry) bool\n```\n\n```go\nfunc (p *ProcNetEntry) String() string\n```\n\n","path":"github.com/celzero/firestack/intra/netstat","name":"netstat","synopsis":"","isRedistributable":true}
