2015-04-30 21:16:38 +02:00
|
|
|
/*
|
2018-10-23 19:34:46 +02:00
|
|
|
* Copyright (C) 2015 Cenk Gündoğan <cnkgndgn@gmail.com>
|
|
|
|
* Copyright (C) 2018 Freie Universität Berlin
|
2015-04-30 21:16:38 +02:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-08-09 23:53:40 +02:00
|
|
|
* @defgroup net_ipv6_ext_rh IPv6 routing header extension
|
|
|
|
* @ingroup net_ipv6_ext
|
2018-10-23 19:34:46 +02:00
|
|
|
* @brief Definitions for IPv6 routing header extension.
|
2015-04-30 21:16:38 +02:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Routing extension header definitions.
|
|
|
|
*
|
2018-10-23 19:34:46 +02:00
|
|
|
* @author Cenk Gündoğan <cnkgndgn@gmail.com>
|
|
|
|
* @author Martine Lenders <m.lenders@fu-berlin.de>
|
2015-04-30 21:16:38 +02:00
|
|
|
*/
|
2017-05-23 18:19:52 +02:00
|
|
|
#ifndef NET_IPV6_EXT_RH_H
|
|
|
|
#define NET_IPV6_EXT_RH_H
|
2015-08-09 23:53:40 +02:00
|
|
|
|
|
|
|
#include <stdint.h>
|
2015-04-30 21:16:38 +02:00
|
|
|
|
2015-08-10 00:26:36 +02:00
|
|
|
#include "net/ipv6/addr.h"
|
2016-01-24 11:45:41 +01:00
|
|
|
#include "net/ipv6/ext.h"
|
2015-08-09 23:53:40 +02:00
|
|
|
#include "net/ipv6/hdr.h"
|
2015-04-30 21:16:38 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief IPv6 routing extension header.
|
|
|
|
*
|
2018-04-10 15:38:05 +02:00
|
|
|
* @see [RFC 8200](https://tools.ietf.org/html/rfc8200#section-4.4)
|
2015-04-30 21:16:38 +02:00
|
|
|
*
|
2015-08-09 23:53:40 +02:00
|
|
|
* @extends ipv6_ext_t
|
2015-04-30 21:16:38 +02:00
|
|
|
*/
|
|
|
|
typedef struct __attribute__((packed)) {
|
|
|
|
uint8_t nh; /**< next header */
|
|
|
|
uint8_t len; /**< length in 8 octets without first octet */
|
|
|
|
uint8_t type; /**< identifier of a particular routing header type */
|
|
|
|
uint8_t seg_left; /**< number of route segments remaining */
|
2015-08-09 23:53:40 +02:00
|
|
|
} ipv6_ext_rh_t;
|
2015-04-30 21:16:38 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-05-23 18:19:52 +02:00
|
|
|
#endif /* NET_IPV6_EXT_RH_H */
|
2015-04-30 21:16:38 +02:00
|
|
|
/** @} */
|