Added Packet API.

Adds an API to deal with Packets.