Class: DhcpsApi::DHCP_OPTION_VALUE_ARRAY
- Inherits:
-
DHCPS_Struct
- Object
- FFI::Struct
- DHCPS_Struct
- DhcpsApi::DHCP_OPTION_VALUE_ARRAY
- Defined in:
- lib/dhcpsapi/data_structures.rb
Overview
DHCP_OPTION_VALUE_ARRAY defines a list of DHCP option values.
Available fields: :bum_elements [Fixnum], The number of option values in the list :values [Array<DHCP_OPTION_DATA>], Array of option values
Instance Method Summary collapse
Methods inherited from DHCPS_Struct
Methods included from RubyStructAttrHelpers
#dhcp_client_uid_to_mac, #ip_to_uint32, #mac_address_to_array_of_uint8, #to_string, #to_wchar_string, #uint32_to_ip, #wchar_string_length
Instance Method Details
#as_ruby_struct ⇒ Object
507 508 509 510 511 |
# File 'lib/dhcpsapi/data_structures.rb', line 507 def as_ruby_struct 0.upto(self[:num_elements]-1).inject([]) do |all, offset| all << DhcpsApi::DHCP_OPTION_VALUE.new(self[:values] + offset*DHCP_OPTION_VALUE.size).as_ruby_struct end end |