net

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

The dev pseudo-file contains network device status information. This gives the number of received and sent pack‐ ets, the number of errors and collisions and other basic statistics. These are used by the ifconfig(8) program to report device status

various net pseudo-files, all of which give the status of some part of the networking layer. These files contain ASCII structures and are, therefore, readable with cat(1). However, the standard netstat(8) suite provides much cleaner access to these files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Procfs string
}
var Ctx Context

type Dev

type Dev struct {
	Ifaces []Iface
}

func (*Dev) CountRx

func (p *Dev) CountRx() uint64

func (*Dev) CountTx

func (p *Dev) CountTx() uint64

func (*Dev) Update

func (p *Dev) Update() error

type Iface

type Iface struct {
	Name string
	Rx   RX
	Tx   TX
}

type RX

type RX struct {
	Bytes      uint64
	Packets    uint64
	Errs       uint64
	Drop       uint64
	Fifo       uint64
	Frame      uint64
	Compressed uint64
	Multicast  uint64
}

type TX

type TX struct {
	Bytes      uint64
	Packets    uint64
	Errs       uint64
	Drop       uint64
	Fifo       uint64
	Colls      uint64
	Carrier    uint64
	Compressed uint64
}

Jump to

Keyboard shortcuts

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