Module: Ronin::Support::Binary::CTypes::LittleEndian
- Includes:
- CharTypes
- Included in:
- Arch::ARM, Arch::ARM64, Arch::MIPS64::LittleEndian, Arch::MIPS::LittleEndian, Arch::X86, Arch::X86_64
- Defined in:
- lib/ronin/support/binary/ctypes/little_endian.rb
Overview
Represents the C types, but in little-endian byte-order.
Constant Summary collapse
- ADDRESS_SIZE =
The size of a native pointer in bytes.
Native::ADDRESS_SIZE
- INT8 =
The
int8_t
type. Int8Type.new
- INT16 =
The
int16_t
type (little-endianness). Int16Type.new(endian: :little, pack_string: 's<')
- INT32 =
The
int32_t
type (little-endianness). Int32Type.new(endian: :little, pack_string: 'l<')
- INT64 =
The
int64_t
type (little-endianness). Int64Type.new(endian: :little, pack_string: 'q<')
- SHORT =
The
short
type. INT16
- INT =
The
int
type. INT32
- LONG =
The
long
type. if ADDRESS_SIZE == 8 then INT64 else INT32 end
- LONG_LONG =
The
long long
type. INT64
- UINT8 =
The
uint8_t
type. UInt8Type.new
- BYTE =
The
byte
type. UINT8
- UINT16 =
The
uint16_t
type (little-endianness). UInt16Type.new(endian: :little, pack_string: 'S<')
- UINT32 =
The
uint32_t
type (little-endianness). UInt32Type.new(endian: :little, pack_string: 'L<')
- UINT64 =
The
uint64_t
type (little-endianness). UInt64Type.new(endian: :little, pack_string: 'Q<')
- USHORT =
The
unsigned short
type. UINT16
- UINT =
The
unsigned int
type. UINT32
- ULONG =
The
unsigned long
type. if ADDRESS_SIZE == 8 then UINT64 else UINT32 end
- ULONG_LONG =
The
unsigned long long
type. UINT64
- WORD =
The "word" type (16-bit little-endian unsigned integer).
UINT16
- DWORD =
The "dword" type (32-bit little-endian unsigned integer).
UINT32
- QWORD =
The "qword" type (64-bit little-endian unsigned integer).
UINT64
- MACHINE_WORD =
The "machine word" type.
if ADDRESS_SIZE == 8 then UINT64 else UINT32 end
- POINTER =
The
void *
type. MACHINE_WORD
- FLOAT32 =
The
float
type (little-endianness). Float32Type.new(endian: :little, pack_string: 'e')
- FLOAT =
The
float
type (little-endianness). FLOAT32
- FLOAT64 =
The
double
type (little-endianness). Float64Type.new(endian: :little, pack_string: 'E')
- DOUBLE =
The
double
type (little-endianness). FLOAT64
- TYPES =
The little-endian types.
{ int8: INT8, int16: INT16, int32: INT32, int64: INT64, short: SHORT, int: INT, long: LONG, long_long: LONG_LONG, uint8: UINT8, uint16: UINT16, uint32: UINT32, uint64: UINT64, byte: BYTE, ushort: USHORT, uint: UINT, ulong: ULONG, ulong_long: ULONG_LONG, word: WORD, dword: DWORD, qword: QWORD, machine_word: MACHINE_WORD, pointer: MACHINE_WORD, float32: FLOAT32, float64: FLOAT64, float: FLOAT, double: DOUBLE, char: CHAR, uchar: UCHAR, cstring: STRING, string: STRING }
Constants included from CharTypes
CharTypes::CHAR, CharTypes::STRING, CharTypes::UCHAR
Class Method Summary collapse
-
.[](name) ⇒ Type
Fetches the type from TYPES.