libosmocore 1.10.0.64-ff3d
Osmocom core library
|
#include <osmocom/core/utils.h>
Go to the source code of this file.
Functions | |
static uint32_t | osmo_load32le_ext (const void *p, uint8_t n) |
load unaligned n-byte integer (little-endian encoding) into uint32_t, into the least significant octets. More... | |
static uint32_t | osmo_load32be_ext (const void *p, uint8_t n) |
load unaligned n-byte integer (big-endian encoding) into uint32_t, into the MOST significant octets. More... | |
static uint32_t | osmo_load32be_ext_2 (const void *p, uint8_t n) |
load unaligned n-byte integer (big-endian encoding) into uint32_t, into the least significant octets. More... | |
static void | osmo_store32le_ext (uint32_t x, void *p, uint8_t n) |
store unaligned n-byte integer (little-endian encoding) from uint32_t More... | |
static void | osmo_store32be_ext (uint32_t x, void *p, uint8_t n) |
store unaligned n-byte integer (big-endian encoding) from uint32_t More... | |
static uint32_t | osmo_load32le (const void *p) |
load unaligned 32-bit integer (little-endian encoding) More... | |
static uint32_t | osmo_load32be (const void *p) |
load unaligned 32-bit integer (big-endian encoding) More... | |
static void | osmo_store32le (uint32_t x, void *p) |
store unaligned 32-bit integer (little-endian encoding) More... | |
static void | osmo_store32be (uint32_t x, void *p) |
store unaligned 32-bit integer (big-endian encoding) More... | |
|
inlinestatic |
load unaligned 32-bit integer (big-endian encoding)
References osmo_load32be_ext().
Referenced by msgb_get_u32(), and msgb_pull_u32().
|
inlinestatic |
load unaligned n-byte integer (big-endian encoding) into uint32_t, into the MOST significant octets.
WARNING: for n < sizeof(uint32_t), the result is not returned in the least significant octets, as one might expect. To always return the same value as fed to osmo_store32be_ext() before, use osmo_load32be_ext_2().
[in] | p | Buffer where integer is stored |
[in] | n | Number of bytes stored in p |
References n, and OSMO_ASSERT.
Referenced by osmo_load32be().
|
inlinestatic |
load unaligned n-byte integer (big-endian encoding) into uint32_t, into the least significant octets.
[in] | p | Buffer where integer is stored |
[in] | n | Number of bytes stored in p |
References n, and OSMO_ASSERT.
|
inlinestatic |
load unaligned 32-bit integer (little-endian encoding)
References osmo_load32le_ext().
|
inlinestatic |
load unaligned n-byte integer (little-endian encoding) into uint32_t, into the least significant octets.
[in] | p | Buffer where integer is stored |
[in] | n | Number of bytes stored in p |
References n, and OSMO_ASSERT.
Referenced by osmo_load32le().
|
inlinestatic |
store unaligned 32-bit integer (big-endian encoding)
References osmo_store32be_ext(), and x.
Referenced by _gsmtap_raw_output(), msgb_push_u32(), and msgb_put_u32().
|
inlinestatic |
store unaligned n-byte integer (big-endian encoding) from uint32_t
[in] | x | unsigned 32 bit integer |
[out] | p | Buffer to store integer |
[in] | n | Number of bytes to store |
References n, OSMO_ASSERT, and x.
Referenced by osmo_store32be().
|
inlinestatic |
store unaligned 32-bit integer (little-endian encoding)
References osmo_store32le_ext(), and x.
|
inlinestatic |
store unaligned n-byte integer (little-endian encoding) from uint32_t
[in] | x | unsigned 32 bit integer |
[out] | p | Buffer to store integer |
[in] | n | Number of bytes to store |
References n, OSMO_ASSERT, and x.
Referenced by osmo_store32le().