Write a C program that parses a simulated IPv4 packet byte array. Print the version, IHL, total length, TTL, protocol, and source/destination IP addresses.
Requirements:
- Define a simulated IPv4 packet as an unsigned char array
- Parse and print the IP version (should be 4)
- Parse and print the IHL (header length in 32-bit words)
- Parse and print the total length in bytes
- Parse and print the TTL value
- Parse and print the protocol number (1=ICMP, 6=TCP, 17=UDP)
- Parse and print the source IP in dotted-decimal notation
- Parse and print the destination IP in dotted-decimal notation
- Include the keywords: IPv4, TTL, protocol, 192.168