Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultInterface ¶
func ListInterfaces ¶
Types ¶
type DemoCapture ¶
type DemoCapture struct {
// contains filtered or unexported fields
}
DemoCapture generates realistic simulated traffic data for demos and screenshots.
func NewDemo ¶
func NewDemo(threshold int) *DemoCapture
func (*DemoCapture) Interface ¶
func (d *DemoCapture) Interface() string
func (*DemoCapture) Start ¶
func (d *DemoCapture) Start()
func (*DemoCapture) Stop ¶
func (d *DemoCapture) Stop()
func (*DemoCapture) Ticker ¶
func (d *DemoCapture) Ticker() <-chan Snapshot
func (*DemoCapture) Uptime ¶
func (d *DemoCapture) Uptime() time.Duration
type Snapshot ¶
type Snapshot struct {
Timestamp time.Time `json:"timestamp"`
Interface string `json:"interface"`
PPS uint64 `json:"pps"`
BPS uint64 `json:"bps"`
PeakPPS uint64 `json:"peak_pps"`
PeakBPS uint64 `json:"peak_bps"`
TCP float64 `json:"tcp_pct"`
UDP float64 `json:"udp_pct"`
ICMP float64 `json:"icmp_pct"`
Other float64 `json:"other_pct"`
UniqueIPs int `json:"unique_src_ips"`
TopSources []IPCount `json:"top_sources"`
TopPorts []PortCount `json:"top_ports"`
AvgPktSize int `json:"avg_pkt_size"`
Severity string `json:"severity"`
AttackType string `json:"attack_type,omitempty"`
History []uint64 `json:"-"`
}
Click to show internal directories.
Click to hide internal directories.