From 9a390acd44203dc7847ad05d86ac07082336c7fe Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 17 Feb 2015 17:25:28 +0100 Subject: llmnr-query: Add simple LLMNR query program Signed-off-by: Tobias Klauser --- util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index 8a21467..13a8637 100644 --- a/util.h +++ b/util.h @@ -21,6 +21,7 @@ #define UTIL_H #include +#include #include #include @@ -55,4 +56,16 @@ void *xzalloc(size_t size); void *xrealloc(void *ptr, size_t size); char *xstrdup(const char *s); +static inline bool xstreq(const char *str1, const char *str2) +{ + size_t n = strlen(str1); + + if (n != strlen(str2)) + return false; + if (strncmp(str1, str2, n) != 0) + return false; + + return true; +} + #endif /* UTIL_H */ -- cgit v1.2.3-54-g00ecf xt.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
ModeNameSize