Add utilities to filter packet

The utilities makes it easier to do simple matching of packets received
as byte arrays. This is useful for tests operating on tap interfaces.

Test: tests based on this utility
Bug: 156062304
Original-Change: https://android-review.googlesource.com/1309234
Merged-In: Ie648c4aee1eae94ae01e3e29234fb432b35c108e
Change-Id: Ie648c4aee1eae94ae01e3e29234fb432b35c108e
2 files changed