net/tap: add packet type management