Hi mohan
its always very interesting to do a project in networking/firewall.good that
you have intended to do one.instead of re-inventing the wheel by writing a
firewall from scratch ,you can try extending the netfilter/iptables with lots
of options which the commercial firewalls have.netfilter is highly modular it
allows extensions and new features by writing new modules.you can also write
many netfilter hooks.
for more details on netfilter development.
RTFM at www.iptables.org | www.netfilter.org
there are lots of HOWTOS describing netfilter-hacking,etc
Happy Hacking
Manikandan P.