125 lines
4.1 KiB
C
125 lines
4.1 KiB
C
/****************************************************************************
|
|
|
|
|
| (C) Copyright 1985, 1991, 1993, 1996 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 Advance File Services (NSS) module
|
|
|
|
|
|---------------------------------------------------------------------------
|
|
|
|
|
| $Author: blarsen $
|
|
| $Date: 2006-01-21 04:09:53 +0530 (Sat, 21 Jan 2006) $
|
|
|
|
|
| $RCSfile$
|
|
| $Revision: 1315 $
|
|
|
|
|
|---------------------------------------------------------------------------
|
|
| This module is used to:
|
|
| This defines the items used to manage context handles
|
|
|
|
|
| WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
|
|
|
|
| This header file should ONLY be used for NSS internal development.
|
|
| This includes Semantic Agents (SA) and Loadable Storage Services (LSS).
|
|
| Any other use may cause conflicts which NSS will NOT fix.
|
|
+-------------------------------------------------------------------------*/
|
|
#ifndef _CONTEXTHANDLE_H_
|
|
#define _CONTEXTHANDLE_H_
|
|
|
|
#ifndef _OMNI_H_
|
|
#include <omni.h>
|
|
#endif
|
|
|
|
#ifndef _COMNPARAMS_H_
|
|
#include <comnParams.h>
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* context handle structure and types
|
|
*-------------------------------------------------------------------------*/
|
|
struct ContextHandleInfo_s
|
|
{
|
|
BYTE handleID;
|
|
BYTE handleType;
|
|
BYTE reserved1; /* LONG align*/
|
|
BYTE reserved2; /* LONG align*/
|
|
LONG useCount;
|
|
LONG taskID;
|
|
LONG semanticAgentID; /* ID of owning semantic agent */
|
|
struct NameSpace_s *nameSpace; /* Locked pointer to name space */
|
|
struct File_s *dirFile; /* locked pointer to the current directory*/
|
|
Zid_t fileParentZid; /* Zid of the dirFile's parent container */
|
|
NINT fileNameType; /* Name type for the dirFile */
|
|
NINT reserved3; /* cnt fileNameUniquifier; Name uniquifier for the dirFile */
|
|
struct NSSConnection_s *pssConn; /* pss connection structure pointer*/
|
|
};
|
|
|
|
|
|
#define FIRST_CONTEXTHANDLE_INDEX 0 /* first index into array*/
|
|
|
|
#define COMN_GET_VOLUME_FROM_CONTEXTHANDLE(_cx) ((_cx)->dirFile->FILEvolume)
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* This goes in the PSS connection structure and controls the context
|
|
* handle fields.
|
|
*-------------------------------------------------------------------------*/
|
|
typedef struct ContextHandleCtrl_s {
|
|
Latch_s cxhLatch; /* latch */
|
|
NINT nextFree; /* next free index into ARRAY*/
|
|
NINT arraySize;
|
|
ContextHandleInfo_s *(*list)[]; /* pointer to array of context handles*/
|
|
ContextHandleInfo_s *sysLoginCxh;/* pointer to handle for SYS:/LOGIN */
|
|
} ContextHandleCtrl_s;
|
|
|
|
|
|
/*---------------------------------------------------------------------------
|
|
* Internal Common layer prototypes for context handles
|
|
*---------------------------------------------------------------------------*/
|
|
extern void CXH_RemoveAllContextHandlesOnConnection(
|
|
NSSConnection_s *pssConn);
|
|
|
|
extern void CXH_RemoveAllContextHandlesOnVolume(
|
|
NSSConnection_s *pssConn,
|
|
Volume_s *vol);
|
|
|
|
extern void CXH_RemoveAllSAgentContextHandlesOnVolume(
|
|
GeneralMsg_s *genMsg,
|
|
NSSConnection_s *pssConn,
|
|
Volume_s *vol);
|
|
|
|
extern void CXH_FixupAllContextHandlesOnBeast(
|
|
GeneralMsg_s *genMsg,
|
|
File_s *dir,
|
|
File_s *oldDir,
|
|
File_s *newDir,
|
|
// cnt NINT oldNameUniquifier,
|
|
// cnt NINT newNameUniquifier,
|
|
NINT newNameType);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _CONTEXTHANDLE_H_ */
|