Add support for packet filtering; remove unnecessary prototypes