/**************************************************************************** | | (C) Copyright 1998-1999 Novell, Inc. | All Rights Reserved. | | This program is free software; you can redistribute it and/or | modify it under the terms of version 2 of the GNU General Public | License as published by the Free Software Foundation. | | This program is distributed in the hope that it will be useful, | but WITHOUT ANY WARRANTY; without even the implied warranty of | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | GNU General Public License for more details. | | You should have received a copy of the GNU General Public License | along with this program; if not, contact Novell, Inc. | | To contact Novell about this file by physical or electronic mail, | you may find current contact information at www.novell.com | |*************************************************************************** | | NetWare Advanced File Services (NSS) Initialization module | |--------------------------------------------------------------------------- | | $Author: taysom $ | $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ | | $RCSfile$ | $Revision: 465 $ | |--------------------------------------------------------------------------- | This module is used to: | include file for ID.c. +-------------------------------------------------------------------------*/ #ifndef _ID_H_ #define _ID_H_ #ifndef _OMNI_H_ #include #endif /* * Routines for supporting a simple set of hash functions * for trustee ids. */ #define zINVALID_USERID zINVALID_GUID #define MAX_IDS 0x800000 /* Max number of ids we will try * to handle. */ typedef struct Id_s { struct Id_s *next; UserID_t key; UserID_t id; } Id_s; typedef struct IdTable_s { Id_s **buckets; Id_s *ids; LONG mask; } IdTable_s; UserID_t findId(IdTable_s *table, UserID_t key); void *initIds(NINT numEntries, UserID_t *key, UserID_t *id); void freeIds(IdTable_s *idTable); UserID_t findSmallestId(UserID_t *array, LONG *count); #endif