buglwIP - A Lightweight TCP/IP stack - Bugs: bug #27157, Preprocessor definitions to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #27157: Preprocessor definitions to exclude IPv6 sources

Submitter:  Joseph Thomas-Kerr <jokester01au>
Submitted:  Mon 03 Aug 2009 02:01:50 AM UTC
   
 
Category:  IPv6 Severity:  3 - Normal
Item Group:  Feature Request Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

Jump to the original submission

Tue 04 Aug 2009 12:20:25 PM UTC, comment #8: 

Just want to add to this regarding the #includes having to also change for IPv6/v6 that you can use a macro for the include file name.

Bill Auerbach <billauerbach>
Mon 03 Aug 2009 11:20:10 PM UTC, comment #7: 

...of course, its hard to take things out of a release when somebody just possibly might be using it...

Joseph Thomas-Kerr <jokester01au>
Mon 03 Aug 2009 11:18:25 PM UTC, comment #6: 


>  I wouldn't even be surprised if any of the latest changes broke >  IPv6 since I don't think anyone is constantly testing it :-(


If that's the case then maybe you should put it on a branch and take it out of the main release?

> Of course, you're welcome to work on the IPv6 code and make it
> usable again!


I'm afraid my interest at this stage is the same as all the active developers. I'd prefer it wasn't in the release at all.

Joseph Thomas-Kerr <jokester01au>
Mon 03 Aug 2009 01:48:05 PM UTC, comment #5: 


> In any case, I imagine you don't want to consider anything like
> this at the stage of rc2.


Certainly not. And maybe not even for one of the next releases unless an active developer takes care of the IPv6 code. The main reason it's not really usable is noone of the active developers is using it: I wouldn't even be surprised if any of the latest changes broke IPv6 since I don't think anyone is constantly testing it :-(

Of course, you're welcome to work on the IPv6 code and make it usable again!

Simon Goldschmidt <goldsimon>
Group administrator
Mon 03 Aug 2009 12:43:33 PM UTC, comment #4: 

That's very true. In my system .c discovery is automated, .h is not (so I manually choose one include directory or the other).

In other network api's that I have used, ipv6 support is an extension to ipv4, rather than a replacement. Both are in the same header files and there are #if's to selectively include ipv6.

But I realise that this is quite different to the way that lwip is currently structured. Still, you could merge ipv4/lwip/in.h and lpv6/lwip/in.h into a single file and use #if to choose which half to enable (likewise for the other ip headers), then you always include the same set of headers.

In any case, I imagine you don't want to consider anything like this at the stage of rc2.

Joseph Thomas-Kerr <jokester01au>
Mon 03 Aug 2009 09:46:10 AM UTC, comment #3: 

Your patch ignores the fact that all the includes referring to the IP layer (like #include "lwip/ip.h") have to include v4 or v6. Solving this via #if's would require us to change all those lines to something like (#if IPv6 #include "bla" #else #include "blub" #endif) and would also break existing makefiles.

I'm aware the current situation of IPv6 in lwIP is not optimal, but I certainly don't want to have all those #if's around includfe directives.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 03 Aug 2009 07:42:49 AM UTC, comment #2: 

I'm aware that I can select which one to use via setting only one or the other of ipv4 or ipv6 in my makefile.

However, for everything else (eg. DHCP, DNS, ARP, etc. etc.) I can leave my makefile alone and set whether each is built by setting the value of the appropriate LWIP_xxx option.

I'd like to be able to do the same thing with IPv6 as well, because that would enable me to put the entire LWIP release tree into my plugin and have it just work, without having to alter the release at all.

In my plugin architecture, the makefile is dynamically generated by traversing the directory tree looking for .c files.

I've attached a new diff which turns off IPv4 when you turn on IPv6 (of course the default in opt.h is IPv4).

It seems to me that it would be good to be able to select IPv6 as an option just like all of the other compilation decisions in LWIP.

Regards,
Joe.

(file #18520)

Joseph Thomas-Kerr <jokester01au>
Mon 03 Aug 2009 06:44:37 AM UTC, comment #1: 

You can use the unchanged lwIP release as it is now. lwIP does not support IPv4 and IPv6 at the same time but only one or the other. To switch between v4 and v6 you have to change the files that are built and the include directories so that you either include the two 'ipv4' directories or the two 'ipv6' directories in your build.

There is no need for #if's as in normal builds, the v6-files will never get touched.

Simon Goldschmidt <goldsimon>
Group administrator
Mon 03 Aug 2009 02:01:50 AM UTC, original submission:  

Hi,

I notice that IPv6 support is labelled "highly experimental" and not intended to be used.

How about adding an LWIP_IPV6 option for it so that the source files can be excluded by the preprocessor, as you have done with other options such as DHCP or DNS?

The reason that I ask is that I want to use the unchanged LWIP release as part of a plugin in my architecture (which builds all of the source files it finds under the src directory). At the moment I need to delete the src/core/ipv6 directory before it will compile.

I've attached a diff from rc2.

Joseph Thomas-Kerr <jokester01au>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by billauerbach (Posted a comment)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by jokester01au (Submitted the item)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-08-03 jokester01au Attached File- Added LWIP_IPV6-r2.diff, #18520
    2009-08-03 goldsimon StatusNone Invalid
        Open/ClosedOpen Closed
    2009-08-03 jokester01au Attached File- Added LWIP_IPV6.diff, #18519

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code