Bitcoin Core  21.99.0
P2P Digital Currency
Functions
common.h File Reference
#include <stdint.h>
#include <string.h>
#include <compat/endian.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static uint16_t ReadLE16 (const unsigned char *ptr)
 
static uint32_t ReadLE32 (const unsigned char *ptr)
 
static uint64_t ReadLE64 (const unsigned char *ptr)
 
static void WriteLE16 (unsigned char *ptr, uint16_t x)
 
static void WriteLE32 (unsigned char *ptr, uint32_t x)
 
static void WriteLE64 (unsigned char *ptr, uint64_t x)
 
static uint16_t ReadBE16 (const unsigned char *ptr)
 
static uint32_t ReadBE32 (const unsigned char *ptr)
 
static uint64_t ReadBE64 (const unsigned char *ptr)
 
static void WriteBE32 (unsigned char *ptr, uint32_t x)
 
static void WriteBE64 (unsigned char *ptr, uint64_t x)
 
static uint64_t CountBits (uint64_t x)
 Return the smallest number n such that (x >> n) == 0 (or 64 if the highest bit in x is set. More...
 

Function Documentation

◆ CountBits()

static uint64_t CountBits ( uint64_t  x)
inlinestatic

Return the smallest number n such that (x >> n) == 0 (or 64 if the highest bit in x is set.

Definition at line 90 of file common.h.

Here is the caller graph for this function:

◆ ReadBE16()

static uint16_t ReadBE16 ( const unsigned char *  ptr)
inlinestatic

Definition at line 56 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadBE32()

static uint32_t ReadBE32 ( const unsigned char *  ptr)
inlinestatic

Definition at line 63 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadBE64()

static uint64_t ReadBE64 ( const unsigned char *  ptr)
inlinestatic

Definition at line 70 of file common.h.

Here is the call graph for this function:

◆ ReadLE16()

static uint16_t ReadLE16 ( const unsigned char *  ptr)
inlinestatic

Definition at line 17 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadLE32()

static uint32_t ReadLE32 ( const unsigned char *  ptr)
inlinestatic

Definition at line 24 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadLE64()

static uint64_t ReadLE64 ( const unsigned char *  ptr)
inlinestatic

Definition at line 31 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteBE32()

static void WriteBE32 ( unsigned char *  ptr,
uint32_t  x 
)
inlinestatic

Definition at line 77 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteBE64()

static void WriteBE64 ( unsigned char *  ptr,
uint64_t  x 
)
inlinestatic

Definition at line 83 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteLE16()

static void WriteLE16 ( unsigned char *  ptr,
uint16_t  x 
)
inlinestatic

Definition at line 38 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteLE32()

static void WriteLE32 ( unsigned char *  ptr,
uint32_t  x 
)
inlinestatic

Definition at line 44 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteLE64()

static void WriteLE64 ( unsigned char *  ptr,
uint64_t  x 
)
inlinestatic

Definition at line 50 of file common.h.

Here is the call graph for this function:
Here is the caller graph for this function: