packet lib: allow packet type to be specified when parsing packet

Signed-off-by: Shaun Crampton <Shaun.Crampton@metaswitch.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>