diff options
Diffstat (limited to 'node')
-rw-r--r-- | node/Node.cpp | 16 | ||||
-rw-r--r-- | node/Node.hpp | 17 |
2 files changed, 0 insertions, 33 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 5990b83a..07f6637b 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -1018,22 +1018,6 @@ bool Node::updateCheck() return false; } -bool Node::injectPacketFromHost(uint64_t nwid,const unsigned char *from,const unsigned char *to,unsigned int etherType,const void *data,unsigned int len) -{ - if (!running()) - return false; - if ((!from)||(!to)) - return false; - - _NodeImpl *impl = (_NodeImpl *)_impl; - RuntimeEnvironment *RR = (RuntimeEnvironment *)&(impl->renv); - - SharedPtr<Network> network(RR->nc->network(nwid)); - if (network) - return network->tapInjectPacketFromHost(MAC(from,6),MAC(to,6),etherType,data,len); - return false; -} - class _VersionStringMaker { public: diff --git a/node/Node.hpp b/node/Node.hpp index 1b338b22..75bc7a8b 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -226,23 +226,6 @@ public: bool updateCheck() throw(); - /** - * Inject a packet into a network's tap as if it came from the host - * - * This is primarily for debugging, and at the moment is only supported on - * the test/dummy Ethernet tap implementation. Attempting to use it for real - * devices will fail and return 'false.' - * - * @param nwid Network ID - * @param from Source MAC address (must be 6 bytes in length) - * @param to Destination MAC address (must be 6 bytes in length) - * @param etherType Ethernet frame type - * @param data Frame data - * @param len Length of frame in bytes - * @return True on success; false if not a member of network, injection not supported, or data too large - */ - bool injectPacketFromHost(uint64_t nwid,const unsigned char *from,const unsigned char *to,unsigned int etherType,const void *data,unsigned int len); - static const char *versionString() throw(); static unsigned int versionMajor() throw(); static unsigned int versionMinor() throw(); |