linux/include/linux/hex.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_HEX_H
#define _LINUX_HEX_H

#include <linux/types.h>

extern const char hex_asc[];
#define hex_asc_lo(x)
#define hex_asc_hi(x)

static inline char *hex_byte_pack(char *buf, u8 byte)
{}

extern const char hex_asc_upper[];
#define hex_asc_upper_lo(x)
#define hex_asc_upper_hi(x)

static inline char *hex_byte_pack_upper(char *buf, u8 byte)
{}

extern int hex_to_bin(unsigned char ch);
extern int __must_check hex2bin(u8 *dst, const char *src, size_t count);
extern char *bin2hex(char *dst, const void *src, size_t count);

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

#endif