diff options
-rw-r--r-- | datapath-windows/ovsext/Util.c | 14 | ||||
-rw-r--r-- | datapath-windows/ovsext/Util.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Util.c b/datapath-windows/ovsext/Util.c index 51360a8f9..2dfba8e3a 100644 --- a/datapath-windows/ovsext/Util.c +++ b/datapath-windows/ovsext/Util.c @@ -87,3 +87,17 @@ OvsAppendList(PLIST_ENTRY dst, PLIST_ENTRY src) src->Flink = src; src->Blink = src; } + +BOOLEAN +OvsCompareString(PVOID string1, PVOID string2) +{ + /* + * Not a super-efficient string compare since we walk over the strings + * twice: to initialize, and then to do the comparison. + */ + STRING str1, str2; + + RtlInitString(&str1, string1); + RtlInitString(&str2, string2); + return RtlEqualString(&str1, &str2, FALSE); +} diff --git a/datapath-windows/ovsext/Util.h b/datapath-windows/ovsext/Util.h index c45d48881..e75220931 100644 --- a/datapath-windows/ovsext/Util.h +++ b/datapath-windows/ovsext/Util.h @@ -75,4 +75,6 @@ VOID OvsAppendList(PLIST_ENTRY dst, PLIST_ENTRY src); #define BIT16(_x) ((UINT16)0x1 << (_x)) #define BIT32(_x) ((UINT32)0x1 << (_x)) +BOOLEAN OvsCompareString(PVOID string1, PVOID string2); + #endif /* __UTIL_H_ */ |