Deleted Added
sdiff udiff text old ( 11299:72046b9b3323 ) new ( 11701:5e7599457b97 )
full compact
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 1724 unchanged lines hidden (view full) ---

1733 ip->sum(cksum(ip));
1734 txIpChecksums++;
1735 } else {
1736 warn_once("IPPKT set, but not UDP!\n");
1737 }
1738 }
1739 }
1740
1741 txPacket->simLength = txPacketBufPtr - txPacket->data;
1742 txPacket->length = txPacketBufPtr - txPacket->data;
1743 // this is just because the receive can't handle a
1744 // packet bigger want to make sure
1745 if (txPacket->length > 1514)
1746 panic("transmit packet too large, %s > 1514\n",
1747 txPacket->length);
1748
1749#ifndef NDEBUG

--- 432 unchanged lines hidden (view full) ---

2182 txFifo.serialize("txFifo", cp);
2183
2184 /*
2185 * Serialize the various helper variables
2186 */
2187 bool txPacketExists = txPacket != nullptr;
2188 SERIALIZE_SCALAR(txPacketExists);
2189 if (txPacketExists) {
2190 txPacket->simLength = txPacketBufPtr - txPacket->data;
2191 txPacket->length = txPacketBufPtr - txPacket->data;
2192 txPacket->serialize("txPacket", cp);
2193 uint32_t txPktBufPtr = (uint32_t) (txPacketBufPtr - txPacket->data);
2194 SERIALIZE_SCALAR(txPktBufPtr);
2195 }
2196
2197 bool rxPacketExists = rxPacket != nullptr;
2198 SERIALIZE_SCALAR(rxPacketExists);

--- 148 unchanged lines hidden (view full) ---

2347 txFifo.unserialize("txFifo", cp);
2348
2349 /*
2350 * unserialize the various helper variables
2351 */
2352 bool txPacketExists;
2353 UNSERIALIZE_SCALAR(txPacketExists);
2354 if (txPacketExists) {
2355 txPacket = make_shared();
2356 txPacket->unserialize("txPacket", cp);
2357 uint32_t txPktBufPtr;
2358 UNSERIALIZE_SCALAR(txPktBufPtr);
2359 txPacketBufPtr = (uint8_t *) txPacket->data + txPktBufPtr;
2360 } else
2361 txPacket = 0;
2362
2363 bool rxPacketExists;
2364 UNSERIALIZE_SCALAR(rxPacketExists);
2365 rxPacket = 0;
2366 if (rxPacketExists) {
2367 rxPacket = make_shared();
2368 rxPacket->unserialize("rxPacket", cp);
2369 uint32_t rxPktBufPtr;
2370 UNSERIALIZE_SCALAR(rxPktBufPtr);
2371 rxPacketBufPtr = (uint8_t *) rxPacket->data + rxPktBufPtr;
2372 } else
2373 rxPacket = 0;
2374
2375 UNSERIALIZE_SCALAR(txXferLen);

--- 107 unchanged lines hidden ---