Documentation ¶
Index ¶
- Constants
- type DHCPOpt
- func OptionClientIdentifier(hwaddr net.HardwareAddr) DHCPOpt
- func OptionDNS(ip ...net.IP) DHCPOpt
- func OptionDomainName(n string) DHCPOpt
- func OptionHostname(n string) DHCPOpt
- func OptionIPAddressLeaseDuration(d time.Duration) DHCPOpt
- func OptionInterfaceMTU(size uint16) DHCPOpt
- func OptionMaxMessageSize(size uint16) DHCPOpt
- func OptionNTP(ip ...net.IP) DHCPOpt
- func OptionParametersList(params ...uint8) DHCPOpt
- func OptionRequestedIP(ip net.IP) DHCPOpt
- func OptionRouter(ip net.IP) DHCPOpt
- func OptionServerIdentifier(ip net.IP) DHCPOpt
- func OptionSubnetMask(mask net.IPMask) DHCPOpt
- func OptionType(t uint8) DHCPOpt
- type DecodedOptions
- type Message
Constants ¶
View Source
const ( OpRequest = 1 OpReply = 2 )
View Source
const ( MsgTypeDiscover = 1 MsgTypeOffer = 2 MsgTypeRequest = 3 MsgTypeAck = 5 MsgTypeNack = 6 )
View Source
const ( OptPadding = 0 OptSubnetMask = 1 OptRouter = 3 OptDNS = 6 OptHostname = 12 OptDomainName = 15 OptInterfaceMTU = 26 OptBroadcastAddress = 28 OptNTP = 42 OptRequestedIP = 50 OptIPAddressLeaseDuration = 51 OptMessageType = 53 OptServerIdentifier = 54 OptParametersList = 55 OptMessage = 56 OptMaxMessageSize = 57 OptRenewalDuration = 58 OptRebindDuration = 59 OptClientIdentifier = 61 OptEnd = 255 )
View Source
const (
DHCPCookie = 0x63825363
)
View Source
const (
FlagBroadcast = 1 << 15
)
View Source
const (
HtypeETHER = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DHCPOpt ¶
func OptionClientIdentifier ¶
func OptionClientIdentifier(hwaddr net.HardwareAddr) DHCPOpt
func OptionDomainName ¶
func OptionHostname ¶
func OptionInterfaceMTU ¶
func OptionMaxMessageSize ¶
func OptionParametersList ¶
func OptionRequestedIP ¶
func OptionRouter ¶
func OptionServerIdentifier ¶
func OptionSubnetMask ¶
func OptionType ¶
type DecodedOptions ¶
type DecodedOptions struct { MessageType uint8 MaxMessageSize uint16 InterfaceMTU uint16 RequestedIP net.IP ServerIdentifier net.IP BroadcastAddress net.IP SubnetMask net.IPMask Routers []net.IP DNS []net.IP IPAddressLeaseDuration time.Duration RenewalDuration time.Duration RebindDuration time.Duration DomainName string ClientIdentifier []byte Message string ParametersList []uint8 }
func DecodeOptions ¶
func DecodeOptions(opts []DHCPOpt) DecodedOptions
Click to show internal directories.
Click to hide internal directories.