[Tinyos-devel] retransmissions in networking protocols

Omprakash Gnawali gnawali at usc.edu
Thu Oct 4 08:43:59 PDT 2007


> I'm talking about lost ACKs, not lost packets. Whenever only the ACK is
> lost, a duplicate is created by the hop by hop recovery mechanism of the
> network protocols. My question is: why is there no mechanism in place to
> filter duplicates out?


If you are talking about CTP, it already does duplicate suppression:

>From CtpForwardingEngineP.nc:

event message_t*
SubReceive.receive(message_t* msg, void* payload, uint8_t len) {

...

    //See if we remember having seen this packet
    //We look in the sent cache ...
    if (call SentCache.lookup(msg)) {
        call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_CACHE);
        return msg;
    }
    //... and in the queue for duplicates
    if (call SendQueue.size() > 0) {
      for (i = call SendQueue.size(); --i;) {
        qe = call SendQueue.element(i);
        if (call CtpPacket.matchInstance(qe->msg, msg)) {
          duplicate = TRUE;
          break;
        }
      }
    }

    if (duplicate) {
        call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_QUEUE);
        return msg;
    }

...


- om_p



More information about the Tinyos-devel mailing list