OpenVPN
Macros | Functions
integer.h File Reference
#include "error.h"
Include dependency graph for integer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define htonll(x)
 
#define ntohll(x)
 

Functions

static int max_int (int x, int y)
 
static int min_int (int x, int y)
 
static int constrain_int (int x, int min, int max)
 
static int modulo_subtract (int x, int y, int mod)
 
static int modulo_add (int x, int y, int mod)
 
static size_t adjust_power_of_2 (size_t u)
 
static int index_verify (int index, int size, const char *file, int line)
 

Macro Definition Documentation

◆ htonll

#define htonll (   x)
Value:
((1==htonl(1)) ? (x) : \
((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))
unsigned __int64 uint64_t
Definition: config-msvc.h:120

Definition at line 30 of file integer.h.

Referenced by tls_crypt_v2_write_client_key_file().

◆ ntohll

#define ntohll (   x)
Value:
((1==ntohl(1)) ? (x) : \
((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
unsigned __int64 uint64_t
Definition: config-msvc.h:120

Definition at line 35 of file integer.h.

Function Documentation

◆ adjust_power_of_2()

static size_t adjust_power_of_2 ( size_t  u)
inlinestatic

Definition at line 136 of file integer.h.

References ASSERT.

Referenced by argv_grow(), hash_init(), and mbuf_init().

◆ constrain_int()

static int constrain_int ( int  x,
int  min,
int  max 
)
inlinestatic

◆ index_verify()

static int index_verify ( int  index,
int  size,
const char *  file,
int  line 
)
inlinestatic

Definition at line 150 of file integer.h.

References M_FATAL, and msg.

◆ max_int()

static int max_int ( int  x,
int  y 
)
inlinestatic

◆ min_int()

static int min_int ( int  x,
int  y 
)
inlinestatic

◆ modulo_add()

static int modulo_add ( int  x,
int  y,
int  mod 
)
inlinestatic

Definition at line 116 of file integer.h.

References ASSERT.

Referenced by fragment_list_get_buf(), fragment_outgoing(), and log_index().

◆ modulo_subtract()

static int modulo_subtract ( int  x,
int  y,
int  mod 
)
inlinestatic

Definition at line 101 of file integer.h.

References ASSERT.

Referenced by fragment_list_get_buf().