MINOR: standard.c: ipcmp() function to compare 2 IP addresses stored in 2 struct sockaddr_storage
new ipcmp() function to compare 2 IP addresses stored in struct
sockaddr_storage.
Returns 0 if both addresses doesn't match and 1 if they do.
diff --git a/include/common/standard.h b/include/common/standard.h
index 5afaad2..bc1ab40 100644
--- a/include/common/standard.h
+++ b/include/common/standard.h
@@ -880,6 +880,12 @@
*/
extern int v6tov4(struct in_addr *sin_addr, struct in6_addr *sin6_addr);
+/* compare two struct sockaddr_storage and return:
+ * 0 (true) if the addr is the same in both
+ * 1 (false) if the addr is not the same in both
+ */
+int ipcmp(struct sockaddr_storage *ss1, struct sockaddr_storage *ss2);
+
char *human_time(int t, short hz_div);
extern const char *monthname[];