Sha256: 936f8725db3d18e91a993ffa7c53191d2dc92175aacb3839b2b3dd1707d2a24f

Contents?: true

Size: 1.84 KB

Versions: 6

Compression:

Stored size: 1.84 KB

Contents

# frozen_string_literal: true
#
# Copyright (c) 2006-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
#
# ronin-support is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ronin-support is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with ronin-support.  If not, see <https://www.gnu.org/licenses/>.
#

require 'ronin/support/binary/ctypes/os/unix'

module Ronin
  module Support
    module Binary
      module CTypes
        class OS
          #
          # Common types shared by all BSD OSes.
          #
          # @api private
          #
          # @since 1.0.0
          #
          class BSD < UNIX

            #
            # Initializes the common BSD types object.
            #
            # @param [#[]] types
            #   The base types module.
            #
            def initialize(types)
              super(types)

              typedef :long_long,  :__int64_t
              typedef :ulong_long, :__uint64_t
              typedef :long_long,  :int64_t

              typedef :long_long,  :quad_t
              typedef :ulong_long, :u_quad_t

              typedef :string, :caddr_t
              typedef :uint, :fixpt_t
              typedef :long_long, :off_t
              typedef :pointer, :qaddr_t
              typedef :uchar, :sa_family_t
              typedef :int, :segsz_t
              typedef :uint, :useconds_t
            end

          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ronin-support-1.0.7 lib/ronin/support/binary/ctypes/os/bsd.rb
ronin-support-1.0.6 lib/ronin/support/binary/ctypes/os/bsd.rb
ronin-support-1.0.5 lib/ronin/support/binary/ctypes/os/bsd.rb
ronin-support-1.0.4 lib/ronin/support/binary/ctypes/os/bsd.rb
ronin-support-1.0.3 lib/ronin/support/binary/ctypes/os/bsd.rb
ronin-support-1.0.2 lib/ronin/support/binary/ctypes/os/bsd.rb