xref: /illumos-gate/usr/src/uts/common/sys/overlay_common.h (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
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_OVERLAY_COMMON_H
17 #define	_SYS_OVERLAY_COMMON_H
18 
19 /*
20  * Common overlay definitions
21  */
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 typedef enum overlay_target_mode {
28 	OVERLAY_TARGET_NONE = 0x0,
29 	OVERLAY_TARGET_POINT,
30 	OVERLAY_TARGET_DYNAMIC
31 } overlay_target_mode_t;
32 
33 typedef enum overlay_plugin_dest {
34 	OVERLAY_PLUGIN_D_INVALID	= 0x0,
35 	OVERLAY_PLUGIN_D_ETHERNET	= 0x1,
36 	OVERLAY_PLUGIN_D_IP		= 0x2,
37 	OVERLAY_PLUGIN_D_PORT		= 0x4,
38 	OVERLAY_PLUGIN_D_MASK		= 0x7
39 } overlay_plugin_dest_t;
40 
41 typedef enum overlay_prop_type {
42 	OVERLAY_PROP_T_INT = 0x1,	/* signed int */
43 	OVERLAY_PROP_T_UINT,		/* unsigned int */
44 	OVERLAY_PROP_T_IP,		/* sinaddr6 */
45 	OVERLAY_PROP_T_STRING		/* OVERLAY_PROP_SIZEMAX */
46 } overlay_prop_type_t;
47 
48 typedef enum overlay_prop_prot {
49 	OVERLAY_PROP_PERM_REQ	= 0x1,
50 	OVERLAY_PROP_PERM_READ	= 0x2,
51 	OVERLAY_PROP_PERM_WRITE	= 0x4,
52 	OVERLAY_PROP_PERM_RW	= 0x6,
53 	OVERLAY_PROP_PERM_RRW	= 0x7,
54 	OVERLAY_PROP_PERM_MASK	= 0x7
55 } overlay_prop_prot_t;
56 
57 #define	OVERLAY_PROP_NAMELEN	64
58 #define	OVERLAY_PROP_SIZEMAX	256
59 #define	OVERLAY_STATUS_BUFLEN	256
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif /* _SYS_OVERLAY_COMMON_H */
66