Homework Questions? Ask a Tutor for Answers ASAP
I have a C programming question. Could you please add the lines of programming needed near the bottom of the file? I need to decode the ethernet header and print the header in a readable format, print the addresses in hex with ":" between each byte (e.g. DA = 00:16:22:F3:33:45, SA = 00:FF:34:78:CD:22) and print the type/length field as Type = (hex value) or Len = (in decimal). Also:*need to print IP (0x80) the print Payload = IP or if type field indicates payload is ARP (0x806) then print Payload = ARP)*add a set of counters to count the # ***** broadcast packets /# ***** IP Packets / # ***** ARP PAcketsthen add code to print the values of these counter to the subroutine program_ending(). Note the subroutine already prints the total of packetsThanks!The code is downloadable from ftp:www.dougj.net under pub, the file netdump.tar. You will need to extract the files into a directory and type "make" to create the program netdump. To run the program, you will use "run_dump. Thanks!