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 (c) 2001 by Sun Microsystems, Inc.
  24  * All rights reserved.
  25  */
  26 
  27 #ifndef _CLASS_CACHE_H
  28 #define _CLASS_CACHE_H
  29 
  30 #pragma ident   "%Z%%M% %I%     %E% SMI"
  31 
  32 #include <jni.h>
  33 
  34 #ifdef  __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 typedef enum {
  39         DCR_CLASS, DTR_CLASS, NET_CLASS, MAC_CLASS, OPT_CLASS, DS_CLASS,
  40         CFG_CLASS, RES_CLASS, IP_CLASS, IPIF_CLASS
  41 } CC_CLASSMAP_ID;
  42 #define CC_CLASSMAP_NUM         IPIF_CLASS + 1
  43 
  44 typedef enum {
  45         DCR_CONS, DCR_GETCID, DCR_GETFLAG, DCR_GETCIP, DCR_GETSIP, DCR_GETEXP,
  46         DCR_GETSIG, DCR_GETMAC, DCR_GETCMT, DTR_GETKEY, DTR_GETFLAG,
  47         DTR_GETSIG, DTR_GETVAL, NET_CONS, MAC_CONS, OPT_CONS, DS_CONS,
  48         DS_GETRSRC, DS_GETLOC, DS_GETRSRCCFG, DS_GETVER, CFG_CONS, CFG_SET,
  49         CFG_GETALL, RES_GETKEY, RES_GETVAL, RES_ISCOM, IP_CONS, IPIF_CONS
  50 } CC_METHODMAP_ID;
  51 #define CC_METHODMAP_NUM        IPIF_CONS + 1
  52 
  53 extern void init_class_cache(void);
  54 extern jclass find_class(JNIEnv *, CC_CLASSMAP_ID);
  55 extern jmethodID get_methodID(JNIEnv *, jclass, CC_METHODMAP_ID);
  56 
  57 #ifdef  __cplusplus
  58 }
  59 #endif
  60 
  61 #endif  /* !_CLASS_CACHE_H */