Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this set up of tasks, you should compile the C code inside the host VM , and then run the code inside the container.

For this set up of tasks, you should compile the C code inside the host VM, and then run the code inside the container. You can use the "docker cp" command to copy a file from the host VM to a container. See the following example (there is no need to type the docker ID in full):
$ dockps
f 4501 a 488 a 69 hostA-10.9.0.5
85058 cbdee 62 hostB-10.9.0.6
24 cbc879e 371 seed-attacker
// Copy a.out to the seed-attacker container's / tmp folder
$ docker cp a.out 24cbc879e371:tmp
4.1 Task 2.1: Writing Packet Sniffing Program
Sniffer programs can be easily written using the pcap library. With pcap, the task of sniffers becomes invoking a simple sequence of procedures in the pcap library. At the end of the sequence, packets will be put in buffer for further processing as soon as they are captured. All the details of packet capturing are handled by the pcap library. The SEED book provides a sample code, showing how to write a simple sniffer program using pcap. We include the sample code in the following (see the book for detailed explanation).
#include )
(constuchar *** packet})
({)
(constuchar *** packet})
({
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Entity Alignment Concepts Recent Advances And Novel Approaches

Authors: Xiang Zhao ,Weixin Zeng ,Jiuyang Tang

1st Edition

9819942527, 978-9819942527

More Books

Students also viewed these Databases questions