sniffer

package
Version: v0.0.0-...-1537486 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DHCPDiscover = MessageType(1)
	DHCPOffer    = MessageType(2)
	DHCPRequest  = MessageType(3)
	DHCPDecline  = MessageType(4)
	DHCPACK      = MessageType(5)
	DHCPNAK      = MessageType(6)
	DHCPRelease  = MessageType(7)
	DHCPInform   = MessageType(8)
)

Variables

This section is empty.

Functions

func NewCachedSniffer

func NewCachedSniffer(cfg config.Config) *cachedSniffer

func NewSniffer

func NewSniffer(cfg config.Config) *sniffer

Types

type DHCPDatagram

type DHCPDatagram struct {
	Mac         string
	MessageType MessageType
	// contains filtered or unexported fields
}

func DHCPDatagramFromBytes

func DHCPDatagramFromBytes(bytes []byte) (*DHCPDatagram, error)

func (*DHCPDatagram) Host

func (self *DHCPDatagram) Host() (string, error)

func (*DHCPDatagram) IP

func (self *DHCPDatagram) IP() (string, error)

func (*DHCPDatagram) String

func (self *DHCPDatagram) String() string

type MessageType

type MessageType int

func (*MessageType) IsRequest

func (mt *MessageType) IsRequest() bool

func (MessageType) String

func (mt MessageType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL