Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- func GetActiveConnectionIDs() (connections []string)
- func GetTCP4PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, ...) (pid int, direction bool, err error)
- func GetTCP6PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, ...) (pid int, direction bool, err error)
- func GetUDP4PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, ...) (pid int, direction bool, err error)
- func GetUDP6PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, ...) (pid int, direction bool, err error)
- type ConnectionEntry
- type IPHelper
Constants ¶
View Source
const ( IPv4 uint8 = 4 IPv6 uint8 = 6 TCP uint8 = 6 UDP uint8 = 17 )
IP and Protocol constants
Variables ¶
This section is empty.
Functions ¶
func GetActiveConnectionIDs ¶
func GetActiveConnectionIDs() (connections []string)
GetActiveConnectionIDs returns all currently active connection IDs.
func GetTCP4PacketInfo ¶
func GetTCP4PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, pktDirection bool) (pid int, direction bool, err error)
GetTCP4PacketInfo returns the pid of the given IPv4/TCP connection.
func GetTCP6PacketInfo ¶
func GetTCP6PacketInfo(localIP net.IP, localPort uint16, remoteIP net.IP, remotePort uint16, pktDirection bool) (pid int, direction bool, err error)
GetTCP6PacketInfo returns the pid of the given IPv6/TCP connection.
Types ¶
type ConnectionEntry ¶ added in v0.2.5
type ConnectionEntry struct {
// contains filtered or unexported fields
}
ConnectionEntry describes a connection state table entry.
func (*ConnectionEntry) String ¶ added in v0.2.5
func (entry *ConnectionEntry) String() string
type IPHelper ¶
type IPHelper struct {
// contains filtered or unexported fields
}
IPHelper represents a subset of the Windows iphlpapi.dll.
func (*IPHelper) GetTables ¶
func (ipHelper *IPHelper) GetTables(protocol uint8, ipVersion uint8) (connections []*ConnectionEntry, listeners []*ConnectionEntry, err error)
GetTables returns the current connection state table of Windows of the given protocol and IP version.
Click to show internal directories.
Click to hide internal directories.