Blame docs/reference/glib/html/glib-Byte-Order-Macros.html

Packit ae235b
Packit ae235b
<html>
Packit ae235b
<head>
Packit ae235b
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit ae235b
<title>Byte Order Macros: GLib Reference Manual</title>
Packit ae235b
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit ae235b
<link rel="home" href="index.html" title="GLib Reference Manual">
Packit ae235b
<link rel="up" href="glib-fundamentals.html" title="GLib Fundamentals">
Packit ae235b
<link rel="prev" href="glib-Type-Conversion-Macros.html" title="Type Conversion Macros">
Packit ae235b
<link rel="next" href="glib-Bounds-checked-integer-arithmetic.html" title="Bounds-checking integer arithmetic">
Packit ae235b
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit ae235b
<link rel="stylesheet" href="style.css" type="text/css">
Packit ae235b
</head>
Packit ae235b
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit ae235b
Packit ae235b
Packit ae235b
Top  | 
Packit ae235b
                  Description
Packit ae235b
Packit ae235b
Home
Packit ae235b
Up
Packit ae235b
Prev
Packit ae235b
Next
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Byte Order Macros

Packit ae235b

Byte Order Macros — a portable way to convert between different byte orders

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
g_htonl()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
g_htons()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
g_ntohl()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
g_ntohs()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GLONG_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GLONG_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GLONG_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GLONG_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GULONG_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GULONG_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GULONG_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GULONG_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GSIZE_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GSIZE_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GSIZE_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GSIZE_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GSSIZE_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GSSIZE_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GSSIZE_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GSSIZE_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT16_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT16_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT16_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT16_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT16_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT16_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT16_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT16_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT32_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT32_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT32_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT32_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT32_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT32_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT32_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT32_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT64_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT64_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT64_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GINT64_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT64_FROM_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT64_FROM_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT64_TO_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT64_TO_LE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT16_SWAP_BE_PDP()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT16_SWAP_LE_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT16_SWAP_LE_PDP()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT32_SWAP_BE_PDP()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT32_SWAP_LE_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT32_SWAP_LE_PDP()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
Packit ae235b
GUINT64_SWAP_LE_BE()
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_BYTE_ORDER
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_LITTLE_ENDIAN
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_BIG_ENDIAN
Packit ae235b
Packit ae235b
Packit ae235b
#define
Packit ae235b
G_PDP_ENDIAN
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Includes

Packit ae235b
#include <glib.h>
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Description

Packit ae235b

These macros provide a portable way to determine the host byte order

Packit ae235b
and to convert values between different byte orders.

Packit ae235b

The byte order is the order in which bytes are stored to create larger

Packit ae235b
data types such as the gint and glong values.
Packit ae235b
The host byte order is the byte order used on the current machine.

Packit ae235b

Some processors store the most significant bytes (i.e. the bytes that

Packit ae235b
hold the largest part of the value) first. These are known as big-endian
Packit ae235b
processors. Other processors (notably the x86 family) store the most
Packit ae235b
significant byte last. These are known as little-endian processors.

Packit ae235b

Finally, to complicate matters, some other processors store the bytes in

Packit ae235b
a rather curious order known as PDP-endian. For a 4-byte word, the 3rd
Packit ae235b
most significant byte is stored first, then the 4th, then the 1st and
Packit ae235b
finally the 2nd.

Packit ae235b

Obviously there is a problem when these different processors communicate

Packit ae235b
with each other, for example over networks or by using binary file formats.
Packit ae235b
This is where these macros come in. They are typically used to convert
Packit ae235b
values into a byte order which has been agreed on for use when
Packit ae235b
communicating between different processors. The Internet uses what is
Packit ae235b
known as 'network byte order' as the standard byte order (which is in
Packit ae235b
fact the big-endian byte order).

Packit ae235b

Note that the byte order conversion macros may evaluate their arguments

Packit ae235b
multiple times, thus you should not use them with arguments which have
Packit ae235b
side-effects.

Packit ae235b
Packit ae235b
Packit ae235b

Functions

Packit ae235b
Packit ae235b

g_htonl()

Packit ae235b
#define             g_htonl(val)
Packit ae235b

Converts a 32-bit integer value from host to network byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a 32-bit integer value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to network byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_htons()

Packit ae235b
#define             g_htons(val)
Packit ae235b

Converts a 16-bit integer value from host to network byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a 16-bit integer value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to network byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_ntohl()

Packit ae235b
#define             g_ntohl(val)
Packit ae235b

Converts a 32-bit integer value from network to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a 32-bit integer value in network byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order.

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

g_ntohs()

Packit ae235b
#define             g_ntohs(val)
Packit ae235b

Converts a 16-bit integer value from network to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a 16-bit integer value in network byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT_FROM_BE()

Packit ae235b
#define GINT_FROM_BE(val) (GINT_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gint value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT_FROM_LE()

Packit ae235b
#define GINT_FROM_LE(val) (GINT_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gint value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT_TO_BE()

Packit ae235b
#define GINT_TO_BE(val)		((gint) GINT32_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gint value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT_TO_LE()

Packit ae235b
#define GINT_TO_LE(val)		((gint) GINT32_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gint value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT_FROM_BE()

Packit ae235b
#define GUINT_FROM_BE(val) (GUINT_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a guint value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT_FROM_LE()

Packit ae235b
#define GUINT_FROM_LE(val) (GUINT_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a guint value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT_TO_BE()

Packit ae235b
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a guint value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT_TO_LE()

Packit ae235b
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a guint value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian byte order.

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GLONG_FROM_BE()

Packit ae235b
#define GLONG_FROM_BE(val) (GLONG_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a glong value from big-endian to the host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a glong value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GLONG_FROM_LE()

Packit ae235b
#define GLONG_FROM_LE(val) (GLONG_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a glong value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a glong value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GLONG_TO_BE()

Packit ae235b
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a glong value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a glong value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GLONG_TO_LE()

Packit ae235b
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a glong value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a glong value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GULONG_FROM_BE()

Packit ae235b
#define GULONG_FROM_BE(val) (GULONG_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gulong value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gulong value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GULONG_FROM_LE()

Packit ae235b
#define GULONG_FROM_LE(val) (GULONG_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gulong value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gulong value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GULONG_TO_BE()

Packit ae235b
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gulong value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gulong value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GULONG_TO_LE()

Packit ae235b
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gulong value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gulong value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GSIZE_FROM_BE()

Packit ae235b
#define GSIZE_FROM_BE(val) (GSIZE_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gsize value from big-endian to the host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gsize value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GSIZE_FROM_LE()

Packit ae235b
#define GSIZE_FROM_LE(val) (GSIZE_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gsize value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gsize value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GSIZE_TO_BE()

Packit ae235b
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gsize value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gsize value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GSIZE_TO_LE()

Packit ae235b
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gsize value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gsize value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GSSIZE_FROM_BE()

Packit ae235b
#define GSSIZE_FROM_BE(val) (GSSIZE_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gssize value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gssize value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GSSIZE_FROM_LE()

Packit ae235b
#define GSSIZE_FROM_LE(val) (GSSIZE_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gssize value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gssize value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GSSIZE_TO_BE()

Packit ae235b
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gssize value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gssize value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GSSIZE_TO_LE()

Packit ae235b
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gssize value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gssize value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT16_FROM_BE()

Packit ae235b
#define GINT16_FROM_BE(val) (GINT16_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gint16 value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint16 value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT16_FROM_LE()

Packit ae235b
#define GINT16_FROM_LE(val) (GINT16_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gint16 value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint16 value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT16_TO_BE()

Packit ae235b
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
Packit ae235b
Packit ae235b

Converts a gint16 value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint16 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT16_TO_LE()

Packit ae235b
#define GINT16_TO_LE(val) ((gint16) (val))
Packit ae235b
Packit ae235b

Converts a gint16 value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint16 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT16_FROM_BE()

Packit ae235b
#define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a guint16 value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint16 value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT16_FROM_LE()

Packit ae235b
#define GUINT16_FROM_LE(val) (GUINT16_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a guint16 value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint16 value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT16_TO_BE()

Packit ae235b
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
Packit ae235b
Packit ae235b

Converts a guint16 value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint16 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT16_TO_LE()

Packit ae235b
#define GUINT16_TO_LE(val) ((guint16) (val))
Packit ae235b
Packit ae235b

Converts a guint16 value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint16 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT32_FROM_BE()

Packit ae235b
#define GINT32_FROM_BE(val) (GINT32_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gint32 value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint32 value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT32_FROM_LE()

Packit ae235b
#define GINT32_FROM_LE(val) (GINT32_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gint32 value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint32 value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT32_TO_BE()

Packit ae235b
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
Packit ae235b
Packit ae235b

Converts a gint32 value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint32 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT32_TO_LE()

Packit ae235b
#define GINT32_TO_LE(val) ((gint32) (val))
Packit ae235b
Packit ae235b

Converts a gint32 value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint32 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT32_FROM_BE()

Packit ae235b
#define GUINT32_FROM_BE(val) (GUINT32_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a guint32 value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint32 value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT32_FROM_LE()

Packit ae235b
#define GUINT32_FROM_LE(val) (GUINT32_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a guint32 value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint32 value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT32_TO_BE()

Packit ae235b
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
Packit ae235b
Packit ae235b

Converts a guint32 value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint32 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT32_TO_LE()

Packit ae235b
#define GUINT32_TO_LE(val) ((guint32) (val))
Packit ae235b
Packit ae235b

Converts a guint32 value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint32 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT64_FROM_BE()

Packit ae235b
#define GINT64_FROM_BE(val) (GINT64_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a gint64 value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint64 value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT64_FROM_LE()

Packit ae235b
#define GINT64_FROM_LE(val) (GINT64_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a gint64 value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint64 value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT64_TO_BE()

Packit ae235b
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
Packit ae235b
Packit ae235b

Converts a gint64 value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint64 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GINT64_TO_LE()

Packit ae235b
#define GINT64_TO_LE(val) ((gint64) (val))
Packit ae235b
Packit ae235b

Converts a gint64 value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a gint64 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT64_FROM_BE()

Packit ae235b
#define GUINT64_FROM_BE(val) (GUINT64_TO_BE (val))
Packit ae235b
Packit ae235b

Converts a guint64 value from big-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint64 value in big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT64_FROM_LE()

Packit ae235b
#define GUINT64_FROM_LE(val) (GUINT64_TO_LE (val))
Packit ae235b
Packit ae235b

Converts a guint64 value from little-endian to host byte order.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint64 value in little-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to host byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT64_TO_BE()

Packit ae235b
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
Packit ae235b
Packit ae235b

Converts a guint64 value from host byte order to big-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint64 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to big-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT64_TO_LE()

Packit ae235b
#define GUINT64_TO_LE(val) ((guint64) (val))
Packit ae235b
Packit ae235b

Converts a guint64 value from host byte order to little-endian.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint64 value in host byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to little-endian

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT16_SWAP_BE_PDP()

Packit ae235b
#define GUINT16_SWAP_BE_PDP(val) (GUINT16_SWAP_LE_BE (val))
Packit ae235b
Packit ae235b

Converts a guint16 value between big-endian and pdp-endian byte order.

Packit ae235b
The conversion is symmetric so it can be used both ways.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint16 value in big-endian or pdp-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to the opposite byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT16_SWAP_LE_BE()

Packit ae235b
#    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
Packit ae235b
Packit ae235b

Converts a guint16 value between little-endian and big-endian byte order.

Packit ae235b
The conversion is symmetric so it can be used both ways.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint16 value in little-endian or big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to the opposite byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT16_SWAP_LE_PDP()

Packit ae235b
#define GUINT16_SWAP_LE_PDP(val) ((guint16) (val))
Packit ae235b
Packit ae235b

Converts a guint16 value between little-endian and pdp-endian byte order.

Packit ae235b
The conversion is symmetric so it can be used both ways.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint16 value in little-endian or pdp-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to the opposite byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT32_SWAP_BE_PDP()

Packit ae235b
#define             GUINT32_SWAP_BE_PDP(val)
Packit ae235b

Converts a guint32 value between big-endian and pdp-endian byte order.

Packit ae235b
The conversion is symmetric so it can be used both ways.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint32 value in big-endian or pdp-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to the opposite byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT32_SWAP_LE_BE()

Packit ae235b
#    define GUINT32_SWAP_LE_BE(val) ((guint32) __builtin_bswap32 ((guint32) (val)))
Packit ae235b
Packit ae235b

Converts a guint32 value between little-endian and big-endian byte order.

Packit ae235b
The conversion is symmetric so it can be used both ways.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint32 value in little-endian or big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to the opposite byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT32_SWAP_LE_PDP()

Packit ae235b
#define             GUINT32_SWAP_LE_PDP(val)
Packit ae235b

Converts a guint32 value between little-endian and pdp-endian byte order.

Packit ae235b
The conversion is symmetric so it can be used both ways.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint32 value in little-endian or pdp-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to the opposite byte order

Packit ae235b
Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

GUINT64_SWAP_LE_BE()

Packit ae235b
#    define GUINT64_SWAP_LE_BE(val) ((guint64) __builtin_bswap64 ((guint64) (val)))
Packit ae235b
Packit ae235b

Converts a guint64 value between little-endian and big-endian byte order.

Packit ae235b
The conversion is symmetric so it can be used both ways.

Packit ae235b
Packit ae235b

Parameters

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

val

Packit ae235b

a guint64 value in little-endian or big-endian byte order

Packit ae235b
 
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Returns

Packit ae235b

val

Packit ae235b
converted to the opposite byte order

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Types and Values

Packit ae235b
Packit ae235b

G_BYTE_ORDER

Packit ae235b
#define G_BYTE_ORDER G_LITTLE_ENDIAN
Packit ae235b
Packit ae235b

The host byte order.

Packit ae235b
This can be either G_LITTLE_ENDIAN or G_BIG_ENDIAN (support for
Packit ae235b
G_PDP_ENDIAN may be added in future.)

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_LITTLE_ENDIAN

Packit ae235b
#define G_LITTLE_ENDIAN 1234
Packit ae235b
Packit ae235b

Specifies one of the possible types of byte order.

Packit ae235b
See G_BYTE_ORDER.

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_BIG_ENDIAN

Packit ae235b
#define G_BIG_ENDIAN    4321
Packit ae235b
Packit ae235b

Specifies one of the possible types of byte order.

Packit ae235b
See G_BYTE_ORDER.

Packit ae235b
Packit ae235b

Packit ae235b
Packit ae235b

G_PDP_ENDIAN

Packit ae235b
#define G_PDP_ENDIAN    3412		/* unused, need specific PDP check */	
Packit ae235b
Packit ae235b

Specifies one of the possible types of byte order

Packit ae235b
(currently unused). See G_BYTE_ORDER.

Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b
Packit ae235b

Generated by GTK-Doc V1.27
Packit ae235b
</body>
Packit ae235b
</html>