Documentation
¶
Index ¶
- Constants
- func GetCountryByIP(ipStr string) (string, error)
- type ConnectionInfo
- type Event
- type GeoIP
- type MIB_TCPROW_OWNER_PID
- type MIB_TCPTABLE_OWNER_PID
- type MIB_UDPROW_OWNER_PID
- type MIB_UDPTABLE_OWNER_PID
- type NetworkConnections
- type PortMap
- type ProcInfo
- type System
- func (c *System) EmitEvent(event string, parameter string)
- func (c *System) GetAndClearEvents() []Event
- func (c *System) GetFilterStatus() string
- func (c *System) GetFilterType() string
- func (c *System) GetProcessName(pid uint32) string
- func (c *System) GetServiceByPort(port uint16) string
- func (c *System) IsLocalAreaNetwork(ip string) bool
- func (c *System) SetFilterStatus(filterStatus string)
- func (c *System) SetFilterType(filterType string)
- func (c *System) Start()
- func (c *System) Stop()
Constants ¶
View Source
const ( AF_INET = 2 TCP_TABLE_OWNER_PID_ALL = 5 UDP_TABLE_OWNER_PID = 1 MIB_TCP_STATE_LISTEN = 2 )
Variables ¶
This section is empty.
Functions ¶
func GetCountryByIP ¶
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct {
Protocol string // "TCP" or "UDP"
LocalAddr string // Local side IP address
LocalPort uint16 // Local side port
RemoteAddr string // Remote side IP address (for TCP)
RemotePort uint16 // Remote side port (for TCP)
State string // Connection state (for TCP)
PID uint32 // Process ID
ProcessName string // Process name
}
ConnectionInfo contains detailed information about a single network connection
type MIB_TCPROW_OWNER_PID ¶
type MIB_TCPTABLE_OWNER_PID ¶
type MIB_TCPTABLE_OWNER_PID struct {
NumEntries uint32
Table [1]MIB_TCPROW_OWNER_PID
}
type MIB_UDPROW_OWNER_PID ¶
type MIB_UDPTABLE_OWNER_PID ¶
type MIB_UDPTABLE_OWNER_PID struct {
NumEntries uint32
Table [1]MIB_UDPROW_OWNER_PID
}
type NetworkConnections ¶
type NetworkConnections struct {
Connections []ConnectionInfo
}
NetworkConnections contains all network connections
func GetAllConnections ¶
func GetAllConnections() NetworkConnections
GetAllConnections returns information about all network connections (TCP and UDP)
type System ¶
type System struct {
// contains filtered or unexported fields
}
var Instance *System
func (*System) GetAndClearEvents ¶
func (*System) GetFilterStatus ¶
func (*System) GetFilterType ¶
func (*System) GetProcessName ¶
func (*System) GetServiceByPort ¶
func (*System) IsLocalAreaNetwork ¶
func (*System) SetFilterStatus ¶
func (*System) SetFilterType ¶
Click to show internal directories.
Click to hide internal directories.