diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-11 16:19:06 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-11 16:19:06 -0400 |
| commit | ffad0b27809f8ec0cca11a5dabd9624340857f57 (patch) | |
| tree | ab0d78f3ad1fce257214065c4dd87fe3502473e7 /node/Packet.hpp | |
| parent | bcd079b70eb984a44dc62b2f8aa591c4f9c57f8a (diff) | |
| download | infinitytier-ffad0b27809f8ec0cca11a5dabd9624340857f57.tar.gz infinitytier-ffad0b27809f8ec0cca11a5dabd9624340857f57.zip | |
Factoring out packet decoder from Switch to put that object on a little bit of a diet. Work in progress, wont build yet.
Diffstat (limited to 'node/Packet.hpp')
| -rw-r--r-- | node/Packet.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/node/Packet.hpp b/node/Packet.hpp index 7eae9880..a5c450fb 100644 --- a/node/Packet.hpp +++ b/node/Packet.hpp @@ -563,6 +563,18 @@ public: } /** + * 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 * * @param dest ZeroTier address of destination |
