rh.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef NET_IPV6_EXT_RH_H
21 #define NET_IPV6_EXT_RH_H
22 
23 #include <stdint.h>
24 
25 #include "net/ipv6/addr.h"
26 #include "net/ipv6/ext.h"
27 #include "net/ipv6/hdr.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
37 #define EXT_RH_CODE_ERROR (-1)
38 #define EXT_RH_CODE_FORWARD (0)
39 #define EXT_RH_CODE_OK (1)
40 
51 typedef struct __attribute__((packed)) {
52  uint8_t nh;
53  uint8_t len;
54  uint8_t type;
55  uint8_t seg_left;
57 
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* NET_IPV6_EXT_RH_H */
75 
IPv6 extension header definitions.
Definitions for IPv6 addresses.
Data type to represent an IPv6 packet header.
Definition: ipv6/hdr.h:66
uint8_t len
length in 8 octets without first octet
Definition: rh.h:53
IPv6 header type and helper function definitions.
uint8_t nh
next header
Definition: rh.h:52
uint8_t seg_left
number of route segments remaining
Definition: rh.h:55
IPv6 routing extension header.
Definition: rh.h:51
uint8_t type
identifier of a particular routing header type
Definition: rh.h:54
int ipv6_ext_rh_process(ipv6_hdr_t *ipv6, ipv6_ext_rh_t *ext)
Process the routing header of an IPv6 packet.