Module: Facter::Resolvers::Solaris::FFI::Ioctl

Extended by:
FFI::Library
Defined in:
lib/facter/resolvers/solaris/ffi/functions.rb

Overview

Since:

  • 2.0.0

Class Method Summary collapse

Class Method Details

.ioctl(call_const, pointer, address_family = AF_INET) ⇒ Object

Since:

  • 2.0.0



16
17
18
19
20
21
# File 'lib/facter/resolvers/solaris/ffi/functions.rb', line 16

def self.ioctl(call_const, pointer, address_family = AF_INET)
  fd = Ioctl.open_socket(address_family, SOCK_DGRAM, 0)
  result = ioctl_base(fd, call_const, pointer)
  Ioctl.close_socket(fd, 2)
  result
end