Documentation ¶
Overview ¶
Package transport contains Linux-based transports for the DHCP broadcast and unicast specifications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDeadlineExceeded = errors.New("deadline exceeded")
Functions ¶
func NewInvalidMessageError ¶
Types ¶
type BroadcastTransport ¶
type BroadcastTransport struct {
// contains filtered or unexported fields
}
BroadcastTransport implements a DHCP transport based on a custom IP/UDP stack fulfilling the specific requirements for broadcasting DHCP packets (like all-zero source address, no ARP, ...)
func NewBroadcastTransport ¶
func NewBroadcastTransport(iface *net.Interface) *BroadcastTransport
func (*BroadcastTransport) Close ¶
func (t *BroadcastTransport) Close() error
func (*BroadcastTransport) Open ¶
func (t *BroadcastTransport) Open() error
func (*BroadcastTransport) SetReceiveDeadline ¶
func (t *BroadcastTransport) SetReceiveDeadline(deadline time.Time) error
type InvalidMessageError ¶
type InvalidMessageError struct {
// contains filtered or unexported fields
}
func (InvalidMessageError) Error ¶
func (i InvalidMessageError) Error() string
func (InvalidMessageError) Unwrap ¶
func (i InvalidMessageError) Unwrap() error
type UnicastTransport ¶
type UnicastTransport struct {
// contains filtered or unexported fields
}
UnicastTransport implements a DHCP transport based on a normal Linux UDP socket with some custom socket options to influence DSCP and routing.
func NewUnicastTransport ¶
func NewUnicastTransport(iface *net.Interface) *UnicastTransport
func (*UnicastTransport) Close ¶
func (t *UnicastTransport) Close() error
func (*UnicastTransport) SetReceiveDeadline ¶
func (t *UnicastTransport) SetReceiveDeadline(deadline time.Time) error
Click to show internal directories.
Click to hide internal directories.