udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
bswap.h File Reference
`#include "config.h"`
`#include <inttypes.h>`
`#include <sys/types.h>`
Include dependency graph for bswap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | constant_swab16(x)
#define | constant_swab32(x)
#define | constant_swab64(x)
#define | constant_swab16p(x)
#define | constant_swab32p(x)
#define | constant_swab64p(x)
#define | cpu_to_le16(x) le16_to_cpu((x))
#define | cpu_to_le32(x) le32_to_cpu((x))
#define | cpu_to_le64(x) le64_to_cpu((x))
#define | constant_cpu_to_le16(x) constant_le16_to_cpu((x))
#define | constant_cpu_to_le32(x) constant_le32_to_cpu((x))
#define | constant_cpu_to_le64(x) constant_le64_to_cpu((x))
#define | cpu_to_le16p(x) le16_to_cpup((x))
#define | cpu_to_le32p(x) le32_to_cpup((x))
#define | cpu_to_le64p(x) le64_to_cpup((x))
#define | constant_cpu_to_le16p(x) constant_le16_to_cpup((x))
#define | constant_cpu_to_le32p(x) constant_le32_to_cpup((x))
#define | constant_cpu_to_le64p(x) constant_le64_to_cpup((x))
#define | cpu_to_be16(x) be16_to_cpu((x))
#define | cpu_to_be32(x) be32_to_cpu((x))
#define | cpu_to_be64(x) be64_to_cpu((x))
#define | constant_cpu_to_be16(x) constant_be16_to_cpu((x))
#define | constant_cpu_to_be32(x) constant_be32_to_cpu((x))
#define | constant_cpu_to_be64(x) constant_be64_to_cpu((x))
#define | cpu_to_be16p(x) be16_to_cpup((x))
#define | cpu_to_be32p(x) be32_to_cpup((x))
#define | cpu_to_be64p(x) be64_to_cpup((x))
#define | constant_cpu_to_be16p(x) constant_be16_to_cpup((x))
#define | constant_cpu_to_be32p(x) constant_be32_to_cpup((x))
#define | constant_cpu_to_be64p(x) constant_be64_to_cpup((x))

## Functions
static uint16_t | swab16 (uint16_t x)
static uint32_t | swab32 (uint32_t x)
static uint64_t | swab64 (uint64_t x)
static uint16_t | swab16p (uint16_t *x)
static uint32_t | swab32p (uint32_t *x)
static uint64_t | swab64p (uint64_t *x)

## Macro Definition Documentation

#define constant_cpu_to_be16 | ( |  | x | ) | constant_be16_to_cpu((x))

Definition at line 266 of file bswap.h.

#define constant_cpu_to_be16p | ( |  | x | ) | constant_be16_to_cpup((x))

Definition at line 274 of file bswap.h.

#define constant_cpu_to_be32 | ( |  | x | ) | constant_be32_to_cpu((x))

Definition at line 267 of file bswap.h.

#define constant_cpu_to_be32p | ( |  | x | ) | constant_be32_to_cpup((x))

Definition at line 275 of file bswap.h.

#define constant_cpu_to_be64 | ( |  | x | ) | constant_be64_to_cpu((x))

Definition at line 268 of file bswap.h.

#define constant_cpu_to_be64p | ( |  | x | ) | constant_be64_to_cpup((x))

Definition at line 276 of file bswap.h.

#define constant_cpu_to_le16 | ( |  | x | ) | constant_le16_to_cpu((x))

Definition at line 250 of file bswap.h.

#define constant_cpu_to_le16p | ( |  | x | ) | constant_le16_to_cpup((x))

Definition at line 258 of file bswap.h.

#define constant_cpu_to_le32 | ( |  | x | ) | constant_le32_to_cpu((x))

Definition at line 251 of file bswap.h.

#define constant_cpu_to_le32p | ( |  | x | ) | constant_le32_to_cpup((x))

Definition at line 259 of file bswap.h.

#define constant_cpu_to_le64 | ( |  | x | ) | constant_le64_to_cpu((x))

Definition at line 252 of file bswap.h.

#define constant_cpu_to_le64p | ( |  | x | ) | constant_le64_to_cpup((x))

Definition at line 260 of file bswap.h.

#define constant_swab16 | ( |  | x | ) |

Value:
((uint16_t)((((uint16_t)(x) & 0x00FFU) << 8) | \
(((uint16_t)(x) & 0xFF00U) >> 8)))

Definition at line 45 of file bswap.h.

#define constant_swab16p | ( |  | x | ) |

Value:
((uint16_t)(((*(uint16_t *)(x) & 0x00FFU) << 8) | \
((*(uint16_t *)(x) & 0xFF00U) >> 8)))

Definition at line 91 of file bswap.h.

#define constant_swab32 | ( |  | x | ) |

Value:
((uint32_t)((((uint32_t)(x) & 0x000000FFU) << 24) | \
(((uint32_t)(x) & 0x0000FF00U) << 8) | \
(((uint32_t)(x) & 0x00FF0000U) >> 8) | \
(((uint32_t)(x) & 0xFF000000U) >> 24)))

Definition at line 49 of file bswap.h.

#define constant_swab32p | ( |  | x | ) |

Value:
((uint32_t)(((*(uint32_t *)(x) & 0x000000FFU) << 24) | \
((*(uint32_t *)(x) & 0x0000FF00U) << 8) | \
((*(uint32_t *)(x) & 0x00FF0000U) >> 8) | \
((*(uint32_t *)(x) & 0xFF000000U) >> 24)))

Definition at line 95 of file bswap.h.

#define constant_swab64 | ( |  | x | ) |

Value:
((uint64_t)((((uint64_t)(x) & 0x00000000000000FFULL) << 56) | \
(((uint64_t)(x) & 0x000000000000FF00ULL) << 40) | \
(((uint64_t)(x) & 0x0000000000FF0000ULL) << 24) | \
(((uint64_t)(x) & 0x00000000FF000000ULL) << 8) | \
(((uint64_t)(x) & 0x000000FF00000000ULL) >> 8) | \
(((uint64_t)(x) & 0x0000FF0000000000ULL) >> 24) | \
(((uint64_t)(x) & 0x00FF000000000000ULL) >> 40) | \
(((uint64_t)(x) & 0xFF00000000000000ULL) >> 56)))

Definition at line 55 of file bswap.h.

#define constant_swab64p | ( |  | x | ) |

Value:
((uint64_t)(((*(uint64_t *)(x) & 0x00000000000000FFULL) << 56) | \
((*(uint64_t *)(x) & 0x000000000000FF00ULL) << 40) | \
((*(uint64_t *)(x) & 0x0000000000FF0000ULL) << 24) | \
((*(uint64_t *)(x) & 0x00000000FF000000ULL) << 8) | \
((*(uint64_t *)(x) & 0x000000FF00000000ULL) >> 8) | \
((*(uint64_t *)(x) & 0x0000FF0000000000ULL) >> 24) | \
((*(uint64_t *)(x) & 0x00FF000000000000ULL) >> 40) | \
((*(uint64_t *)(x) & 0xFF00000000000000ULL) >> 56)))

Definition at line 101 of file bswap.h.

#define cpu_to_be16 | ( |  | x | ) | be16_to_cpu((x))

Definition at line 262 of file bswap.h.

#define cpu_to_be16p | ( |  | x | ) | be16_to_cpup((x))

Definition at line 270 of file bswap.h.

#define cpu_to_be32 | ( |  | x | ) | be32_to_cpu((x))

Definition at line 263 of file bswap.h.

#define cpu_to_be32p | ( |  | x | ) | be32_to_cpup((x))

Definition at line 271 of file bswap.h.

#define cpu_to_be64 | ( |  | x | ) | be64_to_cpu((x))

Definition at line 264 of file bswap.h.

#define cpu_to_be64p | ( |  | x | ) | be64_to_cpup((x))

Definition at line 272 of file bswap.h.

#define cpu_to_le16 | ( |  | x | ) | le16_to_cpu((x))

Definition at line 246 of file bswap.h.

#define cpu_to_le16p | ( |  | x | ) | le16_to_cpup((x))

Definition at line 254 of file bswap.h.

#define cpu_to_le32 | ( |  | x | ) | le32_to_cpu((x))

Definition at line 247 of file bswap.h.

#define cpu_to_le32p | ( |  | x | ) | le32_to_cpup((x))

Definition at line 255 of file bswap.h.

#define cpu_to_le64 | ( |  | x | ) | le64_to_cpu((x))

Definition at line 248 of file bswap.h.

#define cpu_to_le64p | ( |  | x | ) | le64_to_cpup((x))

Definition at line 256 of file bswap.h.

## Function Documentation

static uint16_t swab16 | ( | uint16_t | x | ) |
| inline static

Definition at line 65 of file bswap.h.

static uint16_t swab16p | ( | uint16_t * | x | ) |
| inline static

Definition at line 112 of file bswap.h.

static uint32_t swab32 | ( | uint32_t | x | ) |
| inline static

Definition at line 71 of file bswap.h.

static uint32_t swab32p | ( | uint32_t * | x | ) |
| inline static

Definition at line 118 of file bswap.h.

static uint64_t swab64 | ( | uint64_t | x | ) |
| inline static

Definition at line 79 of file bswap.h.

static uint64_t swab64p | ( | uint64_t * | x | ) |
| inline static

Definition at line 126 of file bswap.h.