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 GNRC_RPL_SRH_H
24 #define 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 
36 #define GNRC_RPL_SRH_TYPE (3U)
37 
47 typedef struct __attribute__((packed)) {
48  uint8_t nh;
49  uint8_t len;
50  uint8_t type;
51  uint8_t seg_left;
52  uint8_t compr;
53  uint8_t pad_resv;
54  uint16_t resv;
56 
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* GNRC_RPL_SRH_H */
74 
Definitions for IPv6 addresses.
uint16_t resv
reserved
Definition: srh.h:54
Data type to represent an IPv6 packet header.
Definition: ipv6/hdr.h:68
int gnrc_rpl_srh_process(ipv6_hdr_t *ipv6, gnrc_rpl_srh_t *rh)
Process the RPL source routing header.
IPv6 header type and helper function definitions.
uint8_t compr
number of prefix octets (comprI and comprE)
Definition: srh.h:52
uint8_t seg_left
number of route segments remaining
Definition: srh.h:51
uint8_t nh
next header
Definition: srh.h:48
uint8_t len
length in 8 octets without first octet
Definition: srh.h:49
uint8_t pad_resv
padding and reserved
Definition: srh.h:53
The RPL Source routing header.
Definition: srh.h:47
uint8_t type
identifier of a particular routing header type
Definition: srh.h:50