[PATCH 2/4] ipmon(): move packet handling into separate function