summaryrefslogtreecommitdiff
path: root/node/OutboundMulticast.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-09-26 14:18:25 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-09-26 14:18:25 -0700
commited0ba4950238c74e2b0115410e0e37b49dd5f26a (patch)
tree0b830183b5dfa42b40ed1a015a6fdafecd26bc5a /node/OutboundMulticast.cpp
parent2d41055bdce886722d1b6a355559862016ac964c (diff)
downloadinfinitytier-ed0ba4950238c74e2b0115410e0e37b49dd5f26a.tar.gz
infinitytier-ed0ba4950238c74e2b0115410e0e37b49dd5f26a.zip
A few more revisions to new multicast verbs.
Diffstat (limited to 'node/OutboundMulticast.cpp')
-rw-r--r--node/OutboundMulticast.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/node/OutboundMulticast.cpp b/node/OutboundMulticast.cpp
index bf2991cc..02956dd3 100644
--- a/node/OutboundMulticast.cpp
+++ b/node/OutboundMulticast.cpp
@@ -28,10 +28,11 @@
#include "Constants.hpp"
#include "OutboundMulticast.hpp"
#include "Switch.hpp"
+#include "CertificateOfMembership.hpp"
namespace ZeroTier {
-void OutboundMulticast::init(uint64_t timestamp,const Address &self,uint64_t nwid,unsigned int gatherLimit,const MAC &src,const MulticastGroup &dest,unsigned int etherType,const void *payload,unsigned int len)
+void OutboundMulticast::init(uint64_t timestamp,const Address &self,uint64_t nwid,const CertificateOfMembership *com,unsigned int gatherLimit,const MAC &src,const MulticastGroup &dest,unsigned int etherType,const void *payload,unsigned int len)
{
_timestamp = timestamp;
_nwid = nwid;
@@ -41,8 +42,9 @@ void OutboundMulticast::init(uint64_t timestamp,const Address &self,uint64_t nwi
_packet.setSource(self);
_packet.setVerb(Packet::VERB_MULTICAST_FRAME);
_packet.append((uint64_t)nwid);
- _packet.append((char)0); // 0 flags
+ _packet.append((uint8_t)((com) ? 0x01 : 0x00));
_packet.append((uint32_t)gatherLimit); // gather limit -- set before send, start with 0
+ if (com) com->serialize(_packet);
_packet.append((uint32_t)dest.adi());
dest.mac().appendTo(_packet);
src.appendTo(_packet);