40#ifndef SUN_COMMON_STRUCTURES_H
41#define SUN_COMMON_STRUCTURES_H
44#define MIN_SNR -9999.9
46#define DROP_DEST_UNREACHABLE_REASON \
49#define DROP_PATH_ALREADY_PROCESSED \
51#define DROP_MAX_NUMBER_OF_HOP_IN_LIST_REACHED \
53#define DROP_WRONG_NODE_PATH_EST \
57#define DROP_DATA_HOPS_LENGTH_EQUALS_ZERO \
61#define DROP_PATH_ESTABLISHMENT_SEARCH_PACKET_HOP_LIST_FULL \
63#define DROP_PATH_ESTABLISHMENT_SEARCH_PACKET_ALREADY_PROCESSED \
65#define DROP_PATH_ESTABLISHMENT_SEARCH_PACKET_WRONG_CHECKSUM \
67#define DROP_PATH_ESTABLISHMENT_SEARCH_PACKET_NO_ROUTE_TO_DESTINATION \
71#define DROP_PATH_ESTABLISHMENT_ANSWER_PACKET_GARBAGE \
73#define DROP_PATH_ESTABLISHMENT_ANSWER_NODE_ROUTING_TABLE_FULL \
77#define DROP_SINK_PACKET_TYPE_UNSOPPORTED \
81#define DROP_PACKET_NOT_FOR_ME \
83#define DROP_PACKET_WITHOUT_DIRECTION \
85#define DROP_BROKEN_LINK_DROP \
87#define DROP_BUFFER_IS_FULL \
119 double _t_reception_ = Scheduler::instance().clock(),
120 double _t_last_tx_ = 0,
int _num_retx_ = 0)
buffer_element describes an entry in the buffer used by SUN.
buffer_element(Packet *_p, int _id_pkt_=0, double _t_reception_=Scheduler::instance().clock(), double _t_last_tx_=0, int _num_retx_=0)
Constructor for buffer_element.
unsigned int retx_
Real retransmission counter: incremented only if packet is sent donwlayer.
Packet * p_
Pointer to the packet buffered.
double t_last_tx_
Time instant of the last transmission attempt.
int id_pkt_
ID of the packet buffered.
double t_reception_
Time instant in which the packet was buffered.
int num_attempts_
Number of transmission attempts.
buffer_element()
Constructor for buffer_element.
static int sunuid_
Unique identifier for UWSUN packets.
static const int MAX_HOP_NUMBER
Maximum number of hops contained in a SUN Path Establishment packet.