All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit c3ac79df authored by Jonathon Duerig's avatar Jonathon Duerig

Changed individual saves to a memcpy in replay.

parent e0e21aa4
......@@ -106,6 +106,7 @@ char * savePacket(char * buffer, PacketInfo const & value)
pos = saveInt(pos, value.packetLength);
// Save tcp_info
/* Inefficient, but safe.
pos = saveChar(pos, kernel->tcpi_state);
pos = saveChar(pos, kernel->tcpi_ca_state);
pos = saveChar(pos, kernel->tcpi_retransmits);
......@@ -140,6 +141,10 @@ char * savePacket(char * buffer, PacketInfo const & value)
pos = saveInt(pos, kernel->tcpi_snd_cwnd);
pos = saveInt(pos, kernel->tcpi_advmss);
pos = saveInt(pos, kernel->tcpi_reordering);
*/
memcpy(pos, kernel, sizeof(struct tcp_info));
pos += sizeof(struct tcp_info);
// Save IP header
memcpy(pos, value.ip, sizeof(struct ip));
......@@ -372,6 +377,7 @@ char * loadPacket(char * buffer, PacketInfo * value, struct tcp_info & kernel,
value->packetLength = static_cast<int>(packetLength);
// Load tcp_info
/* Inefficient, but safe
pos = loadChar(pos, & kernel.tcpi_state);
pos = loadChar(pos, & kernel.tcpi_ca_state);
pos = loadChar(pos, & kernel.tcpi_retransmits);
......@@ -407,6 +413,10 @@ char * loadPacket(char * buffer, PacketInfo * value, struct tcp_info & kernel,
pos = loadInt(pos, & kernel.tcpi_snd_cwnd);
pos = loadInt(pos, & kernel.tcpi_advmss);
pos = loadInt(pos, & kernel.tcpi_reordering);
*/
memcpy(&kernel, pos, sizeof(struct tcp_info));
pos += sizeof(struct tcp_info);
// Load IP header
memcpy(&ip, pos, sizeof(struct ip));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment