blob: c1958c8ada585496c5edd5e77a6f8633c698b37b [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris48af7cb2017-02-21 12:35:09 -08007#ifndef _UAPI_LINUX_SEG6_H
8#define _UAPI_LINUX_SEG6_H
Christopher Ferris525ce912017-07-26 13:12:53 -07009#include <linux/types.h>
10#include <linux/in6.h>
Christopher Ferris48af7cb2017-02-21 12:35:09 -080011struct ipv6_sr_hdr {
12 __u8 nexthdr;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080013 __u8 hdrlen;
14 __u8 type;
15 __u8 segments_left;
16 __u8 first_segment;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080017 __u8 flags;
Christopher Ferris934ec942018-01-31 15:29:16 -080018 __u16 tag;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070019 struct in6_addr segments[];
Christopher Ferris48af7cb2017-02-21 12:35:09 -080020};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080021#define SR6_FLAG1_PROTECTED (1 << 6)
22#define SR6_FLAG1_OAM (1 << 5)
23#define SR6_FLAG1_ALERT (1 << 4)
24#define SR6_FLAG1_HMAC (1 << 3)
Christopher Ferris48af7cb2017-02-21 12:35:09 -080025#define SR6_TLV_INGRESS 1
26#define SR6_TLV_EGRESS 2
27#define SR6_TLV_OPAQUE 3
28#define SR6_TLV_PADDING 4
Christopher Ferris48af7cb2017-02-21 12:35:09 -080029#define SR6_TLV_HMAC 5
30#define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC)
31struct sr6_tlv {
32 __u8 type;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080033 __u8 len;
34 __u8 data[0];
35};
36#endif