1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Lib: Add functions for reading and writing of bytestrings

Based on patch from Alexander Zubkov, thanks!
This commit is contained in:
Ondrej Zajicek
2023-08-24 03:04:58 +02:00
parent e3c0eca956
commit eddc0ffdab
3 changed files with 99 additions and 50 deletions

View File

@@ -33,6 +33,9 @@ u64 bstrtoul10(const char *str, char **end);
u64 bstrtoul16(const char *str, char **end);
byte bstrtobyte16(const char *str);
int bstrhextobin(const char *s, byte *b);
int bstrbintohex(const byte *b, size_t len, char *buf, size_t size, char delim);
int patmatch(const byte *pat, const byte *str);
static inline char *xbasename(const char *str)