diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-01 14:05:25 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-01 14:05:25 -0700 |
| commit | e1882b614b48bf0c2a68223b3ee2fb338dbcb8f6 (patch) | |
| tree | 2447fa648e910c6ef9aa8d4b3147606b2bc18e91 /node/OutboundMulticast.cpp | |
| parent | ae082c3cb8a1ba7f8efb95ce690b012ffa7a79cd (diff) | |
| download | infinitytier-e1882b614b48bf0c2a68223b3ee2fb338dbcb8f6.tar.gz infinitytier-e1882b614b48bf0c2a68223b3ee2fb338dbcb8f6.zip | |
Some cleanup, Multicaster now sends multicasts as it gets additional members.
Diffstat (limited to 'node/OutboundMulticast.cpp')
| -rw-r--r-- | node/OutboundMulticast.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/node/OutboundMulticast.cpp b/node/OutboundMulticast.cpp index cd11a523..7b2e4386 100644 --- a/node/OutboundMulticast.cpp +++ b/node/OutboundMulticast.cpp @@ -32,12 +32,24 @@ namespace ZeroTier { -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) +void OutboundMulticast::init( + uint64_t timestamp, + const Address &self, + uint64_t nwid, + const CertificateOfMembership *com, + unsigned int limit, + unsigned int gatherLimit, + const MAC &src, + const MulticastGroup &dest, + unsigned int etherType, + const void *payload, + unsigned int len) { _timestamp = timestamp; _nwid = nwid; _source = src; _destination = dest; + _limit = limit; _etherType = etherType; _packet.setSource(self); @@ -46,7 +58,7 @@ void OutboundMulticast::init(uint64_t timestamp,const Address &self,uint64_t nwi self.appendTo(_packet); _packet.append((uint64_t)nwid); _packet.append((uint8_t)((com) ? 0x01 : 0x00)); - _packet.append((uint32_t)gatherLimit); // gather limit -- set before send, start with 0 + _packet.append((uint32_t)gatherLimit); if (com) com->serialize(_packet); _packet.append((uint32_t)dest.adi()); dest.mac().appendTo(_packet); |
