A bunch of multicast work... in progress.

This commit is contained in:
Adam Ierymenko 2019-09-07 19:15:21 -07:00
parent 0d2c87fe4e
commit 540ee69773
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
11 changed files with 139 additions and 911 deletions

View file

@ -27,8 +27,6 @@ void OutboundMulticast::init(
uint64_t timestamp,
uint64_t nwid,
bool disableCompression,
unsigned int limit,
unsigned int gatherLimit,
const MAC &src,
const MulticastGroup &dest,
unsigned int etherType,
@ -46,17 +44,13 @@ void OutboundMulticast::init(
_macSrc.fromAddress(RR->identity.address(),nwid);
}
_macDest = dest.mac();
_limit = limit;
_frameLen = (len < ZT_MAX_MTU) ? len : ZT_MAX_MTU;
_etherType = etherType;
if (gatherLimit) flags |= 0x02;
_packet.setSource(RR->identity.address());
_packet.setVerb(Packet::VERB_MULTICAST_FRAME);
_packet.append((uint64_t)nwid);
_packet.append(flags);
if (gatherLimit) _packet.append((uint32_t)gatherLimit);
if (src) src.appendTo(_packet);
dest.mac().appendTo(_packet);
_packet.append((uint32_t)dest.adi());