dscpmk_impl.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _IPP_DSCPMK_DSCPMK_IMPL_H
#define _IPP_DSCPMK_DSCPMK_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <inet/ipp_common.h>
#ifdef __cplusplus
extern "C" {
#endif
#define _DSCPMK_DEBUG
/* Mask out all but the Traffic class for IPv6 header */
#ifdef _BIG_ENDIAN
#define TCLASS_MASK 0xF00FFFFF
#else
#define TCLASS_MASK 0xFFFF0FF0
#endif
/* Array count for dscp_policed_array 0-63 */
#define DSCPMK_ARRAY_COUNT 64
/* During modification, entries that are unchanged are signified with -1 */
#define DSCPMK_UNCHANGED_DSCP -1
#ifdef _DSCPMK_DEBUG
#define dscpmk0dbg(a) printf a
#else
#define dscpmk0dbg(a)
#define dscpmk1dbg(a)
#define dscpmk2dbg(a)
#endif /* _DSCPMK_DEBUG */
/* dscpmk stats information available using kstats */
typedef struct dscpmk_stat_s {
typedef struct dscpmk_dscp_stats_s {
/*
* If the above structure is changed, the count will have to be updated
* accordingly.
*/
#define DSCPMK_STATS_COUNT 5
#define DSCPMK_STATS_STRING "dscpmk_stats"
#define DSCPMK_DSCP_STATS_COUNT 2
typedef struct dscp_stats_s {
} dscp_stats_t;
/* Per-instance structure */
typedef struct dscpmk_data_s {
/* inbound DSCP -> outbound DSCP mapping table */
/* Minimal stats */
/* per-DSCP stats */
/* Stats count per DSCP value 0-63 */
#define DSCPMK_DATA_SZ sizeof (dscpmk_data_t)
#ifdef _KERNEL
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _IPP_DSCPMK_DSCPMK_IMPL_H */