dhcp4: make all options use type Option

This commit is contained in:
Matt Layher 2018-07-27 11:49:37 -04:00 committed by Dave Anderson
parent cc33920b4f
commit df529f74dc

View File

@ -32,35 +32,35 @@ type Option byte
// for the full authoritative list. // for the full authoritative list.
const ( const (
OptSubnetMask Option = 1 // IPMask OptSubnetMask Option = 1 // IPMask
OptTimeOffset = 2 // int32 OptTimeOffset Option = 2 // int32
OptRouters = 3 // IPs OptRouters Option = 3 // IPs
OptDNSServers = 6 // IPs OptDNSServers Option = 6 // IPs
OptHostname = 12 // string OptHostname Option = 12 // string
OptBootFileSize = 13 // uint16 OptBootFileSize Option = 13 // uint16
OptDomainName = 15 // string OptDomainName Option = 15 // string
OptBroadcastAddr = 28 // IP OptBroadcastAddr Option = 28 // IP
OptNTPServers = 42 // IP OptNTPServers Option = 42 // IP
OptVendorSpecific = 43 // []byte OptVendorSpecific Option = 43 // []byte
OptRequestedIP = 50 // IP OptRequestedIP Option = 50 // IP
OptLeaseTime = 51 // uint32 OptLeaseTime Option = 51 // uint32
OptOverload = 52 // byte OptOverload Option = 52 // byte
OptServerIdentifier = 54 // IP OptServerIdentifier Option = 54 // IP
OptRequestedOptions = 55 // []byte OptRequestedOptions Option = 55 // []byte
OptMessage = 56 // string OptMessage Option = 56 // string
OptMaximumMessageSize = 57 // uint16 OptMaximumMessageSize Option = 57 // uint16
OptRenewalTime = 58 // uint32 OptRenewalTime Option = 58 // uint32
OptRebindingTime = 59 // uint32 OptRebindingTime Option = 59 // uint32
OptVendorIdentifier = 60 // string OptVendorIdentifier Option = 60 // string
OptClientIdentifier = 61 // string OptClientIdentifier Option = 61 // string
OptFQDN = 81 // string OptFQDN Option = 81 // string
// You shouldn't need to use the following directly. Instead, // You shouldn't need to use the following directly. Instead,
// refer to the fields in the Packet struct, and Marshal/Unmarshal // refer to the fields in the Packet struct, and Marshal/Unmarshal
// will handle encoding for you. // will handle encoding for you.
OptTFTPServer = 66 // string OptTFTPServer Option = 66 // string
OptBootFile = 67 // string OptBootFile Option = 67 // string
OptDHCPMessageType = 53 // byte OptDHCPMessageType Option = 53 // byte
) )
// Options stores DHCP options. // Options stores DHCP options.