1 / 7

How to receive a multicast packet ?

How to receive a multicast packet ?. Procedure (when no errors or congestion). recv() -> receive timer started -> recv_timer() -> recvDATA() -> uptarget_->recv() -> rx_resume(). recv( ). void Mac802_11::recv(Packet *p, Handler *h) { ………………………………………………………..

Download Presentation

How to receive a multicast packet ?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

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

More Related