0 15 31
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Second |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Microsecond |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP Header ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TCP/UDP Header ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data (Optional) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Second (Packet 2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Microsecond (Packet 2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Length (Packet 2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP Header (Packet 2) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
The capture seconds are measured since the epoch on
January 1, 1970. Microseconds is the number of microseconds
within that second. This is the standard C timeval structure
timing. The capture length is the number of bytes captured
of the message. The processing takes the form of the following.
- HH:MM:SS.UUUUUU IP.port -> IP.port Proto TCPFlags Datalen
- Capture starts on: Tue Mar 11 20:15:37 EST 2003 and 034083 microseconds
- 00:00:00.000000 157.182.194.39.22 -> 157.182.194.28.7462 TCP S 40
- 00:00:00.005679 157.182.194.28.7462 -> 157.182.194.39.22 TCP S,A 40
- . . .
-s argument specifying the Source IP address to look
for and the -d argument specifying the
Destination IP address to look for. e.g.
$ pfilter -s 157.182.194.28/24 filename
might only display information for IP packets that have
a source IP address that falls in the 157.182.194.28/24 subnet.
Both the Source IP address and Destination IP address may be given
or just one of them may be given.
Notes: Your submissions must at least compile before any credit will be given. Submissions that do not compile will not be graded. Submissions submitted after the due date will not be graded. All work must be your own original work. To get partial credit for parts of the assignment, you must demonstrate that those pieces work by themselves. If you share code with others, you will be given a 0 for the assignment. This assignment set is worth 25% of your total grade.
For extra credit, construct a DNS client application that can send queries for a given hostname or IP address. The application can also be given a list of domains to try in addition to the specified hostname alone. The application must send the query to a given DNS server, wait for the response (resending if necessary), and display all the Resource Records returned.