Added Packet API.

Adds an API to deal with Packets.
Missing newline character