|
|
| 94 |
template <typename T> void |
94 |
template <typename T> void |
| 95 |
PcapHelper::HookDefaultSink (Ptr<T> object, std::string tracename, Ptr<PcapFileWrapper> file) |
95 |
PcapHelper::HookDefaultSink (Ptr<T> object, std::string tracename, Ptr<PcapFileWrapper> file) |
| 96 |
{ |
96 |
{ |
| 97 |
bool __attribute__ ((unused)) result = |
97 |
bool result = |
| 98 |
object->TraceConnectWithoutContext (tracename.c_str (), MakeBoundCallback (&DefaultSink, file)); |
98 |
object->TraceConnectWithoutContext (tracename.c_str (), MakeBoundCallback (&DefaultSink, file)); |
| 99 |
NS_ASSERT_MSG (result == true, "PcapHelper::HookDefaultSink(): Unable to hook \"" << tracename << "\""); |
99 |
NS_ASSERT_MSG (result == true, "PcapHelper::HookDefaultSink(): Unable to hook \"" << tracename << "\""); |
| 100 |
} |
100 |
} |
|
|
| 231 |
template <typename T> void |
231 |
template <typename T> void |
| 232 |
AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
232 |
AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
| 233 |
{ |
233 |
{ |
| 234 |
bool __attribute__ ((unused)) result = |
234 |
bool result = |
| 235 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultEnqueueSinkWithoutContext, file)); |
235 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultEnqueueSinkWithoutContext, file)); |
| 236 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext(): Unable to hook \"" |
236 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultEnqueueSinkWithoutContext(): Unable to hook \"" |
| 237 |
<< tracename << "\""); |
237 |
<< tracename << "\""); |
|
|
| 244 |
std::string tracename, |
244 |
std::string tracename, |
| 245 |
Ptr<OutputStreamWrapper> stream) |
245 |
Ptr<OutputStreamWrapper> stream) |
| 246 |
{ |
246 |
{ |
| 247 |
bool __attribute__ ((unused)) result = |
247 |
bool result = |
| 248 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultEnqueueSinkWithContext, stream)); |
248 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultEnqueueSinkWithContext, stream)); |
| 249 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultEnqueueSinkWithContext(): Unable to hook \"" |
249 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultEnqueueSinkWithContext(): Unable to hook \"" |
| 250 |
<< tracename << "\""); |
250 |
<< tracename << "\""); |
|
|
| 253 |
template <typename T> void |
253 |
template <typename T> void |
| 254 |
AsciiTraceHelper::HookDefaultDropSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
254 |
AsciiTraceHelper::HookDefaultDropSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
| 255 |
{ |
255 |
{ |
| 256 |
bool __attribute__ ((unused)) result = |
256 |
bool result = |
| 257 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultDropSinkWithoutContext, file)); |
257 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultDropSinkWithoutContext, file)); |
| 258 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDropSinkWithoutContext(): Unable to hook \"" |
258 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDropSinkWithoutContext(): Unable to hook \"" |
| 259 |
<< tracename << "\""); |
259 |
<< tracename << "\""); |
|
|
| 266 |
std::string tracename, |
266 |
std::string tracename, |
| 267 |
Ptr<OutputStreamWrapper> stream) |
267 |
Ptr<OutputStreamWrapper> stream) |
| 268 |
{ |
268 |
{ |
| 269 |
bool __attribute__ ((unused)) result = |
269 |
bool result = |
| 270 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultDropSinkWithContext, stream)); |
270 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultDropSinkWithContext, stream)); |
| 271 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDropSinkWithContext(): Unable to hook \"" |
271 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDropSinkWithContext(): Unable to hook \"" |
| 272 |
<< tracename << "\""); |
272 |
<< tracename << "\""); |
|
|
| 275 |
template <typename T> void |
275 |
template <typename T> void |
| 276 |
AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
276 |
AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
| 277 |
{ |
277 |
{ |
| 278 |
bool __attribute__ ((unused)) result = |
278 |
bool result = |
| 279 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultDequeueSinkWithoutContext, file)); |
279 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultDequeueSinkWithoutContext, file)); |
| 280 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext(): Unable to hook \"" |
280 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDequeueSinkWithoutContext(): Unable to hook \"" |
| 281 |
<< tracename << "\""); |
281 |
<< tracename << "\""); |
|
|
| 288 |
std::string tracename, |
288 |
std::string tracename, |
| 289 |
Ptr<OutputStreamWrapper> stream) |
289 |
Ptr<OutputStreamWrapper> stream) |
| 290 |
{ |
290 |
{ |
| 291 |
bool __attribute__ ((unused)) result = |
291 |
bool result = |
| 292 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultDequeueSinkWithContext, stream)); |
292 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultDequeueSinkWithContext, stream)); |
| 293 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDequeueSinkWithContext(): Unable to hook \"" |
293 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultDequeueSinkWithContext(): Unable to hook \"" |
| 294 |
<< tracename << "\""); |
294 |
<< tracename << "\""); |
|
|
| 297 |
template <typename T> void |
297 |
template <typename T> void |
| 298 |
AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
298 |
AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext (Ptr<T> object, std::string tracename, Ptr<OutputStreamWrapper> file) |
| 299 |
{ |
299 |
{ |
| 300 |
bool __attribute__ ((unused)) result = |
300 |
bool result = |
| 301 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultReceiveSinkWithoutContext, file)); |
301 |
object->TraceConnectWithoutContext (tracename, MakeBoundCallback (&DefaultReceiveSinkWithoutContext, file)); |
| 302 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext(): Unable to hook \"" |
302 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultReceiveSinkWithoutContext(): Unable to hook \"" |
| 303 |
<< tracename << "\""); |
303 |
<< tracename << "\""); |
|
|
| 310 |
std::string tracename, |
310 |
std::string tracename, |
| 311 |
Ptr<OutputStreamWrapper> stream) |
311 |
Ptr<OutputStreamWrapper> stream) |
| 312 |
{ |
312 |
{ |
| 313 |
bool __attribute__ ((unused)) result = |
313 |
bool result = |
| 314 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultReceiveSinkWithContext, stream)); |
314 |
object->TraceConnect (tracename, context, MakeBoundCallback (&DefaultReceiveSinkWithContext, stream)); |
| 315 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultReceiveSinkWithContext(): Unable to hook \"" |
315 |
NS_ASSERT_MSG (result == true, "AsciiTraceHelper::HookDefaultReceiveSinkWithContext(): Unable to hook \"" |
| 316 |
<< tracename << "\""); |
316 |
<< tracename << "\""); |