Microchip® Advanced Software Framework

mac-sequence.h File Reference

    Header file for MAC sequence numbers management
Author
Adam Dunkels adam@.nosp@m.sics.nosp@m..se Benoît Thébaudeau benoi.nosp@m.t.th.nosp@m.ebaud.nosp@m.eau@.nosp@m.advan.nosp@m.see..nosp@m.com

Functions

int mac_sequence_is_duplicate (void)
 Tell whether the packetbuf is a duplicate packet. More...
 
void mac_sequence_register_seqno (void)
 Register the sequence number of the packetbuf. More...
 

int mac_sequence_is_duplicate ( void  )

Tell whether the packetbuf is a duplicate packet.

Returns
Non-zero if the packetbuf is a duplicate packet, zero otherwise
        This function is used to check for duplicate packet by comparing
        the sequence number of the incoming packet with the last few ones
        we saw, filtering with the Rime address.

References i, linkaddr_cmp(), MAX_SEQNOS, packetbuf_addr(), PACKETBUF_ADDR_SENDER, packetbuf_attr(), PACKETBUF_ATTR_PACKET_ID, received_seqnos, and seqno::sender.

Referenced by input_packet(), and packet_input().

void mac_sequence_register_seqno ( void  )

Register the sequence number of the packetbuf.

This function is used to add the sequence number of the incoming packet to the history.

References i, j, linkaddr_cmp(), linkaddr_copy(), MAX_SEQNOS, packetbuf_addr(), PACKETBUF_ADDR_SENDER, packetbuf_attr(), PACKETBUF_ATTR_PACKET_ID, received_seqnos, seqno::sender, and seqno::seqno.

Referenced by input_packet(), and packet_input().