PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/resolvers/solaris/ffi/ |
| Server: Linux server1.ngambekcore.com 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 04:00:07 EDT 2025 x86_64 IP: 159.198.77.92 |
| Dir : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/resolvers/solaris/ffi/functions.rb |
# frozen_string_literal: true
module Facter
module Resolvers
module Solaris
module FFI
module Ioctl
extend ::FFI::Library
ffi_lib ::FFI::Library::LIBC, 'socket'
attach_function :ioctl_base, :ioctl, %i[int int pointer], :int
attach_function :open_socket, :socket, %i[int int int], :int
attach_function :close_socket, :close, %i[int], :int
attach_function :inet_ntop, %i[int pointer pointer uint], :string
def self.ioctl(call_const, pointer, address_family = AF_INET)
fd = Ioctl.open_socket(address_family, SOCK_DGRAM, 0)
begin
ioctl_base(fd, call_const, pointer)
ensure
Ioctl.close_socket(fd)
end
end
end
end
end
end
end