libipq will not give me what I want. I want this to be complete transparent to the user space.
You can try lipipq http://linux.die.net/man/3/libipqRegards,Sankalp.