mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 12:03:44 +02:00
Fix Windows compile error.
This commit is contained in:
parent
4878d8ec15
commit
d6e8a5f3ca
4 changed files with 923 additions and 926 deletions
|
@ -795,8 +795,9 @@ void WindowsEthernetTap::put(const MAC &from,const MAC &to,unsigned int etherTyp
|
|||
return;
|
||||
|
||||
Mutex::Lock _l(_injectPending_m);
|
||||
_injectPending.push( std::pair<Array<char,ZT_MAX_MTU + 32>,unsigned int>(Array<char,ZT_MAX_MTU + 32>(),len + 14) );
|
||||
char *d = _injectPending.back().first.data;
|
||||
_injectPending.emplace();
|
||||
_injectPending.back().len = len + 14;
|
||||
char *const d = _injectPending.back().data;
|
||||
to.copyTo(d,6);
|
||||
from.copyTo(d + 6,6);
|
||||
d[12] = (char)((etherType >> 8) & 0xff);
|
||||
|
@ -1100,7 +1101,7 @@ void WindowsEthernetTap::threadMain()
|
|||
} else _injectPending_m.lock();
|
||||
|
||||
if (!_injectPending.empty()) {
|
||||
WriteFile(_tap,_injectPending.front().first.data,_injectPending.front().second,NULL,&tapOvlWrite);
|
||||
WriteFile(_tap,_injectPending.front().data,_injectPending.front().len,NULL,&tapOvlWrite);
|
||||
writeInProgress = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
#include "../node/Constants.hpp"
|
||||
#include "../node/Mutex.hpp"
|
||||
#include "../node/Array.hpp"
|
||||
#include "../node/MulticastGroup.hpp"
|
||||
#include "../node/InetAddress.hpp"
|
||||
#include "../osdep/Thread.hpp"
|
||||
|
@ -150,7 +149,12 @@ private:
|
|||
|
||||
std::vector<MulticastGroup> _multicastGroups;
|
||||
|
||||
std::queue< std::pair< Array<char,ZT_MAX_MTU + 32>,unsigned int > > _injectPending;
|
||||
struct _InjectPending
|
||||
{
|
||||
unsigned int len;
|
||||
char data[ZT_MAX_MTU + 32];
|
||||
};
|
||||
std::queue<_InjectPending> _injectPending;
|
||||
Mutex _injectPending_m;
|
||||
|
||||
std::string _pathToHelpers;
|
||||
|
|
|
@ -130,7 +130,6 @@
|
|||
<ClInclude Include="..\..\ext\x64-salsa2012-asm\salsa2012.h" />
|
||||
<ClInclude Include="..\..\include\ZeroTierOne.h" />
|
||||
<ClInclude Include="..\..\node\Address.hpp" />
|
||||
<ClInclude Include="..\..\node\Array.hpp" />
|
||||
<ClInclude Include="..\..\node\AtomicCounter.hpp" />
|
||||
<ClInclude Include="..\..\node\Buffer.hpp" />
|
||||
<ClInclude Include="..\..\node\C25519.hpp" />
|
||||
|
@ -151,7 +150,6 @@
|
|||
<ClInclude Include="..\..\node\NetworkConfig.hpp" />
|
||||
<ClInclude Include="..\..\node\NetworkController.hpp" />
|
||||
<ClInclude Include="..\..\node\Node.hpp" />
|
||||
<ClInclude Include="..\..\node\NonCopyable.hpp" />
|
||||
<ClInclude Include="..\..\node\OutboundMulticast.hpp" />
|
||||
<ClInclude Include="..\..\node\Packet.hpp" />
|
||||
<ClInclude Include="..\..\node\Path.hpp" />
|
||||
|
|
|
@ -293,9 +293,6 @@
|
|||
<ClInclude Include="..\..\node\Address.hpp">
|
||||
<Filter>Header Files\node</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\node\Array.hpp">
|
||||
<Filter>Header Files\node</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\node\AtomicCounter.hpp">
|
||||
<Filter>Header Files\node</Filter>
|
||||
</ClInclude>
|
||||
|
@ -347,9 +344,6 @@
|
|||
<ClInclude Include="..\..\node\Node.hpp">
|
||||
<Filter>Header Files\node</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\node\NonCopyable.hpp">
|
||||
<Filter>Header Files\node</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\node\OutboundMulticast.hpp">
|
||||
<Filter>Header Files\node</Filter>
|
||||
</ClInclude>
|
||||
|
|
Loading…
Add table
Reference in a new issue