WAND Trace processing  4.0.5
lt_bswap.h File Reference

Header file containing definitions of functions and macros that deal with byteswapping within libtrace and libpacketdump. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define bswap_host_to_be64(num)   ((uint64_t)(num))
 
#define bswap_host_to_le64(num)   byteswap64(num)
 
#define bswap_host_to_be32(num)   ((uint32_t)(num))
 
#define bswap_host_to_le32(num)   byteswap32(num)
 
#define bswap_host_to_be16(num)   ((uint16_t)(num))
 
#define bswap_host_to_le16(num)   byteswap16(num)
 
#define bswap_be_to_host64(num)   ((uint64_t)(num))
 
#define bswap_le_to_host64(num)   byteswap64(num)
 
#define bswap_be_to_host32(num)   ((uint32_t)(num))
 
#define bswap_le_to_host32(num)   byteswap32(num)
 
#define bswap_be_to_host16(num)   ((uint16_t)(num))
 
#define bswap_le_to_host16(num)   byteswap16(num)
 

Functions

uint64_t byteswap64 (uint64_t num)
 Byteswaps a 64-bit value. More...
 
uint32_t byteswap32 (uint32_t num)
 Byteswaps a 32-bit value. More...
 
uint16_t byteswap16 (uint16_t num)
 Byteswaps a 16-bit value. More...
 

Detailed Description

Header file containing definitions of functions and macros that deal with byteswapping within libtrace and libpacketdump.

Author
Perry Lorier
Shane Alcock
Version
$Id$

Function Documentation

uint16_t byteswap16 ( uint16_t  num)

Byteswaps a 16-bit value.

Parameters
numThe value to be byteswapped.
Returns
The byteswapped 16-bit number
uint32_t byteswap32 ( uint32_t  num)

Byteswaps a 32-bit value.

Parameters
numThe value to be byteswapped.
Returns
The byteswapped 32-bit number

Referenced by byteswap64().

uint64_t byteswap64 ( uint64_t  num)

Byteswaps a 64-bit value.

Parameters
numThe value to be byteswapped.
Returns
The byteswapped 64-bit number

References byteswap32().