]> git.sesse.net Git - cubemap/blobdiff - sa_compare.h
Add a listen statement to listen on only specific IP addresses, in addition to the...
[cubemap] / sa_compare.h
diff --git a/sa_compare.h b/sa_compare.h
new file mode 100644 (file)
index 0000000..95fa0d8
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef _SA_COMPARE_H
+#define _SA_COMPARE_H
+
+#include <netinet/in.h>
+
+// A utility functor to help use sockaddr_in6 as keys in a map.
+struct Sockaddr6Compare {
+       bool operator() (const sockaddr_in6 &a, const sockaddr_in6 &b) const;
+};
+
+#endif  // !defined(_SA_COMPARE_H)