ipfw, status report

marta carbone marta at freebsd.org
Sun Aug 9 21:37:45 UTC 2009


The current implementation of the ipfw userland program integrates the
microinstruction compiler and the socket i/o code in a single function.
This no clear distinction between the compiler and the socket i/o code
makes impossible to use such functions for their own purpose.
The decompilation code suffers of similar problems too, since it integrates
the microinstruction code with the socket i/o functions. In addition to
this, the resulting output is redirected to the stdout, making difficult
to use the decompilation function as a pure "decompiler".

Part of the gsoc project is aimed to change this behavior and clearly
separate the microinstruction compiler from socket i/o functions.

An immediate result of this work will be a set of functions dedicated
to compile and decompile ipfw microinstructions, and a set of function
dedicated to perform socket i/o operations.  These functions can be used
to build the "libipfw" library, making the ipfw microinstruction compiler
available to other programs as well.

Changes done until now involve:
 - removed some static variables and use the reentrant version
   of the sorting function, aimed to make reentrant the code;
 - code cleanup, aimed to improve readability;
 - extraction of the global options parsing code from the main file;
 - removed globals variables;
 - build the "libipfw" library;
 - build the ipfw userland program by linking the code against the
   "libipfw" library.

In the next days I plan to continue the work on libipfw code,
extracting the socket/io related code, upload the code to the perforce
server.

marta


More information about the soc-status mailing list