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