nhdp_reader.h
1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Copyright (C) 2014 Freie Universität Berlin
*
* 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 nhdp
* @{
*
* @file
* @brief Reader interface for message processing in NHDP
*
* @author Fabian Nack <nack@inf.fu-berlin.de>
*/
#ifndef NHDP_READER_H_
#define NHDP_READER_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Set up the NHDP reader
*
* Initializes the reader and registers HELLO messages as a message
* type consumed by this reader.
*/
void nhdp_reader_init(void);
/**
* @brief Clean up the NHDP reader
*/
void nhdp_reader_cleanup(void);
/**
* @brief Handle a packet received from a registered interface
*
* @note
* HELLO message processing is triggered from this function.
*
* @param[in] rcvg_if_pid PID of the interface the packet was received on
* @param[in] buffer Pointer to start of packet data
* @param[in] length Length in bytes of the packet data
*
* @return rfc5444_result of the packet handling process
*/
int nhdp_reader_handle_packet(kernel_pid_t rcvg_if_pid, void *buffer, size_t length);
#ifdef __cplusplus
}
#endif
#endif /* NHDP_READER_H_ */
/** @} */