/**
 * @file rudp-light.h
 *
 * @brief Reliable User Datagram Protocol (RUDP) - minimal implemenation (header).
 *
 * 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.h 2685 2008-06-25 16:38:56Z wittenbu $
 */

#ifndef RUDP_LIGHT_H
#define RUDP_LIGHT_H

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

// Interface to main module.
void RUDP_init();
void RUDP_start();
void RUDP_stop();
void RUDP_finalize();
void RUDP_recv(const packet_header_t* header, const void* payload);
bool RUDP_command(int argc, const char*const* argv);

// Interface provided by this module.
void RUDP_send(const packet_header_t* header, const void* payload, callback_function_t function, RUDP_transmission_result_t* result);
void RUDP_sendto(C_addr_t to, uint8_t app, uint8_t type, const void* payload, size_t payload_length, callback_function_t function, RUDP_transmission_result_t* result);
void RUDP_sendto2(C_addr_t to, uint8_t app, uint8_t type, const void* payload1, size_t payload_length1, const void* payload2, size_t payload_length2, callback_function_t function, RUDP_transmission_result_t* result);
size_t RUDP_max_payload_size();

#endif	// RUDP_LIGHT_H
