Class: DHCP::OptIP
- Inherits:
-
OptFixedData
- Object
- Opt
- OptData
- OptFixedData
- DHCP::OptIP
- Defined in:
- lib/dhcp/options.rb
Overview
Class for DHCP options that contain a single IPv4 address
Instance Attribute Summary
Attributes inherited from OptData
Attributes inherited from Opt
Instance Method Summary collapse
Methods inherited from OptFixedData
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::OptFixedData
Instance Method Details
#bin_to_data(data) ⇒ Object
326 327 328 |
# File 'lib/dhcp/options.rb', line 326 def bin_to_data(data) IPAddress::IPv4::parse_data(data).to_s end |
#data_to_bin(data) ⇒ Object
330 331 332 |
# File 'lib/dhcp/options.rb', line 330 def data_to_bin(data) IPAddress::IPv4.new(data).data ## Will raise exception if data is not a valid IP end |