Contiki-NG
|
MAC sequence numbers management. More...
#include <string.h>
#include "contiki-net.h"
#include "lib/random.h"
#include "net/mac/mac-sequence.h"
#include "net/packetbuf.h"
Go to the source code of this file.
Functions | |
void | mac_sequence_init (void) |
brief Initializes the destination sequence number to a random value. | |
void | mac_sequence_set_dsn (void) |
Sets and increments the destination sequence number. | |
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... | |
MAC sequence numbers management.
Definition in file mac-sequence.c.
int mac_sequence_is_duplicate | ( | void | ) |
Tell whether the packetbuf is a duplicate packet.
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 link-layer address.
Definition at line 87 of file mac-sequence.c.
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.
Definition at line 116 of file mac-sequence.c.