|
|
| 122 |
|
122 |
|
| 123 |
if (i != m_sent.end () && echo.GetIdentifier () == 0) |
123 |
if (i != m_sent.end () && echo.GetIdentifier () == 0) |
| 124 |
{ |
124 |
{ |
| 125 |
uint32_t buf[m_size / 4]; |
125 |
uint32_t* buf = new uint32_t[m_size / 4]; |
| 126 |
uint32_t dataSize = echo.GetDataSize (); |
126 |
uint32_t dataSize = echo.GetDataSize (); |
| 127 |
uint32_t nodeId; |
127 |
uint32_t nodeId; |
| 128 |
uint32_t appId; |
128 |
uint32_t appId; |
|
|
| 153 |
} |
153 |
} |
| 154 |
} |
154 |
} |
| 155 |
} |
155 |
} |
|
|
156 |
delete[] buf; |
| 156 |
} |
157 |
} |
| 157 |
} |
158 |
} |
| 158 |
} |
159 |
} |
|
|
| 192 |
// (where any difference would show up anyway) and borrow that code. Don't |
193 |
// (where any difference would show up anyway) and borrow that code. Don't |
| 193 |
// be too surprised when you see that this is a little endian convention. |
194 |
// be too surprised when you see that this is a little endian convention. |
| 194 |
// |
195 |
// |
| 195 |
uint8_t data[m_size]; |
196 |
uint8_t* data = new uint8_t[m_size]; |
| 196 |
for (uint32_t i = 0; i < m_size; ++i) data[i] = 0; |
197 |
for (uint32_t i = 0; i < m_size; ++i) data[i] = 0; |
| 197 |
NS_ASSERT (m_size >= 16); |
198 |
NS_ASSERT (m_size >= 16); |
| 198 |
|
199 |
|
|
|
| 216 |
m_sent.insert (std::make_pair (m_seq - 1, Simulator::Now())); |
217 |
m_sent.insert (std::make_pair (m_seq - 1, Simulator::Now())); |
| 217 |
m_socket->Send (p, 0); |
218 |
m_socket->Send (p, 0); |
| 218 |
m_next = Simulator::Schedule (m_interval, & V4Ping::Send, this); |
219 |
m_next = Simulator::Schedule (m_interval, & V4Ping::Send, this); |
|
|
220 |
delete[] data; |
| 219 |
} |
221 |
} |
| 220 |
|
222 |
|
| 221 |
void |
223 |
void |