A library called libipq is provided for userspace packet handling. Unfortunately there is no documentation about libipq. But there are some examples of code using libipq.