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.
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.
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]
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _INET_IPP_COMMON_H
27 #define _INET_IPP_COMMON_H
37 * IPP -- IP Policy -- interface.
39 * WARNING: Everything in this file is private, belonging to the IPP
40 * subsystem. The interfaces and declarations made here are subject
44 extern uint32_t ipp_action_count
;
46 /* Whether ip policy is enabled at callout position proc */
47 #define IPP_ENABLED(proc, ipst) ((ipp_action_count != 0) && \
48 (~((ipst)->ips_ip_policy_mask) & (proc)))
50 /* Extracts 8 bit traffic class from IPV6 flow label field */
52 #define __IPV6_TCLASS_FROM_FLOW(n) (((n)>>20) & 0xff)
54 #define __IPV6_TCLASS_FROM_FLOW(n) ((((n)<<4) | (((n)>>12) & 0xf)) & 0xff)
55 #endif /* _BIG_ENDIAN */
64 /* IP private data structure */
65 typedef struct ip_priv
{
70 /* The entry point for ip policy processing */
72 extern mblk_t
*ip_process(ip_proc_t
, mblk_t
*, ill_t
*, ill_t
*);
74 extern void ip_priv_free(void *);
82 #endif /* _INET_IPP_COMMON_H */