"ask" or "bid", (5) the time, in
milliseconds, between each retransmission, and (6) the maximum
number of times to retransmit before giving up. The routine or
object should send quote queries to the IP address and UDP port
until it receives a response or retransmits enough times and
gives up. The time between each retransmission must be as given
by the appropriate parameter. The format of a quote query and
response are given below. The dollar value is the whole dollar
value of the stock price. The 64th is the number of 64ths of
a dollar in the stock price. This value must be between 0 and 63.
Query:
Bytes: 2 Var 1 Var 1
+------+----------+-+------+-+
| 0x1 | symbol |0| type |0|
+------+----------+-+------+-+
Response:
Bytes: 2 Var 1 Var 1 2 1
+------+----------+-+------+-+--------+------+
| 0x2 | symbol |0| type |0| dollar | 64th |
+------+----------+-+------+-+--------+------+
Error:
Bytes: 2 Var 1 Var 1 Var 1
+------+----------+-+------+-+--------+------+-+
| 0x3 | symbol |0| type |0| error message |0|
+------+----------+-+------+-+--------+------+-+
The routine or object must return whether a response was
received or not and the dollar and 64th values of the response.
- ~cs268/sniff-Fa00-1.data
- ~cs268/sniff-Fa00-2.data
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. 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, make Part 2 accept stock information periodically
from a TCP streaming stock ticker (one will be provided at a later date) [7%].
And/Or make Part 3 print each and every field in the IP/TCP/UDP headers
(including options) as well as print out the data contents in hexadecimal format as given by
the xxd program [6%].