xref: /illumos-gate/usr/src/uts/common/sys/vxlan.h (revision 12faddfc969d1c6aa650b4b2ebd995071c86350d)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2015 Joyent, Inc.
14  */
15 
16 #ifndef _SYS_VXLAN_H
17 #define	_SYS_VXLAN_H
18 
19 /*
20  * Common VXLAN information
21  */
22 
23 #include <sys/inttypes.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /* Sizes in bytes */
30 #define	VXLAN_HDR_LEN	8
31 #define	VXLAN_ID_LEN	3
32 
33 #define	VXLAN_F_VDI	0x08000000
34 #define	VXLAN_ID_SHIFT	8
35 
36 #pragma pack(1)
37 typedef struct vxlan_hdr {
38 	uint32_t vxlan_flags;
39 	uint32_t vxlan_id;
40 } vxlan_hdr_t;
41 #pragma pack()
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif /* _SYS_VXLAN_H */
48