Bug 739

Summary: OLSR: Strange HTime value in HELLO messages
Product: ns-3 Reporter: Pavel Boyko <boyko>
Component: routingAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: trivial CC: mathieu.lacage, ns-bugs
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Pavel Boyko 2009-11-12 07:45:27 EST
I see (in wireshark) that HTime field in OLSR hello messages is 3 times larger than actual hello emission interval. I see this in the code as well: src/routing/olsr/olsr-routing-protocol.cc:1451

  hello.SetHTime (Scalar (3) * m_helloInterval);
 
Meanwhile RFC 3626 Page 27 says:

      HTime

         This field specifies the HELLO emission interval used by the
         node on this particular interface, i.e., the time before the
         transmission of the next HELLO (this information may be used in
         advanced link sensing, see section 14).  The HELLO emission
         interval is represented by its mantissa (four highest bits of
         Htime field) and by its exponent (four lowest bits of Htime
         field).  In other words:

              HELLO emission interval=C*(1+a/16)*2^b  [in seconds]

Please explain (in the comment inplace) or fix.
Comment 1 Gustavo J. A. M. Carneiro 2009-11-24 06:49:51 EST
changeset:   5771:a8245e39c546
Comment 2 Pavel Boyko 2009-11-25 03:16:57 EST
(In reply to comment #1)
> changeset:   5771:a8245e39c546

You should update reference traces for PCAP based regression tests:

$ ./test.py -s routing-olsr-regression
FAIL: TestSuite routing-olsr-regression
0 of 1 tests passed (0 passed, 0 skipped, 1 failed, 0 crashed, 0 valgrind errors)

To do so you have to:

$ cd src/routing/olsr/test/
$ grep "WRITE_VECTORS = false" *.cc
hello-regression-test.cc:const bool WRITE_VECTORS = false;
tc-regression-test.cc:const bool WRITE_VECTORS = false;

Then change these "= false" to "= true" and rerun test suite. Reference PCAP traces will be updated. Revert changes in *.cc files and commit *.pcap ones.
Comment 3 Gustavo J. A. M. Carneiro 2009-11-25 05:33:53 EST
I thought I did commit new pcap files?...
Comment 4 Pavel Boyko 2009-11-25 10:04:29 EST
(In reply to comment #3)
> I thought I did commit new pcap files?...

 that's true ;)