dhcp

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPXEPort = 4011
)

Variables

View Source
var (
	CancelTime = time.Unix(1, 0)
)

Functions

This section is empty.

Types

type PXEServer

type PXEServer struct {
	DB             model.DataStore
	ListenAddress  net.IP
	ServerAddress  net.IP
	InterfaceIPMap map[int]net.IP
	Port           int
	// contains filtered or unexported fields
}

func NewPXEServer

func NewPXEServer(db model.DataStore, address string) (*PXEServer, error)

func (*PXEServer) Serve

func (s *PXEServer) Serve() error

func (*PXEServer) Shutdown

func (s *PXEServer) Shutdown(ctx context.Context) error

type Server

type Server struct {
	ListenAddress  net.IP
	ServerAddress  net.IP
	InterfaceIPMap map[int]net.IP
	Port           int
	ProxyOnly      bool
	DB             model.DataStore
	LeaseTime      time.Duration
	// contains filtered or unexported fields
}

func NewServer

func NewServer(db model.DataStore, address string) (*Server, error)

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

type Snooper

type Snooper struct {
	ListenAddress net.IP
	Port          int
	Handler       func(req *dhcpv4.DHCPv4)
	// contains filtered or unexported fields
}

func NewSnooper

func NewSnooper(address string, handler func(req *dhcpv4.DHCPv4)) (*Snooper, error)

func (*Snooper) Shutdown

func (s *Snooper) Shutdown(ctx context.Context) error

func (*Snooper) Snoop

func (s *Snooper) Snoop() error

Jump to

Keyboard shortcuts

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