packet.cc (2665:a124942bacb8) packet.cc (2811:9da12e9830ce)
1/*
2 * Copyright (c) 2006 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;

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

52 case WriteReq: return WriteReqString;
53 case WriteReqNoAck: return WriteReqNoAckString;
54 case ReadResp: return ReadRespString;
55 case WriteResp: return WriteRespString;
56 default: return OtherCmdString;
57 }
58}
59
1/*
2 * Copyright (c) 2006 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;

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

52 case WriteReq: return WriteReqString;
53 case WriteReqNoAck: return WriteReqNoAckString;
54 case ReadResp: return ReadRespString;
55 case WriteResp: return WriteRespString;
56 default: return OtherCmdString;
57 }
58}
59
60const std::string &
61Packet::cmdIdxToString(Packet::Command idx)
62{
63 switch (idx) {
64 case ReadReq: return ReadReqString;
65 case WriteReq: return WriteReqString;
66 case WriteReqNoAck: return WriteReqNoAckString;
67 case ReadResp: return ReadRespString;
68 case WriteResp: return WriteRespString;
69 default: return OtherCmdString;
70 }
71}
72
60/** delete the data pointed to in the data pointer. Ok to call to matter how
61 * data was allocted. */
62void
63Packet::deleteData()
64{
65 assert(staticData || dynamicData);
66 if (staticData)
67 return;

--- 40 unchanged lines hidden ---
73/** delete the data pointed to in the data pointer. Ok to call to matter how
74 * data was allocted. */
75void
76Packet::deleteData()
77{
78 assert(staticData || dynamicData);
79 if (staticData)
80 return;

--- 40 unchanged lines hidden ---