summaryrefslogtreecommitdiffstats
path: root/include/headers.h
diff options
context:
space:
mode:
authorAhmed Abdelsalam <amsalam20@gmail.com>2018-02-27 11:04:14 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-03-11 22:59:46 +0100
commita7e02fe7984a721ae1240c415ec7d1e73ccc5dbd (patch)
tree29aabe95725a2f29543044bdaf81efe5da6f05f1 /include/headers.h
parent1400288f6d39d9839748c44216171e84c6d47d66 (diff)
src: Adding support for segment routing header 'srh'
Segment Routing Header "SRH" is new type of IPv6 Routing extension header (type 4). SRH contains a list of segments (each is represented as an IPv6 address) to be visited by packets during the journey from source to destination. The SRH specification are defined in the below IETF SRH draft. https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-07 Signed-off-by: Ahmed Abdelsalam <amsalam20@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/headers.h')
-rw-r--r--include/headers.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/headers.h b/include/headers.h
index 469d6740..3d564deb 100644
--- a/include/headers.h
+++ b/include/headers.h
@@ -112,6 +112,18 @@ struct ip6_mh {
uint8_t data[0];
};
+/* Type 4 Routing header - well known as srh */
+struct ip6_rt4 {
+ uint8_t ip6r4_nxt; /* next header */
+ uint8_t ip6r4_len; /* length in units of 8 octets */
+ uint8_t ip6r4_type; /* always zero */
+ uint8_t ip6r4_segleft; /* segments left */
+ uint8_t ip6r4_last_entry; /* last entry */
+ uint8_t ip6r4_flags; /* flags */
+ uint16_t ip6r4_tag; /* tag */
+ struct in6_addr ip6r4_segments[0]; /* SID list */
+};
+
/* RFC 3775 */
#define IP6_MH_TYPE_BRR 0 /* Binding Refresh Request */
#define IP6_MH_TYPE_HOTI 1 /* HOTI Message */