diff options
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2,6 +2,7 @@ #define fooutilshfoo #include <stdio.h> +#include <string.h> #include <stdbool.h> #include <stdlib.h> #include <linux/if_packet.h> @@ -91,6 +92,16 @@ static inline bool empty_str(const char *str) return false; } +static inline bool streq(const char *a, const char *b) +{ + return strcmp(a, b) == 0; +} + +static inline bool strcaseeq(const char *a, const char *b) +{ + return strcasecmp(a, b) == 0; +} + #if __BYTE_ORDER == __LITTLE_ENDIAN #define chtobe32(x) __bswap_constant_32(x) #else |