47 #include "contiki-net.h"
57 #ifdef NETSTACK_CONF_MAC_SEQNO_HISTORY
58 #define MAX_SEQNOS NETSTACK_CONF_MAC_SEQNO_HISTORY
62 static struct seqno received_seqnos[MAX_SEQNOS];
74 for(i = 0; i < MAX_SEQNOS; ++i) {
76 &received_seqnos[i].sender)) {
77 if(packetbuf_attr(PACKETBUF_ATTR_PACKET_ID) == received_seqnos[i].seqno) {
93 for(i = 0; i < MAX_SEQNOS; ++i) {
95 &received_seqnos[i].sender)) {
102 for(j = i - 1; j > 0; --j) {
103 memcpy(&received_seqnos[j], &received_seqnos[j - 1],
sizeof(
struct seqno));
105 received_seqnos[0].seqno = packetbuf_attr(PACKETBUF_ATTR_PACKET_ID);
107 packetbuf_addr(PACKETBUF_ADDR_SENDER));