summaryrefslogtreecommitdiff
path: root/node/Network.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-06-10 21:41:34 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-06-10 21:41:34 -0700
commitc30f9832b0a926914986bc9160190dbfec7ceddd (patch)
tree02f10d85b10bb89757c4541632aa906b289dc228 /node/Network.hpp
parentd44e1349d8e83b875b1a102b2b1ce31613a10924 (diff)
downloadinfinitytier-c30f9832b0a926914986bc9160190dbfec7ceddd.tar.gz
infinitytier-c30f9832b0a926914986bc9160190dbfec7ceddd.zip
Packet decoder work for EXT_FRAME for bridging - GitHub issue #68
Diffstat (limited to 'node/Network.hpp')
-rw-r--r--node/Network.hpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/node/Network.hpp b/node/Network.hpp
index b40afd45..0a89c848 100644
--- a/node/Network.hpp
+++ b/node/Network.hpp
@@ -372,21 +372,6 @@ public:
}
/**
- * Inject a frame into tap with local MAC as destination MAC (if it's created)
- *
- * @param from Origin MAC
- * @param etherType Ethernet frame type
- * @param data Frame data
- * @param len Frame length
- */
- inline void tapPut(const MAC &from,unsigned int etherType,const void *data,unsigned int len)
- {
- EthernetTap *t = _tap;
- if (t)
- t->put(from,t->mac(),etherType,data,len);
- }
-
- /**
* @return Tap device name or empty string if still initializing
*/
inline std::string tapDeviceName() const
@@ -401,6 +386,7 @@ public:
* @return Ethernet MAC address for this network's local interface
*/
inline const MAC &mac() const
+ throw()
{
return _mac;
}
@@ -417,6 +403,20 @@ public:
}
/**
+ * Shortcut for config()->permitsBridging(), returns false if no config
+ *
+ * @param peer Peer address to check
+ * @return True if peer can bridge other Ethernet nodes into this network or network is in permissive bridging mode
+ */
+ inline bool permitsBridging(const Address &peer) const
+ {
+ Mutex::Lock _l(_lock);
+ if (_config)
+ return _config->permitsBridging(peer);
+ return false;
+ }
+
+ /**
* @param mac MAC address
* @return ZeroTier address of bridge to this MAC or null address if not found
*/