Question: In a networked application, you need to design a structure to represent a network packet that contains headers and payloads. Define a `Packet` structure where each packet contains a `Header` structure, a dynamically allocated `Payload` structure, and a nested `Footer` structure. Write a C program that:
→ Allocates memory for a packet, including its headers and payload.
→ Provides functions to construct, send, and destruct packets, ensuring all parts of the packet are correctly managed in memory.
→ Discuss how the nested structure impacts memory alignment and padding, particularly in the context of network protocols that require precise data layouts.