Blame view

RIOT/sys/include/net/eui64.h 1.16 KB
a752c7ab   elopes   add first test an...
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
  /*
   * Copyright (C) 2015 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.
   */
  
  /**
   * @defgroup    net_eui64   IEEE EUI-64 identifier
   * @ingroup     net
   * @brief       Type definiton of the IEEE EUI-64 identifier
   * @see         <a href="http://standards.ieee.org/regauth/oui/tutorials/EUI64.html">
   *                  IEEE, "Guidelines for 64-bit Global Identifier (EUI-64)"
   *              </a>
   * @{
   *
   * @file
   * @brief   EUI-64 data type definition
   *
   * @author  Martine Lenders <mlenders@inf.fu-berlin.de>
   * @author  Oliver Hahm <oliver.hahm@inria.fr>
   */
  #ifndef NET_EUI64_H
  #define NET_EUI64_H
  
  #include <stdint.h>
  #include "byteorder.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /**
   * @brief Data type to represent an EUI-64.
   */
  typedef union {
      network_uint64_t uint64;     /**< represented as 64 bit value */
      uint8_t uint8[8];            /**< split into 8 8-bit words. */
      network_uint16_t uint16[4];  /**< split into 4 16-bit words. */
  } eui64_t;
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif /* NET_EUI64_H */
  /** @} */