lwIP - A Lightweight TCP/IP stack - Patches: patch #5952, Integration of AutoIP module
You are not allowed to post comments on this tracker with your current authentication level.
patch #5952: Integration of AutoIP module
Submitter: | Dominik Spies <dspies> | ||
Submitted: | Tue 22 May 2007 01:45:20 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | fbernon | Open/Closed: | Closed |
Planned Release: | None |
Jump to the original submission
Thu 28 Jun 2007 06:09:38 PM UTC, comment #39: |
Frédéric Bernon <fbernon> |
Mon 25 Jun 2007 04:51:07 PM UTC, comment #38: I sort of agree with our current philosophy, which is to use lwIP local functions where possible, and libc only where we have to. My current environment is very lean, with a very sparse libc. For example, I don't have a rand.
|
Thomas Taranowski <taranowski> |
Fri 22 Jun 2007 08:05:48 PM UTC, comment #37: Hmm, I can't say anything about what ttw should be...
|
Simon Goldschmidt <goldsimon> |
Fri 22 Jun 2007 07:03:25 PM UTC, comment #36: 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).
|
Frédéric Bernon <fbernon> |
Fri 22 Jun 2007 06:20:23 PM UTC, comment #35: Some delays to get an address (with default timers values):
|
Frédéric Bernon <fbernon> |
Fri 22 Jun 2007 03:47:54 PM UTC, comment #34:
|
Frédéric Bernon <fbernon> |
Fri 22 Jun 2007 01:10:46 PM UTC, comment #33: I think taking four bytes from the MAC address is better than only 2. Note that tried_llipaddr will be the same for all devices (worst case).
|
Simon Goldschmidt <goldsimon> |
Fri 22 Jun 2007 12:43:28 PM UTC, comment #32:
|
Frédéric Bernon <fbernon> |
Fri 22 Jun 2007 11:20:36 AM UTC, comment #31:
|
Simon Goldschmidt <goldsimon> |
Fri 22 Jun 2007 10:41:31 AM UTC, comment #30: Some remarks:
|
Frédéric Bernon <fbernon> |
Fri 22 Jun 2007 07:46:57 AM UTC, comment #29: Hi Dominik, I currently test Autoip.
|
Frédéric Bernon <fbernon> |
Fri 22 Jun 2007 07:33:51 AM UTC, comment #28: Simons patch for the caclic inclusion problem is okay for me, I tested it and it works fine for me.
|
Dominik Spies <dspies> |
Tue 19 Jun 2007 12:50:39 PM UTC, comment #27: Yes, I use time(NULL) for generic system, not really for this case. Note that using time(NULL) or the magic number should be an usual case (because, most of time, the MAC address will be used).
|
Frédéric Bernon <fbernon> |
Tue 19 Jun 2007 10:52:37 AM UTC, comment #26:
|
Simon Goldschmidt <goldsimon> |
Tue 19 Jun 2007 10:16:58 AM UTC, comment #25: Ok, I have check in, but tell me if you have an idea to replace the srand/rand. But I note that these functions are also used in PPP part. Perhaps something based on jiffies/ticks? But they are not integrated in current lwIP...
|
Frédéric Bernon <fbernon> |
Tue 19 Jun 2007 10:07:52 AM UTC, comment #24:
|
Frédéric Bernon <fbernon> |
Tue 19 Jun 2007 09:21:28 AM UTC, comment #23: Looks fine to me. Except for the 'magic number' passed to srand... But that shouldn't happen too often, anyway.
|
Simon Goldschmidt <goldsimon> |
Tue 19 Jun 2007 09:05:55 AM UTC, comment #22: I join a patch with some changes for integration in tcpip.c, and some comments.
|
Frédéric Bernon <fbernon> |
Mon 18 Jun 2007 09:46:09 PM UTC, comment #21: Ok, I check in your patch Simon... |
Frédéric Bernon <fbernon> |
Mon 18 Jun 2007 09:07:13 PM UTC, comment #20: Perhaps it's a style preference, but I prefer the solution which avoid the forward-declare. But it's not my code, change that if you want (the warning disappear with both solutions)...
|
Frédéric Bernon <fbernon> |
Mon 18 Jun 2007 07:32:54 PM UTC, comment #19: What do you think of this patch (of netif.h) to solve the cyclic inclusion problem (simple forward declaration of the used structs instead of including the whole file, also done in tcp.h to forward-declare the struct tcp_pcb used as a pointer in tcp-functions):
--- netif.h 9 Jun 2007 16:57:05 -0000 1.34
|
Simon Goldschmidt <goldsimon> |
Mon 18 Jun 2007 07:20:57 PM UTC, comment #18: Oh, forgot to answer:
|
Simon Goldschmidt <goldsimon> |
Mon 18 Jun 2007 04:03:03 PM UTC, comment #17:
|
Simon Goldschmidt <goldsimon> |
Mon 18 Jun 2007 02:15:41 PM UTC, comment #16: The warning problem seems to be due to a circular reference between etharp.h and autoip.h. A simple solution is to replace ...
|
Frédéric Bernon <fbernon> |
Mon 18 Jun 2007 07:26:16 AM UTC, comment #15: I just rebuild with LWIP_AUTOIP=1 and LWIP_DHCP_AUTOIP_COOP=1, and I always got these errors :
|
Frédéric Bernon <fbernon> |
Sat 16 Jun 2007 11:46:48 AM UTC, comment #14: I think the TODOs in autoip.c directly above the includes are solved, aren't they? |
Simon Goldschmidt <goldsimon> |
Wed 13 Jun 2007 08:54:16 AM UTC, comment #13: Take a look about TODO tags. I have note some specific code in autip_init, and use of constants like 6 for ethadr length (like in eth_addr_cmp). Actually, I have disable it. If you also can help us wih some comments (with javaDoc style) about your functions in autoip.c (search "TODO: Add comment"), it will be great...
|
Frédéric Bernon <fbernon> |
Wed 13 Jun 2007 08:32:08 AM UTC, comment #12: Nice to see that my code seems to be not so bad at all ;)
|
Dominik Spies <dspies> |
Sun 10 Jun 2007 06:47:44 PM UTC, comment #11: About etharp_request, you're right, but I wouldn't change lot of thing before the first integration (except style coding). I think you can propose a patch for that, or directly modify it (if Dominik is agree)... But there is several things "TODO" before getting something well integrated... |
Frédéric Bernon <fbernon> |
Sun 10 Jun 2007 09:59:49 AM UTC, comment #10: I haven't tested the module, only looked at the diffs from checking in and it looks OK.
|
Simon Goldschmidt <goldsimon> |
Sat 09 Jun 2007 06:07:16 PM UTC, comment #9: Ok, I have build the change with and without LWIP_AUTOIP. I think nothing change if LWIP_AUTOIP=0, so, I have check in. But I have note several thing to study, like some warning due to autoip.h, some initalizations to study in autoip.c, and some values to replace by defines... Some thing to review are tagged with a TODO mark.
|
Frédéric Bernon <fbernon> |
Sat 09 Jun 2007 01:40:19 PM UTC, comment #8: I join the patch file. Warning, I just have produce it from CVS HEAD, and not build and test it...
|
Frédéric Bernon <fbernon> |
Sat 09 Jun 2007 11:11:17 AM UTC, comment #7: I start to produce a patch file from that using the current CVS HEAD...
|
Frédéric Bernon <fbernon> |
Wed 23 May 2007 04:01:03 PM UTC, comment #6: Hallo again,
|
Dominik Spies <dspies> |
Tue 22 May 2007 06:17:13 PM UTC, comment #5: Ok. For the name, so, choose the one you think better. To my point of view, autoip.c/.h is better, just because it's we know what the module do just by the name (IPv4LL is more difficult to understand).
|
Frédéric Bernon <fbernon> |
Tue 22 May 2007 05:48:39 PM UTC, comment #4: Hi!
|
Dominik Spies <dspies> |
Tue 22 May 2007 02:47:24 PM UTC, comment #3: IPV4LL seems to be a good name :
|
Frédéric Bernon <fbernon> |
Tue 22 May 2007 02:33:13 PM UTC, comment #2: First remarks:
|
Frédéric Bernon <fbernon> |
Tue 22 May 2007 01:59:40 PM UTC, comment #1: As you mentioned on one of the mailing lists that these patches aren't against the CVS head (and I'm presuming are large enough that they don't apply cleanly to the CVS head) they're unlikely to get applied unless there is someone willing to bring them up to date.
|
Kieran Mansley <kieranm> |
Tue 22 May 2007 01:45:20 PM UTC, original submission:
A first draft of my APIPA module for lwIP Stack.
|
Dominik Spies <dspies> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-06-28 | fbernon | Status | Ready For Test | Done | |
Open/Closed | Open | Closed | |||
2007-06-22 | fbernon | Attached File | - | Added AutoIP tests.txt, #13135 | |
2007-06-19 | fbernon | Attached File | - | Added autoip.c.patch, #13100 | |
2007-06-09 | fbernon | Status | In Progress | Ready For Test | |
2007-06-09 | fbernon | Attached File | - | Added autoip.zip, #12990 | |
2007-06-09 | fbernon | Status | None | In Progress | |
Assigned to | None | fbernon | |||
2007-05-23 | dspies | Attached File | - | Added lwIP AutoIP.zip, #12841 | |
2007-05-22 | dspies | Attached File | - | Added lwIP APIPA.zip, #12831 |
Powered by Savane 3.13-f8d8.
Corresponding source code
Ok, I have check in a change where rand() calls are replaced by a LWIP_AUTOIP_RAND macro. This one use MAC address and autoip's tried_llipaddr to return a "pseudo random value" (it's not perfect, but...). Of course, you can always use rand() by defining LWIP_AUTOIP_RAND in your lwipopts.h.
So, I close it, but reopen if you want to improve LWIP_AUTOIP_RAND.
Thank you Dominik for your module...