Greetings,

I am using the LWIP stack for a small project running under Linux. It is a kind 
of simulation - we are not using actual hardware for the network devices. The 
stack seems to be working well for this purpose.

Periodically I expect to grab the latest LWIP source from CVS and update my 
local copy to take advantage of new features and bug fixes. To simplify this, I 
am tring to keep 'my code' separate from the LWIP code. 

I would like to be able to simply copy the LWIP code into my working area, 
recompile and go. Currently I must make some manual tweaks to the LWIP code.

An example is the settings of the debug flags. I would like to preserve my 
current settings by keeping them in a separate file called (for example) 
debug_local.h (the 'local' means my local changes to the LWIP code).

Relevant files are:
  LWIP files:
    opt.h
    debug.h
    arch.h
The files that I supply are:
   lwipopts.h
   arch/cc.h

I cannot put the debug settings in lwipopts.h - it's too 'early' in the include 
chain and does not have access to the LWIP_DBG_ON, etc., tags.

I cannot put the settings in cc.h - it's also too 'early'.

What I do is manually insert 
   #include "local/debug_local.h"
into opt.h right after the include of debug.h:
    ...snip...
        /*
         * Include user defined options first. Anything not defined in these 
files
         * will be set to standard values. Override anything you dont like!
         */
        #include "lwipopts.h"
        #include "lwip/debug.h"
        #include "local/debug_local.h"
    ...snip...

My request is to add this to the LWIP source so I don't have to manually change 
the opt.h file. 

I would also request that the LWIP code move toward naming 'user supplied' 
files in a standard way to make them easy to separate from LWIP base code.
Examples:
    lwipopts   ==>  local/opt_local.h
    arch/cc.h  ==>  local/arch_local.h

The LWIP source would include these files as placeholders containing comments 
describing what belongs in each file. 

My many thanks to all who have contributed to LWIP - it's a great tool!

Art Rasmussen
Southwest Research Institute
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to