next up previous
Next: Parameters Up: Radio Link Control (RLC) Previous: Radio Link Control (RLC)

RLC class in C++

The RLC class derives from the LinkDelay class. The code can be found in  ns/ll-timers.{cc,h} and  ns/ll.{cc,h}. The functions and variables of the class are shown below

class RLC : public LinkDelay {
     friend class rlcTxTimer;           //rtx timer for data pkts
     friend class rlcackTimer;          //rtx timer for rlc acks
public:
      :
     //new funcs
     virtual void recvACK(Packet* p);    //recv ack pkts
     virtual void recvDATA(Packet* p);   //recv data pkts
     virtual void sendUpDATA(Packet* p); //reassemble and send data up
     virtual void enqueDATA(Packet* p);  //frag and enque data
     virtual void sendDownDATA(void);    //send data down
     virtual void sendACK(Packet* p);    //send rlc ack
      :
     virtual void RetransmitDATA(void);  //rtx data on timeout
     virtual void RetransmitACK(void);   //rtx rlc on timeout
     virtual void sendDownDATAonACK(void);  //send data when recv ack
      :
	  
protected:
     int command(int argc, const char*const* argv);
     static int rlcverbose_;  
     int seqno_;              // rlc sequence number
     int ackno_;              // ACK received so far
     int rackno_;             // seq no of left most pkt
     int macDA_;              // destination MAC address
     int window_;             //window size for sack
     Queue* ifq_;             // interface queue
     PacketQueue* buf_;       // queue to store frag pkts to sendDown
     PacketQueue* Txbuf_;     // Tx buffer
     PacketQueue* Rxbuf_;     // Rx buffer
       :
	 int acked_;              //RLC layer acked?
     int rlcfraged_;          //RLC layer PDU fragmented?
     int rlcfragsz_;          //RLC layer frag size
     int datacounter;         //no of rtx for data
     int ackcounter;          //no of rtx for rlc ack
     Packet *pktTx_;          //store rtx data
     Packet *pktRx_;          //store rtx  rlc ack
     int inseq_;              //flag for pkts in seq in unack mode
     int unackseqno_;         //seqno when in unack mode
     int numdups;             //no of dupacks for sack
      :	
}



Richa Jain (96D07007)
Tue Jul 24 22:29:53 IST 2001