Class: DHCP::OptDomain
Overview
Class for DHCP options containing DNS domain names
Instance Attribute Summary
Attributes inherited from OptData
Attributes inherited from Opt
Instance Method Summary collapse
Methods inherited from OptData
#bin_to_data, #get, #initialize, #opt_header, #set, #to_opt, #to_s
Methods inherited from Opt
#initialize, #opt_header, #to_opt, #to_s
Constructor Details
This class inherits a constructor from DHCP::OptData
Instance Method Details
#data_to_bin(data) ⇒ Object
550 551 552 |
# File 'lib/dhcp/options.rb', line 550 def data_to_bin(data) raise "Invalid domain name" unless /^(?:[a-zA-Z0-9][a-zA-Z0-9-]{0,62}\.)*[a-zA-Z0-9][a-zA-Z0-9-]{0,62}\.?$/.match(data) end |