Bug 448

Summary: V4Ping Application Sends uint32_t Data in Host Order
Product: ns-3 Reporter: Craig Dowell <craigdo>
Component: applicationsAssignee: Rajib Bhattacharjea <raj.b>
Status: RESOLVED FIXED    
Severity: normal CC: craigdo
Priority: P1    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: Proposed patch to fix bug.

Description Craig Dowell 2008-12-16 14:46:36 EST
Sending 32-bit ints as ping data causes regression tests to fail on ppc.

void
V4Ping::StartApplication (void)
{

  ...

  uint32_t data[4];
  data[0] = GetNode ()->GetId ();
  data[1] = GetApplicationId ();
  int64_t now = Simulator::Now ().GetTimeStep ();
  data[2] = now & 0xffffffff;
  now >>= 32;
  data[3] = now & 0xffffffff;

  ...
}

For those with enquiring minds, this is not reported on the nightly regression tests due to another problem (for which Tom will file a separate bug).

Regression testing for machine: darwin-ppc
Darwin 8.11.0 Power Macintosh
powerpc-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)
----------------------------- 
SUCCESS: waf -d debug configure; ./waf --regression passed on darwin-ppc 
SUCCESS: waf -d optimized configure; ./waf --regression passed on darwin-ppc
Comment 1 Craig Dowell 2008-12-16 15:37:24 EST
Created attachment 337 [details]
Proposed patch to fix bug.

Patch to send ping data in pcap version of "network" byte order (little endian).
Comment 2 Craig Dowell 2008-12-16 15:38:47 EST
Raj, do you approve?
Comment 3 Rajib Bhattacharjea 2008-12-16 15:46:41 EST
Looks good to me.