122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _UAPI_LINUX_SEG6_H
2022851890Sopenharmony_ci#define _UAPI_LINUX_SEG6_H
2122851890Sopenharmony_ci#include <linux/types.h>
2222851890Sopenharmony_ci#include <linux/in6.h>
2322851890Sopenharmony_cistruct ipv6_sr_hdr {
2422851890Sopenharmony_ci  __u8 nexthdr;
2522851890Sopenharmony_ci  __u8 hdrlen;
2622851890Sopenharmony_ci  __u8 type;
2722851890Sopenharmony_ci  __u8 segments_left;
2822851890Sopenharmony_ci  __u8 first_segment;
2922851890Sopenharmony_ci  __u8 flags;
3022851890Sopenharmony_ci  __u16 tag;
3122851890Sopenharmony_ci  struct in6_addr segments[0];
3222851890Sopenharmony_ci};
3322851890Sopenharmony_ci#define SR6_FLAG1_PROTECTED (1 << 6)
3422851890Sopenharmony_ci#define SR6_FLAG1_OAM (1 << 5)
3522851890Sopenharmony_ci#define SR6_FLAG1_ALERT (1 << 4)
3622851890Sopenharmony_ci#define SR6_FLAG1_HMAC (1 << 3)
3722851890Sopenharmony_ci#define SR6_TLV_INGRESS 1
3822851890Sopenharmony_ci#define SR6_TLV_EGRESS 2
3922851890Sopenharmony_ci#define SR6_TLV_OPAQUE 3
4022851890Sopenharmony_ci#define SR6_TLV_PADDING 4
4122851890Sopenharmony_ci#define SR6_TLV_HMAC 5
4222851890Sopenharmony_ci#define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC)
4322851890Sopenharmony_cistruct sr6_tlv {
4422851890Sopenharmony_ci  __u8 type;
4522851890Sopenharmony_ci  __u8 len;
4622851890Sopenharmony_ci  __u8 data[0];
4722851890Sopenharmony_ci};
4822851890Sopenharmony_ci#endif
49