2023-02-01 12:26:07 +00:00
|
|
|
#ifndef SOCKS_UTIL_H_
|
|
|
|
|
#define SOCKS_UTIL_H_
|
|
|
|
|
|
|
|
|
|
#include <stddef.h>
|
2023-02-06 20:41:40 +00:00
|
|
|
#include <stdbool.h>
|
2023-02-01 12:26:07 +00:00
|
|
|
|
|
|
|
|
extern void data_size_to_string(size_t value, char *out, size_t outsz);
|
2023-02-06 20:41:40 +00:00
|
|
|
static inline bool power_of_2(size_t x) { return (x > 0 && (x & (x - 1)) == 0); }
|
2023-02-01 12:26:07 +00:00
|
|
|
|
|
|
|
|
#endif
|