mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-05 17:10:57 +01:00
27 lines
427 B
Go
27 lines
427 B
Go
package netstat
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
type Entry struct {
|
|
Proto string
|
|
SrcIP net.IP
|
|
SrcPort uint
|
|
DstIP net.IP
|
|
DstPort uint
|
|
UserId int
|
|
INode int
|
|
}
|
|
|
|
func NewEntry(proto string, srcIP net.IP, srcPort uint, dstIP net.IP, dstPort uint, userId int, iNode int) Entry {
|
|
return Entry{
|
|
Proto: proto,
|
|
SrcIP: srcIP,
|
|
SrcPort: srcPort,
|
|
DstIP: dstIP,
|
|
DstPort: dstPort,
|
|
UserId: userId,
|
|
INode: iNode,
|
|
}
|
|
}
|