SSCH Simulation Code -------------------- This code was developed on QualNet 3.6. Prerequisites ------------- - A Qualnet v. 3.6 installation - The MANET addons in QualNet, the routing protocols, etc - The IEEE 802.11 implementation in QualNet - Privileges to add, remove files and compile the software - A machine with sufficient memory. Installation Instructions ------------------------- - Download this software to a directory - Copy the files ssch.c and ssch.h to $QUALNET/addons/seq/ssch.c and $QUALNET/addons/seq/ssch.h - Add the following features: - Add the lines in ssch_phy.c to $QUALNET/phy/phy.c - Add the lines in ssch_mac_802_11.h to $QUALNET/addons/seq/mac_802_11.h - Modify $QUALNET/addons/seq/mac_802_11.c to incorporate the following: * do not send a packet for an EIFS period after switching to a new channel * When checking for outgoing packet (CheckForOutgoingPacket), get a packet from the SSCH rexmt buffer if it is not empty using SSCHMoveAPacketFromRexmtBufferToTheLocalBuffer * In the same function, queue the packet in the SSCH buffer when it comes down from the network layer using SSCHInsertRexmtBuffer, and then move a packet from the rexmt buffer to the local buffer * When retrying a packet, note that the congestion windows are adjusted * SSCH retransmits are handled differently, using MacHandleSSCHTransmitFailure * When you receive an ACK delete the packet from rexmt buffer, using SSCHDeleteRexmtBufferByNextHop * On receiving ACK, switch channel if it was due using MacHandleSSCHSwitchChannel * Even after processing a frame, switch channel if it was due * Check for outgoing packets after sending the beacon * When network layer has packet to send, buffer it in the SSCH queue, and move a packet from the rexmt buffer to the local buffer (see code). * On receiving a packet from the phy layer, check to see if "time to switch across channels" has passed. Else drop the packet. * Do not send a CTS if "switch time + EIFS time" has not elapsed since last switch * Send an SSCH beacon once every slot embedded in the LongControlFrame using MacSSCHTransmitBeacon. Add this functionality only in the handle timeout routine, and after the DIFS_EIFS timer has expired or after the backoff is complete, and if the SSCH beacon flag is set. * Whenever the SSCH beacon flag is set, go into EIFS_DIFS mode * On receiving a packet of type M802_11_SSCH_BEACON, add the contents in the SSCH structure using SSCHAddNbrInfo * After you are done receiving packet from phy, check to see if switching is due * On receiving a phy status change notification, switch channels if you come back to phy_idle mode, or from receiving to sensing mode. * On timing out after an EIFS or DIFS, first check if beacon is due, and if so send it. Also, if a switch is due, then switch * If you missed the CTS, and switch was due, then switch using MacHandleSSCHSwitchChannel * If you timeout on any other packet, then switch if it is due * Initialize the SSCH vars as shown in ssch_mac_802_11.c * To handle SSCH messages, make the changes as shown in ssch_mac_802_11.c - At this point please check your code for correctness! To check the code, please see that the implementation switches channels consistently, and does not stop switching due to some wait condition. Specifying Parameters (see ssch.config for details) --------------------------------------------------- You will need to specify the following params in your config file: - MAC-802.11-SSCH-SLOT-DURATION This specifies the SSCH slot duration. A value of 0 implies no SSCH. - MAC-802.11-SSCH-CHANNEL-SWITCH-TIME This is the time taken to switch across channels. We used 80 micro seconds - MAC-802.11-SSCH-NUM-CHANNELS Number of orthogonal channels to be used by SSCH. We used 13 for IEEE 802.11 - MAC-802.11-SSCH-RETRY-COUNT-PER-SLOT Max number of times a packet is retried in a slot We used value of 3. Also remember to specify the PROPAGATION-CHANNEL-FREQUENCY[ ] for all the channels. Note that the retry counts should be 1 for SSCH. For your convenience we have included a sample configuration file with SSCH paramaters.