Download
how to receive a multicast packet n.
Skip this Video
Loading SlideShow in 5 Seconds..
How to receive a multicast packet ? PowerPoint Presentation
Download Presentation
How to receive a multicast packet ?

How to receive a multicast packet ?

135 Vues Download Presentation
Télécharger la présentation

How to receive a multicast packet ?

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. How to receive a multicast packet ?

  2. Procedure (when no errors or congestion) recv() -> receive timer started -> recv_timer() -> recvDATA() -> uptarget_->recv() -> rx_resume()

  3. recv( ) void Mac802_11::recv(Packet *p, Handler *h) { ……………………………………………………….. if(rx_state_ == MAC_IDLE) { setRxState(MAC_RECV); pktRx_ = p; /* * Schedule the reception of this packet, in * txtime seconds. */ mhRecv_.start(txtime(p)); } ……………………………… } Back to procedure

  4. recvHandler( ) voidMac802_11::recvHandler() { recv_timer(); } Back to procedure

  5. recv_timer( ) void Mac802_11::recv_timer() { switch(type) { case MAC_Type_Management: …………………………………………… case MAC_Type_Control: switch(subtype) { …………………………………………… case MAC_Type_Data: switch(subtype) { case MAC_Subtype_Data: recvDATA(pktRx_); break; default: fprintf(stderr, "recv_timer2:Invalid MAC Data Subtype %x\n", subtype); exit(1); } break; default: fprintf(stderr, "recv_timer3:Invalid MAC Type %x\n", subtype); exit(1); } done: pktRx_ = 0; rx_resume(); } Back to procedure

  6. recvDATA( ) void Mac802_11::recvDATA(Packet *p) { struct hdr_mac802_11 *dh = HDR_MAC802_11(p); u_int32_t dst, src, size; struct hdr_cmn *ch = HDR_CMN(p); dst = ETHER_ADDR(dh->dh_ra); src = ETHER_ADDR(dh->dh_ta); size = ch->size(); ch->size() -= phymib_.getHdrLen11(); ch->num_forwards() += 1; …………………………………………………….. uptarget_->recv(p, (Handler*) 0); } Back to recv_timer( ) Back to procedure

  7. rx_resume( ) void Mac802_11::rx_resume() { assert(pktRx_ == 0); assert(mhRecv_.busy() == 0); setRxState(MAC_IDLE); } Back to procedure