aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/utils.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstrongswan/utils.h b/src/libstrongswan/utils.h
index c41e1d6b3..8ab732205 100644
--- a/src/libstrongswan/utils.h
+++ b/src/libstrongswan/utils.h
@@ -57,7 +57,7 @@
#define streq(x,y) (strcmp(x, y) == 0)
/**
- * Macro compares two strings for equality
+ * Macro compares two strings for equality, length limited
*/
#define strneq(x,y,len) (strncmp(x, y, len) == 0)
@@ -67,6 +67,11 @@
#define strcaseeq(x,y) (strcasecmp(x, y) == 0)
/**
+ * Macro compares two strings for equality ignoring case, length limited
+ */
+#define strncaseeq(x,y,len) (strncasecmp(x, y, len) == 0)
+
+/**
* Macro compares two binary blobs for equality
*/
#define memeq(x,y,len) (memcmp(x, y, len) == 0)