Class: DhcpsApi::DWORD_DWORD
Class Method Summary
collapse
Instance Method Summary
collapse
ruby_struct_attr
#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
Class Method Details
.from_int(an_int) ⇒ Object
111
112
113
114
115
116
|
# File 'lib/dhcpsapi/data_structures.rb', line 111
def self.from_int(an_int)
to_return = new
to_return[:dword1] = ((an_int >> 32) & 0xffffffff)
to_return[:dword2] = (an_int & 0xffffffff)
to_return
end
|
Instance Method Details
#as_ruby_struct ⇒ Object
118
119
120
|
# File 'lib/dhcpsapi/data_structures.rb', line 118
def as_ruby_struct
(self[:dword1] << 32) | self[:dword2]
end
|