Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 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 Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_ERSPAN_H |
| 8 | #define _UAPI_ERSPAN_H |
| 9 | #include <linux/types.h> |
| 10 | #include <asm/byteorder.h> |
| 11 | struct erspan_md2 { |
| 12 | __be32 timestamp; |
| 13 | __be16 sgt; |
| 14 | #ifdef __LITTLE_ENDIAN_BITFIELD |
| 15 | __u8 hwid_upper : 2, ft : 5, p : 1; |
| 16 | __u8 o : 1, gra : 2, dir : 1, hwid : 4; |
| 17 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 18 | __u8 p : 1, ft : 5, hwid_upper : 2; |
| 19 | __u8 hwid : 4, dir : 1, gra : 2, o : 1; |
| 20 | #else |
| 21 | #error "Please fix <asm/byteorder.h>" |
| 22 | #endif |
| 23 | }; |
| 24 | struct erspan_metadata { |
| 25 | int version; |
| 26 | union { |
| 27 | __be32 index; |
| 28 | struct erspan_md2 md2; |
| 29 | } u; |
| 30 | }; |
| 31 | #endif |