lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #5952] Integration of AutoIP module


From: Frédéric Bernon
Subject: [lwip-devel] [patch #5952] Integration of AutoIP module
Date: Fri, 22 Jun 2007 19:03:25 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Follow-up Comment #36, patch #5952 (project lwip):

I have change the autoip_init (do nothing now) and autoip_create_rand_addr to
generate the "autoip", based on MAC address. I attach a test file with some
tries (64x 4 MAC addresses).

There is again 2 rand() in the code. Perhaps we can simply create a s32_t
based on hwaddr[2],hwaddr[3],hwaddr[4],hwaddr[5]. This is not really
something "random", but yes, it can be a solution. These two rand() are:

/* time to wait to first probe, this is randomly
   * choosen out of 0 to PROBE_WAIT seconds.
   * compliant to RFC 3927 Section 2.2.1
   */
autoip->ttw = (rand() % (PROBE_WAIT * AUTOIP_TICKS_PER_SECOND));

...and...

/* calculate time to wait to next probe */
netif->autoip->ttw = (rand() % ((PROBE_MAX - PROBE_MIN) *
AUTOIP_TICKS_PER_SECOND) ) + PROBE_MIN * AUTOIP_TICKS_PER_SECOND;

With default autoip.hvalues, we obtain a "ttw" value inside [0...100[ (+100
for the second one).


(file #13135)
    _______________________________________________________

Additional Item Attachment:

File name: AutoIP tests.txt               Size:14 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5952>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]