Factoring out packet decoder from Switch to put that object on a little bit of a diet. Work in progress, wont build yet.

This commit is contained in:
Adam Ierymenko 2013-07-11 16:19:06 -04:00
parent bcd079b70e
commit ffad0b2780
6 changed files with 551 additions and 371 deletions

View file

@ -562,6 +562,18 @@ public:
setVerb(v);
}
/**
* Generate a new IV / packet ID in place
*
* This can be used to re-use a packet buffer multiple times to send
* technically different but otherwise identical copies of the same
* packet.
*/
inline void newInitializationVector()
{
Utils::getSecureRandom(field(ZT_PACKET_IDX_IV,8),8);
}
/**
* Set this packet's destination
*