dhcpv6relay

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

relay

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCPConn

type DHCPConn interface {
	// net.PacketConn methods
	ReadFrom(p []byte) (n int, addr net.Addr, err error)
	WriteTo(p []byte, addr net.Addr) (n int, err error)
	Close() error
	LocalAddr() net.Addr
	SetDeadline(t time.Time) error
	SetReadDeadline(t time.Time) error
	SetWriteDeadline(t time.Time) error
	// new methods
	ReadFromIP(p []byte) (n int, addr net.IP, err error)
}

type Modifier

type Modifier func(*RelayAgent)

func WithLinkAddr

func WithLinkAddr(addr net.IP) Modifier

func WithOptions

func WithOptions(opts dhcpv6.Options) Modifier

func WithPeerAddr

func WithPeerAddr(addr net.IP) Modifier

func WithSvrAddr

func WithSvrAddr(addr *net.UDPAddr) Modifier

type PairDHCPConn

type PairDHCPConn struct {
	*conpair.PacketConnPair
}

func (*PairDHCPConn) ReadFromIP

func (pc *PairDHCPConn) ReadFromIP(p []byte) (int, net.IP, error)

type RUDPDHCPConn

type RUDPDHCPConn struct {
	*etherconn.RUDPConn
}

func (*RUDPDHCPConn) ReadFromIP

func (rudpc *RUDPDHCPConn) ReadFromIP(p []byte) (int, net.IP, error)

type RelayAgent

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

func NewRelayAgent

func NewRelayAgent(ctx context.Context, access, network DHCPConn, options ...Modifier) *RelayAgent

type UDPDHCPConn

type UDPDHCPConn net.UDPConn

func (*UDPDHCPConn) ReadFromIP

func (udpc *UDPDHCPConn) ReadFromIP(p []byte) (int, net.IP, error)

Jump to

Keyboard shortcuts

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