Commit 70cbdf5e authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Rationalized Rob's previous checkin with mine to remove the additional...

Rationalized Rob's previous checkin with mine to remove the additional dependencies that I had made to the now defunct IpHeader
parent d0f8197a
......@@ -171,7 +171,7 @@ struct PacketInfo
enum {size = sizeof(int)*(2 +1 +21 + 1) +
sizeof(short)*(0 +0 +0 + 2) +
sizeof(char)*(0 +0 +7 + 1) +
sizeof(IpHeader) + sizeof(struct tcphdr)};
sizeof(struct ip) + sizeof(struct tcphdr)};
Time packetTime;
int packetLength;
......
......@@ -412,7 +412,7 @@ void replayLoop(void)
char packetBuffer[(PacketInfo::size > sizeof(SensorCommand))
? PacketInfo::size : sizeof(SensorCommand)];
struct tcp_info kernel;
IpHeader ip;
struct ip ip;
struct tcphdr tcp;
PacketInfo packet;
map<Order, SensorList> streams;
......
......@@ -115,8 +115,8 @@ char * savePacket(char * buffer, PacketInfo const & value)
pos = saveInt(pos, kernel->tcpi_advmss);
pos = saveInt(pos, kernel->tcpi_reordering);
memcpy(pos, value.ip, sizeof(IpHeader));
pos += sizeof(IpHeader);
memcpy(pos, value.ip, sizeof(struct ip));
pos += sizeof(struct ip);
memcpy(pos, value.tcp, sizeof(struct tcphdr));
pos += sizeof(struct tcphdr);
......@@ -278,7 +278,7 @@ auto_ptr<Command> loadCommand(Header * head, char * body)
}
char * loadPacket(char * buffer, PacketInfo * value, struct tcp_info & kernel,
IpHeader & ip, struct tcphdr & tcp)
struct ip & ip, struct tcphdr & tcp)
{
char * pos = buffer;
value->kernel = &kernel;
......@@ -330,8 +330,8 @@ char * loadPacket(char * buffer, PacketInfo * value, struct tcp_info & kernel,
pos = loadInt(pos, & kernel.tcpi_advmss);
pos = loadInt(pos, & kernel.tcpi_reordering);
memcpy(&ip, pos, sizeof(IpHeader));
pos += sizeof(IpHeader);
memcpy(&ip, pos, sizeof(struct ip));
pos += sizeof(struct ip);
memcpy(&tcp, pos, sizeof(struct tcphdr));
pos += sizeof(struct tcphdr);
......
......@@ -36,6 +36,6 @@ std::auto_ptr<Command> loadCommand(Header * head, char * body);
// It is presumed that value contains pointers to the various
// substructures that need to be filled.
char * loadPacket(char * buffer, PacketInfo * value, struct tcp_info & kernel,
IpHeader & ip, struct tcphdr & tcp);
struct ip & ip, struct tcphdr & tcp);
#endif
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