dhcp

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCP

type DHCP struct {
	app.BaseProcessor
	// contains filtered or unexported fields
}

func New

func New(db Database) *DHCP

func (*DHCP) Init

func (r *DHCP) Init() error

func (*DHCP) Name

func (r *DHCP) Name() string

func (*DHCP) OnPacketIn

func (r *DHCP) OnPacketIn(finder network.Finder, ingress *network.Port, eth *protocol.Ethernet) error

func (*DHCP) String

func (r *DHCP) String() string

type Database

type Database interface {
	// DHCP returns a network configuration matched with the hardware address, otherwise nil.
	DHCP(net.HardwareAddr) (*NetConfig, error)
}

type NetConfig

type NetConfig struct {
	IP      net.IP     // Host IP address.
	Mask    net.IPMask // Network mask.
	Gateway net.IP     // Gateway (router) IP address.
}

Jump to

Keyboard shortcuts

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