Added some very messy code to support filtering based on ip protocol.
Some major logic holes are still remaining.... but basic skeleton works.
Very unmodular code - needs some laundry