Checkpoint #2

Simple Packet Transmission

Due Monday, November 6th by 11:59pm
This checkpoint will not be accepted late!


Overview

Now that you've given your design some careful thought, it's time to start implementing! Be careful to write clean, well-documented code for this checkpoint, as you'll be extending your implementation and adding complexity before long. Your best defense at this stage is to keep your code clear, simple, and bug free.

The goal for this checkpoint is to be able to send and receive properly-formatted 802.11~ packets, and to be at least somewhat considerate of other 802.11~ stations in the process. The minimum functionality required for this checkpoint is spelled out below, but feel free to be more ambitious.

Specifics

When the layer above passes data to be transmitted, you must build and send a proper 802.11~ frame. Specifically, you should create a frame with type Data, a sequence number of zero, and with the retry bit set to zero (off). The source and destination addresses must be filled in correctly, and the checksum field filled either with an accurate checksum or with all 1s. You're not yet expected to implement the complete set of rules that manage sends on the shared channel, but you should at least listen first and only send once the channel is idle. (Do not just "busy wait" for the channel to become available! Insert a delay between checks, or find some other way to wait without hogging the CPU.) You do not need to worry about waiting for ACKs, handling retransmissions, checksums, sequence numbers, or the contention window mechanism for this checkpoint.

Your implementation must also receive and deliver incoming transmissions, though it's fine for now if you don't implement address selectivity. (That is, you can accept all transmissions you see, not just those destined for your station, if you choose.) Data from incoming packets should be queued up to await recv() calls from the layer above. You can ignore sequence numbers and checksums for this checkpoint, and don't need to send an ACK back when data frames arrive (though you certainly can if you want).

You do not need to add any code to status() for this checkpoint. It would be an excellent idea to print diagnostic output on the output stream passed to the constructor though (dot11_init in C++) — you might also consider allowing this output to be enabled and disabled (or to change the level of debugging detail) via the command() routine.

Submitting

Submit your code via Canvas. If you're using Eclipse, please export your project as an archive file and submit that. If you're using Java but not Eclipse, please zip up the top-level folder in your project and submit that. I want to make sure that I have all code necessary to compile and run your projects! Leave me a README.txt file if there's anything I need to know about how to build or run your program.


Brad Richards, 2023