XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
hex.h File Reference
#include <linux/types.h>
Include dependency graph for hex.h:

Go to the source code of this file.

Macros

#define hex_asc_lo(x)   hex_asc[((x) & 0x0f)]
 
#define hex_asc_hi(x)   hex_asc[((x) & 0xf0) >> 4]
 
#define hex_asc_upper_lo(x)   hex_asc_upper[((x) & 0x0f)]
 
#define hex_asc_upper_hi(x)   hex_asc_upper[((x) & 0xf0) >> 4]
 

Functions

int hex_to_bin (unsigned char ch)
 
int __must_check hex2bin (u8 *dst, const char *src, size_t count)
 
char * bin2hex (char *dst, const void *src, size_t count)
 
bool mac_pton (const char *s, u8 *mac)
 

Variables

const char hex_asc []
 
const char hex_asc_upper []
 

Macro Definition Documentation

◆ hex_asc_hi

#define hex_asc_hi (   x)    hex_asc[((x) & 0xf0) >> 4]

◆ hex_asc_lo

#define hex_asc_lo (   x)    hex_asc[((x) & 0x0f)]

◆ hex_asc_upper_hi

#define hex_asc_upper_hi (   x)    hex_asc_upper[((x) & 0xf0) >> 4]

◆ hex_asc_upper_lo

#define hex_asc_upper_lo (   x)    hex_asc_upper[((x) & 0x0f)]

Function Documentation

◆ bin2hex()

char * bin2hex ( char *  dst,
const void *  src,
size_t  count 
)
extern

◆ hex2bin()

int __must_check hex2bin ( u8 *  dst,
const char *  src,
size_t  count 
)
extern

◆ hex_to_bin()

int hex_to_bin ( unsigned char  ch)
extern

◆ mac_pton()

bool mac_pton ( const char *  s,
u8 *  mac 
)

Variable Documentation

◆ hex_asc

const char hex_asc[]
extern

◆ hex_asc_upper

const char hex_asc_upper[]
extern