Class: Ronin::Support::Binary::CTypes::OS::UNIX Private

Inherits:
Ronin::Support::Binary::CTypes::OS show all
Defined in:
lib/ronin/support/binary/ctypes/os/unix.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Common types shared by all UNIX libc implementations.

Since:

  • 1.0.0

Direct Known Subclasses

BSD, Linux

Instance Attribute Summary

Attributes inherited from Ronin::Support::Binary::CTypes::OS

#typedefs, #types

Instance Method Summary collapse

Methods inherited from Ronin::Support::Binary::CTypes::OS

#[], #typedef

Constructor Details

#initialize(types) ⇒ UNIX

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initializes the common UNIX libc typedefs.

Parameters:

  • types (#[])

    The base types module.

Since:

  • 1.0.0



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/ronin/support/binary/ctypes/os/unix.rb', line 40

def initialize(types)
  super(types)

  typedef :char,  :__int8_t
  typedef :short, :__int16_t
  typedef :int,   :__int32_t

  typedef :uchar,  :__uint8_t
  typedef :ushort, :__uint16_t
  typedef :uint,   :__uint32_t

  typedef :char,  :int8_t
  typedef :short, :int16_t
  typedef :int,   :int32_t

  typedef :uchar,      :u_int8_t
  typedef :ushort,     :u_int16_t
  typedef :uint,       :u_int32_t
  typedef :ulong_long, :u_int64_t

  typedef :uchar,  :u_char
  typedef :uint,   :u_int
  typedef :ulong,  :u_long
  typedef :ushort, :u_short

  typedef :uint, :uid_t
  typedef :uint, :gid_t
  typedef :int,  :pid_t

  typedef :uint,   :in_addr_t
  typedef :ushort, :in_port_t
  typedef :uint,   :socklen_t
end