Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IPAddressOption ¶
type IPAddressOption struct { OptionCode dhcpv4.OptionCode IPAddress net.IP }
IPAddressOption represents an option whose value is a single IP address.
func ParseIPAddressOption ¶
func ParseIPAddressOption(data []byte) (*IPAddressOption, error)
ParseIPAddressOption returns a new IPAddressOption from a byte stream, or error if any.
func (*IPAddressOption) Code ¶
func (o *IPAddressOption) Code() dhcpv4.OptionCode
Code returns the option code.
func (*IPAddressOption) Length ¶
func (o *IPAddressOption) Length() int
Length returns the length of the data portion (excluding option code an byte length).
func (*IPAddressOption) String ¶
func (o *IPAddressOption) String() string
String returns a human-readable string.
func (*IPAddressOption) ToBytes ¶
func (o *IPAddressOption) ToBytes() []byte
ToBytes returns a serialized stream of bytes for this option.
type IPAddressesOption ¶
type IPAddressesOption struct { dhcpv4.OptionCode IPAddresses []net.IP }
IPAddressesOption represents an option whose value is a list of IP addresses.
func ParseIPAddressesOption ¶
func ParseIPAddressesOption(data []byte) (*IPAddressesOption, error)
ParseIPAddressesOption returns a new IPAddressesOption from a byte stream, or error if any.
func (*IPAddressesOption) Code ¶
func (o *IPAddressesOption) Code() dhcpv4.OptionCode
Code returns the option code.
func (*IPAddressesOption) Length ¶
func (o *IPAddressesOption) Length() int
Length returns the length of the data portion (excluding option code an byte length).
func (*IPAddressesOption) String ¶
func (o *IPAddressesOption) String() string
String returns a human-readable string.
func (*IPAddressesOption) ToBytes ¶
func (o *IPAddressesOption) ToBytes() []byte
ToBytes returns a serialized stream of bytes for this option.
type TextOption ¶
type TextOption struct { OptionCode dhcpv4.OptionCode Text string }
TextOption represents an option whose value is a string.
func ParseTextOption ¶
func ParseTextOption(data []byte) (*TextOption, error)
ParseTextOption returns a new TextOption from a byte stream, or error if any.
func (*TextOption) Code ¶
func (o *TextOption) Code() dhcpv4.OptionCode
Code returns the option code.
func (*TextOption) Length ¶
func (o *TextOption) Length() int
Length returns the length of the data portion (excluding option code an byte length).
func (*TextOption) String ¶
func (o *TextOption) String() string
String returns a human-readable string.
func (*TextOption) ToBytes ¶
func (o *TextOption) ToBytes() []byte
ToBytes returns a serialized stream of bytes for this option.