mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-03-22 03:55:24 +00:00
etherTypeName() is only used in Switch and only with ZT_TRACE
This commit is contained in:
parent
07ea4fd4f9
commit
41fc08b330
@ -48,6 +48,23 @@
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
#ifdef ZT_TRACE
|
||||
static const char *etherTypeName(const unsigned int etherType)
|
||||
{
|
||||
switch(etherType) {
|
||||
case ZT_ETHERTYPE_IPV4: return "IPV4";
|
||||
case ZT_ETHERTYPE_ARP: return "ARP";
|
||||
case ZT_ETHERTYPE_RARP: return "RARP";
|
||||
case ZT_ETHERTYPE_ATALK: return "ATALK";
|
||||
case ZT_ETHERTYPE_AARP: return "AARP";
|
||||
case ZT_ETHERTYPE_IPX_A: return "IPX_A";
|
||||
case ZT_ETHERTYPE_IPX_B: return "IPX_B";
|
||||
case ZT_ETHERTYPE_IPV6: return "IPV6";
|
||||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
#endif // ZT_TRACE
|
||||
|
||||
Switch::Switch(const RuntimeEnvironment *renv) :
|
||||
RR(renv)
|
||||
{
|
||||
@ -519,22 +536,6 @@ unsigned long Switch::doTimerTasks(uint64_t now)
|
||||
return nextDelay;
|
||||
}
|
||||
|
||||
const char *Switch::etherTypeName(const unsigned int etherType)
|
||||
throw()
|
||||
{
|
||||
switch(etherType) {
|
||||
case ZT_ETHERTYPE_IPV4: return "IPV4";
|
||||
case ZT_ETHERTYPE_ARP: return "ARP";
|
||||
case ZT_ETHERTYPE_RARP: return "RARP";
|
||||
case ZT_ETHERTYPE_ATALK: return "ATALK";
|
||||
case ZT_ETHERTYPE_AARP: return "AARP";
|
||||
case ZT_ETHERTYPE_IPX_A: return "IPX_A";
|
||||
case ZT_ETHERTYPE_IPX_B: return "IPX_B";
|
||||
case ZT_ETHERTYPE_IPV6: return "IPV6";
|
||||
}
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
void Switch::_handleRemotePacketFragment(const InetAddress &fromAddr,const void *data,unsigned int len)
|
||||
{
|
||||
Packet::Fragment fragment(data,len);
|
||||
|
@ -177,13 +177,6 @@ public:
|
||||
*/
|
||||
unsigned long doTimerTasks(uint64_t now);
|
||||
|
||||
/**
|
||||
* @param etherType Ethernet type ID
|
||||
* @return Human-readable name
|
||||
*/
|
||||
static const char *etherTypeName(const unsigned int etherType)
|
||||
throw();
|
||||
|
||||
private:
|
||||
void _handleRemotePacketFragment(const InetAddress &fromAddr,const void *data,unsigned int len);
|
||||
void _handleRemotePacketHead(const InetAddress &fromAddr,const void *data,unsigned int len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user