summaryrefslogtreecommitdiff
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-rw-r--r--osdep/Binder.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/osdep/Binder.hpp b/osdep/Binder.hpp
index 1839ecc2..a0b47367 100644
--- a/osdep/Binder.hpp
+++ b/osdep/Binder.hpp
@@ -57,6 +57,7 @@
#include <algorithm>
#include <utility>
#include <map>
+#include <set>
#include "../node/NonCopyable.hpp"
#include "../node/InetAddress.hpp"
@@ -471,6 +472,20 @@ Binder_send_packet:
return aa;
}
+ /**
+ * @param addr Address to check
+ * @return True if this is a bound local interface address
+ */
+ inline bool isBoundLocalInterfaceAddress(const InetAddress &addr) const
+ {
+ Mutex::Lock _l(_lock);
+ for(std::vector<_Binding>::const_iterator b(_bindings.begin());b!=_bindings.end();++b) {
+ if (b->address == addr)
+ return true;
+ }
+ return false;
+ }
+
private:
std::vector<_Binding> _bindings;
Mutex _lock;