A network router is a serious undertaking. Especially if you intend to handle all the details of what a router really does and not just implement a static lookup table.
I'd suggest that you start to look at things already designed for this purpose. One that I am familiar with is the Click modular router. It is written in C++ with some parts written in C where necessary.
In addition, jonsca's advice is correct. You will get no free handouts here; you need to show effort and we will help you progress.
One final point: You posted this question in at least two threads. I'd suggest that you decide on a target language and post specific to that language. It helps the community help you. Not everyone visits each thread and you may end up wasting the time of multiple people if you do keep your questions relevant.