From 431476e2e4474c83013c2a1a6d80f1e815a2d37c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 24 Sep 2014 13:45:58 -0700 Subject: Some more multicast algo work... --- node/OutboundMulticast.hpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'node/OutboundMulticast.hpp') diff --git a/node/OutboundMulticast.hpp b/node/OutboundMulticast.hpp index f8338b93..3ef9532b 100644 --- a/node/OutboundMulticast.hpp +++ b/node/OutboundMulticast.hpp @@ -50,6 +50,13 @@ namespace ZeroTier { class OutboundMulticast { public: + /** + * Create an uninitialized outbound multicast + * + * It must be initialized with init(). + */ + OutboundMulticast() {} + /** * Initialize outbound multicast * @@ -63,13 +70,13 @@ public: * @param len Length of data * @throws std::out_of_range Data too large to fit in a MULTICAST_FRAME */ - OutboundMulticast(uint64_t timestamp,const Address &self,uint64_t nwid,const MAC &src,const MulticastGroup &dest,unsigned int etherType,const void *payload,unsigned int len) : - _timestamp(timestamp), - _nwid(nwid), - _source(src), - _destination(dest), - _etherType(etherType) + inline void init(uint64_t timestamp,const Address &self,uint64_t nwid,const MAC &src,const MulticastGroup &dest,unsigned int etherType,const void *payload,unsigned int len) { + _timestamp = timestamp; + _nwid = nwid; + _source = src; + _destination = dest; + _etherType = etherType; _packet.setSource(self); _packet.setVerb(Packet::VERB_MULTICAST_FRAME); _packet.append((char)0); -- cgit v1.2.3