diff options
author | David Ahern <dsahern@gmail.com> | 2020-05-05 16:23:14 +0000 |
---|---|---|
committer | David Ahern <dsahern@gmail.com> | 2020-05-05 16:23:14 +0000 |
commit | c1b21f528687f913535621a898b94bbc083b94f7 (patch) | |
tree | 49cbb03e0c9034cbf6abef5ad7b97b1520a8af87 | |
parent | 3175bca7182b0867c6e9a3d5d1551fdecf70118c (diff) | |
download | iproute2-c1b21f528687f913535621a898b94bbc083b94f7.tar.gz |
Import rpl.h and rpl_iptunnel.h uapi headers
Import rpl.h and rpl_iptunnel.h as of kernel commit:
354d86141796 ("Merge branch 'net-reduce-dynamic-lockdep-keys'")
Signed-off-by: David Ahern <dsahern@gmail.com>
-rw-r--r-- | include/uapi/linux/rpl.h | 48 | ||||
-rw-r--r-- | include/uapi/linux/rpl_iptunnel.h | 21 |
2 files changed, 69 insertions, 0 deletions
diff --git a/include/uapi/linux/rpl.h b/include/uapi/linux/rpl.h new file mode 100644 index 000000000..c24b64cd5 --- /dev/null +++ b/include/uapi/linux/rpl.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +/* + * IPv6 RPL-SR implementation + * + * Author: + * (C) 2020 Alexander Aring <alex.aring@gmail.com> + */ + +#ifndef _LINUX_RPL_H +#define _LINUX_RPL_H + +#include <asm/byteorder.h> +#include <linux/types.h> +#include <linux/in6.h> + +/* + * RPL SR Header + */ +struct ipv6_rpl_sr_hdr { + __u8 nexthdr; + __u8 hdrlen; + __u8 type; + __u8 segments_left; +#if defined(__LITTLE_ENDIAN_BITFIELD) + __u32 cmpre:4, + cmpri:4, + reserved:4, + pad:4, + reserved1:16; +#elif defined(__BIG_ENDIAN_BITFIELD) + __u32 reserved:20, + pad:4, + cmpri:4, + cmpre:4; +#else +#error "Please fix <asm/byteorder.h>" +#endif + + union { + struct in6_addr addr[0]; + __u8 data[0]; + } segments; +} __attribute__((packed)); + +#define rpl_segaddr segments.addr +#define rpl_segdata segments.data + +#endif diff --git a/include/uapi/linux/rpl_iptunnel.h b/include/uapi/linux/rpl_iptunnel.h new file mode 100644 index 000000000..c255b92ca --- /dev/null +++ b/include/uapi/linux/rpl_iptunnel.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +/* + * IPv6 RPL-SR implementation + * + * Author: + * (C) 2020 Alexander Aring <alex.aring@gmail.com> + */ + +#ifndef _LINUX_RPL_IPTUNNEL_H +#define _LINUX_RPL_IPTUNNEL_H + +enum { + RPL_IPTUNNEL_UNSPEC, + RPL_IPTUNNEL_SRH, + __RPL_IPTUNNEL_MAX, +}; +#define RPL_IPTUNNEL_MAX (__RPL_IPTUNNEL_MAX - 1) + +#define RPL_IPTUNNEL_SRH_SIZE(srh) (((srh)->hdrlen + 1) << 3) + +#endif |