a82212bd36e1074408974b466798b9966bbaf49bvboxsync1 Introduction
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsyncThis document describes some guidelines for people participating
a82212bd36e1074408974b466798b9966bbaf49bvboxsyncin lwIP development.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync2 How to contribute to lwIP
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsyncHere is a short list of suggestions to anybody working with lwIP and
a82212bd36e1074408974b466798b9966bbaf49bvboxsynctrying to contribute bug reports, fixes, enhancements, platform ports etc.
a82212bd36e1074408974b466798b9966bbaf49bvboxsyncFirst of all as you may already know lwIP is a volunteer project so feedback
a82212bd36e1074408974b466798b9966bbaf49bvboxsyncto fixes or questions might often come late. Hopefully the bug and patch tracking
a82212bd36e1074408974b466798b9966bbaf49bvboxsyncfeatures of Savannah help us not lose users' input.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync2.1 Source code style:
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync1. do not use tabs.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync2. indentation is two spaces per level (i.e. per tab).
a82212bd36e1074408974b466798b9966bbaf49bvboxsync3. end debug messages with a trailing newline (\n).
a82212bd36e1074408974b466798b9966bbaf49bvboxsync4. one space between keyword and opening bracket.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync5. no space between function and opening bracket.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync6. one space and no newline before opening curly braces of a block.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync7. closing curly brace on a single line.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync8. spaces surrounding assignment and comparisons.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync9. use current source code style as further reference.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync2.2 Source code documentation style:
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync1. JavaDoc compliant and Doxygen compatible.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync2. Function documentation above functions in .c files, not .h files.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync (This forces you to synchronize documentation and implementation.)
a82212bd36e1074408974b466798b9966bbaf49bvboxsync3. Use current documentation style as further reference.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync2.3 Bug reports and patches:
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync1. Make sure you are reporting bugs or send patches against the latest
a82212bd36e1074408974b466798b9966bbaf49bvboxsync sources. (From the latest release and/or the current CVS sources.)
a82212bd36e1074408974b466798b9966bbaf49bvboxsync2. If you think you found a bug make sure it's not already filed in the
a82212bd36e1074408974b466798b9966bbaf49bvboxsync bugtracker at Savannah.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync3. If you have a fix put the patch on Savannah. If it is a patch that affects
a82212bd36e1074408974b466798b9966bbaf49bvboxsync both core and arch specific stuff please separate them so that the core can
a82212bd36e1074408974b466798b9966bbaf49bvboxsync be applied separately while leaving the other patch 'open'. The prefered way
a82212bd36e1074408974b466798b9966bbaf49bvboxsync is to NOT touch archs you can't test and let maintainers take care of them.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync This is a good way to see if they are used at all - the same goes for unix
a82212bd36e1074408974b466798b9966bbaf49bvboxsync netifs except tapif.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync4. Do not file a bug and post a fix to it to the patch area. Either a bug report
a82212bd36e1074408974b466798b9966bbaf49bvboxsync or a patch will be enough.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync If you correct an existing bug then attach the patch to the bug rather than creating a new entry in the patch area.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync5. Trivial patches (compiler warning, indentation and spelling fixes or anything obvious which takes a line or two)
a82212bd36e1074408974b466798b9966bbaf49bvboxsync can go to the lwip-users list. This is still the fastest way of interaction and the list is not so crowded
a82212bd36e1074408974b466798b9966bbaf49bvboxsync as to allow for loss of fixes. Putting bugs on Savannah and subsequently closing them is too much an overhead
a82212bd36e1074408974b466798b9966bbaf49bvboxsync for reporting a compiler warning fix.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync6. Patches should be specific to a single change or to related changes.Do not mix bugfixes with spelling and other
a82212bd36e1074408974b466798b9966bbaf49bvboxsync trivial fixes unless the bugfix is trivial too.Do not reorganize code and rename identifiers in the same patch you
a82212bd36e1074408974b466798b9966bbaf49bvboxsync change behaviour if not necessary.A patch is easier to read and understand if it's to the point and short than
a82212bd36e1074408974b466798b9966bbaf49bvboxsync if it's not to the point and long :) so the chances for it to be applied are greater.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync2.4 Platform porters:
a82212bd36e1074408974b466798b9966bbaf49bvboxsync
a82212bd36e1074408974b466798b9966bbaf49bvboxsync1. If you have ported lwIP to a platform (an OS, a uC/processor or a combination of these) and
a82212bd36e1074408974b466798b9966bbaf49bvboxsync you think it could benefit others[1] you might want discuss this on the mailing list. You
a82212bd36e1074408974b466798b9966bbaf49bvboxsync can also ask for CVS access to submit and maintain your port in the contrib CVS module.
a82212bd36e1074408974b466798b9966bbaf49bvboxsync