Definition: A packet is one unit of binary data capable of being routed through a computer network. To improve communication performance and reliability, each message sent between two network devices is often subdivided into packets by the underlying hardware and software.
Depending on the protocol(s) they need to support, packets are constructed in some standard packet format. Packet formats generally include a header, the body containing the message data (also known as the payload), and sometimes a footer (also known as the trailer). The packet header lists the destination of the packet (in IP packets, the destination IP address) and often indicates the length of the message data. The packet footer contains data that signifies the end of the packet, such as a special sequence of bits known as a magic number.