diff options
Diffstat (limited to 'lib/frrstr.h')
| -rw-r--r-- | lib/frrstr.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/frrstr.h b/lib/frrstr.h index 441d7b8670..d52d6a4482 100644 --- a/lib/frrstr.h +++ b/lib/frrstr.h @@ -154,6 +154,26 @@ bool frrstr_endswith(const char *str, const char *suffix); */ int all_digit(const char *str); +/* + * Copy the hexadecimal representation of the string to a buffer. + * + * buff + * Buffer to copy result into with size of at least (2 * num) + 1. + * + * bufsiz + * Size of destination buffer. + * + * str + * String to represent as hexadecimal. + * + * num + * Number of characters to copy. + * + * Returns: + * Pointer to buffer containing resulting hexadecimal representation. + */ +char *frrstr_hex(char *buff, size_t bufsiz, const uint8_t *str, size_t num); + #ifdef __cplusplus } #endif |
