Question: Write a C program that will decode the Ethernet header from a packet stored in a binary file. This program needs to run in Visual

Write a C program that will decode the Ethernet header from a
packet stored in a binary file. This program needs to run in
Visual Studio 2022.
What you program should do:
Decode the destination MAC address, source MAC address,
and the type.
List the hex representation of frame's payload.
Several binary files have been supplied on Canvas. The files are
frames from the tcp.pcapng file. Use these files to test your
program. You may also create your own binary files from any
packet you can view in Wireshark.
Your program must match the formatting in the example output
shown below:
Ethernet header:
Destination MAC address:
Source MAC address:
Type:
e: 8c:29:b4:90:14
ec: fa:bb:96:12:0e800
Payload:
6f 6d6d 65
20,28,28,28,49,72,6f,6e
20,31,31,34,39,28,20,20
28,28,28,28,20,20,20,20
65,67,6f,72,79,3a,20,45
2,20,2,49,50,28,6f,76
75,61,6c,69,74,79,20,6f
45,78,79,65,72,69,6d,65
74,65,72,6e,65,74ea20
74,28,73,78,65,63,69,66
66,20,61,6e,79,28,6b,69
NB : This example does not include the entire payload; only the
first several bytes.
To turn in:
A file containing your source code named Assignment 5.c or
Assignment5.cpp
C commands you will probably need to use:
Declare a file
FILE*@
 Write a C program that will decode the Ethernet header from

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!