ipp_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-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _IPP_IPP_IMPL_H
#define _IPP_IPP_IMPL_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* IP Policy Framework (IPPF) implementation detail.
*
* WARNING: Everything in this file is private, belonging to the IPPF
* subsystem. The interfaces and declarations made here are subject
* to change.
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
#define IPP_ALIGN 64
#define IPP_NBUCKET 23
#define IPP_LOG2NACTION 16
#define IPP_LOG2NMOD 6
#define IPP_NCLASS 5
struct ipp_ref {
union {
void *u_ptr;
} ippr_u;
};
typedef enum {
IPP_MODSTATE_PROTO = 0x10,
struct ipp_mod {
char ippm_name[MAXNAMELEN];
};
typedef enum {
IPP_ASTATE_PROTO = 0x20,
} ipp_astate_t;
typedef struct cfglock {
} cfglock_t;
#ifndef __lint
#define CL_READ 0
#define CL_WRITE 1
#define CONFIG_LOCK_INIT(_clp) \
{ \
(void *)ipltospl(LOCK_LEVEL)); \
}
#define CONFIG_LOCK_FINI(_clp) \
{ \
}
{ \
(_clp)->cl_writers++; \
} \
(_clp)->cl_writers > 0) { \
} \
} \
}
#define CONFIG_LOCK_EXIT(_clp) \
{ \
} else { \
(_clp)->cl_writers--; \
if ((_clp)->cl_writers == 0) { \
} \
} \
}
#else /* __lint */
#define CONFIG_LOCK_INIT(_clp)
#define CONFIG_LOCK_FINI(_clp)
#define CONFIG_LOCK_EXIT(_clp)
#endif /* __lint */
struct ipp_action {
void *ippa_ptr;
char ippa_name[MAXNAMELEN];
};
struct ipp_class {
char ippc_name[MAXNAMELEN];
};
struct ipp_log {
char ippl_name[MAXNAMELEN];
};
typedef struct ipp_stat_impl ipp_stat_impl_t;
struct ipp_stat_impl {
void *ippsi_data;
int ippsi_limit;
int ippsi_count;
int (*ippsi_update)(ipp_stat_t *, void *, int);
void *ippsi_arg;
char ippsi_name[MAXNAMELEN];
};
struct ipp_packet {
void *ippp_private;
void (*ippp_private_free)(void *);
};
extern void ipp_init(void);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _IPP_IPP_IMPL_H */