diff options
author | Ahmed Abdelsalam <amsalam20@gmail.com> | 2017-12-29 17:43:35 +0100 |
---|---|---|
committer | Ahmed Abdelsalam <amsalam20@gmail.com> | 2017-12-29 17:43:35 +0100 |
commit | 9c33608cb2fb6a64e1b76745efa530a63de08100 (patch) | |
tree | 66a09d9a96185cfa3ddc7ace7d1f6d2195237db8 /ip6.h | |
parent | 2f7e7d424e495eb92b1ee5b765e908e7bf80e48c (diff) | |
download | tcpdump-9c33608cb2fb6a64e1b76745efa530a63de08100.tar.gz |
Add support for IPv6 routing header type 4
IPv6 routing header type 4 is known as Segment Routing Header (SRH).
It is used by Segment Routing (SR) to steer a packet through a
controlled set of instructions, called segments. It is described in
https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-07
An extension is added to allow tcpdump to print SRH information.
Diffstat (limited to 'ip6.h')
-rw-r--r-- | ip6.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -174,6 +174,7 @@ struct ip6_rthdr { #define IPV6_RTHDR_TYPE_0 0 #define IPV6_RTHDR_TYPE_2 2 +#define IPV6_RTHDR_TYPE_4 4 /* Type 0 Routing header */ /* Also used for Type 2 */ @@ -186,6 +187,21 @@ struct ip6_rthdr0 { struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */ }; +/** + * Type 4 Routing header + * known as Segment Routing Header 'SRH' + */ +struct ip6_srh { + nd_uint8_t srh_nxt; /* next header */ + nd_uint8_t srh_len; /* length in units of 8 octets */ + nd_uint8_t srh_type; /* Routing Type 4 */ + nd_uint8_t srh_segleft; /* segments left */ + nd_uint8_t srh_last_ent; /* Last Entry*/ + nd_uint8_t srh_flags; /* Flags */ + nd_uint16_t srh_tag; /* Tag */ + struct in6_addr srh_segments[1]; /* SRH segments list*/ +}; + /* Fragment header */ struct ip6_frag { nd_uint8_t ip6f_nxt; /* next header */ |