STRUCTS_TYPE_INT(3)

NAME
structs_type_int - structs types for integral types

LIBRARY
PDEL Library (libpdel, -lpdel)

SYNOPSIS
#include <sys/types.h>
#include <pdel/structs/structs.h>
#include <pdel/structs/type/int.h>
extern const struct structs_type structs_type_char;
extern const struct structs_type structs_type_uchar;
extern const struct structs_type structs_type_hchar;
extern const struct structs_type structs_type_short;
extern const struct structs_type structs_type_ushort;
extern const struct structs_type structs_type_hshort;
extern const struct structs_type structs_type_int;
extern const struct structs_type structs_type_uint;
extern const struct structs_type structs_type_hint;
extern const struct structs_type structs_type_long;
extern const struct structs_type structs_type_ulong;
extern const struct structs_type structs_type_hlong;
extern const struct structs_type structs_type_int8;
extern const struct structs_type structs_type_uint8;
extern const struct structs_type structs_type_hint8;
extern const struct structs_type structs_type_int16;
extern const struct structs_type structs_type_uint16;
extern const struct structs_type structs_type_hint16;
extern const struct structs_type structs_type_int32;
extern const struct structs_type structs_type_uint32;
extern const struct structs_type structs_type_hint32;
extern const struct structs_type structs_type_int64;
extern const struct structs_type structs_type_uint64;
extern const struct structs_type structs_type_hint64;

DESCRIPTION
The structs(3) library includes these pre-defined integral types:

structs_type_char
For values of type char.

structs_type_uchar
For values of type u_char.

structs_type_hchar
For values of type u_char expressed as hexadecimal.

structs_type_short
For values of type short.

structs_type_ushort
For values of type u_short.

structs_type_hshort
For values of type u_short expressed as hexadecimal.

structs_type_int
For values of type int.

structs_type_uint
For values of type u_int.

structs_type_hint
For values of type u_int expressed as hexadecimal.

structs_type_long
For values of type long.

structs_type_ulong
For values of type u_long.

structs_type_hlong
For values of type u_long expressed as hexadecimal.

structs_type_int8
For values of type int8_t.

structs_type_uint8
For values of type u_int8_t.

structs_type_hint8
For values of type u_int8_t expressed as hexadecimal.

structs_type_int16
For values of type int16_t.

structs_type_uint16
For values of type u_int16_t.

structs_type_hint16
For values of type u_int16_t expressed as hexadecimal.

structs_type_int32
For values of type int32_t.

structs_type_uint32
For values of type u_int32_t.

structs_type_hint32
For values of type u_int32_t expressed as hexadecimal.

structs_type_int64
For values of type int64_t.

structs_type_uint64
For values of type u_int64_t.

structs_type_hint64
For values of type u_int64_t expressed as hexadecimal.

Note: the “short”, “int”, and “long” variants have sizes that are machine dependent, because they represent primitive types whose sizes are machine dependent. Therefore, the binary encodings of these types are also machine dependent (although they are independent of byte-order).

To ensure machine independence in binary encodings, use the fixed-size “8”, “16”, “32”, and “64” variants.

SEE ALSO
libpdel(3), structs(3), structs_type(3)

HISTORY
The PDEL library was developed at Packet Design, LLC. http://www.packetdesign.com/

AUTHORS
Archie Cobbs <archie@freebsd.org>