1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * ERSPAN Tunnel Metadata
5 * Copyright (c) 2018 VMware
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2
9 * as published by the Free Software Foundation.
11 * Userspace API for metadata mode ERSPAN tunnel
13 #ifndef _UAPI_ERSPAN_H
14 #define _UAPI_ERSPAN_H
16 #include <linux/types.h> /* For __beXX in userspace */
17 #include <asm/byteorder.h>
19 /* ERSPAN version 2 metadata header */
22 __be16 sgt
; /* security group tag */
23 #if defined(__LITTLE_ENDIAN_BITFIELD)
31 #elif defined(__BIG_ENDIAN_BITFIELD)
40 #error "Please fix <asm/byteorder.h>"
44 struct erspan_metadata
{
47 __be32 index
; /* Version 1 (type II)*/
48 struct erspan_md2 md2
; /* Version 2 (type III) */
52 #endif /* _UAPI_ERSPAN_H */