Some cleanup, Multicaster now sends multicasts as it gets additional members.
This commit is contained in:
parent
ae082c3cb8
commit
e1882b614b
8 changed files with 76 additions and 27 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue