summaryrefslogtreecommitdiff
path: root/node/Switch.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-08 19:52:40 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-07-08 19:52:40 -0400
commite7f20ad5f9345d17f7699d2d5ffab2ca5de335c1 (patch)
tree48b2979cbf2a360fad9b004d5dd1776c7f5018d0 /node/Switch.cpp
parentf8cfdf973e17f67472f84798672c871f6992ba28 (diff)
downloadinfinitytier-e7f20ad5f9345d17f7699d2d5ffab2ca5de335c1.tar.gz
infinitytier-e7f20ad5f9345d17f7699d2d5ffab2ca5de335c1.zip
More filter development. It builds but is not integrated with the rest of the code.
Diffstat (limited to 'node/Switch.cpp')
-rw-r--r--node/Switch.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp
index 2e8a549a..6f237a10 100644
--- a/node/Switch.cpp
+++ b/node/Switch.cpp
@@ -41,6 +41,7 @@
#include "Peer.hpp"
#include "NodeConfig.hpp"
#include "Demarc.hpp"
+#include "Filter.hpp"
#include "../version.h"
@@ -233,7 +234,7 @@ Switch_onRemotePacket_complete_packet_handler:
void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,const MAC &to,unsigned int etherType,const Buffer<4096> &data)
{
if (from != network->tap().mac()) {
- LOG("ignored tap: %s -> %s %s (bridging is not supported)",from.toString().c_str(),to.toString().c_str(),Utils::etherTypeName(etherType));
+ LOG("ignored tap: %s -> %s %s (bridging is not supported)",from.toString().c_str(),to.toString().c_str(),Filter::etherTypeName(etherType));
return;
}
@@ -245,7 +246,7 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c
}
if ((etherType != ZT_ETHERTYPE_ARP)&&(etherType != ZT_ETHERTYPE_IPV4)&&(etherType != ZT_ETHERTYPE_IPV6)) {
- LOG("ignored tap: %s -> %s %s (not a supported etherType)",from.toString().c_str(),to.toString().c_str(),Utils::etherTypeName(etherType));
+ LOG("ignored tap: %s -> %s %s (not a supported etherType)",from.toString().c_str(),to.toString().c_str(),Filter::etherTypeName(etherType));
return;
}
@@ -277,10 +278,10 @@ void Switch::onLocalEthernet(const SharedPtr<Network> &network,const MAC &from,c
outp.compress();
send(outp,true);
} else {
- TRACE("UNICAST: %s -> %s %s (dropped, destination not a member of closed network %llu)",from.toString().c_str(),to.toString().c_str(),Utils::etherTypeName(etherType),network->id());
+ TRACE("UNICAST: %s -> %s %s (dropped, destination not a member of closed network %llu)",from.toString().c_str(),to.toString().c_str(),Filter::etherTypeName(etherType),network->id());
}
} else {
- TRACE("UNICAST: %s -> %s %s (dropped, destination MAC not ZeroTier)",from.toString().c_str(),to.toString().c_str(),Utils::etherTypeName(etherType));
+ TRACE("UNICAST: %s -> %s %s (dropped, destination MAC not ZeroTier)",from.toString().c_str(),to.toString().c_str(),Filter::etherTypeName(etherType));
}
}