/**
 * @file rudp-light_vars.h
 *
 * @brief Reliable User Datagram Protocol (RUDP) - minimal implemenation (variables).
 *
 * Copyright 2007-2008, Freie Universitaet Berlin. All rights reserved.
 * Please refer to the COPYING file for detailed licensing information.
 *
 * @author Georg Wittenburg
 *
 * $Id: rudp-light_vars.h 2685 2008-06-25 16:38:56Z wittenbu $
 */

#ifndef RUDP_LIGHT_VARS_H
#define RUDP_LIGHT_VARS_H

#include "../types.h"
#include "rudp-light_types.h"



/**
 * @brief Number of RUDP transmission retries.
 */
#define C_RUDP_PACKET_RETRIES		16

/**
 * @brief Minimal RUDP backoff time.
 */
#define C_RUDP_MIN_BACKOFF_TIME	C_EXPECTED_MULTI_HOP_RTT

/**
 * @brief Maximal RUDP backoff time.
 */
#define C_RUDP_MAX_BACKOFF_TIME	(16.0 * C_EXPECTED_MULTI_HOP_RTT)

/**
 * @brief List of packets queued for transmission.
 */
list_t* C_RUDP_transmission_queue;

/**
 * @brief Size of cache for recently received packets.
 */
#define C_RUDP_RECEIVED_PACKET_CACHE_SIZE	16

/**
 * @brief Cache for recently received packets.
 */
packet_fingerprint_t C_RUDP_received_packet_cache[C_RUDP_RECEIVED_PACKET_CACHE_SIZE];

/**
 * @brief Statistics counter of totally transmitted packets.
 */
uint32_t C_RUDP_total_transmissions;

/**
 * @brief Statistics counter of successfully transmitted packets.
 */
uint32_t C_RUDP_successful_transmissions;

/**
 * @brief Statistics counter of not transmitted packets.
 */
uint32_t C_RUDP_failed_transmissions;

#endif	// RUDP_LIGHT_VARS_H
