handler

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHandler

func AddHandler(s string, f func(HandlerInitParams) Handler) error

Types

type Handler

type Handler interface {
	ReceiveMessage(m message.Message) bool
	Init() error
	Run()
	Stop() error
	DeInit() error
}

func New

func New(s *socketeer.RawSocketeer, o config.HammerConfig, logFunc func(string) bool, errFunc func(error) bool, statFunc func(stats.StatValue) bool) (Handler, error)

func NewDhcpV4

func NewDhcpV4(hip HandlerInitParams) Handler

type HandlerDhcpV4

type HandlerDhcpV4 struct {
	// contains filtered or unexported fields
}

func (*HandlerDhcpV4) DeInit

func (h *HandlerDhcpV4) DeInit() error

func (*HandlerDhcpV4) Init

func (h *HandlerDhcpV4) Init() error

func (*HandlerDhcpV4) ReceiveMessage

func (h *HandlerDhcpV4) ReceiveMessage(msg message.Message) bool

func (*HandlerDhcpV4) Run

func (h *HandlerDhcpV4) Run()

func (*HandlerDhcpV4) Stop

func (h *HandlerDhcpV4) Stop() error

type HandlerInitParams

type HandlerInitParams struct {
	// contains filtered or unexported fields
}

type LeaseDhcpV4

type LeaseDhcpV4 struct {
	Packet   gopacket.Packet
	LinkAddr *netlink.Addr
	Acquired time.Time
	HwAddr   net.HardwareAddr
}

Jump to

Keyboard shortcuts

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