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:
parent
bcd079b70e
commit
ffad0b2780
6 changed files with 551 additions and 371 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue