[Olsr-dev] hna and tc set

Henning Rogge (spam-protected)
Thu Apr 8 14:55:00 CEST 2010

Am Dienstag 06 April 2010 19:31:50 schrieb Airton Ishimori:
> In hna_set.c there are bellow code lines. Why has that add 8? Would be
> netmask size?
>      if (olsr_msgsize < 8 + olsr_cnf->ipsize) {
>     #ifndef WIN32
>         OLSR_PRINTF(1, "HNA message size %d too small (at least %zu)!\n",
> olsr_msgsize,
>                     8 + olsr_cnf->ipsize);
>     #endif
>         return false;
>       }
(8+ipsize) is the minimal length of an OLSR message. I will be moving this to 
the generic parser.
> and in the tc_set.c has bellow code lines. What is lower_border and
> upper_border?
>     /* Get borders */
>       pkt_get_u8(&curr, &lower_border);
>       pkt_get_u8(&curr, &upper_border);
lower_border/upper_border is an idea I have developed for more efficient 
handling of fragmented TCs. OLSRd create only TCs with sorted IPs. If a TC is 
fragmented it's typically not possible to erase tc-edges in the database but 
not in the TC because they could be in another fragment.

The borders (together with the first and last IP) allow OLSRd to calculate the 
"range" of IPs the TC fragment is responsible for, so all tc-edges inside this 
range can be instantly deleted from the database.


1) You can't win.
2) You can't break even.
3) You can't leave the game.
— The Laws of Thermodynamics, summarized
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20100408/2e68e1f6/attachment.sig>

More information about the Olsr-dev mailing list