rh.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Cenk Gündoğan <cnkgndgn@gmail.com>
3  * Copyright (C) 2018 Freie Universität Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
22 #ifndef NET_IPV6_EXT_RH_H
23 #define NET_IPV6_EXT_RH_H
24 
25 #include <stdint.h>
26 
27 #include "net/ipv6/addr.h"
28 #include "net/ipv6/ext.h"
29 #include "net/ipv6/hdr.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
43 #define IPV6_EXT_RH_TYPE_0 (0U)
44 
48 #define IPV6_EXT_RH_TYPE_NIMROD (1U)
49 
54 #define IPV6_EXT_RH_TYPE_2 (2U)
55 
60 #define IPV6_EXT_RH_TYPE_RPL_SRH (3U)
61 
70 typedef struct __attribute__((packed)) {
71  uint8_t nh;
72  uint8_t len;
73  uint8_t type;
74  uint8_t seg_left;
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* NET_IPV6_EXT_RH_H */
82 
IPv6 extension header definitions.
Definitions for IPv6 addresses.
uint8_t len
length in 8 octets without first octet
Definition: rh.h:72
uint8_t nh
next header
Definition: rh.h:71
uint8_t seg_left
number of route segments remaining
Definition: rh.h:74
IPv6 header type and helper function definitions.
IPv6 routing extension header.
Definition: rh.h:70
uint8_t type
identifier of a particular routing header type
Definition: rh.h:73