Class: DHCP::OptIPList
- Inherits:
-
OptListFixedData
- Object
- Opt
- OptData
- OptListData
- OptListFixedData
- DHCP::OptIPList
- Defined in:
- lib/dhcp/options.rb
Overview
Class for DHCP options that contain a list of IPv4 addresses
Instance Attribute Summary
Attributes inherited from OptData
Attributes inherited from Opt
Instance Method Summary collapse
Methods inherited from OptListFixedData
Methods inherited from OptListData
#append, #data=, #each, #get, #initialize, #is_list?, #set, #size, #split_data, #to_s
Methods inherited from OptData
#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::OptListData
Instance Method Details
#bin_to_data(data) ⇒ Object
339 340 341 |
# File 'lib/dhcp/options.rb', line 339 def bin_to_data(data) IPAddress::IPv4::parse_data(data).to_s end |
#data_to_bin(data) ⇒ Object
343 344 345 |
# File 'lib/dhcp/options.rb', line 343 def data_to_bin(data) IPAddress::IPv4.new(data).data ## Will raise exception if data is not a valid IP end |