Documentation ¶
Index ¶
- func ResolveHostname(ip string) (string, error)
- type Client
- type Clients
- type Flow
- type FlowSlice
- func (fs FlowSlice) FilterByIP(ip net.IP) FlowSlice
- func (fs FlowSlice) OrderByOriginalBytes()
- func (fs FlowSlice) OrderByOriginalDPort()
- func (fs FlowSlice) OrderByOriginalDestination()
- func (fs FlowSlice) OrderByOriginalSPort()
- func (fs FlowSlice) OrderByOriginalSource()
- func (fs FlowSlice) OrderByReplyBytes()
- func (fs FlowSlice) OrderByReplyDPort()
- func (fs FlowSlice) OrderByReplyDestination()
- func (fs FlowSlice) OrderByReplySPort()
- func (fs FlowSlice) OrderByReplySource()
- func (fs FlowSlice) OrderByTTL()
- type IPTStats
- type IPTables
- type Monitor
- type Subflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveHostname ¶
Types ¶
type Client ¶
type Client struct { CreatedAt time.Time UpdatedAt time.Time IP string HWAddr string Name string // contains filtered or unexported fields }
Client represent a device on the network, a client is tracked by it's IP address.
func (*Client) Stat ¶
func (c *Client) Stat() clientstats.Stat
func (*Client) UpdateIPTables ¶
func (*Client) UpdateName ¶
type Clients ¶
type Clients struct {
// contains filtered or unexported fields
}
Clients hold the recorded data of all known clients data.
Access to the data is protected by a single mutex because it is expected that it is more than enough for this use case.
func (*Clients) Stats ¶
func (c *Clients) Stats() clientstats.Stats
func (*Clients) UpdateIPTables ¶
type FlowSlice ¶
type FlowSlice []Flow
FlowSlice provides filtering and ordering methods.
func Flows ¶
Flows returns the current connections that might be interesting to display to the user.
func (FlowSlice) OrderByOriginalBytes ¶ added in v1.1.3
func (fs FlowSlice) OrderByOriginalBytes()
func (FlowSlice) OrderByOriginalDPort ¶
func (fs FlowSlice) OrderByOriginalDPort()
func (FlowSlice) OrderByOriginalDestination ¶
func (fs FlowSlice) OrderByOriginalDestination()
func (FlowSlice) OrderByOriginalSPort ¶
func (fs FlowSlice) OrderByOriginalSPort()
func (FlowSlice) OrderByOriginalSource ¶
func (fs FlowSlice) OrderByOriginalSource()
func (FlowSlice) OrderByReplyBytes ¶ added in v1.1.3
func (fs FlowSlice) OrderByReplyBytes()
func (FlowSlice) OrderByReplyDPort ¶
func (fs FlowSlice) OrderByReplyDPort()
func (FlowSlice) OrderByReplyDestination ¶
func (fs FlowSlice) OrderByReplyDestination()
func (FlowSlice) OrderByReplySPort ¶
func (fs FlowSlice) OrderByReplySPort()
func (FlowSlice) OrderByReplySource ¶
func (fs FlowSlice) OrderByReplySource()
func (FlowSlice) OrderByTTL ¶
func (fs FlowSlice) OrderByTTL()
type IPTables ¶
type IPTables struct {
// contains filtered or unexported fields
}
IPTables takes care of managing iptables rules for tracking per client bandwidth usage.
Click to show internal directories.
Click to hide internal directories.