The LL class is derived 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 LL : public LinkDelay { friend class llTxTimer; //rtx timer for datapkts friend class llackTimer; //rtx timer for llacks 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 sendDown(Packet* p); //hack for calls in snoop.cc virtual void enqueDATA(Packet* p); //set mac hdrs and arp virtual void fragDATA(Packet* p); //fragment data virtual void sendDownDATA(void); //send data down virtual void sendACK(Packet* p); //send ll ack virtual void sendHandler(void); virtual void send_timer(void); virtual void sendackHandler(void); virtual void send_acktimer(void); virtual void RetransmitDATA(void); //rtx data on timeout virtual void RetransmitACK(void); //rtc ll ack on timeout : protected: int command(int argc, const char*const* argv); static int llverbose_; //ll layer debug output int seqno_; // link-layer sequence number int ackno_; // ACK received so far int macDA_; // destination MAC address : Queue* ifq_; // interface queue PacketQueue* buf_; // queue to store frag pkts to sendDown : int acked_; //LL layer acked? int llfraged_; //LL layer PDU fragmented? int llfragsz_; //LL layer frag size int datacounter; //no of rtx for data int ackcounter; //no of rtx for ll ack Packet *pktTx_; //store rtx data Packet *pktRx_; //store rtx ll ack }