libosmocore UNKNOWN
Osmocom core library
Loading...
Searching...
No Matches
byteswap.h File Reference
#include <stdint.h>
#include <osmocom/core/endian.h>

Go to the source code of this file.

Macros

#define osmo_ntohl(x)
#define osmo_ntohs(x)
#define osmo_htonl(x)
#define osmo_htons(x)

Functions

static uint32_t osmo_swab32 (uint32_t in)
 byte-swap a 32bit word
static uint16_t osmo_swab16 (uint16_t in)
 byte-swap a 16bit word

Macro Definition Documentation

◆ osmo_htonl

#define osmo_htonl ( x)
Value:
static uint32_t osmo_swab32(uint32_t in)
byte-swap a 32bit word
Definition byteswap.h:10
uint32_t x
Definition jhash.h:0

Referenced by _gsmtap_raw_output(), and gsmtap_makemsg_ex().

◆ osmo_htons

#define osmo_htons ( x)
Value:
static uint16_t osmo_swab16(uint16_t in)
byte-swap a 16bit word
Definition byteswap.h:25

Referenced by gsmtap_makemsg_ex().

◆ osmo_ntohl

#define osmo_ntohl ( x)
Value:

◆ osmo_ntohs

#define osmo_ntohs ( x)
Value:

Function Documentation

◆ osmo_swab16()

uint16_t osmo_swab16 ( uint16_t in)
inlinestatic

byte-swap a 16bit word

Parameters
[in]into be swapped 16bit word
Returns
byte-swapped 16bit word

◆ osmo_swab32()

uint32_t osmo_swab32 ( uint32_t in)
inlinestatic

byte-swap a 32bit word

Parameters
[in]into be swapped 32bit word
Returns
byte-swapped 32bit word