gen_p.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 1997-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1996,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* $Id: gen_p.h,v 1.11 2001/05/29 05:48:39 marka Exp $
*/
/* Notes:
* We hope to create a complete set of thread-safe entry points someday,
* which will mean a set of getXbyY() functions that take as an argument
* a pointer to the map class, which will have a pointer to the private
* data, which will be used preferentially to the static variables that
* are necessary to support the "classic" interface. This "classic"
* interface will then be reimplemented as stubs on top of the thread
* safe modules, and will keep the map class pointers as their only
* static data. HOWEVER, we are not there yet. So while we will call
* the just-barely-converted map class methods with map class pointers,
* right now they probably all still use statics. We're not fooling
* anybody, and we're not trying to (yet).
*/
#ifndef _GEN_P_H_INCLUDED
#define _GEN_P_H_INCLUDED
/*
* These are the access methods.
*/
enum irs_acc_id {
irs_lcl, /* Local. */
irs_dns, /* DNS or Hesiod. */
irs_nis, /* Sun NIS ("YP"). */
irs_irp, /* IR protocol. */
};
/*
* These are the map types.
*/
enum irs_map_id {
irs_gr, /* "group" */
irs_pw, /* "passwd" */
irs_sv, /* "services" */
irs_pr, /* "protocols" */
irs_ho, /* "hosts" */
irs_nw, /* "networks" */
irs_ng, /* "netgroup" */
};
/*
* This is an accessor instance.
*/
struct irs_inst {
};
/*
* This is a search rule for some map type.
*/
struct irs_rule {
int flags;
};
/*
* This is the private data for a search access class.
*/
struct gen_p {
char * options;
struct __res_state * res;
};
/*
* Externs.
*/
#endif /*_IRS_P_H_INCLUDED*/