You are on page 1of 1

UNIVERSITY OF CENTRAL PUNJAB

(Faculty of IT)

Data Network Security (DNS)


CSNC-3423
Assign 01 Date: 21 Mar, 2019
Total Marks : 100 Due Date : 28 Mar, 2019

Develop a Packet Sniffing application in Unix C environment using Packet Capture library
“libpcap”.
A general purpose packet sniffer in Unix C environment can be developed using “libpcap” packet
capture library. Consult the libpcap programming guide from the class lecture and web, and develop an
understanding of the use/syntax of the various library functions used for packet capturing, such as
pcap_lookupdev( ), pcap_open_live( ), pcap_loop( ) or pcap_next(), etc.
Then write the code to capture packets and process their headers to display all the header field values
at the data link layer, network layer, and transport layer.
While parsing protocol headers, the program will first need to determine the upper layer protocol type
and then proceed to process/display the requisite protocol header fields.
The report is to include the following:-
(a) Screen shots of packet sniffer functionality in terminal window, showing the Hex dump of at
least two captured packets, along with all the field values for Ethernet, IP and TCP headers.
(b) The hard copy of the complete code is to be provided; the code should be well commented to
indicate what function is being performed; the code should be readable (reasonable font size)
and not span unnecessary pages.

Assignment Guidelines:

Hard copy of assignment is to be submitted in groups (3-4 students per group). There should be a
Title Page showing Subject, Assignment Number, Student Name/ID and Date of Submission.

Program should not have been copied verbatim from any source, and should have only the required
functionality.

Code will also be submitted in hard copy; it should be in small font for good readability and indented/
well commented.

The screen shots of code functionality should be provided.

Demo of running code will be given by individual groups. A viva will also be conducted at demo time.

Page 1 of 1

You might also like