Blame view

RIOT/sys/include/net/gnrc/sixlowpan/netif.h 1.87 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
75
76
77
  /*
   * Copyright (C) 2015 Martine Lenders <mlenders@inf.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.
   */
  
  /**
   * @defgroup    net_gnrc_sixlowpan_netif  6LoWPAN network interfaces
   * @ingroup     net_gnrc_sixlowpan
   * @brief       6LoWPAN specific information on @ref net_gnrc_netif
   * @{
   *
   * @file
   * @brief   Definitions for 6LoWPAN specific information of network interfaces.
   *
   * @author  Martine Lenders <mlenders@inf.fu-berlin.de>
   */
  #ifndef GNRC_SIXLOWPAN_NETIF_H_
  #define GNRC_SIXLOWPAN_NETIF_H_
  
  #include <stdbool.h>
  
  #include "kernel_types.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /**
   * @brief   Definition of 6LoWPAN interface type.
   */
  typedef struct {
      kernel_pid_t pid;       /**< PID of the interface */
      uint16_t max_frag_size; /**< Maximum fragment size for this interface */
  #ifdef MODULE_GNRC_SIXLOWPAN_IPHC
      bool iphc_enabled;      /**< enable or disable IPHC */
  #endif
  } gnrc_sixlowpan_netif_t;
  
  /**
   * @brief   Initializes the module
   */
  void gnrc_sixlowpan_netif_init(void);
  
  /**
   * @brief   Add interface to 6LoWPAN.
   *
   * @param[in] pid           The PID to the interface.
   * @param[in] max_frag_size The maximum fragment size for this interface.
   */
  void gnrc_sixlowpan_netif_add(kernel_pid_t pid, uint16_t max_frag_size);
  
  /**
   * @brief   Remove interface from 6LoWPAN.
   *
   * @param[in] pid   The PID to the interface.
   */
  void gnrc_sixlowpan_netif_remove(kernel_pid_t pid);
  
  /**
   * @brief   Get interface.
   *
   * @param[in] pid   The PID to the interface
   *
   * @return  The interface describing structure, on success.
   * @return  NULL, if there is no interface with PID @p pid.
   */
  gnrc_sixlowpan_netif_t *gnrc_sixlowpan_netif_get(kernel_pid_t pid);
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif /* GNRC_SIXLOWPAN_NETIF_H_ */
  /** @} */