xref: /titanic_50/usr/src/uts/common/ipp/ipgpc/ipgpc.h (revision 25c28e83beb90e7c80452a7c818c5e6f73a07dc8)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_IPP_IPGPC_IPGPC_H
27 #define	_IPP_IPGPC_IPGPC_H
28 
29 #include <sys/types.h>
30 #include <sys/kmem.h>
31 #include <sys/socket.h>
32 #include <netinet/ip6.h>
33 #include <net/if.h>
34 #include <inet/common.h>
35 #include <inet/ip.h>
36 
37 #ifdef	__cplusplus
38 extern "C" {
39 #endif
40 
41 /* Header file for IP Generic Packet Classifier (ipgpc) ipp kernel module */
42 
43 /* names for single ipgpc action and module name */
44 #define	IPGPC_CLASSIFY		"ipgpc.classify"
45 #define	IPGPC_NAME		"ipgpc"
46 
47 /* config names of name-value pairs and type */
48 #define	IPGPC_UID		"ipgpc.user" /* int32_t */
49 #define	IPGPC_PROJID		"ipgpc.projid" /* int32_t */
50 #define	IPGPC_IF_INDEX		"ipgpc.if_index" /* uint32_t */
51 #define	IPGPC_DIR		"ipgpc.direction" /* uint32_t */
52 #define	IPGPC_PROTO		"ipgpc.protocol" /* byte */
53 #define	IPGPC_DSFIELD		"ipgpc.dsfield"	/* byte */
54 #define	IPGPC_DSFIELD_MASK	"ipgpc.dsfield_mask" /* byte */
55 #define	IPGPC_SPORT		"ipgpc.sport" /* uint16_t */
56 #define	IPGPC_SPORT_MASK	"ipgpc.sport_mask" /* uint16_t */
57 #define	IPGPC_DPORT		"ipgpc.dport" /* uint16_t */
58 #define	IPGPC_DPORT_MASK	"ipgpc.dport_mask" /* uint16_t */
59 #define	IPGPC_SADDR		"ipgpc.saddr" /* uint32_t[4] */
60 #define	IPGPC_SADDR_MASK	"ipgpc.saddr_mask" /* uint32_t[4] */
61 #define	IPGPC_SADDR_HOSTNAME	"ipgpc.saddr_hostname" /* string */
62 #define	IPGPC_DADDR		"ipgpc.daddr" /* uint32_t[4] */
63 #define	IPGPC_DADDR_MASK	"ipgpc.daddr_mask" /* uint32_t[4] */
64 #define	IPGPC_DADDR_HOSTNAME	"ipgpc.daddr_hostname" /* string */
65 #define	IPGPC_PRECEDENCE	"ipgpc.precedence" /* uint32_t */
66 #define	IPGPC_PRIORITY		"ipgpc.priority" /* uint32_t */
67 #define	IPGPC_FILTER_TYPE	"ipgpc.filter_type" /* byte */
68 #define	IPGPC_FILTER_INSTANCE	"ipgpc.filter_instance"	/* int32_t */
69 #define	IPGPC_FILTER_PRIVATE	"ipgpc.filter_private" /* string */
70 
71 /* Filter Types for IPGPC_FILTER_TYPE */
72 #define	IPGPC_GENERIC_FLTR	0
73 #define	IPGPC_V4_FLTR		1
74 #define	IPGPC_V6_FLTR		2
75 
76 #ifdef	__cplusplus
77 }
78 #endif
79 
80 #endif	/* _IPP_IPGPC_IPGPC_H */
81