0 15 31
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Second |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Microsecond |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Packet Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP Header ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TCP/UDP Header ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data (Optional) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Second (Packet 2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Microsecond (Packet 2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Capture Length (Packet 2) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Packet 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 packet length is the total length of
the packet. The processing takes the form of the following.
- HH:MM:SS.UUUUUU IP.port -> IP.port Proto TCPFlags Datalen
- 12:56:42.005679 157.182.194.28.7462 -> 157.182.194.39.22 TCP AP 1460
-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.
Notification:
Bytes: 2 Var 1
+------+----------+-+
| 0x1 | client |0|
+------+----------+-+
Event:
Bytes: 2 Var 1 Var 1 Var 1
+------+----------+-+------+-+--------+------+-+
| 0x2 | client |0| type |0| event message |0|
+------+----------+-+------+-+--------+------+-+
Notifications are sent in the absence of events to log. They contain
a string used as the name of the client (this is the hostname).
Events are sent to the server for logging. The event has a type
field which is a string and a message field which is also a string.
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 MX queries for a given domain name to a given DNS server, wait for the response (resending if necessary), and display the MX Resource Record returned.