srh.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 
23 #ifndef NET_GNRC_RPL_SRH_H
24 #define NET_GNRC_RPL_SRH_H
25 
26 #include "net/ipv6/hdr.h"
27 #include "net/ipv6/addr.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
42 typedef struct __attribute__((packed)) {
43  uint8_t nh;
44  uint8_t len;
45  uint8_t type;
46  uint8_t seg_left;
47  uint8_t compr;
48  uint8_t pad_resv;
49  uint16_t resv;
51 
70 int gnrc_rpl_srh_process(ipv6_hdr_t *ipv6, gnrc_rpl_srh_t *rh, void **err_ptr);
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif /* NET_GNRC_RPL_SRH_H */
77 
Definitions for IPv6 addresses.
uint16_t resv
reserved
Definition: srh.h:49
Data type to represent an IPv6 packet header.
Definition: hdr.h:66
uint8_t compr
number of prefix octets (comprI and comprE)
Definition: srh.h:47
uint8_t seg_left
number of route segments remaining
Definition: srh.h:46
uint8_t nh
next header
Definition: srh.h:43
uint8_t len
length in 8 octets without first octet
Definition: srh.h:44
IPv6 header type and helper function definitions.
uint8_t pad_resv
padding and reserved
Definition: srh.h:48
The RPL Source routing header.
Definition: srh.h:42
uint8_t type
identifier of a particular routing header type
Definition: srh.h:45
int gnrc_rpl_srh_process(ipv6_hdr_t *ipv6, gnrc_rpl_srh_t *rh, void **err_ptr)
Process the RPL source routing header.