devices

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B_to_E

func B_to_E(b uint64) (float64, string, int)

func DevicesInfo

func DevicesInfo()

func PAC

func PAC() []pcap.Interface

Types

type Device

type Device struct {
	Pcap    pcap.Interface
	Net     net.Interface
	Io      stnet.IOCountersStat
	Name    string
	Address net.IP
}

func Devices

func Devices() []Device

func (*Device) ReadTraffic

func (D *Device) ReadTraffic(d time.Duration, f func(Traffic))

func (*Device) Rx

func (D *Device) Rx() (float64, string, int)

func (*Device) Tx

func (D *Device) Tx() (float64, string, int)

type Traffic

type Traffic struct {
	Tx     float64
	Txc    string
	Txu    string
	TxBps  float64
	TxcBps string
	TxuBps string
	Rx     float64
	Rxc    string
	Rxu    string
	RxBps  float64
	RxcBps string
	RxuBps string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL