summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index f87159e..a38602c 100644
--- a/utils.h
+++ b/utils.h
@@ -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