Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_LINUX_IOAM6_H |
| 20 | #define _UAPI_LINUX_IOAM6_H |
| 21 | #include <asm/byteorder.h> |
| 22 | #include <linux/types.h> |
| 23 | #define IOAM6_U16_UNAVAILABLE U16_MAX |
| 24 | #define IOAM6_U32_UNAVAILABLE U32_MAX |
| 25 | #define IOAM6_U64_UNAVAILABLE U64_MAX |
| 26 | #define IOAM6_DEFAULT_ID (IOAM6_U32_UNAVAILABLE >> 8) |
| 27 | #define IOAM6_DEFAULT_ID_WIDE (IOAM6_U64_UNAVAILABLE >> 8) |
| 28 | #define IOAM6_DEFAULT_IF_ID IOAM6_U16_UNAVAILABLE |
| 29 | #define IOAM6_DEFAULT_IF_ID_WIDE IOAM6_U32_UNAVAILABLE |
| 30 | struct ioam6_hdr { |
| 31 | __u8 opt_type; |
| 32 | __u8 opt_len; |
| 33 | __u8 : 8; |
| 34 | #define IOAM6_TYPE_PREALLOC 0 |
| 35 | __u8 type; |
| 36 | } __attribute__((packed)); |
| 37 | struct ioam6_trace_hdr { |
| 38 | __be16 namespace_id; |
| 39 | #ifdef __LITTLE_ENDIAN_BITFIELD |
| 40 | __u8 : 1, : 1, overflow : 1, nodelen : 5; |
| 41 | __u8 remlen : 7, : 1; |
| 42 | union { |
| 43 | __be32 type_be32; |
| 44 | struct { |
| 45 | __u32 bit7 : 1, bit6 : 1, bit5 : 1, bit4 : 1, bit3 : 1, bit2 : 1, bit1 : 1, bit0 : 1, bit15 : 1, bit14 : 1, bit13 : 1, bit12 : 1, bit11 : 1, bit10 : 1, bit9 : 1, bit8 : 1, bit23 : 1, bit22 : 1, bit21 : 1, bit20 : 1, bit19 : 1, bit18 : 1, bit17 : 1, bit16 : 1, : 8; |
| 46 | } type; |
| 47 | }; |
| 48 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 49 | __u8 nodelen : 5, overflow : 1, : 1, : 1; |
| 50 | __u8 : 1, remlen : 7; |
| 51 | union { |
| 52 | __be32 type_be32; |
| 53 | struct { |
| 54 | __u32 bit0 : 1, bit1 : 1, bit2 : 1, bit3 : 1, bit4 : 1, bit5 : 1, bit6 : 1, bit7 : 1, bit8 : 1, bit9 : 1, bit10 : 1, bit11 : 1, bit12 : 1, bit13 : 1, bit14 : 1, bit15 : 1, bit16 : 1, bit17 : 1, bit18 : 1, bit19 : 1, bit20 : 1, bit21 : 1, bit22 : 1, bit23 : 1, : 8; |
| 55 | } type; |
| 56 | }; |
| 57 | #else |
| 58 | #error "Please fix <asm/byteorder.h>" |
| 59 | #endif |
| 60 | #define IOAM6_TRACE_DATA_SIZE_MAX 244 |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame^] | 61 | __u8 data[]; |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 62 | } __attribute__((packed)); |
| 63 | #endif |