Blame view

RIOT/sys/include/net/gnrc/rpl/p2p_dodag.h 1.67 KB
fb11e647   vrobic   reseau statique a...
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
  /*
   * Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.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 net_gnrc_rpl_p2p
   * @{
   *
   * @file
   * @brief       DODAG-related functions for P2P-RPL
   *
   * Header file, which defines all public known DODAG-related functions for P2P-RPL.
   *
   * @author      Cenk Gündoğan <mail@cgundogan.de>
   */
  
  #ifndef GNRC_RPL_P2P_DODAG_H_
  #define GNRC_RPL_P2P_DODAG_H_
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  #include "net/gnrc/rpl/p2p_structs.h"
  
  /**
   * @brief   Number of P2P RPL DODAG extensions
   */
  #ifndef GNRC_RPL_P2P_EXTS_NUMOF
  #define GNRC_RPL_P2P_EXTS_NUMOF (1)
  #endif
  
  /**
   * @brief   P2P-RPL DODAG extensions table
   */
  extern gnrc_rpl_p2p_ext_t gnrc_rpl_p2p_exts[GNRC_RPL_P2P_EXTS_NUMOF];
  
  /**
   * @brief   Allocate a free P2P-RPL DODAG extension
   *
   * @return  Pointer to a free P2P-RPL DODAG extension
   * @return  NULL, if no free P2P-RPL DODAG extension is available
   */
  gnrc_rpl_p2p_ext_t *gnrc_rpl_p2p_ext_new(gnrc_rpl_dodag_t *dodag);
  
  /**
   * @brief   Free the P2P-RPL DODAG extension of @p dodag
   *
   * @param[in] dodag     Pointer to a P2P-RPL DODAG
   */
  void gnrc_rpl_p2p_ext_remove(gnrc_rpl_dodag_t *dodag);
  
  /**
   * @brief   Get the appropriate P2P-RPL DODAG extension of the @p dodag
   *
   * @param[in] dodag     Pointer to a P2P-RPL DODAG
   *
   * @return  Pointer to a P2P-RPL DODAG extension
   * @return  NULL, if no P2P-RPL DODAG extension is available for @p dodag
   */
  gnrc_rpl_p2p_ext_t *gnrc_rpl_p2p_ext_get(gnrc_rpl_dodag_t *dodag);
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif /* GNRC_RPL_P2P_DODAG_H_ */
  /**
   * @}
   */