portmaster: github.com/Safing/portmaster/process/proc Index | Files

package proc

import "github.com/Safing/portmaster/process/proc"

Index

Package Files

gather.go get.go processfinder.go sockets.go

Constants

const (
    Success uint8 = iota
    NoSocket
    NoProcess
)
const (
    TCP4 uint8 = iota
    UDP4
    TCP6
    UDP6
    ICMP4
    ICMP6

    TCP4Data  = "/proc/net/tcp"
    UDP4Data  = "/proc/net/udp"
    TCP6Data  = "/proc/net/tcp6"
    UDP6Data  = "/proc/net/udp6"
    ICMP4Data = "/proc/net/icmp"
    ICMP6Data = "/proc/net/icmp6"

    TCP_ESTABLISHED = iota + 1
    TCP_SYN_SENT
    TCP_SYN_RECV
    TCP_FIN_WAIT1
    TCP_FIN_WAIT2
    TCP_TIME_WAIT
    TCP_CLOSE
    TCP_CLOSE_WAIT
    TCP_LAST_ACK
    TCP_LISTEN
    TCP_CLOSING
    TCP_NEW_SYN_RECV
)

func GetActiveConnectionIDs Uses

func GetActiveConnectionIDs() []string

GetActiveConnectionIDs returns all connection IDs that are still marked as active by the OS.

func GetPidOfConnection Uses

func GetPidOfConnection(localIP net.IP, localPort uint16, protocol uint8) (pid int, status uint8)

GetPidOfConnection returns the PID of the given connection.

func GetPidOfIncomingConnection Uses

func GetPidOfIncomingConnection(localIP net.IP, localPort uint16, protocol uint8) (pid int, status uint8)

GetPidOfConnection returns the PID of the given incoming connection.

func GetPidOfInode Uses

func GetPidOfInode(uid, inode int) (int, bool)

func GetTCP4PacketInfo Uses

func GetTCP4PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, pktDirection bool) (pid int, direction bool, err error)

func GetTCP6PacketInfo Uses

func GetTCP6PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, pktDirection bool) (pid int, direction bool, err error)

func GetUDP4PacketInfo Uses

func GetUDP4PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, pktDirection bool) (pid int, direction bool, err error)

func GetUDP6PacketInfo Uses

func GetUDP6PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, pktDirection bool) (pid int, direction bool, err error)

Package proc imports 14 packages (graph) and is imported by 1 packages. Updated 2019-02-15. Refresh now. Tools for package owners.