EMANE  1.2.1
net.h File Reference
#include <cstdlib>
#include <cstdio>

Go to the source code of this file.

Namespaces

 EMANE
 

Macros

#define SWAP_16(x)
 
#define SWAP_32(x)
 
#define SWAP_64(x)
 

Functions

constexpr std::uint64_t EMANE::HTONLL (std::uint64_t x)
 
constexpr std::uint64_t EMANE::NTOHLL (std::uint64_t x)
 
constexpr std::uint32_t EMANE::HTONL (std::uint32_t x)
 
constexpr std::uint32_t EMANE::NTOHL (std::uint32_t x)
 
constexpr std::uint16_t EMANE::HTONS (std::uint16_t x)
 
constexpr std::uint16_t EMANE::NTOHS (std::uint16_t x)
 

Macro Definition Documentation

◆ SWAP_16

#define SWAP_16 (   x)
Value:
((((x) & 0XFF00) >> 8)) | \
(((x) & 0X00FF) << 8)

Definition at line 60 of file net.h.

◆ SWAP_32

#define SWAP_32 (   x)
Value:
((((x) & 0XFF000000UL) >> 24) | \
(((x) & 0X00FF0000UL) >> 8) | \
(((x) & 0X0000FF00UL) << 8) | \
(((x) & 0X000000FFUL) << 24))

Definition at line 64 of file net.h.

◆ SWAP_64

#define SWAP_64 (   x)
Value:
((((x) & 0XFF00000000000000ULL) >> 56) | \
(((x) & 0X00FF000000000000ULL) >> 40) | \
(((x) & 0X0000FF0000000000ULL) >> 24) | \
(((x) & 0X000000FF00000000ULL) >> 8) | \
(((x) & 0X00000000FF000000ULL) << 8) | \
(((x) & 0X0000000000FF0000ULL) << 24) | \
(((x) & 0X000000000000FF00ULL) << 40) | \
(((x) & 0X00000000000000FFULL) << 56))

Definition at line 70 of file net.h.