1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/net/routing/aodvv2/reader.h
Lotte Steenbrink 0c67c02047 Add the AODVv2 Routing Protocol
This PR depends on #1766.

It contains a minimal implementation of the AODVv2 routing protocol.
*Not* implemented are:

	- AckReqs
	- alternate metrics
	- multiple interfaces
	- clients and Client Networks
	- buffering
	- all addresses, TLVs, and features that are marked as optional

An example application can be found at https://github.com/Lotterleben/RIOT-AODVv2/tree/master/aodvv2_demo.

The implementation relies heavily on a functioning Neighbor Discovery Protocol.
It might be necessary to fill the neighbor cache manually with the current state
of RIOTs NDP implementation.

The value of AODVV2_MAX_UNREACHABLE_NODES has been chosen arbitrarily and will be subject to
future improvement.

Please note that based on my experience, with the default transceiver
buffer size (3) of the native port, about 2/3 of the route discoveries
will fail. This has been addressed in issue #1747. It is advised to increase
the transceiver buffer size when using AODVv2 as a routing protocol.
2014-11-27 03:50:20 -08:00

63 lines
1.4 KiB
C

/*
* Copyright (C) 2014 Freie Universität Berlin
* Copyright (C) 2014 Lotte Steenbrink <lotte.steenbrink@fu-berlin.de>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup aodvv2
* @{
*
* @file reader.h
* @brief reading and handling of RFC5444 aodvv2 messages
*
* @author Lotte Steenbrink <lotte.steenbrink@fu-berlin.de>
*/
#ifndef AODVV2_READER_H_
#define AODVV2_READER_H_
#include <string.h>
#include <stdio.h>
#include "common/netaddr.h"
#include "rfc5444/rfc5444_reader.h"
#include "utils.h"
#include "routingtable.h"
#include "constants.h"
#include "seqnum.h"
#include "aodv.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Initialize reader.
*/
void aodv_packet_reader_init(void);
/**
* @brief Clean up after reader. Only needs to be called upon shutdown.
*/
void aodv_packet_reader_cleanup(void);
/**
* @brief Read data buffer as RFC5444 packet and handle the data it contains
*
* @param[in] buffer Data to be read and handled
* @param[in] length Length of data
* @param[in] sender Address of the node from which the packet was received
*/
int aodv_packet_reader_handle_packet(void *buffer, size_t length, struct netaddr *sender);
#ifdef __cplusplus
}
#endif
#endif /* AODVV2_READER_H_ */