Import full nss
All checks were successful
Source release / source-package (push) Successful in 1m39s
All checks were successful
Source release / source-package (push) Successful in 1m39s
This commit is contained in:
@@ -53,11 +53,11 @@ extern "C" {
|
||||
* streams, this structure will never be present. However, if the file beast
|
||||
* does have extended attributes or data streams, this structure will be
|
||||
* allocated when the first attempt is made to access this information.
|
||||
*
|
||||
*
|
||||
* The first attempt to read or modify the data stream info will detect
|
||||
* that dataStreamCount == DSI_COUNT_INVALID, and will calculate at that time
|
||||
* the correct data stream counts and sizes. All subsequent attempts to
|
||||
* read or modify the info will modify it directly.
|
||||
* the correct data stream counts and sizes. All subsequent attempts to
|
||||
* read or modify the info will modify it directly.
|
||||
*
|
||||
* Likewise, the extended attribute info is handled the same way.
|
||||
*
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
@@ -45,19 +45,19 @@
|
||||
#define _COMNLOCK_H_
|
||||
|
||||
#ifndef _OMNI_H
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _RBPTREE_H_
|
||||
#include <library/rbpTree.h>
|
||||
#include <rbpTree.h>
|
||||
#endif
|
||||
|
||||
#ifndef _COMNBEASTS_H_
|
||||
#include <include/comnBeasts.h>
|
||||
#include <comnBeasts.h>
|
||||
#endif
|
||||
|
||||
#ifndef _PSSCONNECTION_H_
|
||||
#include <comnSA/pssConnection.h>
|
||||
#include <pssConnection.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -222,7 +222,7 @@ BOOL LOCK_IsExclusiveByteRange (
|
||||
QUAD length);
|
||||
|
||||
BOOL LOCK_IsExclusiveByteRangeMandatory (
|
||||
NamedBeast_s *beast,
|
||||
NamedBeast_s *beast,
|
||||
QUAD start,
|
||||
QUAD length);
|
||||
|
||||
@@ -262,7 +262,7 @@ ByteRangeLock_s *allocByteRangeLock (
|
||||
|
||||
|
||||
BOOL checkDeadLockByFH(
|
||||
FileHandle_s *waiter,
|
||||
FileHandle_s *waiter,
|
||||
FileHandle_s *holder,
|
||||
BOOL setWaitFor);
|
||||
|
||||
@@ -297,19 +297,19 @@ extern STATUS LOCK_Startup(void);
|
||||
extern void LOCK_Shutdown(void);
|
||||
|
||||
extern Lock_s *COMN_LookupLock(
|
||||
BYTE *key,
|
||||
BYTE *key,
|
||||
NINT keyBytes,
|
||||
BOOL allocIfNotThere);
|
||||
BOOL allocIfNotThere);
|
||||
|
||||
extern BOOL COMN_LockFunc(
|
||||
BYTE *key,
|
||||
NINT keyBytes,
|
||||
NINT mode,
|
||||
BYTE *key,
|
||||
NINT keyBytes,
|
||||
NINT mode,
|
||||
SLONG msecs);
|
||||
|
||||
extern void COMN_UnLockFunc(
|
||||
BYTE *key,
|
||||
NINT keyBytes);
|
||||
BYTE *key,
|
||||
NINT keyBytes);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
#define _CONTEXTHANDLE_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _COMNPARAMS_H_
|
||||
#include <include/comnParams.h>
|
||||
#include <comnParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| This defines the interfaces into the PSS portion of the connection
|
||||
| structure.
|
||||
| structure.
|
||||
|
|
||||
| WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
||||
|
|
||||
@@ -45,23 +45,23 @@
|
||||
#define _FILEHANDLE_H_
|
||||
|
||||
#ifndef _COMNPARAMS_H_
|
||||
#include <include/comnParams.h>
|
||||
#include <comnParams.h>
|
||||
#endif
|
||||
|
||||
#ifndef _NSS_MSG_H_
|
||||
#include <include/msg.h>
|
||||
#include <msg.h>
|
||||
#endif
|
||||
|
||||
#ifndef _FSMSG_H_
|
||||
#include <include/fsmsg.h>
|
||||
#include <fsmsg.h>
|
||||
#endif
|
||||
|
||||
#ifndef _UTC_H_
|
||||
#include <include/utc.h>
|
||||
#include <utc.h>
|
||||
#endif
|
||||
|
||||
#ifndef _HARDLINK_H_
|
||||
#include <include/hardLinkBeast.h>
|
||||
#include <hardLinkBeast.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -89,7 +89,7 @@ struct FileHandle_s
|
||||
HardLinkBeast_s *hlFile; /* if non-zero, pointer to hardlink beast that was parsed while opening this file */
|
||||
NamedBeast_s *dataStream; /* the dataStream ptr for the open file */
|
||||
RootBeast_s *compBeast; /* Compressed beast for this datastream
|
||||
* Valid only when reading/writing compressed
|
||||
* Valid only when reading/writing compressed
|
||||
* stream */
|
||||
Zid_t fileParentZid; /* The ZID of the file's parent container */
|
||||
NINT fileNameUniquifier; /* Name uniquifier for the dirFile */
|
||||
@@ -102,9 +102,9 @@ struct FileHandle_s
|
||||
BYTE dataStreamNameSpaceID; /* the nameSpace the dataStream was opened in*/
|
||||
BYTE dataStreamNameType; /* The nameType the dataStream was opened in*/
|
||||
WORD fhState; /* state of the fileHandle */
|
||||
WORD parentIsImmCompress; /* Immediate Compress flag is set on
|
||||
WORD parentIsImmCompress; /* Immediate Compress flag is set on
|
||||
* parent Directory */
|
||||
// WORD cm_closeAction; /* Compression-related action to perform
|
||||
// WORD cm_closeAction; /* Compression-related action to perform
|
||||
// * on COMN_Close; Opcodes in cmNSS.h */
|
||||
VirtInfo_s *virtInfo; /* pointer to info for a virtual file */
|
||||
NSSConnection_s *pssConn; /* pss connection structure pointer */
|
||||
@@ -121,12 +121,12 @@ struct FileHandle_s
|
||||
DQhead_t fhWaiters; /* open requests that is blocked because of */
|
||||
/* conflicting file lock held by this handle*/
|
||||
struct inode *fh_inode; /* Inode this fh got a count on */
|
||||
struct CROAccessLease_s *FH_accessLease; /* If volume is a slave, then
|
||||
* the access lease that this
|
||||
* fH is using
|
||||
struct CROAccessLease_s *FH_accessLease; /* If volume is a slave, then
|
||||
* the access lease that this
|
||||
* fH is using
|
||||
*/
|
||||
struct CsaVolumeDoor_s *FH_csaVolObj; /* When on Master and state
|
||||
* is FH_CFS_OPEN, this
|
||||
* is FH_CFS_OPEN, this
|
||||
* points to the CSAVolObj
|
||||
* identifying the slave that
|
||||
* that opened this file.
|
||||
@@ -169,9 +169,9 @@ struct FileHandle_s
|
||||
#define FH_CFS_OPEN 0x10 /* The open was done for a CFS slave on
|
||||
* the master.
|
||||
*/
|
||||
#define FH_CFS_ASYNC_CLOSE 0x20 /* Pre-Close -- decrementing the
|
||||
#define FH_CFS_ASYNC_CLOSE 0x20 /* Pre-Close -- decrementing the
|
||||
* the grantedRights counts has been
|
||||
* done synchronously, now do the
|
||||
* done synchronously, now do the
|
||||
* async part of the close
|
||||
*/
|
||||
|
||||
@@ -221,7 +221,7 @@ extern BOOL FH_FreeOpenFile(
|
||||
FileHandle_s *fileHandle);
|
||||
|
||||
extern STATUS FH_SetOpenFileGrantedRights(
|
||||
GeneralMsg_s *genMsg,
|
||||
GeneralMsg_s *genMsg,
|
||||
OpenMsg_s *openMsg,
|
||||
FileHandleIDP_s *fhIDP,
|
||||
NINT grantedRights);
|
||||
@@ -279,13 +279,6 @@ void FH_DeleteRights(FileHandle_s *fileHandle);
|
||||
extern Key_t hackKey(Key_t key);
|
||||
|
||||
|
||||
#ifndef KERNEL_VERSION
|
||||
#define KERNEL_VERSION(_major, _minor, _patch) (((_major) << 16) + ((_minor) << 8) + (_patch))
|
||||
#endif
|
||||
#ifndef LINUX_VERSION_CODE
|
||||
#define LINUX_VERSION_CODE KERNEL_VERSION(2,6,32)
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6))
|
||||
#define CONN_KEY(_connNum, _nwHandle) ((((Key_t)(_connNum)) << 32) \
|
||||
| (_nwHandle))
|
||||
@@ -305,7 +298,7 @@ extern Key_t hackKey(Key_t key);
|
||||
((_status) == zERR_CANT_DENY_WRITE_LOCK) || \
|
||||
((_status) == zERR_FILE_WRITE_LOCKED)) \
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
322
include/nwnss/comnSA/intmem.h
Normal file
322
include/nwnss/comnSA/intmem.h
Normal file
@@ -0,0 +1,322 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (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: gpachner $
|
||||
| $Date: 2005-03-18 23:26:41 +0530 (Fri, 18 Mar 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 879 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| THIS FILE IS ONLY USED BY ROUTINES in STDLIB and should NOT be
|
||||
| included by any routine outside of that.
|
||||
|
|
||||
| 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 _INTMEM_H_
|
||||
#define _INTMEM_H_
|
||||
|
||||
//#ifndef _OMNI_H_
|
||||
//#include <omni.h>
|
||||
//#endif
|
||||
#ifndef _QUE_H_
|
||||
#include <que.h>
|
||||
#endif
|
||||
#ifndef _NSS_STRING_H_
|
||||
#include <string.h>
|
||||
#endif
|
||||
#ifndef _PSSDEBUG_H_
|
||||
#include <pssDebug.h>
|
||||
#endif
|
||||
#ifndef _NSS_STDIO_H_
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#ifndef _UTC_H_
|
||||
#include <utc.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAX_MALLOC (64*1024*1024) /* set to 64 MEG */
|
||||
#define FILL_PATTERN 0xbad4babe
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Macros that control if we should keep our own list of memory that we
|
||||
* have allocated.
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
#if NSS_DEBUG IS_ENABLED
|
||||
|
||||
#define NSS_MEMREPORT_CALLERS 8 /* Number of callers to display
|
||||
* into debug buffer as the alloc/free
|
||||
* is called. If more than 8 adjust
|
||||
* code that displays them.
|
||||
*/
|
||||
|
||||
extern void GetClosestSymbol(BYTE *buffer, LONG address);
|
||||
extern NINT NSS_StoreCallers (void **buffer, NINT bufferCount, SNINT skipCount);
|
||||
extern BOOL MKL_Symbols;
|
||||
|
||||
#ifdef IAPX386
|
||||
#define GET_RETURN_ADDR(to,firstParam) ((to) = ((LONG *)&(firstParam))[-1])
|
||||
#else
|
||||
#define GET_RETURN_ADDR(to,firstParam) ((to) = 0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if MEM_KEEP_LIST IS_ENABLED
|
||||
|
||||
|
||||
#define NSS_MKL_CALLERS 7 /* Number of callers to store into
|
||||
* MKL for later viewing.
|
||||
*/
|
||||
extern BOOL MKL_ImmediateFree;
|
||||
extern BOOL MKL_FreeScheduled;
|
||||
extern BOOL MKL_StoreCallers;
|
||||
|
||||
extern QUAD MKL_Insert;
|
||||
extern QUAD MKL_Remove;
|
||||
extern QUAD MKL_FreeToNSS;
|
||||
extern QUAD MKL_FreeToOS;
|
||||
|
||||
/*
|
||||
* As of Oct 2002, this structure has been moved from the end of a user's
|
||||
* block of memory to in front of the memory. This way if the user frees
|
||||
* the memory via the OS directly they will get an error.
|
||||
* You need to have "set alloc memory check flag = on" for the OS to detect
|
||||
* the improper free.
|
||||
*
|
||||
*/
|
||||
typedef struct MKL_Header_s {
|
||||
DQlink_t MH_link;
|
||||
BYTE MH_allocCallersNumber;
|
||||
BYTE MH_freeCallersNumber;
|
||||
WORD MH_Reserved;
|
||||
Time_t MH_allocTime;
|
||||
Time_t MH_freeTime;
|
||||
void* MH_allocCallers[NSS_MKL_CALLERS];
|
||||
void* MH_freeCallers[NSS_MKL_CALLERS];
|
||||
LONG MH_signature; /* At end as more likily to be poked */
|
||||
#define MKL_SIGN_ALLOC 0x56415656 /* "VAVV" */
|
||||
#define MKL_SIGN_FREE 0x57465757 /* "WFWW" */
|
||||
} MKL_Header_s;
|
||||
|
||||
extern DQhead_t MKL_head;
|
||||
extern DQhead_t MKL_FreeHead;
|
||||
|
||||
void MKL_AllocStart( void );
|
||||
void MKL_AllocStop( void );
|
||||
|
||||
#define UMEM_TO_MKL(_uMem) ( (void *)(((ADDR)(_uMem)) - sizeof(MKL_Header_s) ) )
|
||||
#define MKL_TO_UMEM(_mkl) ( (void *)(((ADDR)(_mkl)) + sizeof(MKL_Header_s) ) )
|
||||
#define MKL_NEW_SIZE(size) ((size) + sizeof(MKL_Header_s))
|
||||
#define MKL_ORIG_SIZE(size) ((size) - sizeof(MKL_Header_s))
|
||||
#define MKL_INSERT(__mkl, _firstParam) \
|
||||
{ \
|
||||
MKL_Header_s *_mkl = (MKL_Header_s *)(__mkl); \
|
||||
zASSERT( _mkl != 0 ); \
|
||||
bzero( _mkl, sizeof( *_mkl ) ); \
|
||||
NULLIFY( &_mkl->MH_link ); \
|
||||
_mkl->MH_signature = MKL_SIGN_ALLOC; \
|
||||
_mkl->MH_Reserved = (WORD)MKL_SIGN_ALLOC; \
|
||||
_mkl->MH_allocTime = GetUTCTime(); \
|
||||
DQ_ENQ(&MKL_head,_mkl,MH_link); \
|
||||
++MKL_Insert; \
|
||||
if ( MKL_StoreCallers ) \
|
||||
{ \
|
||||
_mkl->MH_allocCallersNumber = 0;\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_mkl->MH_freeCallersNumber = 0; \
|
||||
} \
|
||||
}
|
||||
|
||||
/*
|
||||
* Oct 2002, no longer FILL_PATTERN MKL part of block. This was
|
||||
* done to aid in debugging when OS catches someone writing to
|
||||
* freed memory. In this case we should still have our caller
|
||||
* information stored.
|
||||
*/
|
||||
#define MKL_REMOVE(_uMem) \
|
||||
{ \
|
||||
NINT _length; \
|
||||
MKL_Header_s *_mkl = (MKL_Header_s *)((ADDR)(_uMem) - \
|
||||
sizeof(MKL_Header_s)); \
|
||||
\
|
||||
zASSERT( _uMem != 0 ); \
|
||||
zASSERT( _mkl->MH_signature == MKL_SIGN_ALLOC ); \
|
||||
_length = MKL_ORIG_SIZE(SizeOfAllocBlock(_mkl)); \
|
||||
DQ_RMV(_mkl,MH_link); \
|
||||
++MKL_Remove; \
|
||||
_mkl->MH_freeTime = GetUTCTime(); \
|
||||
_mkl->MH_signature = MKL_SIGN_FREE; \
|
||||
if ( MKL_StoreCallers ) \
|
||||
{ \
|
||||
_mkl->MH_freeCallersNumber = 0;\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_mkl->MH_freeCallersNumber = 0; \
|
||||
} \
|
||||
memlset((_uMem),FILL_PATTERN,(_length/sizeof(LONG))); \
|
||||
}
|
||||
|
||||
/*
|
||||
* MKL_FREE -
|
||||
* Will either free the memory directly to the OS or place
|
||||
* on the MKL_FreeHead list so that it can be freed in a little bit.
|
||||
*/
|
||||
#define MKL_FREE(__mkl) \
|
||||
{ \
|
||||
MKL_Header_s *_mkl = (MKL_Header_s *)__mkl; \
|
||||
zASSERT( _mkl->MH_signature == MKL_SIGN_FREE ); \
|
||||
if ( MKL_ImmediateFree ) \
|
||||
{ \
|
||||
ZOS_Free(_mkl) \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
DQ_ENQ( &MKL_FreeHead, _mkl, MH_link ); \
|
||||
++MKL_FreeToNSS; \
|
||||
} \
|
||||
/* Wierd check to handle setting of MKL_ImmediateFree to TRUE */ \
|
||||
if ( (DQ_NOT_EMPTY( &MKL_FreeHead )) && (!MKL_FreeScheduled) ) \
|
||||
{ \
|
||||
MKL_ScheduleFree(); \
|
||||
} \
|
||||
}
|
||||
|
||||
extern void LB_CHECK_FREE_LIST(void);
|
||||
|
||||
|
||||
#else /* MEM_KEEP_LIST IS_DISABLED*/
|
||||
|
||||
#define UMEM_TO_MKL(_uMem) (_uMem)
|
||||
#define MKL_NEW_SIZE(size) (size)
|
||||
#define MKL_TO_UMEM(_mkl) (_mkl)
|
||||
#define MKL_ORIG_SIZE(size) (size)
|
||||
#define MKL_OLD_SIZE(size) (size)
|
||||
#define MKL_INSERT(mem,firstParam) ((void)0)
|
||||
#if NSS_DEBUG IS_ENABLED
|
||||
# define MKL_REMOVE(_uMem) \
|
||||
{ \
|
||||
memlset((_uMem),FILL_PATTERN,(SizeOfAllocBlock(_uMem)/sizeof(LONG))); \
|
||||
}
|
||||
#else
|
||||
# define MKL_REMOVE(_uMem) ((void)0)
|
||||
#endif
|
||||
|
||||
#define MKL_FREE(_mkl) ZOS_Free(_mkl)
|
||||
#define LB_CHECK_FREE_LIST() ((void)0)
|
||||
|
||||
#endif /* MEM_KEEP_LIST IS_DISABLED*/
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Report memory usage
|
||||
*****************************************************************************/
|
||||
#define MALLOC_TRACE ENABLE
|
||||
|
||||
extern BOOL MallocTraceEnable;
|
||||
|
||||
#if MALLOC_TRACE IS_ENABLED && NSS_DEBUG IS_ENABLED
|
||||
|
||||
|
||||
extern void LB_MEMORY_DISPLAY_SETUP(void);
|
||||
extern void LB_MEMORY_DISPLAY_SHUTDOWN(void);
|
||||
|
||||
|
||||
#define LB_MEMREPORT(name,_addr,firstParam) \
|
||||
{ \
|
||||
if (MallocTraceEnable) \
|
||||
{ \
|
||||
NINT length=0; \
|
||||
if (_addr != NULL) \
|
||||
{ \
|
||||
length = MKL_ORIG_SIZE(SizeOfAllocBlock(_addr)); \
|
||||
} \
|
||||
DBG_DebugPrintf(LGRAY,"%s: %08x(%x)\n", name,_addr,length); \
|
||||
{ \
|
||||
NINT index; \
|
||||
NINT MH_callersNumber; \
|
||||
BYTE buffer[514]; \
|
||||
void* MH_callers[NSS_MEMREPORT_CALLERS]; \
|
||||
MH_callersNumber = 0;\
|
||||
for ( index = 0; index < MH_callersNumber; ++index ) \
|
||||
{ \
|
||||
if ( MKL_Symbols ) \
|
||||
{ /* This next function is very slow */ \
|
||||
DBG_DebugPrintf(LGRAY, MSGNot(" %s"),buffer); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
DBG_DebugPrintf(LGRAY, MSGNot(" %08x"), \
|
||||
MH_callers[index]); \
|
||||
} \
|
||||
} \
|
||||
if ( (!MKL_Symbols) && (MH_callersNumber != 0) ) \
|
||||
{ \
|
||||
DBG_DebugPrintf(LGRAY, "\n"); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
#define LB_MEMREPORTPAGE(name,_addr,numPages,firstParam) \
|
||||
{ \
|
||||
if (MallocTraceEnable) \
|
||||
{ \
|
||||
NINT where; \
|
||||
GET_RETURN_ADDR(where,firstParam); \
|
||||
DBG_DebugPrintf(LGRAY,"%s: %08x %d where=%08x\n", \
|
||||
name,_addr,numPages,where); \
|
||||
} \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define LB_MEMORY_DISPLAY_SETUP() ((void)0)
|
||||
#define LB_MEMORY_DISPLAY_SHUTDOWN() ((void)0)
|
||||
#define LB_MEMREPORT(name,_addr,firstParam) ((void)0)
|
||||
#define LB_MEMREPORTPAGE(name,_addr,numPages,firstParam) ((void)0)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _INTMEM_H_ */
|
||||
@@ -45,11 +45,11 @@
|
||||
#define _MSGLOCK_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XLIMITS_H_
|
||||
#include <library/xLimits.h>
|
||||
#include <xLimits.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -44,14 +44,14 @@
|
||||
#define _NAME_H_
|
||||
|
||||
#ifndef _COMNBEASTS_H_
|
||||
#include <include/comnBeasts.h>
|
||||
#include <comnBeasts.h>
|
||||
#endif
|
||||
|
||||
#ifndef _NAMESPACE_H_
|
||||
#include <include/nameSpace.h>
|
||||
#include <nameSpace.h>
|
||||
#endif
|
||||
|
||||
#include <library/xUnicode.h>
|
||||
#include <xUnicode.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -67,7 +67,7 @@ struct FullDirectoryInfo_s;
|
||||
|
||||
/* preferably prime numbers since these numbers are used for hashing */
|
||||
#define MIN_NAME_CACHE_SIZE 17 /* The minimum number of entries that */
|
||||
/* can be set for the name cache. */
|
||||
/* can be set for the name cache. */
|
||||
#define DEFAULT_NAME_CACHE_SIZE 2111 /* The maximum number of entries that */
|
||||
/* can be set for the name cache. */
|
||||
#define DEFAULT_MAX_NAME_CACHE_SIZE 100000 /* Default maximum size of the name cache */
|
||||
@@ -110,7 +110,7 @@ typedef struct NameCacheCtrl_s
|
||||
NINT minValidSize; /* minimum value of maxEntries before an invalidate should occur */
|
||||
NINT maxValidSize; /* minimum value of maxEntries before an invalidate should occur */
|
||||
NINT lastInvalidateSize; /* value of maxEntries at last invalidate */
|
||||
Latch_s latch; /* latch to control changes in this structure */
|
||||
Latch_s latch; /* latch to control changes in this structure */
|
||||
NINT numHashEntries; /* number of entries in each hash table */
|
||||
DQhead_t *uniHash; /* pointer to unicode hash array */
|
||||
DQhead_t *asciiHash; /* pointer to ASCII hash array */
|
||||
@@ -177,10 +177,10 @@ extern STATUS NAME_InsertAndMangleName(
|
||||
NINT *retDirNamesAdded); /*Optional--Null is allowed */
|
||||
|
||||
#define INSNAMEFL_NULL_FLAG 0x00000000
|
||||
#define INSNAMEFL_NEW_PARENT_AUTH 0x00000001 /* If set, the names are for
|
||||
#define INSNAMEFL_NEW_PARENT_AUTH 0x00000001 /* If set, the names are for
|
||||
* a new parent so the authorization
|
||||
* info should be updated */
|
||||
#define INSNAMEFL_DIRECTORY_ONLY 0x00000002 /* If set, the names are only
|
||||
#define INSNAMEFL_DIRECTORY_ONLY 0x00000002 /* If set, the names are only
|
||||
* added in directory, there'll be no
|
||||
* name operations on beast. This is
|
||||
* useful for some LSS (such as CD9660)
|
||||
@@ -188,8 +188,8 @@ extern STATUS NAME_InsertAndMangleName(
|
||||
* instead of create all file beasts
|
||||
*/
|
||||
extern STATUS NAME_WillAddToSalvage(
|
||||
struct NamedBeast_s *beast,
|
||||
struct NamedBeast_s *dir,
|
||||
struct NamedBeast_s *beast,
|
||||
struct NamedBeast_s *dir,
|
||||
NINT flags,
|
||||
struct ParentEntry_s *pentry);
|
||||
|
||||
@@ -219,7 +219,7 @@ extern STATUS NAME_doAddName(
|
||||
#define REMNAMEFL_KEEP_BEAST_NAMES 0x00000001 /* if SET, keep the beast names
|
||||
* and only remove names from the
|
||||
* parent directory. */
|
||||
#define REMNAMEFL_KEEP_PARENT_ENTRY 0x00000002 /* if SET, keep the empty
|
||||
#define REMNAMEFL_KEEP_PARENT_ENTRY 0x00000002 /* if SET, keep the empty
|
||||
* parent entry in the beast because we
|
||||
* are renaming and we will shortly
|
||||
* re-insert names back into the
|
||||
@@ -228,7 +228,7 @@ extern STATUS NAME_doAddName(
|
||||
* be atomic, either all of the name
|
||||
* entries will be removed, or none
|
||||
* of them will. */
|
||||
#define REMNAMEFL_REMOVE_PARENT_AUTH 0x00000008 /* If set, the names are for
|
||||
#define REMNAMEFL_REMOVE_PARENT_AUTH 0x00000008 /* If set, the names are for
|
||||
* a parent that is being removed, so
|
||||
* the authorization info should be
|
||||
* updated */
|
||||
@@ -390,7 +390,7 @@ extern void NAME_AddNameToCache(
|
||||
unicode_t *uniName,
|
||||
NINT asciiNameLen, /* May be 0 */
|
||||
char *asciiName, /* May be NULL if asciiNameLen is 0 */
|
||||
Zid_t zid
|
||||
Zid_t zid
|
||||
/* cnt NINT nameUniquifier*/);
|
||||
|
||||
extern Zid_t NAME_GetNameFromCacheUnicode(
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| This defines the interfaces into the NSS portion of the connection
|
||||
| structure.
|
||||
| structure.
|
||||
|
|
||||
| WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
||||
|
|
||||
@@ -45,13 +45,13 @@
|
||||
#define _PSSCONNECTION_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
#ifndef _QUE_H_
|
||||
#include <library/que.h>
|
||||
#include <que.h>
|
||||
#endif
|
||||
#ifndef _MSGGEN_H_
|
||||
#include <include/msgGen.h>
|
||||
#include <msgGen.h>
|
||||
#endif
|
||||
#ifndef _CONTEXTHANDLE_H_
|
||||
#include "contextHandle.h"
|
||||
@@ -63,7 +63,7 @@
|
||||
#include "searchMap.h"
|
||||
#endif
|
||||
#ifndef _COMNPUBLICS_H_
|
||||
#include <include/comnPublics.h>
|
||||
#include <comnPublics.h>
|
||||
#endif
|
||||
#ifndef _SAGENTHANDLE_H_
|
||||
#include "sAgentHandle.h"
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#define _PSSLIB_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
/* Pre-declare the following structure(s) */
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| This defines the interfaces into the PSS portion of the connection
|
||||
| structure.
|
||||
| structure.
|
||||
|
|
||||
| WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
||||
|
|
||||
@@ -45,7 +45,7 @@
|
||||
#define _SAGENTHANDLE_H_
|
||||
|
||||
#ifndef _COMNPARAMS_H_
|
||||
#include <include/comnParams.h>
|
||||
#include <comnParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
#define _SYSIMP_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
#if !defined(__KERNEL__) && !defined(NSS_USERSPACE)
|
||||
#if !defined(__KERNEL__)
|
||||
#ifndef __DDSAPI_H
|
||||
#include <ddsapi.h>
|
||||
#endif
|
||||
@@ -59,10 +59,10 @@
|
||||
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
#ifndef _MPKTYPES_H_
|
||||
#include <support/lnxmbINC/mpktypes.h>
|
||||
#include <mpktypes.h>
|
||||
#endif
|
||||
|
||||
#include <support/lnxmbINC/alert.h> /* NetWare Include*/
|
||||
#include <alert.h> /* NetWare Include*/
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -99,7 +99,7 @@ extern LONG NDSEventHandlerHandle;
|
||||
extern DDSAPI int(*DDSGetLocalAgentInfoPtr)(NINT *state, void *treeName);
|
||||
extern DDSAPI int(*DDSGetLocalEntryNamePtr)(NINT entryid, int FormFlags, unicode_t *dn);
|
||||
#endif
|
||||
#if !defined(__KERNEL__) && !defined(NSS_USERSPACE)
|
||||
#if !defined(__KERNEL__)
|
||||
extern DDSAPI int(*DDCCreateContextPtr)(SAL_ModHandle taskID, int *context);
|
||||
extern DDSAPI int(*DDCDuplicateContextPtr)(int oldContext, int *newContext);
|
||||
extern DDSAPI int(*DDCResolveNamePtr)(int context, uint32 flags, const void *dn);
|
||||
@@ -137,58 +137,6 @@ extern DDSAPI uint32(*DDCContextEntryIDPtr)(int context);
|
||||
extern DDSAPI int(*DDCPingPtr)(int context, uint32 *dsVersion, uint32 *rootMostEntryDepth, char *treeName, uint32 *flags, unicode *uTree);
|
||||
#endif
|
||||
|
||||
#if defined(NSS_USERSPACE)
|
||||
/*
|
||||
* Userspace NSS needs the NSS locale table layout for namespace code.
|
||||
* This is the original LocaleTableStruct block from the NetWare/kernel
|
||||
* sysimp import area below, exposed without enabling disk/VFS import
|
||||
* function pointers.
|
||||
*/
|
||||
struct LocaleTableStruct
|
||||
{
|
||||
/*BYTE LocaleTableSgnature[12];*/ /* "LoCaLe Table" */
|
||||
/* the address we get from the OS starts HERE*/
|
||||
/* LCONFIG.SYS relative offset */
|
||||
LONG OSLanguageID; /* 0 */
|
||||
LONG OSDoubleBytePresentFlag; /* 4 */
|
||||
LONG OSDoubleByteSpace; /* 8 */
|
||||
|
||||
LONG OSUpperCaseTableID; /* 12 */
|
||||
|
||||
/* WARNING - util.386 assumes OSUpperCaseTable is at offset 16 */
|
||||
BYTE OSUpperCaseTable[256]; /* 16 */
|
||||
|
||||
LONG OSSortTableID; /* 272 */
|
||||
BYTE OSSortTable[256]; /* 276 */
|
||||
|
||||
LONG OSLineDrawCharTableID; /* 532 */
|
||||
BYTE OSLineDrawCharTable[8 * 6]; /* 536 */
|
||||
|
||||
LONG OSDoubleByteTableID; /* 584 */
|
||||
BYTE OSFirstByteBitMap[256 / 8]; /* 588 */
|
||||
|
||||
/* DOS Flavor Tables */
|
||||
|
||||
LONG DOSType; /* 620 */
|
||||
|
||||
BYTE DOSValidCharBitMap[256/8]; /* 624 */
|
||||
|
||||
BYTE DOSValidCharBitMapNoLower[256/8];/* 656 */
|
||||
|
||||
BYTE DOSFirstByteBitMap[256/8]; /* 688 */
|
||||
|
||||
BYTE DOSSecondByteBitMap[256/8]; /* 720 */
|
||||
|
||||
/* WARNING - util.386 assumes DOSUpperCaseTable is at offset 752 */
|
||||
BYTE DOSUpperCaseTable[256]; /* 752 */
|
||||
|
||||
BYTE DOSToMAC[256]; /* 1008 */
|
||||
|
||||
BYTE MACToDOS[256]; /* 1264 */
|
||||
};
|
||||
extern struct LocaleTableStruct *NW_LocaleTable;
|
||||
#endif
|
||||
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
extern STATUS (*zClosePtr)(
|
||||
Key_t key);
|
||||
@@ -210,7 +158,7 @@ extern STATUS (*zOpenPtr)(
|
||||
|
||||
extern STATUS (*zReadPtr)(
|
||||
Key_t key,
|
||||
Xid_t xid,
|
||||
Xid_t xid,
|
||||
QUAD startingOffset,
|
||||
NINT bytesToRead,
|
||||
void *retBuffer,
|
||||
@@ -222,7 +170,7 @@ extern STATUS (*zRootKeyPtr)(
|
||||
|
||||
extern STATUS (*zWritePtr)(
|
||||
Key_t key,
|
||||
Xid_t xid,
|
||||
Xid_t xid,
|
||||
QUAD startingOffset,
|
||||
NINT bytesToWrite,
|
||||
const void *buffer,
|
||||
@@ -334,11 +282,11 @@ extern BYTE *NW_DebuggerActive;
|
||||
|
||||
#ifndef __linux__
|
||||
extern THREAD (*kStartThreadWithModuleHandlePtr)(
|
||||
BYTE *pThreadName,
|
||||
BYTE *pThreadName,
|
||||
void *(*StartAddress)(THREAD, void *),
|
||||
void *StackAddressHigh,
|
||||
LONG StackSize,
|
||||
void *Argument,
|
||||
void *StackAddressHigh,
|
||||
LONG StackSize,
|
||||
void *Argument,
|
||||
uint32 ModuleHandle);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
@@ -390,7 +338,7 @@ struct NW_BranchTableEntry /* from NSIMMU.H */
|
||||
|
||||
extern void NW_WriteBranchTableEntry( /* from NSIMMU.C */
|
||||
NINT instruction,
|
||||
struct NW_BranchTableEntry *entry,
|
||||
struct NW_BranchTableEntry *entry,
|
||||
void *branchRoutine);
|
||||
|
||||
#define CALL_INST 0xE8
|
||||
@@ -489,7 +437,7 @@ LONG NW_CallAsm2d(void *RoutineAddress, void *parm1, void *parm2);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
*
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
#if zNETWARE
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
#define _ZFRIENDS_H_
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
# include <public/zOmni.h>
|
||||
# include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
# include <public/zParams.h>
|
||||
# include <zParams.h>
|
||||
#endif
|
||||
|
||||
#ifndef _CHUNK_H_
|
||||
# include <public/chunk.h>
|
||||
# include <chunk.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ STATUS zChangeConnection(
|
||||
|
||||
STATUS zReadPageChunks(
|
||||
Key_t key,
|
||||
Xid_t xid,
|
||||
Xid_t xid,
|
||||
QUAD startingOffset,
|
||||
NINT bytesToRead,
|
||||
NSSChunk_s *chunks,
|
||||
@@ -75,7 +75,7 @@ STATUS zReleasePageChunks(
|
||||
|
||||
STATUS zZIDCreate(
|
||||
Key_t key,
|
||||
NINT taskID,
|
||||
NINT taskID,
|
||||
Xid_t xid,
|
||||
NINT nameSpace,
|
||||
VolumeID_t *volumeID,
|
||||
@@ -138,7 +138,7 @@ DOSTime_t xUTC2dosTime(Time_t utc);
|
||||
Time_t xDOS2utcTime(DOSTime_t dosTime);
|
||||
|
||||
STATUS xPoolGUIDToName(
|
||||
VolumeID_t *poolID,
|
||||
VolumeID_t *poolID,
|
||||
unicode_t *poolName,
|
||||
NINT poolNameSizeInUnicode);
|
||||
|
||||
@@ -147,11 +147,11 @@ STATUS xPoolNameToGUID(
|
||||
VolumeID_t *poolID);
|
||||
|
||||
STATUS xPoolGetEnabledFeatures(
|
||||
VolumeID_t *poolID,
|
||||
VolumeID_t *poolID,
|
||||
QUAD *enabledFeatures );
|
||||
|
||||
STATUS xVolumeGUIDToName(
|
||||
VolumeID_t *volumeID,
|
||||
VolumeID_t *volumeID,
|
||||
unicode_t *volumeName,
|
||||
NINT volumeNameSizeInUnicode);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#define _DISPLAYVERSION_H_
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
# include <public/zOmni.h>
|
||||
# include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
1999
include/nwnss/include/Moab.imp
Normal file
1999
include/nwnss/include/Moab.imp
Normal file
File diff suppressed because it is too large
Load Diff
229
include/nwnss/include/WithMPKSpinLock.h
Normal file
229
include/nwnss/include/WithMPKSpinLock.h
Normal file
@@ -0,0 +1,229 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) / Distributed File Services (DFS)
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: stoner $
|
||||
| $Date: 2005-04-13 22:08:08 +0530 (Wed, 13 Apr 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 927 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Provide a means for an NSS NLM that is internally MPK safe to operate
|
||||
| without holding the NSS MPK Spin Lock except where required for
|
||||
| specific NSS function calls as defined by the macros below.
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _WITHMPKSPINLOCK_H_
|
||||
#define _WITHMPKSPINLOCK_H_
|
||||
|
||||
|
||||
/* If we are compiling six pack code for Cobra */
|
||||
#ifdef NSS_ON_NW56_MODE
|
||||
|
||||
/* Include the MPK headers */
|
||||
#include <mpkapis.h>
|
||||
#include <mpkerror.h>
|
||||
|
||||
/* Function style macros */
|
||||
#define ASSERT_MPKNSS_LOCK() /* Fake the assert on the NSS MPK lock for the pre-MP version of NSS */
|
||||
#define MPKNSS_LOCK() /* Fake the NSS MPK lock for the pre-MP version of NSS */
|
||||
#define MPKNSS_UNLOCK() /* Fake the NSS MPK unlock for the pre-MPK version of NSS */
|
||||
|
||||
#define microSecondTimer() ((QUAD)GetHighResClock() * (QUAD)100)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TOTALALLOCS
|
||||
/*
|
||||
These need to be defined in the source for the NLM being compiled with the TOTALALLOCS macro enabled
|
||||
*/
|
||||
extern LONG AllocBytes;
|
||||
extern LONG AllocPages;
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
Manifest constants
|
||||
*/
|
||||
|
||||
|
||||
/* New types */
|
||||
|
||||
|
||||
/* Function style macros */
|
||||
#define NOZOS_UnRegisterEventNotification(_p1) \
|
||||
UnRegisterEventNotification(_p1);
|
||||
|
||||
#define WithMPKLock_ByteToUnicode(_ret, _arg1, _arg2, _arg3, _arg4, _arg5) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = LB_ByteToUnicode(_arg1, _arg2, _arg3, _arg4, _arg5); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#define WithMPKLock_COMN_NameToUnicode(_ret, _arg1, _arg2, _arg3, _arg4, _arg5) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = COMN_NameToUnicode(_arg1, _arg2, _arg3, _arg4, _arg5); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
#define WithMPKLock_exitMyselfAndReturn(_arg1, _arg2) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
LB_exitMyselfAndReturn(_arg1, _arg2); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
#if zNETWARE
|
||||
#ifndef TOTALALLOCS
|
||||
#define WithMPKLock_free(_arg1) { \
|
||||
MPKNSS_LOCK(); \
|
||||
free(_arg1); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#else
|
||||
#define WithMPKLock_free(_arg1) { \
|
||||
MPKNSS_LOCK(); \
|
||||
atomic_sub(&AllocBytes, *(((LONG *)_arg1)-1)); \
|
||||
free(((LONG *)_arg1)-1); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#define WithMPKLock_free(_arg1) free(_arg1);
|
||||
#endif
|
||||
|
||||
#ifndef TOTALALLOCS
|
||||
#define WithMPKLock_freePage(_arg1, _arg2) { \
|
||||
MPKNSS_LOCK(); \
|
||||
freePage(_arg1, _arg2); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#else
|
||||
#define WithMPKLock_freePage(_arg1, _arg2) { \
|
||||
MPKNSS_LOCK(); \
|
||||
freePage(_arg1, _arg2); \
|
||||
atomic_sub(&AllocPages, _arg2); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define WithMPKLock_LB_GUIDGenerate(_arg1) { \
|
||||
MPKNSS_LOCK(); \
|
||||
LB_GUIDGenerate(_arg1); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
#define WithMPKLock_LB_GUIDToString(_ret, _arg1, _arg2, _arg3) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = LB_GUIDToString(_arg1, _arg2, _arg3); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
#if zNETWARE
|
||||
#ifndef TOTALALLOCS
|
||||
#define WithMPKLock_malloc(_ret, _arg1) { \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = malloc(_arg1); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#else
|
||||
#define WithMPKLock_malloc(_ret, _arg1) { \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = malloc((_arg1) + 4); \
|
||||
*(LONG *)_ret = _arg1; \
|
||||
_ret = (void *)(&((LONG *)_ret)[1]); \
|
||||
atomic_add(&AllocBytes, _arg1); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#define WithMPKLock_malloc(_ret, _arg1) _ret = malloc(_arg1);
|
||||
#endif
|
||||
|
||||
#ifndef TOTALALLOCS
|
||||
#define WithMPKLock_mallocPage(_ret, _arg1) { \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = mallocPage(_arg1); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#else
|
||||
#define WithMPKLock_mallocPage(_ret, _arg1) { \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = mallocPage(_arg1); \
|
||||
atomic_add(&AllocPages, _arg1); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef TOTALALLOCS
|
||||
#define WithMPKLock_realloc(_ret, _arg1, _arg2) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = realloc(_arg1, _arg2); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#else
|
||||
#define WithMPKLock_realloc(_ret, _arg1, _arg2) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
atomic_sub(&AllocBytes, *(((LONG *)_arg1)-1); \
|
||||
_ret = realloc(((LONG *)_arg1)-1, _arg2 + 4); \
|
||||
*(LONG *)_ret = arg2; \
|
||||
_ret = (void *)(&((LONG *)_ret)[1]); \
|
||||
atomic_add(&AllocBytes, arg2); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define WithMPKLock_UnicodeToByte(_ret, _arg1, _arg2, _arg3, _arg4, _arg5) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = LB_UnicodeToByte(_arg1, _arg2, _arg3, _arg4, _arg5); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
#define WithMPKLock_uniupr(_ret, _arg1) { \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = uniupr(_arg1); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
#define WithMPKLock_UTCTime2Str(_ret, _arg1, _arg2) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
_ret = UTCTime2Str(_arg1, _arg2); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,236 +0,0 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1995-1998 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: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Support routines for processing legacy operations by NCPs and NLMs
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _ADMINVOLUME_H_
|
||||
#define _ADMINVOLUME_H_
|
||||
#include <library/xUnicode.h>
|
||||
|
||||
#ifndef _QUE_H_
|
||||
#include <library/que.h>
|
||||
#endif
|
||||
|
||||
#ifndef _VOLUME_H_
|
||||
#include "volume.h"
|
||||
#endif
|
||||
|
||||
#ifndef _XADMINVOLUME_H_
|
||||
#include "xAdminVolume.h"
|
||||
#endif
|
||||
|
||||
/* Pre-define struct(s) so Linux compiler doesn't complain */
|
||||
struct PCLSwitchDef_s;
|
||||
|
||||
#define AVOL_BLOCK_SHIFT 12 /* has 4K blocks */
|
||||
#define AVOL_DEFAULT_NUM_BLOCKS 1024 /* has 1meg worth of blocks */
|
||||
#define AVOL_MAX_BEAST_SIZE 4096 /* the biggest beast allowed */
|
||||
#define AVOL_REALLOC_AMOUNT 8 /* number of block entries to be added on a realloc */
|
||||
|
||||
typedef enum adminStorageState_e
|
||||
{
|
||||
INIT_STATE = 0,
|
||||
PERSIST_DATA = 1,
|
||||
} adminStorageState_e;
|
||||
|
||||
typedef struct AdminVolStorageInfo_s
|
||||
{
|
||||
StorageInfo_s comnInfo;
|
||||
adminStorageState_e state;
|
||||
NINT numBlocks;
|
||||
NINT numEntriesAlloced;
|
||||
union
|
||||
{
|
||||
BYTE *memBlocks[1];
|
||||
Blknum_t diskBlocks[1];
|
||||
} u;
|
||||
} AdminVolStorageInfo_s;
|
||||
|
||||
/****************************************************************************
|
||||
* ADMIN VOLUME Beast
|
||||
*
|
||||
* All of the definitions specific to the admin volume
|
||||
*****************************************************************************/
|
||||
typedef struct AdminVolume_s
|
||||
{
|
||||
Volume_s vol; /* derived from a volume*/
|
||||
Zid_t nextZID; /* next ZID to allocate*/
|
||||
} AdminVolume_s;
|
||||
|
||||
#define AVOLroot vol.avfile.file.auth.named.root
|
||||
#define AVOLnamed vol.avfile.file.auth.named
|
||||
#define AVOLauth vol.avfile.file.auth
|
||||
#define AVOLfile vol.avfile.file
|
||||
#define AVOLavfile vol.avfile
|
||||
#define AVOLvol vol
|
||||
|
||||
#define AVOLzid AVOLroot.zid
|
||||
#define AVOLbeastClass AVOLroot.beastClass
|
||||
#define AVOLbeastLatch AVOLroot.mycache.agent.latch
|
||||
#define AVOLuseCount AVOLroot.useCount
|
||||
#define AVOLcomnBeastOps AVOLbeastClass->comnOps
|
||||
#define AVOLcomnVolOps AVOLbeastClass->comnVolOps
|
||||
|
||||
#define AVOLfirstParentZid AVOLnamed.firstParent.p.zid
|
||||
|
||||
#define AVOLrootdir AVOLvol.rootdir
|
||||
#define AVOLbeastList AVOLvol.beastList
|
||||
#define AVOLauthModel AVOLvol.authModel
|
||||
#define AVOLauthModelIndex AVOLvol.authModelIndex
|
||||
#define AVOLstate AVOLvol.state
|
||||
#define AVOLagent AVOLvol.agent
|
||||
#define AVOLstorageIndex AVOLvol.storageIndex
|
||||
#define AVOLmaxBeastSize AVOLvol.maxBeastSize
|
||||
#define AVOLsupportedAttributes AVOLvol.supportedAttributes
|
||||
#define AVOLmaximumFileSize AVOLvol.maximumFileSize
|
||||
|
||||
#define AVOLvolumeID AVOLvol.VOLvolumeID
|
||||
#define AVOLnameSpaceMask AVOLvol.p.nameSpaceMask
|
||||
#define AVOLblockSize AVOLvol.p.blockSize
|
||||
#define AVOLblockShift AVOLvol.p.blockShift
|
||||
#define AVOLenabledAttributes AVOLvol.p.enabledAttributes
|
||||
|
||||
#define AVOLnextZid AVOLvol.logged.nextZid
|
||||
#define AVOLtotalBlocks AVOLvol.logged.totalBlocks
|
||||
#define AVOLinUseBlocks AVOLvol.logged.inUseBlocks
|
||||
#define AVOLnumFiles AVOLvol.logged.numFiles
|
||||
#define AVOLnumObjects AVOLvol.logged.numObjects
|
||||
|
||||
/****************************************************************************
|
||||
* Globals
|
||||
*****************************************************************************/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Defines the admin volume for the system
|
||||
*---------------------------------------------------------------------------*/
|
||||
extern AdminVolume_s AdminVolume;
|
||||
extern Volume_s *PersistAdminVolume;
|
||||
extern Key_t SwapRootKey;
|
||||
extern Key_t SwapKey;
|
||||
extern BOOL AdminVolumeIsUsable;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Well Known ZIDs for the Admin Volume's first level directories
|
||||
*---------------------------------------------------------------------------*/
|
||||
//#define ADMVOL_STORAGE_POOL_ZID (zINVALID_ZID+3) /* Directory for all physical storage */
|
||||
|
||||
|
||||
STATUS ADMINVOL_InitPersistentStorage(
|
||||
struct GeneralMsg_s *genMsg);
|
||||
|
||||
File_s *COMN_AVOL_ResolveLink(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct NamedBeast_s *beast);
|
||||
|
||||
void AVOL_PolicySetLoadTimeActivateVolume(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
void AVOL_PolicySetLoadTimeDeactivateVolume(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
void AVOL_PolicySetLoadTimeVerifyVolume(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
|
||||
NINT AVOL_PolicyObtainLoadTimeVolumeState(
|
||||
Volume_s *volume );
|
||||
|
||||
//NINT AVOL_PolicyObtainLoadTimeVerify(
|
||||
// Volume_s *volume );
|
||||
|
||||
|
||||
void AVOL_PolicySetLoadTimeActivatePool(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
void AVOL_PolicySetLoadTimeDeactivatePool(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
void AVOL_PolicySetLoadTimeMaintenancePool(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
void AVOL_PolicyDisplayLoadTimePool(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
void AVOL_PolicyDisplayLoadTimeVolume(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
void AVOL_PolicySetLoadTimeVerifyPool(
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT index,
|
||||
void *userParm);
|
||||
|
||||
|
||||
NINT AVOL_PolicyObtainLoadTimePoolState(
|
||||
Pool_s *volume,
|
||||
BOOL verbose );
|
||||
|
||||
NINT AVOL_PolicyObtainLoadTimeVerifyPool(
|
||||
Pool_s *volume );
|
||||
|
||||
void AVOL_PolicyShutdown();
|
||||
void AVOL_PolicyStartup();
|
||||
|
||||
extern unicode_t *AVOL_PolicyLoadTimeDeactivePool;
|
||||
extern unicode_t *AVOL_PolicyLoadTimeMaintenancePool;
|
||||
extern unicode_t *AVOL_PolicyLoadTimeVerifyPool;
|
||||
extern unicode_t *AVOL_PolicyLoadTimeActivePool;
|
||||
|
||||
extern unicode_t *AVOL_PolicyLoadTimeDeactivePoolPolicyDefault;
|
||||
extern unicode_t *AVOL_PolicyLoadTimeMaintenancePoolPolicyDefault;
|
||||
extern unicode_t *AVOL_PolicyLoadTimeVerifyPoolPolicyDefault;
|
||||
extern unicode_t *AVOL_PolicyLoadTimeActivePoolPolicyDefault;
|
||||
|
||||
extern unicode_t *AVOL_PolicyLoadTimeDeactiveVolume;
|
||||
extern unicode_t *AVOL_PolicyLoadTimeActiveVolume;
|
||||
|
||||
extern unicode_t *AVOL_PolicyLoadTimeDeactiveVolumePolicyDefault;
|
||||
extern unicode_t *AVOL_PolicyLoadTimeActiveVolumePolicyDefault;
|
||||
|
||||
#endif /* _ADMINVOLUME_H_ */
|
||||
50
include/nwnss/include/admindrv.h
Normal file
50
include/nwnss/include/admindrv.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2004 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Define strutures needed by admin upcall driver.
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _ADMINDRV_H_
|
||||
#define _ADMINDRV_H_
|
||||
|
||||
#define ADMD_DEVICE_NAME "admindrv"
|
||||
|
||||
int admd_request(
|
||||
int requestLen,
|
||||
char *request,
|
||||
int *replyLen,
|
||||
char **reply);
|
||||
|
||||
|
||||
#endif
|
||||
119
include/nwnss/include/afpAuthInfo.h
Normal file
119
include/nwnss/include/afpAuthInfo.h
Normal file
@@ -0,0 +1,119 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1988-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This header shares login data types between AFPTCP and LSMAFP3 modules.
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef AFP_AUTH_INFO_H
|
||||
#define AFP_AUTH_INFO_H
|
||||
|
||||
#include <nwdsdefs.h> // MAX_DN_CHARS, MAX_TREE_NAME_CHARS
|
||||
#include <nwdsdc.h> // NWDSContextHandle
|
||||
|
||||
|
||||
typedef enum authRequest_e
|
||||
{
|
||||
AUTHREQ_GUEST,
|
||||
AUTHREQ_CLEARTEXT,
|
||||
AUTHREQ_RANDOMNUM,
|
||||
AUTHREQ_TWOWAYRANDOMNUM,
|
||||
AUTHREQ_RANDOMNUMCONT,
|
||||
AUTHREQ_TWOWAYRANDOMNUMCONT,
|
||||
CHANGEPASSWRD_CLEARTEXT,
|
||||
CHANGEPASSWRD_RANDOMNUM,
|
||||
SETSIMPLEPASSWORD,
|
||||
SET_UNIVERSAL_PASSWORD,
|
||||
AUTHREQ_DHX,
|
||||
AUTHREQ_DHX_CONT,
|
||||
AUTHREQ_DHX2,
|
||||
AUTHREQ_DHX2_CONT,
|
||||
AUTHREQ_KERBEROS,
|
||||
AUTHREQ_KERBEROS_V4_CONT,
|
||||
AUTHREQ_KERBEROS_V5_CONT
|
||||
} authRequest_t;
|
||||
|
||||
#define AUTH_INFO_HEADER_LEN 6 /* size of authInfoSize + authInfoVersion */
|
||||
#define AUTH_INFO_VERSION_1 1
|
||||
#define AUTH_INFO_VERSION_2 2
|
||||
|
||||
// Authentication state
|
||||
#define AUTH_STATE_OFF 0x0000 // NOT authenticated at all
|
||||
#define AUTH_STATE_ON 0x0001 // fully authenticated for all FPCommands
|
||||
#define AUTH_STATE_PARTIAL 0x0002 // partially authenticated for change password, logout, etc.
|
||||
#define AUTH_STATE_SET_NDS_PASSWORD 0x0004 // Universal password not enabled, simple password set, now set NDS password
|
||||
#define AUTH_STATE_CORP_USER 0x0008 // User is in remote.appusers and must be authenticated with HQ (CORP tree)
|
||||
#define AUTH_STATE_PWD_TOO_SHORT 0x0010 // err from change password
|
||||
#define AUTH_STATE_PWD_POLICY_ERR 0x0020 // err from change password
|
||||
#define AUTH_STATE_PWD_SAME_ERR 0x0040 // err from change password
|
||||
|
||||
// These constants define the password length in BYTES. (Apple isn't counting unicode chars.)
|
||||
#define LENGTH_OF_AFP_PASSWORD 8
|
||||
//#define LENGTH_OF_AFP_DHX_PASSWORD 64
|
||||
//#define LENGTH_OF_AFP_DHX2_PASSWORD 256
|
||||
#define AFP_USER_NAME_AREA_SIZE 255*6 /* max for 1 char in UTF8 is 6 bytes, although US ascii always takes 1 byte */
|
||||
|
||||
#define AFP_BYTE_USER_NAME_LENGTH MAX_DN_CHARS + 1
|
||||
#define AFP_UNI_USER_NAME_LENGTH 256
|
||||
#define AFP_RESERVED_AREA AFP_USER_NAME_AREA_SIZE - (AFP_BYTE_USER_NAME_LENGTH + AFP_UNI_USER_NAME_LENGTH * 2)
|
||||
|
||||
typedef struct authInfo_v1
|
||||
{
|
||||
/* header fields */
|
||||
nint32 authInfoSize;
|
||||
WORD authInfoVersion;
|
||||
/* end of header fields */
|
||||
|
||||
char password[LENGTH_OF_AFP_PASSWORD+1]; // password is null terminated string without leading string length
|
||||
char newPassword[LENGTH_OF_AFP_PASSWORD+1];
|
||||
char userName[AFP_BYTE_USER_NAME_LENGTH]; // 256 bytes + NULL terminator
|
||||
WORD uniUserName[AFP_UNI_USER_NAME_LENGTH]; // will be stored as UTF16 )
|
||||
BYTE reserved [AFP_RESERVED_AREA];
|
||||
BYTE randomNum[8];
|
||||
BYTE userAuthMethod; // no auth, cleartext, rand num, 2-way rand num, DHX, DHX2, Kerberos
|
||||
int authenticated; // authentication state
|
||||
BYTE request;
|
||||
WORD loginID;
|
||||
BYTE blobData[8];
|
||||
BYTE userRandNum[8];
|
||||
BYTE userBlobData[8];
|
||||
nint32 mafHandle;
|
||||
nint32 nmasHandle;
|
||||
NWDSContextHandle DSContext;
|
||||
|
||||
}authInfo_v1;
|
||||
|
||||
|
||||
typedef struct authInfo
|
||||
{
|
||||
union
|
||||
{
|
||||
authInfo_v1 v1;
|
||||
};
|
||||
}authInfo;
|
||||
|
||||
#endif
|
||||
@@ -43,8 +43,12 @@
|
||||
#ifndef _ALARM_H_
|
||||
#define _ALARM_H_
|
||||
|
||||
#if zLINUX
|
||||
#include "linux/time.h"
|
||||
#endif
|
||||
|
||||
#ifndef _QUE_H_
|
||||
# include <library/que.h>
|
||||
# include <que.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -54,39 +58,36 @@ extern "C" {
|
||||
typedef struct OneShot_s OneShot_s;
|
||||
typedef struct Cyclic_s Cyclic_s;
|
||||
|
||||
typedef void (*OneShotFunc_t)(OneShot_s *alarm);
|
||||
typedef void (*CyclicFunc_t)(Cyclic_s *alarm);
|
||||
|
||||
struct OneShot_s
|
||||
{
|
||||
DQlink_t link;
|
||||
NINT firetime;
|
||||
OneShotFunc_t function;
|
||||
void (*function)(OneShot_s *);
|
||||
};
|
||||
|
||||
struct Cyclic_s
|
||||
{
|
||||
OneShot_s oneShot;
|
||||
NINT length;
|
||||
CyclicFunc_t function;
|
||||
void (*function)(Cyclic_s *);
|
||||
};
|
||||
|
||||
extern void fireAlarm(void);
|
||||
extern void alarmInit(void);
|
||||
extern void alarmStart(void);
|
||||
extern void alarmStop(void);
|
||||
extern void setOneShot(OneShot_s *alarm, LONG ticks, OneShotFunc_t function);
|
||||
extern void setCyclic(Cyclic_s *alarm, LONG ticks, CyclicFunc_t function);
|
||||
extern void setOneShot(OneShot_s *alarm, LONG ticks, void (*function)());
|
||||
extern void setCyclic(Cyclic_s *alarm, LONG ticks, void (*function)());
|
||||
|
||||
#define MSEC2TICK(_x) (((_x) * 182) / 10000)
|
||||
#define SEC2TICK(_x) (((_x) * 182) / 10)
|
||||
#define MIN2TICK(_x) ((_x) * (182 * 6))
|
||||
#define MILLISEC_PER_TICK 55
|
||||
|
||||
#define msecOneShot(_a, _t, _f) setOneShot((_a), MSEC2TICK(_t), (OneShotFunc_t)(_f))
|
||||
#define msecCyclic(_a, _t, _f) setCyclic((_a), MSEC2TICK(_t), (CyclicFunc_t)(_f))
|
||||
#define secOneShot(_a, _t, _f) setOneShot((_a), SEC2TICK(_t), (OneShotFunc_t)(_f))
|
||||
#define secCyclic(_a, _t, _f) setCyclic((_a), SEC2TICK(_t), (CyclicFunc_t)(_f))
|
||||
#define msecOneShot(_a, _t, _f) setOneShot((_a), MSEC2TICK(_t), (_f))
|
||||
#define msecCyclic(_a, _t, _f) setCyclic((_a), MSEC2TICK(_t), (_f))
|
||||
#define secOneShot(_a, _t, _f) setOneShot((_a), SEC2TICK(_t), (_f))
|
||||
#define secCyclic(_a, _t, _f) setCyclic((_a), SEC2TICK(_t), (_f))
|
||||
|
||||
#define INIT_ONESHOT(_s) (NULLIFY( &(_s).link))
|
||||
#define ONESHOT_SET(_s) (QMEMBER( &(_s).link))
|
||||
|
||||
@@ -63,8 +63,8 @@ typedef struct BioReq_s {
|
||||
#define AIO_FILL_PATTERN 0xdeadbeef
|
||||
|
||||
#if NSS_DEBUG IS_ENABLED
|
||||
# define AIO_FILL(_aio) \
|
||||
(zASSERT((sizeof(DefaultAsyncio_s) & (sizeof(LONG)-1)) == 0), \
|
||||
# define AIO_FILL(_aio) \
|
||||
(zASSERT((sizeof(DefaultAsyncio_s) & (sizeof(LONG)-1)) == 0), \
|
||||
zASSERT((_aio)->fsm.sp == &(_aio)->stack[1]), \
|
||||
LB_memlset((&(_aio)->status), \
|
||||
AIO_FILL_PATTERN, \
|
||||
@@ -97,7 +97,7 @@ typedef struct Asyncio_s
|
||||
BYTE align[3];
|
||||
AgentSignalFunc_t flush; /* routine to call when writting buffer */
|
||||
voidfunc_t action; /* callback when getting a buffer */
|
||||
BioReq_s bioReq;
|
||||
BioReq_s bioReq;
|
||||
} Asyncio_s;
|
||||
|
||||
#define INIT_AIO_BASIC(_asyncio) \
|
||||
@@ -172,7 +172,7 @@ typedef struct AioChunk_s
|
||||
struct NSSChunk_s *chunk;
|
||||
} AioChunk_s;
|
||||
|
||||
#define INIT_AIO_COMNRW(_asyncio, _data, _offset, _length) \
|
||||
#define INIT_AIO_COMNRW(_asyncio, _data, _offset, _length) \
|
||||
{ \
|
||||
(_asyncio)->comn.data = (_data); \
|
||||
(_asyncio)->comn.offset = (_offset); \
|
||||
@@ -185,9 +185,9 @@ typedef struct AioChunk_s
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
//typedef void (*AsyncCallBackFunc_t)(
|
||||
// ADDR callBackContext,
|
||||
// ADDR callBackContext,
|
||||
// STATUS completionCode,
|
||||
// NINT bytesRead,
|
||||
// NINT bytesRead,
|
||||
// PubBuffer_s *releaseBuffer);
|
||||
|
||||
typedef struct OpsAsyncRead_s
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1985, 1991, 1993, 1996-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 file compression algorithm ported to NSS
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: vandana $
|
||||
| $Date: 2005-08-10 01:03:51 +0530 (Wed, 10 Aug 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 1177 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| Module Description:
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef __CDUNCOMP_H__
|
||||
#define __CDUNCOMP_H__
|
||||
|
||||
#define UNCOMPRESS_READ_CACHE_BUFFER_RANGE 1
|
||||
#define UNCOMPRESS_WRITE_CACHE_BUFFER_RANGE 3
|
||||
|
||||
#define UNCOMPRESS_MAX_LENGTH_VALUE 0xFE
|
||||
|
||||
#define UNCOMPRESS_ERROR_OUT_OF_RAM 10001
|
||||
#define UNCOMPRESS_ERROR_READ_ZERO_BYTES 10002
|
||||
#define UNCOMPRESS_ERROR_READ_BEYOND_EOF 10003
|
||||
#define UNCOMPRESS_ERROR_ABORTED 10004
|
||||
#define UNCOMPRESS_ERROR_INVALID_DATA_COUNT 10005 /* tree count */
|
||||
#define UNCOMPRESS_ERROR_INVALID_LENGTH_COUNT 10006 /* tree count */
|
||||
#define UNCOMPRESS_ERROR_INVALID_OFFSET_COUNT 10007 /* tree count */
|
||||
#define UNCOMPRESS_ERROR_HOLE_COUNT_MISMATCH 10008
|
||||
#define UNCOMPRESS_ERROR_UNKNOWN_VERSION 10009
|
||||
#define UNCOMPRESS_ERROR_FILE_TOO_SMALL 10010
|
||||
#define UNCOMPRESS_ERROR_TREE_TOO_BIG 10011
|
||||
#define UNCOMPRESS_ERROR_INVALID_HOLES 10012
|
||||
#define UNCOMPRESS_ERROR_INVALID_OFFSET 10013
|
||||
#define UNCOMPRESS_ERROR_INVALID_LENGTH 10014
|
||||
#define UNCOMPRESS_ERROR_WRITE_BEYOND_EOF 10015
|
||||
#define UNCOMPRESS_ERROR_INVALID_HEADER 10016
|
||||
#define UNCOMPRESS_ERROR_CORRUPT_COMPRESSED_FILE 10017
|
||||
#define UNCOMPRESS_ERROR_TRY_AGAIN 10018 /* also defined in FILER2.C */
|
||||
#define UNCOMPRESS_ERROR_TRY_AGAIN_FOREVER 10019 /* also defined in FILER2.C */
|
||||
|
||||
/*#define UNCOMPRESS_ERROR_COUNT 15 DEFINED in CONFIG.H */
|
||||
|
||||
#define UNCOMPRESS_DOS_NAME_SIZE 16
|
||||
|
||||
typedef struct decompressHoleMark_s {
|
||||
|
||||
struct decompressHoleMark_s * next;
|
||||
LONG offset;
|
||||
LONG size;
|
||||
|
||||
} decompressHoleMark_t, *decompressHoleMark_tp, **decompressHoleMark_tpp;
|
||||
|
||||
typedef struct uncompressNode_s {
|
||||
|
||||
struct uncompressNode_s *left;
|
||||
struct uncompressNode_s *right;
|
||||
LONG value; /* Byte value */
|
||||
|
||||
} uncompressNode_t, *uncompressNode_tp, * *uncompressNode_tpp;
|
||||
|
||||
typedef struct uncompressData_s {
|
||||
|
||||
LONG BitBufferIndex;
|
||||
LONG BitBuffer;
|
||||
LONG *BitMapCurrentPointer;
|
||||
LONG *BitMapCurrentEnd;
|
||||
|
||||
IoHandle_t WriteHandle;
|
||||
LONG WriteFileSize;
|
||||
BYTE *WriteCurrentPointer;
|
||||
BYTE *WriteCurrentBufferBegin;
|
||||
|
||||
BYTE *WriteCurrentBufferEnd;
|
||||
LONG BytesInWriteCacheSoFar;
|
||||
LONG WriteCacheBufferCount;
|
||||
LONG WriteCacheNextBlockToGet;
|
||||
|
||||
BYTE *WriteCachePointers [ UNCOMPRESS_WRITE_CACHE_BUFFER_RANGE ];
|
||||
BYTE *WriteCacheBufferEnd [ UNCOMPRESS_WRITE_CACHE_BUFFER_RANGE ];
|
||||
LONG WriteCacheHandle [ UNCOMPRESS_WRITE_CACHE_BUFFER_RANGE ];
|
||||
LONG WriteCacheBlockNumber[ UNCOMPRESS_WRITE_CACHE_BUFFER_RANGE ];
|
||||
|
||||
uncompressNode_tp DataTree;
|
||||
uncompressNode_tp OffsetTree;
|
||||
uncompressNode_tp LengthTree;
|
||||
readCache_tp ReadCache;
|
||||
|
||||
compressFileHeader_tp Header;
|
||||
LONG ThreadExitNow;
|
||||
decompressHoleMark_tp HoleListHead;
|
||||
BYTE * WriteEOFPointer;
|
||||
|
||||
BYTE * WritePreviousBufferEnd;
|
||||
LONG WritePreviousBufferIndex;
|
||||
LONG CompressedFileSize;
|
||||
|
||||
BYTE DosName[ UNCOMPRESS_DOS_NAME_SIZE ];
|
||||
|
||||
LONG Volume;
|
||||
|
||||
DecompressStatusNode_t decompressStatus;
|
||||
|
||||
LONG beginHighTickCount;
|
||||
|
||||
} uncompressData_t, *uncompressData_tp, * *uncompressData_tpp;
|
||||
|
||||
#if 0
|
||||
typedef struct decompressWorkToDo_s {
|
||||
|
||||
struct WorkToDoStructure DWTD;
|
||||
uncompressData_tp ucp;
|
||||
|
||||
} decompressWorkToDo_t, *decompressWorkToDo_tp, **decompressWorkToDo_tpp;
|
||||
#endif
|
||||
|
||||
|
||||
LONG
|
||||
CCDStartDecompress(
|
||||
IoHandle_t inHandle,
|
||||
IoHandle_t outHandle,
|
||||
ADDR *decompressHandle,
|
||||
BYTE *dosName,
|
||||
LONG volume,
|
||||
LONG directoryNumber);
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
/****************************************************************************/
|
||||
35
include/nwnss/include/cifs.imp
Normal file
35
include/nwnss/include/cifs.imp
Normal file
@@ -0,0 +1,35 @@
|
||||
DCNCInitPdcGatherUsersGroupInfo
|
||||
DCNCPdcGatherUsersGroupStatus
|
||||
DCNCGetDomianName
|
||||
DCNCGetImportContext
|
||||
|
||||
CIFSProxyAwaitRequest
|
||||
CIFSProxyLoadNotify
|
||||
CIFSProxyUnloadNotify
|
||||
CIFSSignalAuthComplete
|
||||
CIFSCopySecblob
|
||||
CIFSNDSGetRID
|
||||
AUTHAllocInfo
|
||||
AUTHFreeInfo
|
||||
AUTHDoDomainAuth
|
||||
AUTHGetNLMAuthType
|
||||
|
||||
CIFS_AddDomainACL
|
||||
CIFS_AddShare
|
||||
CIFS_CreateDomain
|
||||
CIFS_DeleteDomain
|
||||
CIFS_GetDomainConfiguration
|
||||
CIFS_GetServerConfiguration
|
||||
CIFS_GetShareProperties
|
||||
CIFS_JoinDomain
|
||||
CIFS_LeaveDomain
|
||||
CIFS_ListDomainControllers
|
||||
CIFS_ListShares
|
||||
CIFS_ModifyShare
|
||||
CIFS_RemoveShare
|
||||
CIFS_SetDomainConfiguration
|
||||
CIFS_SetServerConfiguration
|
||||
|
||||
RegisterCIFSCallbackMonitor
|
||||
RegisterCIFSDomainAddOn
|
||||
UnRegisterCIFSDomainAddOn
|
||||
305
include/nwnss/include/cifsAuth.h
Normal file
305
include/nwnss/include/cifsAuth.h
Normal file
@@ -0,0 +1,305 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1995-2002 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| CIFS module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
/***************************************************************************
|
||||
*
|
||||
* Definitions exported by all the modules relating to authentication
|
||||
*
|
||||
**************************************************************************/
|
||||
#ifndef _CIFSAUTH_H_
|
||||
#define _CIFSAUTH_H_
|
||||
|
||||
#include <dconst.h>
|
||||
|
||||
#include "cifsStypes.h"
|
||||
#include "que.h"
|
||||
|
||||
#define RID_BLOCK_SIZE 1000
|
||||
#define RID_INCREMENT_SIZE 10
|
||||
|
||||
/* Define well-known Group RIDs */
|
||||
#define DOMAIN_ADMINS_RID 512
|
||||
#define DOMAIN_USERS_RID 513
|
||||
#define DOMAIN_GUESTS_RID 514
|
||||
|
||||
/* Well-known Unicode Group Names */
|
||||
#define GROUP_DOMAIN_ADMINS L"Domain Admins"
|
||||
#define GROUP_DOMAIN_USERS L"Domain Users"
|
||||
#define GROUP_DOMAIN_GUESTS L"Domain Guests"
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Login types used by CIFS
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef enum
|
||||
{
|
||||
guest,
|
||||
user,
|
||||
supervisor,
|
||||
undefined,
|
||||
nulluser
|
||||
} LoginType;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* authInfo_t structure definitions and values
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef enum authRequest_e
|
||||
{
|
||||
AUTHREQ_GETSECBLOB,
|
||||
AUTHREQ_AUTHENTICATE,
|
||||
AUTHREQ_CHANGE_PW,
|
||||
AUTHREQ_LOGOUT,
|
||||
AUTHREQ_GETNONCE,
|
||||
AUTHREQ_CHANGE_MACHINE_PW,
|
||||
AUTHREQ_GETSESKEY,
|
||||
AUTHREQ_GET_MACHINE_PW,
|
||||
AUTHREQ_SAM_LOGON,
|
||||
AUTHREQ_GETRID,
|
||||
AUTHREQ_GET_ACCOUNT_DN,
|
||||
AUTHREQ_GETNAME
|
||||
} authRequest_t;
|
||||
|
||||
typedef enum authResult_e
|
||||
{
|
||||
AUTHRES_UNDEFINED,
|
||||
AUTHRES_FAILURE,
|
||||
AUTHRES_INPROGRESS,
|
||||
AUTHRES_INVALID_OLD_PW,
|
||||
AUTHRES_INVALID_USER,
|
||||
AUTHRES_INVALID_NEW_PW,
|
||||
AUTHRES_SUCCESS
|
||||
} authResult_t;
|
||||
|
||||
typedef enum authType_e
|
||||
{
|
||||
AUTHTYPE_LOCAL,
|
||||
AUTHTYPE_DOMAIN,
|
||||
AUTHTYPE_NONE,
|
||||
AUTHTYPE_BRANCH
|
||||
} authType_t;
|
||||
|
||||
typedef enum authClient_e
|
||||
{
|
||||
AUTHCLIENT_SUCCESS,
|
||||
AUTHCLIENT_FAIL,
|
||||
AUTHCLIENT_NONE
|
||||
} authClient_t;
|
||||
|
||||
|
||||
#define PWDINFO_CHARMAX 64
|
||||
#define PWDINFO_BUFSIZE PWDINFO_CHARMAX * 2 /* 2 = sizeof(unicode_t) */
|
||||
|
||||
typedef struct pwdInfoTag_s
|
||||
{
|
||||
int clearTextPresent;
|
||||
BYTE clrTxtOldPwd[16];
|
||||
BYTE clrTxtNewPwd[16];
|
||||
BYTE ntnew [516];
|
||||
BYTE ntoldhash [16];
|
||||
BYTE lmnew [516];
|
||||
BYTE lmoldhash [16];
|
||||
BYTE account[PWDINFO_BUFSIZE]; /* could be char, could be unicode */
|
||||
int stringsAreUnicode;
|
||||
int cifsError;
|
||||
int ntHashPresent;
|
||||
} pwdInfoTag_s;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Parameters of a session
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef struct sesParamTag_s
|
||||
{
|
||||
unsigned short tid;
|
||||
unsigned short mid;
|
||||
unsigned short uid;
|
||||
} sesParamTag_s;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Substruct for authInfo, below. Used when request == AUTHREQ_GETNONCE.
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef struct nonceDataTag_s
|
||||
{
|
||||
int nonceLength;
|
||||
unsigned char nonce[ 8 ];
|
||||
int responseLength;
|
||||
unsigned char response[ 8 ];
|
||||
} nonceDataTag_s;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Substruct for authInfo, below. Used when request == AUTHREQ_GETSECBLOB.
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef struct secblobDataTag_s
|
||||
{
|
||||
int secblobLength;
|
||||
unsigned char secblob[ 8 ];
|
||||
} secblobDataTag_s;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Substruct for authInfo, below. Used when request == AUTHREQ_AUTHENTICATE.
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef struct authDataTag_s
|
||||
{
|
||||
/* input data */
|
||||
int pwLen;
|
||||
/* Note to absolute numbers, DB021100: we currently use different NDK
|
||||
* headers for the CIFS NLM and CIFS NMAS NLM's, and this causes the use of
|
||||
* literals to give us problems. During this (hopefully temporary)
|
||||
* situation, absolute numbers, ironically, assures all NLM's have the same
|
||||
* structure.
|
||||
*/
|
||||
char pw[32];
|
||||
char account[64];
|
||||
char domain[64];
|
||||
unicode_t unicodeAccount[64];
|
||||
unicode_t unicodeDomain[64];
|
||||
unicode_t uAccountDn[MAX_DN_CHARS];
|
||||
|
||||
#ifdef ADDRESS_RESTRICTIONS
|
||||
LONG ipAddress;
|
||||
#endif
|
||||
|
||||
/* output data */
|
||||
int nwdsContext;
|
||||
LONG nmasHandle;
|
||||
unsigned long nwStationNumber;
|
||||
int nwTaskID;
|
||||
LoginType loginType; /* guest | user */
|
||||
|
||||
|
||||
/* Internal bookkeeping */
|
||||
struct sesParamTag_s pdcSesParams; /* PDC session parameters and status
|
||||
* of most recent command to the
|
||||
* pdc when doing passthrough
|
||||
* authentication.
|
||||
*/
|
||||
} authDataTag_s;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Substruct for authInfo, below. Used when request == AUTHREQ_CHANGE_PW
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef struct pwChangeDataTag_s
|
||||
{
|
||||
/*flag to indicate presence/absence of MD4 password block */
|
||||
char md4Present;
|
||||
|
||||
/*flag to indicate presence/absence of clear text password */
|
||||
char clearTextPresent;
|
||||
|
||||
/*MD4 password block(next 2 strings):
|
||||
* Used only by 'samr'(SamrChangePasswordUser) request from WinNT/W2K
|
||||
* clients. When 'SamOemChangePassword' request is received from Win9X,
|
||||
* this block is filled with NULL.
|
||||
*/
|
||||
unsigned char encNewMd4Password[516];
|
||||
unsigned char encOldMd4Hash[16];
|
||||
|
||||
/*LM password block(next 2 strings):
|
||||
* Used by both Win9X and WinNT/W2K clients.
|
||||
* Win9X clients provide it in RAP request(SamOemChangePassword)
|
||||
* WinNT/W2K clients provide it in 'samr'(SamrChangePasswordUser)
|
||||
* request.
|
||||
*/
|
||||
unsigned char encNewLmPassword[516];
|
||||
unsigned char encOldLmHash[16];
|
||||
|
||||
|
||||
/*The following two clear text passwords are present only when 'clearTextPresent' flag is TRUE
|
||||
* These are used only while servicing password
|
||||
* change RAP request from a Win 9X client. The following two data elements
|
||||
* are not used while servicing password change request received on 'samr'
|
||||
* pipe(from Win NT/W2K clients).
|
||||
*/
|
||||
char ClearTextOldPassword[16];
|
||||
char ClearTextNewPassword[16];
|
||||
|
||||
/* The following two null terminated ASCII strings are returned by LSMCIFS login method
|
||||
* when the return status from LSMCIFS is AUTHRES_SUCCESS. These two passwords
|
||||
* are for the use of CIFSPROX to update the NDS password.
|
||||
*/
|
||||
char OldPwdFromLsm[128];
|
||||
char NewPwdFromLsm[128];
|
||||
} pwChangeDataTag_s;
|
||||
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* The data structure passed between the NMAS proxy and LSM
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef struct authInfoTag_s
|
||||
{
|
||||
/* Admin stuff */
|
||||
DQlink_t link;
|
||||
LONG authComplete;
|
||||
LONG pdcComplete;
|
||||
void *context;
|
||||
authType_t type; /* DOMAIN or LOCAL */
|
||||
authRequest_t request; /* GETSECBLOB or AUTHENTICATE */
|
||||
authResult_t status;
|
||||
authClient_t authClient;
|
||||
int nwError; /* NetWare error - needs translation */
|
||||
/* to CIFS for reply */
|
||||
unsigned long cifsError; /* CIFS error - use directly in */
|
||||
/* reply if available */
|
||||
unsigned char wtdBuf[64]; /* Leave this as a buffer rather than
|
||||
* an explicit zWorkProc_s structure,
|
||||
* because this is included by
|
||||
* cifsProx and it doesn't know about
|
||||
* zWorkProc_s structures. */
|
||||
|
||||
/* The data itself. Both secblob and auth data are included because */
|
||||
/* local login requires both in one request. */
|
||||
secblobDataTag_s secblobData;
|
||||
authDataTag_s authData;
|
||||
pwChangeDataTag_s pwChangeData;
|
||||
nonceDataTag_s nonceData;
|
||||
} authInfoTag_s;
|
||||
|
||||
|
||||
|
||||
typedef struct authContextTag_s
|
||||
{
|
||||
struct authContextTag_s *prev;
|
||||
struct authContextTag_s *next;
|
||||
unsigned long nwStationNumber;
|
||||
LONG ndsContext; /* Kept around for logout only */
|
||||
LONG nmasHandle; /* Kept around for logout only */
|
||||
int userHandle; /* Kept around for logout only */
|
||||
} authContextTag_s;
|
||||
|
||||
|
||||
#endif /* _CIFSAUTH_H_ */
|
||||
214
include/nwnss/include/cifsAuthp.h
Normal file
214
include/nwnss/include/cifsAuthp.h
Normal file
@@ -0,0 +1,214 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1995-2002 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| CIFS module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
/****************************************************************************
|
||||
* Definitions exported by the "AUTH" directory
|
||||
*****************************************************************************/
|
||||
#ifndef _CIFSAUTHP_H_
|
||||
#define _CIFSAUTHP_H_
|
||||
|
||||
#include "cifsAuth.h"
|
||||
|
||||
extern char *AUTHAccount(
|
||||
struct authInfoTag_s *info );
|
||||
|
||||
extern struct authInfoTag_s *AUTHAllocInfo(
|
||||
void *context,
|
||||
int stringsAreUnicode,
|
||||
char *account,
|
||||
int accountHasPad,
|
||||
int pwLen,
|
||||
char *pw,
|
||||
int pwMD4,
|
||||
char *domain,
|
||||
int domainHasPad,
|
||||
BYTE *secBlob,
|
||||
int secblobLength,
|
||||
LONG ipAddress);
|
||||
|
||||
extern struct authInfoTag_s *AUTHAllocInfoChgPwd(
|
||||
void *context,
|
||||
struct pwdInfoTag_s *pwdInfo );
|
||||
|
||||
extern struct authInfoTag_s *AUTHAllocInfoLogout(
|
||||
void *context,
|
||||
unsigned long nwStationNumber);
|
||||
|
||||
extern struct authInfoTag_s *AUTHAllocInfoSamLogon(
|
||||
void *context,
|
||||
unicode_t *uniAcctName,
|
||||
LONG acctNameLen,
|
||||
unicode_t *uniDomName,
|
||||
LONG domNameLen,
|
||||
BYTE *ntlmChal,
|
||||
BYTE *ntCred,
|
||||
BYTE *lmCred,
|
||||
LONG ntlmCredLen);
|
||||
|
||||
extern struct authInfoTag_s *AUTHAllocInfoSecblob(
|
||||
void *context );
|
||||
|
||||
extern authResult_t AUTHChangeMachinePassword(
|
||||
struct pwdInfoTag_s *pwdInfo);
|
||||
|
||||
extern authResult_t AUTHChangePassword(
|
||||
struct pwdInfoTag_s *pwdInfo,
|
||||
LONG *nwError);
|
||||
|
||||
extern char *AUTHDomain(
|
||||
struct authInfoTag_s *info );
|
||||
|
||||
extern void AUTHDomainRestart(
|
||||
LONG mode,
|
||||
BOOL isPDC );
|
||||
|
||||
extern void AUTHFreeInfo(
|
||||
struct authInfoTag_s *info );
|
||||
|
||||
extern authResult_t AUTHGetAccountDN(
|
||||
unicode_t *acctNameUni,
|
||||
unicode_t *acctDNUni );
|
||||
|
||||
extern authResult_t AUTHGetGroups(
|
||||
unicode_t *uniAcctName,
|
||||
unicode_t *uniAcctDN,
|
||||
LONG *numGroups,
|
||||
struct domainGroupInfoTag_s **groupList);
|
||||
|
||||
extern authType_t AUTHGetNLMAuthType( void );
|
||||
|
||||
extern authResult_t AUTHGetMachinePassword(
|
||||
struct pwdInfoTag_s *pwdInfo,
|
||||
BYTE *buffer,
|
||||
int bufLength );
|
||||
|
||||
extern authResult_t AUTHGetName(
|
||||
LONG rid,
|
||||
unicode_t *acctNameUni,
|
||||
LONG *type );
|
||||
|
||||
extern authResult_t AUTHGetRID(
|
||||
unicode_t *acctNameUni,
|
||||
LONG *rid,
|
||||
LONG *type );
|
||||
|
||||
extern authResult_t AUTHGetSecblob(
|
||||
BYTE *buffer,
|
||||
int bufLength );
|
||||
|
||||
extern authResult_t AUTHGetSeskey(
|
||||
BYTE *acctName,
|
||||
BYTE *buffer,
|
||||
int bufLength );
|
||||
|
||||
extern void AUTHInit( void );
|
||||
|
||||
extern void AUTHLogout(
|
||||
unsigned long nwStationNumber);
|
||||
|
||||
extern void AUTHPdcComplete(
|
||||
struct authInfoTag_s *info,
|
||||
authResult_t result,
|
||||
int nwError,
|
||||
LONG cifsError );
|
||||
|
||||
extern struct sesParamTag_s *AUTHPdcSesParams(
|
||||
struct authInfoTag_s *info );
|
||||
|
||||
extern WORD AUTHPdcSesUid(
|
||||
struct authInfoTag_s *info );
|
||||
|
||||
extern char *AUTHPw(
|
||||
struct authInfoTag_s *info );
|
||||
|
||||
extern int AUTHPwLen(
|
||||
struct authInfoTag_s *info );
|
||||
|
||||
extern authResult_t AUTHSamLogon(
|
||||
unicode_t *uniAcctName,
|
||||
LONG acctNameLen,
|
||||
unicode_t *uniDomName,
|
||||
LONG domNameLen,
|
||||
BYTE *ntlmChal,
|
||||
BYTE *ntCred,
|
||||
BYTE *lmCred,
|
||||
LONG ntlmCredLen,
|
||||
LONG *rid,
|
||||
LONG *numGroups,
|
||||
struct domainGroupInfoTag_s **groupList,
|
||||
LONG *nwError);
|
||||
|
||||
extern void AUTHSetRequest(
|
||||
struct authInfoTag_s *info,
|
||||
authRequest_t request);
|
||||
|
||||
extern unsigned char AUTHSetSecMode( void );
|
||||
|
||||
extern void AUTHSetType(
|
||||
struct authInfoTag_s *info,
|
||||
authType_t type );
|
||||
|
||||
extern void AUTHShutdown( void );
|
||||
|
||||
extern authResult_t AUTHStart(
|
||||
struct authInfoTag_s *info );
|
||||
|
||||
extern struct authInfoTag_s *CIFSProxyDequeueRequest( void );
|
||||
|
||||
extern void CIFSProxyEnqueueRequest(
|
||||
struct authInfoTag_s *element );
|
||||
|
||||
|
||||
/*
|
||||
* Functions called by the NMAS PROXY
|
||||
*/
|
||||
|
||||
extern authResult_t CIFSCopySecblob(
|
||||
char *buffer,
|
||||
int bufLength );
|
||||
|
||||
extern STATUS CIFSNDSGetRID(
|
||||
unicode_t *userUDN,
|
||||
LONG *rid,
|
||||
LONG *type);
|
||||
|
||||
extern authInfoTag_s *CIFSProxyAwaitRequest( void );
|
||||
|
||||
extern void CIFSProxyLoadNotify( void );
|
||||
|
||||
extern void CIFSProxyUnloadNotify( void );
|
||||
|
||||
extern void CIFSSignalAuthComplete(
|
||||
authInfoTag_s *authInfo );
|
||||
|
||||
#endif /* _CIFSAUTHP_H_ */
|
||||
498
include/nwnss/include/cifsManage.h
Normal file
498
include/nwnss/include/cifsManage.h
Normal file
@@ -0,0 +1,498 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1995-2002 Novell, Inc.
|
||||
| All Rights Reserved.
|
||||
|
|
||||
| This program is an unpublished copyrighted work which is proprietary
|
||||
| to Novell, Inc. and contains confidential information that is not
|
||||
| to be reproduced or disclosed to any other person or entity without
|
||||
| prior written consent from Novell, Inc. in each and every instance.
|
||||
|
|
||||
| WARNING: Unauthorized reproduction of this program as well as
|
||||
| unauthorized preparation of derivative works based upon the
|
||||
| program or distribution of copies by sale, rental, lease or
|
||||
| lending are violations of federal copyright laws and state trade
|
||||
| secret laws, punishable by civil and criminal penalties.
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| CIFS module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: dpary $
|
||||
| $Modtime: 13 Feb 2006 13:14:44 $
|
||||
|
|
||||
| $Workfile: cifsManage.h $
|
||||
| $Revision: 2437 $
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
/***************************************************************************
|
||||
*
|
||||
* cifsManage.h
|
||||
*
|
||||
* Functions used for managing CIFS via XML commands
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef _CIFSMANAGE_H_
|
||||
#define _CIFSMANAGE_H_
|
||||
|
||||
#include "cifsStypes.h"
|
||||
#include <dconst.h>
|
||||
#include "xUnicode.h"
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
//#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Since we communicate with utf8, the strings need to be bigger than they
|
||||
* might need to be in unicode. A single unicode character can require as
|
||||
* many as three bytes in utf8.
|
||||
*/
|
||||
#define UTF8_FACTOR 3
|
||||
|
||||
/* This structure is used to return info about a share point */
|
||||
typedef struct CifsShareInfo_s
|
||||
{
|
||||
utf8_t shareName[MAX_CIFS_SHARE_NAME * UTF8_FACTOR];
|
||||
utf8_t sharePath[zMAX_FULL_NAME * UTF8_FACTOR];
|
||||
utf8_t shareComment[MAX_CIFS_COMMENT * UTF8_FACTOR];
|
||||
} CifsShareInfo_s;
|
||||
|
||||
|
||||
typedef struct ContextInfoList_s
|
||||
{
|
||||
u_int32_t numofContext;
|
||||
utf8_t **ContextListBuf;
|
||||
}ContextInfoList_s;
|
||||
|
||||
/* Values for modifyMask on CIFS_ModifyShare */
|
||||
#define CIFS_MOD_SHARE_NAME 0x00000001
|
||||
#define CIFS_MOD_SHARE_PATH 0x00000002
|
||||
#define CIFS_MOD_SHARE_COMMENT 0x00000004
|
||||
|
||||
|
||||
/* This structure is used to return info about a server's configuration */
|
||||
typedef struct CifsServerInfo_s
|
||||
{
|
||||
utf8_t serverName[MAX_CIFS_SERVER_NAME * UTF8_FACTOR];
|
||||
utf8_t serverComment[MAX_CIFS_COMMENT * UTF8_FACTOR];
|
||||
utf8_t groupName[MAX_CIFS_WORKGROUP_NAME * UTF8_FACTOR]; /* Workgroup or Domain name */
|
||||
|
||||
LONG numAttachIPAddresses;
|
||||
LONG attachIPAddress[6];
|
||||
|
||||
u_int32_t isOnlineServer;
|
||||
u_int32_t isVirtualServer;
|
||||
|
||||
/* Fields from here down are not filled in if this is a virtual server */
|
||||
LONG authMode;
|
||||
LONG winsIPAddress;
|
||||
LONG pdcIPAddress;
|
||||
utf8_t pdcName[MAX_CIFS_PDC_NAME * UTF8_FACTOR];
|
||||
|
||||
u_int32_t oplocksEnabled;
|
||||
u_int32_t dfsEnabled;
|
||||
u_int32_t shareVolsByDefaultEnabled;
|
||||
u_int32_t pdcEnabled;
|
||||
|
||||
utf8_t domainDN[(MAX_DN_CHARS+2) * UTF8_FACTOR];
|
||||
LONG beginRID;
|
||||
LONG endRID;
|
||||
LONG signatureMode;
|
||||
} CifsServerInfo_s;
|
||||
|
||||
/* Values for CifsServerInfo_s.authentication Mode */
|
||||
#define CIFS_AUTH_MODE_DOMAIN_PASSTHRU 0
|
||||
#define CIFS_AUTH_MODE_LOCAL 1
|
||||
#define CIFS_AUTH_MODE_UNKNOWN 2
|
||||
#define CIFS_AUTH_MODE_BRANCH_OFFICE 3
|
||||
#define CIFS_AUTH_MODE_DOMAIN_CONTROLLER 4
|
||||
#define CIFS_AUTH_MODE_DOMAIN_MEMBER 5
|
||||
|
||||
/* Values for modifyMask on CIFS_SetServerConfiguration */
|
||||
#define CIFS_MOD_SERVER_NAME 0x00000001
|
||||
#define CIFS_MOD_SERVER_COMMENT 0x00000002
|
||||
#define CIFS_MOD_GROUP_NAME 0x00000004
|
||||
#define CIFS_MOD_ATTACH_IP 0x00000008
|
||||
#define CIFS_MOD_AUTH_MODE 0x00000010
|
||||
#define CIFS_MOD_WINS_IP 0x00000020
|
||||
#define CIFS_MOD_PDC_IP 0x00000040
|
||||
#define CIFS_MOD_PDC_NAME 0x00000080
|
||||
#define CIFS_MOD_OPLOCKS_ENABLED 0x00000100
|
||||
#define CIFS_MOD_DFS_ENABLED 0x00000200
|
||||
#define CIFS_MOD_SHARE_VOLS_BY_DEFAULT 0x00000400
|
||||
#define CIFS_MOD_PDC_ENABLED 0x00000800
|
||||
#define CIFS_MOD_BEGIN_RID 0x00001000
|
||||
#define CIFS_MOD_END_RID 0x00002000
|
||||
#define CIFS_MOD_SIGNATURES 0x00004000
|
||||
|
||||
|
||||
/* Values for modifyMask on CIFS_SetDomainConfiguration */
|
||||
/* These first values can be modified by the system administrator */
|
||||
#define CIFS_MOD_DOMAIN_COMMENT 0x00000001
|
||||
#define CIFS_MOD_PDC_DN 0x00000002
|
||||
/* These remaining values can only be modified by internal code */
|
||||
#define CIFS_MOD_DOMAIN_NAME 0x00000004
|
||||
#define CIFS_MOD_GROUP_DN 0x00000008
|
||||
#define CIFS_MOD_DOMAIN_SID 0x00000010
|
||||
#define CIFS_MOD_NEXT_RID 0x00000020
|
||||
#define CIFS_MOD_EPOCH 0x00000040
|
||||
|
||||
/* Values for CifsServerInfo_s.signature Mode */
|
||||
#define CIFS_NLM_SIGN_DISABLED 0
|
||||
#define CIFS_NLM_SIGN_OPTIONAL 1
|
||||
#define CIFS_NLM_SIGN_MANDATORY 2
|
||||
|
||||
/* This structure is used to return info about a domains's configuration */
|
||||
typedef struct CifsDomainInfo_s
|
||||
{
|
||||
utf8_t domainName[MAX_CIFS_WORKGROUP_NAME * UTF8_FACTOR];
|
||||
utf8_t domainComment[MAX_CIFS_COMMENT * UTF8_FACTOR];
|
||||
utf8_t pdcDN[(MAX_DN_CHARS+2) * UTF8_FACTOR];
|
||||
utf8_t groupDN[(MAX_DN_CHARS+2) * UTF8_FACTOR];
|
||||
|
||||
BYTE domainSID[DOMAIN_SID_LEN];
|
||||
LONG nextRID;
|
||||
LONG epoch;
|
||||
|
||||
} CifsDomainInfo_s;
|
||||
|
||||
/* An array of these structures is used to return a list of domain controllers
|
||||
* for a domain
|
||||
*/
|
||||
typedef struct CifsDomainList_s
|
||||
{
|
||||
utf8_t serverDN[(MAX_DN_CHARS+2) * UTF8_FACTOR];
|
||||
} CifsDomainList_s;
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
|
||||
extern STATUS CIFS_Utf8ToByte(
|
||||
char *byteOutput,
|
||||
NINT outputBufLen, /* Length in bytes */
|
||||
unicode_t *tempUniBuf,
|
||||
NINT tempUniBufLen, /* Length in bytes */
|
||||
utf8_t *utf8Input,
|
||||
NINT *retActualLength); /* Length in bytes */
|
||||
|
||||
extern STATUS CIFS_ByteToUtf8(
|
||||
utf8_t *utf8Output,
|
||||
NINT outputBufLen, /* Length in bytes */
|
||||
unicode_t *tempUniBuf,
|
||||
NINT tempUniBufLen, /* Length in unicode characters */
|
||||
char *byteInput,
|
||||
NINT *retActualLength); /* Length in bytes */
|
||||
|
||||
extern STATUS CIFS_AddDomainACL(
|
||||
utf8_t *domainDN,
|
||||
utf8_t *aclContextDN,
|
||||
utf8_t *userDN,
|
||||
utf8_t *password,
|
||||
BYTE *unp,
|
||||
NINT unpLen);
|
||||
|
||||
extern STATUS CIFS_AddShare(
|
||||
utf8_t *shareName,
|
||||
utf8_t *serverDN, /* Optional - default is phys server */
|
||||
utf8_t *serverTree, /* Optional - default is phys tree */
|
||||
utf8_t *shareVolumeNameAndPath,
|
||||
utf8_t *shareComment);
|
||||
|
||||
extern STATUS CIFS_CreateDomain(
|
||||
utf8_t *domainName,
|
||||
utf8_t *serverDN, /* Optional - default is phys server */
|
||||
utf8_t *domainContext,
|
||||
utf8_t *domainComment,
|
||||
utf8_t *userDN,
|
||||
utf8_t *password,
|
||||
BYTE *unp,
|
||||
NINT unpLen);
|
||||
|
||||
extern STATUS CIFS_DeleteDomain(
|
||||
utf8_t *serverDN, /* Optional - default is phys server */
|
||||
utf8_t *domainDN,
|
||||
utf8_t *userDN,
|
||||
utf8_t *password,
|
||||
BYTE *unp,
|
||||
NINT unpLen);
|
||||
|
||||
extern STATUS CIFS_GetDomainConfiguration(
|
||||
utf8_t *domainDN,
|
||||
utf8_t *userDN,
|
||||
utf8_t *password,
|
||||
BYTE *unp,
|
||||
NINT unpLen,
|
||||
CifsDomainInfo_s *domainInfo);
|
||||
|
||||
extern STATUS CIFS_GetServerConfiguration(
|
||||
utf8_t *serverDN,
|
||||
utf8_t *serverTree,
|
||||
CifsServerInfo_s *serverInfo);
|
||||
|
||||
extern STATUS CIFS_GetShareProperties(
|
||||
utf8_t *shareName,
|
||||
utf8_t *serverDN, /* Optional - default is phys server */
|
||||
utf8_t *serverTree, /* Optional - default is phys tree */
|
||||
CifsShareInfo_s *shareInfo);
|
||||
|
||||
extern STATUS CIFS_JoinDomain(
|
||||
utf8_t *serverDN, /* Optional - default is phys server */
|
||||
utf8_t *domainDN,
|
||||
NINT authMode,
|
||||
utf8_t *userDN,
|
||||
utf8_t *password,
|
||||
BYTE *unp,
|
||||
NINT unpLen);
|
||||
|
||||
extern STATUS CIFS_LeaveDomain(
|
||||
utf8_t *serverDN, /* Optional - default is phys server */
|
||||
utf8_t *domainDN,
|
||||
utf8_t *userDN,
|
||||
utf8_t *password,
|
||||
BYTE *unp,
|
||||
NINT unpLen);
|
||||
|
||||
extern STATUS CIFS_ListDomainControllers(
|
||||
utf8_t *domainDN,
|
||||
utf8_t *userDN,
|
||||
utf8_t *password,
|
||||
BYTE *unp,
|
||||
NINT unpLen,
|
||||
NINT startControllerIdx,
|
||||
NINT numControllers,
|
||||
CifsDomainList_s *dcList,
|
||||
NINT *retNumControllers);
|
||||
|
||||
extern STATUS CIFS_ListShares(
|
||||
utf8_t *serverDN,
|
||||
utf8_t *serverTree,
|
||||
NINT startShareIdx,
|
||||
NINT numShares,
|
||||
CifsShareInfo_s *shareInfo, /* bufSize = (numShares * sizeof CifsShareInfo_s) */
|
||||
NINT *retNumShares);
|
||||
|
||||
extern STATUS CIFS_ModifyShare(
|
||||
utf8_t *shareName,
|
||||
utf8_t *serverDN, /* Optional - default is phys server */
|
||||
utf8_t *serverTree, /* Optional - default is phys tree */
|
||||
NINT modifyMask,
|
||||
CifsShareInfo_s *newShareInfo);
|
||||
|
||||
extern STATUS CIFS_RemoveShare(
|
||||
utf8_t *shareName,
|
||||
utf8_t *serverDN, /* Optional - default is phys server */
|
||||
utf8_t *serverTree); /* Optional - default is phys tree */
|
||||
|
||||
extern STATUS CIFS_SetDomainConfiguration(
|
||||
utf8_t *domainDN,
|
||||
NINT modifyMask,
|
||||
utf8_t *userDN,
|
||||
utf8_t *password,
|
||||
BYTE *unp,
|
||||
NINT unpLen,
|
||||
CifsDomainInfo_s *domainInfo);
|
||||
|
||||
extern STATUS CIFS_SetServerConfiguration(
|
||||
utf8_t *serverDN,
|
||||
utf8_t *serverTree,
|
||||
NINT modifyMask,
|
||||
CifsServerInfo_s *serverInfo);
|
||||
|
||||
/*****************************************************************************************************************************
|
||||
* Change for the Unix domain Support *
|
||||
******************************************************************************************************************************/
|
||||
|
||||
|
||||
/* Function Ids for iManager */
|
||||
# define Fid_CIFS_AddDomainACL 0
|
||||
# define Fid_CIFS_AddShare 1
|
||||
# define Fid_CIFS_CreateDomain 2
|
||||
# define Fid_CIFS_DeleteDomain 3
|
||||
# define Fid_CIFS_GetDomainConfiguration 4
|
||||
# define Fid_CIFS_GetServerConfiguration 5
|
||||
# define Fid_CIFS_GetShareProperties 6
|
||||
# define Fid_CIFS_JoinDomain 7
|
||||
# define Fid_CIFS_LeaveDomain 8
|
||||
# define Fid_CIFS_ListDomainControllers 9
|
||||
# define Fid_CIFS_ListShares 10
|
||||
# define Fid_CIFS_ModifyShare 11
|
||||
# define Fid_CIFS_RemoveShare 12
|
||||
# define Fid_CIFS_SetDomainConfiguration 13
|
||||
# define Fid_CIFS_ListContexts 14
|
||||
# define Fid_CIFS_AddContext 15
|
||||
# define Fid_CIFS_RemoveContext 16
|
||||
# define Fid_CIFS_SetServerConfiguration 17
|
||||
# define End_of_iManager_Fid Fid_CIFS_SetServerConfiguration
|
||||
|
||||
|
||||
/* Error Codes for the Response of the CIFS server*/
|
||||
|
||||
# define E_SHARE_ALREADY_EXIST 1
|
||||
# define E_SHARE_NOT_EXIST 2
|
||||
# define E_EDIRECTORY_FAILURE 3
|
||||
# define E_SERVER_NOT_REACHABLE 4
|
||||
# define E_NO_DUMP_DATA 5
|
||||
# define E_REQUIRED_SHARE_POINT_NOT_EXISTS 6
|
||||
# define E_GIVEN_INPUT_NOT_PROPER 7
|
||||
# define E_INSERT_DATA_TO_PKT_FAIL 8
|
||||
# define E_OPERPARM__NOT_EXISTS 9
|
||||
# define E_REMOVING_SHARE_FAIL 10
|
||||
# define E_ADDING_SHARE_FAIL 11
|
||||
# define E_CONN_COUNT_RETRIEVAL_FAIL 12
|
||||
# define E_SHARE_EMPTY 13
|
||||
|
||||
# define NUMBER_OF_ERR_CODES E_SHARE_EMPTY
|
||||
|
||||
#define CMD_SUCCESS 0
|
||||
|
||||
#define ENABLE_DEBUG 1
|
||||
#define DISABLE_DEBUG 0
|
||||
|
||||
/* This structure will contain all the given parameters of the iManager. */
|
||||
|
||||
typedef struct CifsiManagerData
|
||||
{
|
||||
unsigned char cid;
|
||||
unsigned char fid;
|
||||
utf8_t *serverDN;
|
||||
utf8_t *serverTree;
|
||||
CifsServerInfo_s *serverInfo;
|
||||
int modifyMask;
|
||||
NINT startShareIdx;
|
||||
NINT numShares;
|
||||
CifsShareInfo_s *shareInfo;
|
||||
utf8_t *context;
|
||||
struct ContextInfoList_s *contextInfo;
|
||||
NINT retnumShares;
|
||||
utf8_t *shareNameUtf8;
|
||||
utf8_t *shareVolumeNameAndPathUtf8;
|
||||
utf8_t *shareCommentUtf8;
|
||||
|
||||
}CifsiManagerData;
|
||||
|
||||
|
||||
|
||||
#define CLI_COMPONENT 0
|
||||
#define IMANAGER_COMPONENT 1
|
||||
|
||||
/* All fields length of Request and response packet are defined here */
|
||||
#define REQ_PACKET_HDR_LENGTH (sizeof(CifsReqPktHDR_t))
|
||||
#define RESP_PACKET_HDR_LENGTH (sizeof(CifsRespPktHDR_t))
|
||||
#define INITIAL_REQ_PACKET_SIZE 1024
|
||||
#define INITIAL_RESP_PACKET_SIZE 1024
|
||||
|
||||
|
||||
#define INVALID_NO_OF_DATA 0xff
|
||||
#define INVALID_CONN_COUNT -1
|
||||
|
||||
/* Type field of the request and response packet will be filled by
|
||||
this macros */
|
||||
#define TYPE_SHARE_NAME 1
|
||||
#define TYPE_SHARE_PATH 2
|
||||
#define TYPE_CONN_LIMIT 3
|
||||
#define TYPE_COMMENT 4
|
||||
#define TYPE_SMB_STATUS 5
|
||||
#define TYPE_SHARE_DETAIL 6
|
||||
#define TYPE_OPER_PARAM_DETAIL 7
|
||||
#define TYPE_ACTV_CONN_COUNT 8
|
||||
#define TYPE_SERVER_NAME 9
|
||||
#define TYPE_ENABLE_DEBUG_STATUS 10
|
||||
|
||||
#define TYPE_SERVER_DN 20
|
||||
#define TYPE_SERVER_TREE 21
|
||||
#define TYPE_CIFSSERVER_INFO 22
|
||||
#define TYPE_MODIFY_MASK 23
|
||||
#define TYPE_STARTSHAREIDX 24
|
||||
#define TYPE_NUMSHARES 25
|
||||
#define TYPE_CIFSSHARE_INFO 26
|
||||
#define TYPE_RETNUMSHARES 27
|
||||
#define TYPE_ENABLE_INFO_STATUS 28
|
||||
#define TYPE_CONTEXT 29
|
||||
|
||||
typedef struct CifsReqPktHDR
|
||||
{
|
||||
unsigned char cid;
|
||||
unsigned char fid;
|
||||
unsigned char no_of_data;
|
||||
unsigned int totdata_len;
|
||||
}CifsReqPktHDR_t;
|
||||
|
||||
/*typedef struct CifsReqPktFormat
|
||||
{
|
||||
CifsReqPktHDR_t hdr;
|
||||
void *reqdata;
|
||||
}CifsReqPktFormat_t;*/
|
||||
typedef struct DataHDR
|
||||
{
|
||||
unsigned char type;
|
||||
unsigned int len;
|
||||
}DataHDR_t;
|
||||
typedef struct DataFormat
|
||||
{
|
||||
DataHDR_t hdr;
|
||||
void *databuf;
|
||||
}DataFormat_t;
|
||||
|
||||
typedef struct CifsRespPktHDR
|
||||
{
|
||||
STATUS status;
|
||||
unsigned char no_of_data;
|
||||
unsigned int totdata_len;
|
||||
}CifsRespPktHDR_t;
|
||||
|
||||
/*typedef struct CifsRespPktFormat
|
||||
{
|
||||
CifsRespPktHDR_t hdr;
|
||||
void *respdata;
|
||||
}CifsRespPktFormat_t;*/
|
||||
|
||||
typedef struct PacketStruct
|
||||
{
|
||||
char *buf;
|
||||
unsigned int length;
|
||||
char *currptr;
|
||||
}PacketStruct_t;
|
||||
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned short int uint16;
|
||||
|
||||
|
||||
/* Alll defined functions in cifspktstruct.c are prototyped here */
|
||||
|
||||
PacketStruct_t *ReqPktInsertComponentID(uint8 cid);
|
||||
PacketStruct_t *ReqPktInsertFunctionID(PacketStruct_t *pktbuf, uint8 fid);
|
||||
PacketStruct_t *ReqPktInsertData(PacketStruct_t *pktbuf, uint8 type, unsigned int length, void *data);
|
||||
PacketStruct_t *ReqPktSetNumberOfData(PacketStruct_t *pktbuf, uint8 no_of_data);
|
||||
PacketStruct_t *RespPktSetNumberOfData(PacketStruct_t *pktbuf, uint8 no_of_data);
|
||||
unsigned char ReqPktGetNumberOfData(PacketStruct_t *pktbuf);
|
||||
void *RespPktGetNextData(PacketStruct_t *respPkt, unsigned int *length, unsigned char *type);
|
||||
void *RespPktGetFirstData(PacketStruct_t *respPkt, unsigned int *length, unsigned char *type);
|
||||
void *ReqPktGetFirstData(PacketStruct_t *reqPkt, unsigned int *length, unsigned char *type);
|
||||
void *ReqPktGetNextData(PacketStruct_t *reqPkt, unsigned int *length, unsigned char *type);
|
||||
|
||||
unsigned char RespPktGetNumberOfData(PacketStruct_t *pktbuf);
|
||||
PacketStruct_t *RespPktInsertStatus(uint8 status);
|
||||
PacketStruct_t *RespPktInsertData(PacketStruct_t *pktbuf, uint8 type, unsigned int length, void *data);
|
||||
void DispPacketStruct(PacketStruct_t *pktbuf);
|
||||
unsigned char ReqPktGetComponentID(PacketStruct_t *pktbuf);
|
||||
unsigned char ReqPktGetFunctionID(PacketStruct_t *pktbuf);
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _CIFSMANAGE_H_ */
|
||||
95
include/nwnss/include/cifsMemChunk.h
Normal file
95
include/nwnss/include/cifsMemChunk.h
Normal file
@@ -0,0 +1,95 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1995-2002 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| CIFS module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
/***************************************************************************
|
||||
*
|
||||
* Definitions of the genobj data structure, which is a header that is
|
||||
* present in many of the CIFS NLM data structures.
|
||||
*
|
||||
* Also definitions for the memory chunks from which these objects are
|
||||
* allocated.
|
||||
*
|
||||
* NOTE: Annoying problem- Requires stypes.h to be present ahead of
|
||||
* its include.
|
||||
*
|
||||
**************************************************************************/
|
||||
#ifndef _CIFSMEMCHUNK_H_
|
||||
#define _CIFSMEMCHUNK_H_
|
||||
|
||||
#include "cifsStypes.h"
|
||||
#include "que.h"
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* genObj definitions
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef enum genObjStateTag
|
||||
{
|
||||
genObjFree,
|
||||
genObjAlloc,
|
||||
genObjShutdown
|
||||
} GenObjState_t;
|
||||
|
||||
#pragma pack (push, 4)
|
||||
typedef struct GenObjectTag_s
|
||||
{
|
||||
DQlink_t link;
|
||||
int myIndex;
|
||||
struct genChunkHeadTag_s *head;
|
||||
int allocCount;
|
||||
int incarnation; /* updated at alloc and free to inform wtd's */
|
||||
/* waking after the data structure is freed that */
|
||||
/* they should not complete their operation. */
|
||||
int referenceCount;
|
||||
GenObjState_t state;
|
||||
BYTE *data;
|
||||
} GenObjectTag_s;
|
||||
#pragma pack (pop)
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* chunk definitions
|
||||
*---------------------------------------------------------------------------*/
|
||||
#pragma pack (push, 4)
|
||||
typedef struct genChunkHeadTag_s
|
||||
{
|
||||
char name[20];
|
||||
void *objCache;
|
||||
void **index2ObjectTable;
|
||||
int *freeIndexTable;
|
||||
int retrievalIndex; /*Index to freeIndexTable for retrieval of free Index */
|
||||
int returnIndex; /*Index to freeIndexTable for returning free Index */
|
||||
int genObjSize;
|
||||
} genChunkHeadTag_s;
|
||||
#pragma pack (pop)
|
||||
|
||||
#endif /* _CIFSMEMCHUNK_H_ */
|
||||
|
||||
157
include/nwnss/include/cifsPdc.h
Normal file
157
include/nwnss/include/cifsPdc.h
Normal file
@@ -0,0 +1,157 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
/*
|
||||
|
||||
NOTE: This is code cut straight from Samba source code. The only
|
||||
modifications made were debug macros.
|
||||
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
Copyright (C) Andrew Tridgell 1998
|
||||
Copyright (C) Jeremy Allison 1999.
|
||||
|
||||
HMAC MD5 code for use in NTLMv2
|
||||
|
||||
Copyright (C) Luke Kenneth Casson Leighton 1996-2000
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
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, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "ctype.h"
|
||||
#include "string.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#define uchar unsigned char
|
||||
|
||||
/* get single value from an SMB buffer */
|
||||
#define SVAL(buf,pos) (*(const WORD *)((const char *)(buf) + (pos)))
|
||||
#define SVAL_NC(buf,pos) (*(WORD *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
#define IVAL(buf,pos) (*(const LONG *)((const char *)(buf) + (pos)))
|
||||
#define IVAL_NC(buf,pos) (*(LONG *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
#define SVALS(buf,pos) (*(const short *)((const char *)(buf) + (pos)))
|
||||
#define SVALS_NC(buf,pos) (*(short *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
#define IVALS(buf,pos) (*(const long *)((const char *)(buf) + (pos)))
|
||||
#define IVALS_NC(buf,pos) (*(long *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
|
||||
/* store single value in an SMB buffer */
|
||||
#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((WORD)(val))
|
||||
#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((LONG)(val))
|
||||
#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((short)(val))
|
||||
#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((long)(val))
|
||||
|
||||
/* now the reverse routines - these are used in nmb packets (mostly) */
|
||||
#define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
|
||||
#define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16)))
|
||||
|
||||
#define RSVAL(buf,pos) SREV(SVAL(buf,pos))
|
||||
#define RSVALS(buf,pos) SREV(SVALS(buf,pos))
|
||||
#define RIVAL(buf,pos) IREV(IVAL(buf,pos))
|
||||
#define RIVALS(buf,pos) IREV(IVALS(buf,pos))
|
||||
#define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val))
|
||||
#define RSSVALS(buf,pos,val) SSVALS(buf,pos,SREV(val))
|
||||
#define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val))
|
||||
#define RSIVALS(buf,pos,val) SIVALS(buf,pos,IREV(val))
|
||||
|
||||
#ifndef MIN
|
||||
/* A macro to return the minimum of two values */
|
||||
#define MIN( a, b ) ((a) <= (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct msrpcSecChanVerify_s
|
||||
{
|
||||
BYTE sig[8]; /* 77 00 7a 00 ff ff 00 00 */
|
||||
BYTE seq_num[8]; /* verifier, seq num */
|
||||
BYTE packet_digest[8]; /* checksum over the packet, MD5'ed with session key */
|
||||
BYTE data8[8]; /* random 8-byte nonce */
|
||||
} msrpcSecChanVerify_s;
|
||||
|
||||
enum netsec_direction
|
||||
{
|
||||
SENDER_IS_INITIATOR,
|
||||
SENDER_IS_ACCEPTOR
|
||||
};
|
||||
|
||||
/* Internal Flags to indicate what type of authentication on the pipe */
|
||||
#define AUTH_PIPE_SIGN 0x0001
|
||||
#define AUTH_PIPE_SEAL 0x0002
|
||||
#define AUTH_PIPE_NTLMSSP 0x0004
|
||||
#define AUTH_PIPE_NETSEC 0x0008
|
||||
|
||||
typedef struct rpcString_s
|
||||
{
|
||||
LONG maxCount;
|
||||
LONG offset;
|
||||
LONG actualCount;
|
||||
} rpcString_s;
|
||||
|
||||
|
||||
#define FSTRING_LEN 256
|
||||
typedef char fstring[FSTRING_LEN];
|
||||
|
||||
/* 32 bit time (sec) since 01jan1970 - cifs6.txt, section 3.5, page 30 */
|
||||
typedef struct time_info
|
||||
{
|
||||
LONG time;
|
||||
} UTIME;
|
||||
|
||||
/* DOM_CHAL - challenge info */
|
||||
typedef struct chal_info
|
||||
{
|
||||
BYTE data[8]; /* credentials */
|
||||
} DOM_CHAL;
|
||||
|
||||
/* DOM_CREDs - timestamped client or server credentials */
|
||||
typedef struct cred_info
|
||||
{
|
||||
DOM_CHAL challenge; /* credentials */
|
||||
UTIME timestamp; /* credential time-stamp */
|
||||
} DOM_CRED;
|
||||
|
||||
/* Domain controller authentication protocol info */
|
||||
struct dcinfo
|
||||
{
|
||||
DOM_CHAL clnt_chal; /* Initial challenge received from client */
|
||||
DOM_CHAL srv_chal; /* Initial server challenge */
|
||||
DOM_CRED clnt_cred; /* Last client credential */
|
||||
DOM_CRED srv_cred; /* Last server credential */
|
||||
|
||||
BYTE sess_key[8]; /* Session key */
|
||||
BYTE md4pw[16]; /* md4(machine password) */
|
||||
|
||||
fstring mach_acct; /* Machine name we've authenticated. */
|
||||
|
||||
fstring remote_machine; /* Machine name we've authenticated. */
|
||||
|
||||
BOOL challenge_sent;
|
||||
BOOL got_session_key;
|
||||
BOOL authenticated;
|
||||
|
||||
};
|
||||
|
||||
struct netsec_auth_struct
|
||||
{
|
||||
BYTE sess_key[16];
|
||||
LONG seq_num;
|
||||
};
|
||||
|
||||
109
include/nwnss/include/cifsPdcp.h
Normal file
109
include/nwnss/include/cifsPdcp.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1995-2004 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| CIFS module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
/****************************************************************************
|
||||
* Exports for use by CIFS PDC/Domain add-on modules
|
||||
*****************************************************************************/
|
||||
#ifndef _CIFSPDCP_H_
|
||||
#define _CIFSPDCP_H_
|
||||
|
||||
#include "cifsPdc.h"
|
||||
|
||||
typedef struct domAddOnRegInfoTag_s
|
||||
{
|
||||
int (*credAssert)(
|
||||
DOM_CHAL *,
|
||||
uchar *,
|
||||
DOM_CHAL *,
|
||||
UTIME);
|
||||
|
||||
void (*credCreate)(
|
||||
uchar *,
|
||||
DOM_CHAL *,
|
||||
UTIME,
|
||||
DOM_CHAL *);
|
||||
|
||||
void (*credSessionKey)(
|
||||
const DOM_CHAL *,
|
||||
const DOM_CHAL *,
|
||||
const uchar *,
|
||||
uchar *);
|
||||
|
||||
char * (*credToStr)(
|
||||
const uchar *);
|
||||
|
||||
BOOL (*dealWithCreds)(
|
||||
uchar *,
|
||||
DOM_CRED *,
|
||||
DOM_CRED *,
|
||||
DOM_CRED *);
|
||||
|
||||
void (*dumpData)(
|
||||
int,
|
||||
uchar *,
|
||||
int);
|
||||
|
||||
void (*mdFour)(
|
||||
uchar *,
|
||||
const uchar *,
|
||||
int);
|
||||
|
||||
BOOL (*netsecDecode)(
|
||||
struct netsec_auth_struct *,
|
||||
int,
|
||||
enum netsec_direction,
|
||||
msrpcSecChanVerify_s *,
|
||||
char *,
|
||||
LONG);
|
||||
|
||||
void (*netsecEncode)(
|
||||
struct netsec_auth_struct *,
|
||||
int,
|
||||
enum netsec_direction,
|
||||
msrpcSecChanVerify_s *,
|
||||
char *,
|
||||
LONG);
|
||||
|
||||
void (*samOEMHash)(
|
||||
uchar *,
|
||||
const uchar *,
|
||||
int);
|
||||
|
||||
} domAddOnRegInfoTag_s;
|
||||
|
||||
extern int RegisterCIFSDomainAddOn(
|
||||
struct domAddOnRegInfoTag_s *regInfo );
|
||||
|
||||
extern void UnRegisterCIFSDomainAddOn(void);
|
||||
|
||||
#endif /* _CIFSPDCP_H_ */
|
||||
110
include/nwnss/include/cifsStypes.h
Normal file
110
include/nwnss/include/cifsStypes.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1995-2002 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| CIFS module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
/***************************************************************************
|
||||
*
|
||||
* sypes.h
|
||||
*
|
||||
* Header file with definitions from references
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef _CIFSSTYPES_H_
|
||||
#define _CIFSSTYPES_H_
|
||||
|
||||
#undef BOOL
|
||||
#include "omni.h"
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* General typedefs from ref. 1, sec. 3.2
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
LONG LowPart;
|
||||
SLONG HighPart;
|
||||
} LARGE_INTEGER; /* 64 bits of data */
|
||||
|
||||
|
||||
#define PTRINDX(base,offset) ((char*)(base) + (offset))
|
||||
#define PTRDIFF(aAddr,bAddr) ((char*)aAddr > (char*)bAddr) ? ((char*)(aAddr)) - ((char*)(bAddr)) : ((char*)(bAddr)) - ((char*)(aAddr))
|
||||
#define ODD_DIFF(a,b) ((int) ( ((LONG)(a) ^ (LONG)(b)) ) & 1)
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN( a, b ) ((a) <= (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Multi purpose return values.
|
||||
*****************************************************************************/
|
||||
#define ESUCCESS 0
|
||||
#define EFAILURE (-1)
|
||||
|
||||
/****************************************************************************
|
||||
* Maximum string/name sizes.
|
||||
*****************************************************************************/
|
||||
#define MAX_CIFS_SERVER_NAME 16 /* Includes the trailing NULL */
|
||||
#define MAX_CIFS_USER_NAME 21 /* Includes the trailing NULL */
|
||||
#define MAX_CIFS_GROUP_NAME 65 /* Includes the trailing NULL */
|
||||
#define MAX_CIFS_COMMENT 48 /* Includes the trailing NULL */
|
||||
#define MAX_CIFS_WORKGROUP_NAME 48 /* Includes the trailing NULL */
|
||||
#define MAX_CIFS_PDC_NAME 48 /* Includes the trailing NULL */
|
||||
#define MAX_CIFS_SHARE_NAME 81 /* Includes the trailing NULL */
|
||||
|
||||
/****************************************************************************
|
||||
* Domain related defines
|
||||
*****************************************************************************/
|
||||
#define DOMAIN_SID_LEN 24
|
||||
#define MAX_USER_GROUPS 30
|
||||
/*
|
||||
* NOTE: If you change MAX_USER_GROUPS you will also need to increase the
|
||||
* size of the SAMR_GET_GROUPS and NETLOGON_SAM_LOGON reply buffers
|
||||
* to make room for MAX_USER_GROUPS Group RIDS.
|
||||
*/
|
||||
|
||||
#define MAX_LOOKUP_SIDS 10
|
||||
/*
|
||||
* NOTE: If you change MAX_LOOKUP_SIDS you will also need to increase the
|
||||
* size of the LSARPC_LOOKUP_SIDS_LEVEL1 reply buffers to make room for
|
||||
* up to MAX_LOOKUP_SIDS return entries.
|
||||
*/
|
||||
|
||||
/* SID/RID Types */
|
||||
#define SID_USER 1
|
||||
#define SID_GROUP 2
|
||||
#define SID_BUILTIN 4
|
||||
#define SID_UNKNOWN 8
|
||||
|
||||
|
||||
#endif /* _CIFSSTYPES_H_ */
|
||||
@@ -42,14 +42,14 @@
|
||||
#endif
|
||||
|
||||
#ifndef _XCACHE_H_
|
||||
#include <include/xCache.h>
|
||||
#include <xCache.h>
|
||||
#endif
|
||||
|
||||
#if NSS_DEBUG IS_ENABLED
|
||||
|
||||
/*
|
||||
* If this is the debug version of NSS,
|
||||
* Set INSIDE_CM to be able to get at structures referred to by
|
||||
* Set INSIDE_CM to be able to get at structures referred to by
|
||||
* opaque handles below for easy debugging.
|
||||
*/
|
||||
#ifndef INSIDE_CM
|
||||
@@ -89,12 +89,12 @@ typedef STATUS (*CompAlgoStartupFn_t)();
|
||||
/*
|
||||
* Compression Algorithm's interface exported to the Compression Manager
|
||||
*/
|
||||
typedef struct CompAlgoIF_s
|
||||
typedef struct CompAlgoIF_s
|
||||
{
|
||||
STATUS (* init)();
|
||||
|
||||
STATUS (* compressStream)(
|
||||
BYTE algoVersion,
|
||||
BYTE algoVersion,
|
||||
CMStream_t inStreamHandle, /* read-only */
|
||||
CMStream_t outStreamHandle, /* write */
|
||||
CMStream_t tempStreamHandle, /* read/write
|
||||
@@ -102,19 +102,19 @@ typedef struct CompAlgoIF_s
|
||||
BYTE minPercentGain);
|
||||
|
||||
STATUS (* uncompressStream)(
|
||||
BYTE algoVersion,
|
||||
CMStream_t inStreamHandle,
|
||||
BYTE algoVersion,
|
||||
CMStream_t inStreamHandle,
|
||||
CMStream_t outStreamHandle);
|
||||
|
||||
void (* uninit)(); /* Algorithm's destructor called by CM */
|
||||
} CompAlgoIF_s;
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* The Algorithm calls this to register itself with the CM soon after it is
|
||||
* loaded
|
||||
* loaded
|
||||
*/
|
||||
extern STATUS
|
||||
extern STATUS
|
||||
ALGOMGR_registerCompAlgo(BYTE algoID, CompAlgoIF_s *algoIF);
|
||||
|
||||
/* Called by NSS before unloading an algorithm */
|
||||
@@ -122,7 +122,7 @@ extern STATUS
|
||||
ALGOMGR_unregisterCompAlgo(BYTE algoID, BOOL abortOngoingActivities, BOOL wait);
|
||||
|
||||
/* Invoked by CM to request NSS to load an algorithm */
|
||||
extern STATUS
|
||||
extern STATUS
|
||||
loadCompAlgo(BYTE algoID);
|
||||
|
||||
/* Invoked by CM to init/uninit Algorithm management for given volume, if any */
|
||||
@@ -140,13 +140,13 @@ ALGOMGR_uninit(void *voidVol, BOOL abortOngoingActivities, BOOL wait);
|
||||
* given logical offset.
|
||||
* Returns a buffer and a pointer and size of valid data in the supplied buffer.
|
||||
* On error, none of the out parameters are valid.
|
||||
* If isHole is set, the cmBuf handle is invalid;
|
||||
* If isHole is set, the cmBuf handle is invalid;
|
||||
* so no need to call releaseStreamBuf :-)
|
||||
*/
|
||||
extern STATUS
|
||||
extern STATUS
|
||||
ALGOMGR_fetchStreamBuf(
|
||||
CMStream_t streamHandle,
|
||||
QUAD offset,
|
||||
CMStream_t streamHandle,
|
||||
QUAD offset,
|
||||
CMBuffer_t *cmbuf, /* out; to be passed to releaseStreamBuf when
|
||||
* done */
|
||||
LONG mode,
|
||||
@@ -159,16 +159,16 @@ ALGOMGR_fetchStreamBuf(
|
||||
void SET_STREAM_BUF_DIRTY(_cmbuf); /* Will be a macro */
|
||||
#endif
|
||||
|
||||
extern STATUS
|
||||
extern STATUS
|
||||
ALGOMGR_releaseStreamBuf(
|
||||
CMStream_t streamHandle,
|
||||
CMBuffer_t cmbuf,
|
||||
CMStream_t streamHandle,
|
||||
CMBuffer_t cmbuf,
|
||||
BOOL isdirty);
|
||||
|
||||
extern QUAD
|
||||
ALGOMGR_getStreamSize(CMStream_t streamHandle);
|
||||
|
||||
extern STATUS
|
||||
extern STATUS
|
||||
ALGOMGR_setStreamSize(CMStream_t streamHandle, QUAD size);
|
||||
|
||||
extern STATUS ALGOMGR_setStreamPosition(CMStream_t streamHandle, QUAD offset);
|
||||
|
||||
@@ -38,28 +38,28 @@
|
||||
#define _CM_CONTROL_H_
|
||||
|
||||
#ifndef _QUE_H_
|
||||
#include <library/que.h>
|
||||
#include <que.h>
|
||||
#endif /* _QUE_H_ */
|
||||
|
||||
/*
|
||||
* Resource Control Interface
|
||||
* Netware Set-parameters for compression
|
||||
*/
|
||||
typedef struct CMCompControlParams_s
|
||||
typedef struct CMCompControlParams_s
|
||||
{
|
||||
/* CPU Utilization Parameters */
|
||||
LONG dailyCheckStartTime;
|
||||
LONG dailyCheckStopTime;
|
||||
LONG maxCompressions;
|
||||
LONG maxCmActivities; /* Max. # of simultaneous ongoing comp/decomp
|
||||
* activities allowed
|
||||
LONG maxCmActivities; /* Max. # of simultaneous ongoing comp/decomp
|
||||
* activities allowed
|
||||
* i.e., max threads allowed for comp/decomp */
|
||||
QUAD minFileIdleTime; /* for compression */
|
||||
QUAD minDeletedFileIdleTime; /* for compression */
|
||||
BOOL compEnabled;
|
||||
|
||||
/* Space Utilization parameters */
|
||||
LONG maxZidsQueuedForCompression; /* Max # of Beast ZIDs queued in memory
|
||||
LONG maxZidsQueuedForCompression; /* Max # of Beast ZIDs queued in memory
|
||||
for (background) compression */
|
||||
LONG minPercentGain;
|
||||
SLONG decompOption;
|
||||
@@ -119,7 +119,7 @@ extern void CM_bgCompressResetTimer();
|
||||
#define NSS_MAX_COMP_ALGORITHMS 64 /* Currently can't be more than 64 */
|
||||
|
||||
/* Compression Management statistics */
|
||||
typedef struct CMCompStatistics_s
|
||||
typedef struct CMCompStatistics_s
|
||||
{
|
||||
Latch_s latch; /* Compression allows multiple threads, use this
|
||||
* latch when any of the following need to be
|
||||
@@ -134,14 +134,14 @@ typedef struct CMCompStatistics_s
|
||||
NINT numQueuedCompReqs; /* # of ZIDs queued for normal compression */
|
||||
NINT numQueuedBGCompReqs; /* # of ZIDs queued for background compression */
|
||||
// BYTE averageCompRatio[NSS_MAX_COMP_ALGORITHMS];
|
||||
LONG averageCompRatio; /* Average compression ratio achieved for all
|
||||
LONG averageCompRatio; /* Average compression ratio achieved for all
|
||||
* of the algorithms. */
|
||||
} CMCompStatistics_s;
|
||||
extern CMCompStatistics_s CM_curCompStatistics;
|
||||
extern STATUS getCompStatistics(CMCompStatistics_s *stats /* inout */);
|
||||
|
||||
/* Per-volume compression attributes */
|
||||
typedef struct VolumeCompAttr_s
|
||||
typedef struct VolumeCompAttr_s
|
||||
{
|
||||
BYTE ImplMajorVersion; /* Identifies which compression implementation
|
||||
* does this volume use (it's like a version # */
|
||||
@@ -152,12 +152,12 @@ typedef struct VolumeCompAttr_s
|
||||
BYTE algoVersion; /* Default compression Algorithm Version */
|
||||
LONG compFlags; /* Cumulative */
|
||||
//#define VOL_COMP_FLAGS_ENABLE_COMPRESS 0x0002 /* Allow compression */
|
||||
#define VOL_COMP_FLAGS_IMMEDIATE_COMPRESS 0x0001 /* Always Keep files
|
||||
#define VOL_COMP_FLAGS_IMMEDIATE_COMPRESS 0x0001 /* Always Keep files
|
||||
* compressed */
|
||||
#define VOL_COMP_FLAGS_UPGRADE_START 0x4000 /* LSS has given permission
|
||||
* to start upgrading comp beasts
|
||||
*/
|
||||
#define VOL_COMP_FLAGS_UPGRADE_FINISHED 0x8000 /* all compressed beasts are
|
||||
#define VOL_COMP_FLAGS_UPGRADE_FINISHED 0x8000 /* all compressed beasts are
|
||||
* upgraded from rootbeast_s to
|
||||
* compbeast_s
|
||||
*/
|
||||
@@ -176,12 +176,12 @@ extern STATUS volSetCompAttr(Volume_s *volume, VolumeCompAttr_s *newAttr);
|
||||
* structure to hold MAX_COMP_REQS_PER_SCOOP zids. We make sure that
|
||||
* sizeof(CompRequestScoop_s) == 4Kbytes
|
||||
*/
|
||||
typedef struct CompRequest_s
|
||||
typedef struct CompRequest_s
|
||||
{
|
||||
Zid_t zid;
|
||||
} CompRequest_s;
|
||||
|
||||
typedef struct CompRequestScoop_s
|
||||
typedef struct CompRequestScoop_s
|
||||
{
|
||||
SQlink_t requestQLink;
|
||||
WORD firstFreeInd;
|
||||
@@ -191,17 +191,17 @@ typedef struct CompRequestScoop_s
|
||||
#define COMP_REQUEST_SCOOP_UNUSED_WORD 3
|
||||
#else
|
||||
#define COMP_REQUEST_SCOOP_UNUSED_WORD \
|
||||
((sizeof(CompRequest_s) - \
|
||||
((offsetof(struct CompRequestScoop_s, removedQueues) + sizeof(WORD)) \
|
||||
% sizeof(CompRequest_s))) / sizeof(WORD))
|
||||
((sizeof(CompRequest_s) - \
|
||||
((offsetof(struct CompRequestScoop_s, removedQueues) + sizeof(WORD)) \
|
||||
% sizeof(CompRequest_s))) / sizeof(WORD))
|
||||
#endif
|
||||
WORD unused[COMP_REQUEST_SCOOP_UNUSED_WORD];
|
||||
#ifdef COMPILER_NO_INCOMPLETE_OFFSETOF
|
||||
#define MAX_COMP_REQS_PER_SCOOP 510
|
||||
#else
|
||||
#define MAX_COMP_REQS_PER_SCOOP \
|
||||
((4096 - (offsetof(struct CompRequestScoop_s, unused) \
|
||||
+ (sizeof(WORD) * COMP_REQUEST_SCOOP_UNUSED_WORD))) \
|
||||
#define MAX_COMP_REQS_PER_SCOOP \
|
||||
((4096 - (offsetof(struct CompRequestScoop_s, unused) \
|
||||
+ (sizeof(WORD) * COMP_REQUEST_SCOOP_UNUSED_WORD))) \
|
||||
/ sizeof(CompRequest_s))
|
||||
#endif
|
||||
CompRequest_s req[MAX_COMP_REQS_PER_SCOOP];
|
||||
@@ -210,25 +210,25 @@ typedef struct CompRequestScoop_s
|
||||
#define MAX_ZIDS_QUEUED_FOR_COMPRESSION \
|
||||
(MAX_COMP_REQS_PER_SCOOP * MAX_COMP_REQ_SCOOPS)
|
||||
|
||||
typedef struct CMVolumeState_s
|
||||
typedef struct CMVolumeState_s
|
||||
{
|
||||
BOOL compActive; /* Compression Management is currently
|
||||
BOOL compActive; /* Compression Management is currently
|
||||
* active in this volume */
|
||||
SQhead_t compRequestQHead; /* queue head for requests initiated by
|
||||
* normal file operations.
|
||||
* normal file operations.
|
||||
*/
|
||||
Latch_s latch;
|
||||
|
||||
SQhead_t compRequestBGQHead; /* queue head for requests initiated by
|
||||
* background compression
|
||||
* background compression
|
||||
*/
|
||||
Latch_s BGlatch;
|
||||
} CMVolumeState_s;
|
||||
|
||||
|
||||
/* the following defines different reasons to initiate compression request.
|
||||
* Currently, the main purpose is just to clean up all the request initiated
|
||||
* by background compression when stop timer popps
|
||||
* Currently, the main purpose is just to clean up all the request initiated
|
||||
* by background compression when stop timer popps
|
||||
*/
|
||||
#define COMP_NORMAL 0x0001 /* by normal file operation */
|
||||
#define COMP_BACKGROUND 0x0002 /* by background compression thread */
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#define _CM_NSS_H_
|
||||
|
||||
#ifndef _CM_CONTROL_H_
|
||||
#include <include/cmControl.h>
|
||||
#include <cmControl.h>
|
||||
#endif
|
||||
|
||||
/* Compression Manager startup/shutdown */
|
||||
@@ -47,13 +47,13 @@ void CM_shutdown(BOOL abortOngoingActivities, BOOL wait);
|
||||
|
||||
/* Command line operation */
|
||||
extern STATUS CM_screenDisplay();
|
||||
extern void CM_stopCompression(NINT reason);
|
||||
extern void CM_stopCompression();
|
||||
|
||||
/* Per-volume Compression startup/shutdown */
|
||||
extern STATUS CM_volumeActivate(Volume_s *volume);
|
||||
STATUS CM_initVolumeRuntime(Volume_s *volume);
|
||||
void CM_uninitVolumeRuntime(Volume_s *volume);
|
||||
extern void CM_volumeDeactivate(Volume_s *volume,
|
||||
extern void CM_volumeDeactivate(Volume_s *volume,
|
||||
BOOL abortOngoingActivities, BOOL wait);
|
||||
extern void CM_resetVolumeCompState(Volume_s *volume);
|
||||
extern void CM_initVolumeCompState(Volume_s *volume);
|
||||
@@ -75,12 +75,12 @@ STATUS decompressNoRights (
|
||||
void addLeaveCompressedToGrantedRights(
|
||||
RootBeast_s *beast);
|
||||
|
||||
STATUS
|
||||
STATUS
|
||||
CM_uncompressFileRange(
|
||||
GeneralMsg_s *genMsg,
|
||||
RootBeast_s *uncompBeast,
|
||||
QUAD offset,
|
||||
QUAD size,
|
||||
RootBeast_s *uncompBeast,
|
||||
QUAD offset,
|
||||
QUAD size,
|
||||
NINT accessMode,
|
||||
NINT latchType,
|
||||
Xaction_s *xaction,
|
||||
@@ -88,11 +88,11 @@ CM_uncompressFileRange(
|
||||
BOOL wait,
|
||||
BOOL *isDone); /* out */
|
||||
|
||||
STATUS
|
||||
STATUS
|
||||
CM_compressFileRange(
|
||||
GeneralMsg_s *genMsg,
|
||||
RootBeast_s *uncompBeast,
|
||||
QUAD offset,
|
||||
RootBeast_s *uncompBeast,
|
||||
QUAD offset,
|
||||
QUAD size,
|
||||
NINT latchType,
|
||||
Xaction_s *xaction,
|
||||
@@ -101,12 +101,12 @@ CM_compressFileRange(
|
||||
BOOL *isDone,
|
||||
NINT reason); /* out */
|
||||
|
||||
BOOL
|
||||
BOOL
|
||||
CM_checkParentDirForCompressOK(
|
||||
GeneralMsg_s *genMsg,
|
||||
GeneralMsg_s *genMsg,
|
||||
File_s *beast);
|
||||
|
||||
STATUS
|
||||
STATUS
|
||||
CM_compressFileAsync(
|
||||
GeneralMsg_s *genMsg,
|
||||
RootBeast_s *uncompBeast,
|
||||
@@ -166,7 +166,7 @@ CM_accessCompFileDone(
|
||||
STATUS
|
||||
CM_cleanupBeast(
|
||||
GeneralMsg_s *genMsg,
|
||||
RootBeast_s *uncompBeast,
|
||||
RootBeast_s *uncompBeast,
|
||||
Xaction_s *xaction);
|
||||
|
||||
STATUS fixCompFlags(
|
||||
|
||||
@@ -43,25 +43,25 @@
|
||||
#ifndef _COMNAUTHORIZE_H_
|
||||
#define _COMNAUTHORIZE_H_
|
||||
|
||||
#if zNETWARE || (zLINUX && (defined(__KERNEL__) || defined(NSS_USERSPACE)))
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
#ifndef _COMNBEASTCLASS_H_
|
||||
#include <include/comnBeastClass.h>
|
||||
#include <comnBeastClass.h>
|
||||
#endif
|
||||
|
||||
#include <library/xUnicode.h>
|
||||
#include <xUnicode.h>
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _GUID_H_
|
||||
#include <include/guid.h>
|
||||
#include <guid.h>
|
||||
#endif
|
||||
|
||||
#if zNETWARE || (zLINUX && (defined(__KERNEL__) || defined(NSS_USERSPACE)))
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
#ifndef _COMNPARAMS_H_
|
||||
#include <include/comnParams.h>
|
||||
#include <comnParams.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -75,7 +75,7 @@ extern "C" {
|
||||
#define zINVALID_USERID zINVALID_GUID
|
||||
#define zSUPERVISOR_ID zSUPERVISOR_USERID
|
||||
|
||||
#if zNETWARE || (zLINUX && (defined(__KERNEL__) || defined(NSS_USERSPACE)))
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* The following define the authorization system types
|
||||
@@ -633,7 +633,7 @@ extern STATUS ZAS_FixVisibility(
|
||||
|
||||
extern STATUS VAUTH_PassedMAC(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct NSSConnection_s *pssConn,
|
||||
struct NSSConnection_s *pssConn,
|
||||
struct AuthBeast_s *authBeast,
|
||||
NINT operation);
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
#define _COMNBEASTCLASS_H_
|
||||
|
||||
#ifndef _COMNBEASTS_H_
|
||||
# include <include/comnBeasts.h>
|
||||
# include <comnBeasts.h>
|
||||
#endif
|
||||
|
||||
#include <library/xUnicode.h>
|
||||
#include <xUnicode.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -115,7 +115,7 @@ extern NINT BST_getPackedSizeIndex(
|
||||
struct RootBeast_s *beast,
|
||||
NINT storageIndex);
|
||||
|
||||
extern void BST_doPackIndex(
|
||||
extern void BST_doPackIndex(
|
||||
struct RootBeast_s *beast,
|
||||
void *data,
|
||||
NINT packedLen,
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
#define _COMNBEASTS_H_
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
# include <public/zOmni.h>
|
||||
# include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
# include <public/zParams.h>
|
||||
# include <zParams.h>
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
@@ -58,19 +58,19 @@
|
||||
#endif
|
||||
|
||||
#ifndef _LATCH_H_
|
||||
# include <include/latch.h>
|
||||
# include <latch.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XCACHE_H_
|
||||
#include <include/xCache.h>
|
||||
#include <xCache.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XCACHE_H_
|
||||
# include <include/xCache.h>
|
||||
# include <xCache.h>
|
||||
#endif
|
||||
|
||||
#ifndef _EFLDEFS_H_
|
||||
# include <public/efldefs.h>
|
||||
# include <efldefs.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -118,7 +118,7 @@ typedef struct Xaction_s
|
||||
* Structures for use with the purge log calls.
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
#define MAX_PLOG_LOCATION_SIZE 4 /* This is the max size in "LONGs"
|
||||
#define MAX_PLOG_LOCATION_SIZE 4 /* This is the max size in "LONGs"
|
||||
* that the PurgeLogLocation structure
|
||||
* can be
|
||||
*/
|
||||
@@ -164,7 +164,7 @@ typedef struct FixVisibMsg_s
|
||||
} FixVisibMsg_s;
|
||||
#define SETUP_FIX_VISIBILITY_PURGE_LOG(_msg, _loc, _action, _pzid, _uid) \
|
||||
( (_msg)->visib.purgeLogLoc = (_loc), \
|
||||
(_msg)->visib.action = (_action), \
|
||||
(_msg)->visib.action = (_action), \
|
||||
(_msg)->visib.parentZID = (_pzid), \
|
||||
(_msg)->visib.trusteeID = (_uid) )
|
||||
|
||||
@@ -264,7 +264,7 @@ typedef union PurgeLogMsg_s
|
||||
#define PLOG_TRUNCATE 2 /* truncate a file */
|
||||
#define PLOG_BLOCK_FREE 3 /* delete a block (add to the free tree) */
|
||||
#define PLOG_BEAST_COMP_CLEANUP 4 /* Cleanup extra beast compression state */
|
||||
#define PLOG_FIX_VISIBILITY 5 /* add/remove visibility up the tree */
|
||||
#define PLOG_FIX_VISIBILITY 5 /* add/remove visibility up the tree */
|
||||
#define PLOG_SCAN_USER_NAMES 6 /* update names in the user tree from a volume */
|
||||
#define PLOG_REMOVE_DIR_TREE 7 /* remove the directory tree from a volume */
|
||||
#define PLOG_DIR_QUOTA_USED 8 /* fill in used amount for a directory quota entry */
|
||||
@@ -296,7 +296,7 @@ typedef struct StorageInfo_s
|
||||
typedef struct GetStorageInfo_s
|
||||
{
|
||||
QUAD physicalEOF; /* Physical EOF */
|
||||
QUAD filePhysSize; /* Physical size of the file in bytes */
|
||||
QUAD filePhysSize; /* Physical size of the file in bytes */
|
||||
QUAD metaDataPhysSize; /* Physical size of the metadata in bytes */
|
||||
} GetStorageInfo_s;
|
||||
|
||||
@@ -343,11 +343,11 @@ typedef struct RootBeast_s
|
||||
* given volume*/
|
||||
DQlink_t hash; /* used by beast cache hash table*/
|
||||
DQlink_t notInUseLink; /* link used to keep track of NOTINUSE beasts*/
|
||||
struct RootBeast_s *fileSnapshotBeast; /* Points to the snapshot beast
|
||||
struct RootBeast_s *fileSnapshotBeast; /* Points to the snapshot beast
|
||||
* if COW is enabled and file is
|
||||
* open for write */
|
||||
NINT *bitMap; /* A pointer to in memory bit map of
|
||||
* blocks of the file that have been
|
||||
NINT *bitMap; /* A pointer to in memory bit map of
|
||||
* blocks of the file that have been
|
||||
* snapshotted. */
|
||||
Blknum_t bitCount; /* Number of valid bits in bitMap */
|
||||
|
||||
@@ -424,13 +424,13 @@ typedef struct RootBeast_s
|
||||
* new version number (this one) is put in as the current version.
|
||||
*/
|
||||
#define BEAST_VERSION_1 1 /* this version supports 32 bit IDs */
|
||||
#define BEAST_VERSION_2 2 /* this version supports other parent lists */
|
||||
#define BEAST_VERSION_2 2 /* this version supports other parent lists */
|
||||
#define BEAST_VERSION_3 3 /* this version supports new hard links */
|
||||
#define BEAST_VERSION_KEIPPER 57 /* this is a temp version for a one-time fix for Keipper */
|
||||
#define CURRENT_BEAST_VERSION 3 /* this version support new style of hardlinks */
|
||||
/*
|
||||
* Beast version 2 Converts all 32 bit NDS IDs to 128 bit NDS GUIDs.
|
||||
* Moves the owner ID to the root.
|
||||
* Moves the owner ID to the root.
|
||||
*/
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ typedef struct RootBeast_s
|
||||
* inserted into the volume yet*/
|
||||
#define BST_STATE_TOSSING 0x00000010 /* beast is being tossed */
|
||||
#define BST_STATE_PURGING 0x00000020 /* beast is being purged */
|
||||
#define BST_STATE_FULL_FLUSH 0x00000040 /* if set, we want to flush the
|
||||
#define BST_STATE_FULL_FLUSH 0x00000040 /* if set, we want to flush the
|
||||
* beast as well as the data
|
||||
* blocks. If this is not set,
|
||||
* and you request to write the
|
||||
@@ -479,9 +479,9 @@ typedef struct RootBeast_s
|
||||
#define BST_STATE_TOSS_ON_RELEASE 0x00010000 /* Toss the beast when released
|
||||
* Don't save it in memory --
|
||||
* Used by NFS Gateway */
|
||||
#define BST_STATE_DATA_CHANGED 0x00020000 /* Set to indicate the actual
|
||||
#define BST_STATE_DATA_CHANGED 0x00020000 /* Set to indicate the actual
|
||||
* data in the beast changed */
|
||||
#define BST_STATE_METADATA_CHANGED 0x00040000 /* Set to indicate meta data
|
||||
#define BST_STATE_METADATA_CHANGED 0x00040000 /* Set to indicate meta data
|
||||
* we care about has changed */
|
||||
|
||||
/****************************************************************************
|
||||
@@ -510,7 +510,7 @@ typedef struct PersistentNameEntry_s
|
||||
* forced it to upper case. */
|
||||
#define NAMEovflow 0x4000 /* duplicate names stored in fflow
|
||||
* blocks (ZFS naming B-tree-specific) */
|
||||
#define NAMEdup 0x2000 /* Duplicate names exist
|
||||
#define NAMEdup 0x2000 /* Duplicate names exist
|
||||
* (ZFS naming B-tree-specific) */
|
||||
#define NAMEool 0x1000 /* name field points to an out-of-line
|
||||
* array (ZFS naming B-tree-specific) */
|
||||
@@ -661,7 +661,7 @@ typedef struct NamedBeast_s
|
||||
WORD denyReaderCount; /* NOT PERSISTENT - Number of current deny readers */
|
||||
WORD denyWriterCount; /* NOT PERSISTENT - Number of current deny writers */
|
||||
WORD dontDeleteWhileOpenCount; /* NOT PERSISTENT - Number of "don't delete" opens */
|
||||
WORD reserved1; /* cnt WORD lastNameUniquifier; NOT PERSISTENT - value of largest nameUniquifier */
|
||||
WORD reserved1; /* cnt WORD lastNameUniquifier; NOT PERSISTENT - value of largest nameUniquifier */
|
||||
WORD snapReaderCount; /* NOT PERSISTENT - number of backup readers currently reading either the real file or snapshot file. */
|
||||
WORD pad;
|
||||
struct CROAccessLeaseList_s *NB_alList; /* List of Access Leases */
|
||||
@@ -669,20 +669,20 @@ typedef struct NamedBeast_s
|
||||
|
||||
/* If either of these two nameFlag bits is set, the dataStreamInfo field in the
|
||||
* non-persistent file beast will be calculated as needed at runtime.*/
|
||||
#define NFL_HAS_DATA_STREAMS 0x0001 /* nameFlag bit, set if file has
|
||||
#define NFL_HAS_DATA_STREAMS 0x0001 /* nameFlag bit, set if file has
|
||||
* data streams */
|
||||
#define NFL_HAS_EXTENDED_ATTRIBUTES 0x0002 /* nameFlag bit, set if file had
|
||||
#define NFL_HAS_EXTENDED_ATTRIBUTES 0x0002 /* nameFlag bit, set if file had
|
||||
* extended attributes */
|
||||
|
||||
#define NFL_ADDED_TO_SALVAGE_TREE 0x0100 /* File was added to the
|
||||
#define NFL_ADDED_TO_SALVAGE_TREE 0x0100 /* File was added to the
|
||||
* salvage tree */
|
||||
#define NFL_BLKS_NOT_IN_PURGEABLE_CNT 0x0200 /* File was added to the
|
||||
#define NFL_BLKS_NOT_IN_PURGEABLE_CNT 0x0200 /* File was added to the
|
||||
* salvage tree, but its blocks
|
||||
* were not added to the
|
||||
* purgeableCount as the file
|
||||
* were not added to the
|
||||
* purgeableCount as the file
|
||||
* was still open. */
|
||||
#define NFL_PURGED_FROM_SALVAGE_TREE 0x0400 /* File was purged from salvage tree
|
||||
*/
|
||||
#define NFL_PURGED_FROM_SALVAGE_TREE 0x0400 /* File was purged from salvage tree
|
||||
*/
|
||||
|
||||
#define NAMEDroot root
|
||||
|
||||
@@ -726,7 +726,7 @@ typedef struct NamedBeast_s
|
||||
#define NAMEDdenyReaderCount denyReaderCount
|
||||
#define NAMEDdenyWriterCount denyWriterCount
|
||||
#define NAMEDdontDeleteWhileOpenCount dontDeleteWhileOpenCount
|
||||
#define NAMEDsnapReaderCount snapReaderCount
|
||||
#define NAMEDsnapReaderCount snapReaderCount
|
||||
#define NAMEDopenFlags openFlags
|
||||
|
||||
/****************************************************************************
|
||||
@@ -822,7 +822,7 @@ typedef struct PersistentFile_s
|
||||
* salvage area), it is the deletion time*/
|
||||
Time_t archivedTime; /* PERSISTENT - Last time file was archived */
|
||||
UserID_t modifierID; /* PERSISTENT - ID of the last modifier */
|
||||
UserID_t metaDataModifierID; /* PERSISTENT - ID of the last modifier of
|
||||
UserID_t metaDataModifierID; /* PERSISTENT - ID of the last modifier of
|
||||
* the metadata */
|
||||
UserID_t archiverID; /* PERSISTENT - ID of the last archiver */
|
||||
} NSS_MEDIA_STRUCTURE(PersistentFile_s,archiverID) PersistentFile_s;
|
||||
@@ -842,7 +842,7 @@ typedef struct V1_PersistentFile_s
|
||||
* salvage area), it is the deletion time*/
|
||||
Time_t archivedTime; /* PERSISTENT - Last time file was archived */
|
||||
LONG modifierID; /* PERSISTENT - ID of the last modifier */
|
||||
LONG metaDataModifierID; /* PERSISTENT - ID of the last modifier of
|
||||
LONG metaDataModifierID; /* PERSISTENT - ID of the last modifier of
|
||||
* the metadata */
|
||||
LONG archiverID; /* PERSISTENT - ID of the last archiver */
|
||||
} NSS_MEDIA_STRUCTURE(V1_PersistentFile_s,archiverID) V1_PersistentFile_s;
|
||||
@@ -939,7 +939,7 @@ typedef struct File_s
|
||||
*=========================================================================
|
||||
* BEAST OPERATIONS
|
||||
*
|
||||
*
|
||||
*
|
||||
* This defines the operations that are common across all objects in the
|
||||
* system. These operations are always directed to the object being
|
||||
* acted upon.
|
||||
@@ -977,7 +977,7 @@ typedef struct CommonBeastOps_s
|
||||
// cnt struct GeneralMsg_s *genMsg,
|
||||
// cnt NamedBeast_s *beast);
|
||||
|
||||
/* ALLOCATE and initialize the TypeSpecificPersistentParentEntry_s
|
||||
/* ALLOCATE and initialize the TypeSpecificPersistentParentEntry_s
|
||||
* structure pointed to by the parentEntry->t field. The common layer
|
||||
* currently only uses this field for salvage metadata, and the default
|
||||
* functionality provided by the NamedBeast supports this default salvage
|
||||
@@ -1008,7 +1008,7 @@ typedef struct CommonBeastOps_s
|
||||
/* is the given directory empty*/
|
||||
/* LSS must implement this */
|
||||
BOOL (*BST_isDirectoryEmpty)(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct GeneralMsg_s *genMsg,
|
||||
NamedBeast_s *directory,
|
||||
NINT nameType);
|
||||
|
||||
@@ -1081,7 +1081,7 @@ typedef struct CommonBeastOps_s
|
||||
|
||||
/* This locates the curName and curNameSpaceMask in the directory, via
|
||||
* an exact binary match. Then it replaces the nameSpacemask with
|
||||
* the newNameSpacemask. NOTE--This function does not validate the
|
||||
* the newNameSpacemask. NOTE--This function does not validate the
|
||||
* new nameSpacemask, it blindly obeys. All validity checking must
|
||||
* be done by the caller previous to calling this function. ALSO,
|
||||
* this function may not be used to set the nameSpaceMask to 0. */
|
||||
@@ -1111,7 +1111,7 @@ typedef struct CommonBeastOps_s
|
||||
NINT nameType,
|
||||
unicode_t *name,
|
||||
// cnt NINT nameUniquifier, /* Caller passes zFNU_UNDEFINED if not known */
|
||||
NINT newMatchAttributes, /* Same as MA_xxx defines above */
|
||||
NINT newMatchAttributes, /* Same as MA_xxx defines above */
|
||||
Xaction_s *xaction); /* Optional xaction, may be NULL */
|
||||
|
||||
/* this is called to locate a name in a directory via wildcarding*/
|
||||
@@ -1163,7 +1163,7 @@ typedef struct CommonBeastOps_s
|
||||
|
||||
/*
|
||||
* Get the real physical extent for the object. We are going to
|
||||
* do it one at a time for now.
|
||||
* do it one at a time for now.
|
||||
*/
|
||||
STATUS (*BST_getPhysicalExtent)(
|
||||
struct zNSSMsg_s *msg,
|
||||
@@ -1274,7 +1274,7 @@ typedef struct CommonBeastOps_s
|
||||
RootBeast_s *beast,
|
||||
NINT bufLen,
|
||||
utf8_t *buf,
|
||||
Xaction_s *xaction,
|
||||
Xaction_s *xaction,
|
||||
BOOL doChange);
|
||||
|
||||
/** New functions should be added at the end of this structure */
|
||||
@@ -1306,12 +1306,12 @@ typedef struct COMNDirQuota_s
|
||||
*/
|
||||
typedef Time_t Epoch_t;
|
||||
|
||||
typedef struct MFLKey_s
|
||||
typedef struct MFLKey_s
|
||||
{
|
||||
Zid_t zid; /* file's ZID */
|
||||
} NSS_MEDIA_STRUCTURE(MFLKey_s,zid) MFLKey_s;
|
||||
|
||||
typedef struct MFLValue_s
|
||||
typedef struct MFLValue_s
|
||||
{
|
||||
Epoch_t epoch;
|
||||
LONG reserved; /* to set value size to multiple of 64-bit word */
|
||||
@@ -1488,12 +1488,12 @@ typedef struct FCNTL_Out_s
|
||||
* Defines for newHardLinkFlags in FCNTL_SetHardLinkFlags_s structure.
|
||||
* This is stored as a single BYTE
|
||||
*/
|
||||
#define HL_FLAG_IS_VALID 0x80 /* If set, the other "HL_FLAG_IS_HARD_LINK"
|
||||
#define HL_FLAG_IS_VALID 0x80 /* If set, the other "HL_FLAG_IS_HARD_LINK"
|
||||
* flag can be assumed to be accurate.
|
||||
* If this is zero, the "HL_FLAG_IS_HARD_LINK"
|
||||
* bit must also be zero.
|
||||
*/
|
||||
#define HL_FLAG_IS_HARD_LINK 0x40 /* If "HL_FLAG_IS_VALID" is set, then
|
||||
#define HL_FLAG_IS_HARD_LINK 0x40 /* If "HL_FLAG_IS_VALID" is set, then
|
||||
* this indicates if the name belongs
|
||||
* to a hard link.
|
||||
*/
|
||||
@@ -1591,7 +1591,7 @@ typedef struct
|
||||
*=========================================================================
|
||||
* VOLUME OPERATIONS
|
||||
*
|
||||
*
|
||||
*
|
||||
* This defines volume specific operations that are only sent to a
|
||||
* VOLUME object which means they must be implemented by LSSs.
|
||||
*=========================================================================
|
||||
@@ -1613,7 +1613,7 @@ typedef struct CommonVolumeOps_s
|
||||
// cnt struct GeneralMsg_s *genMsg,
|
||||
// cnt NamedBeast_s *beast);
|
||||
|
||||
/* ALLOCATE and initialize the TypeSpecificPersistentParentEntry_s
|
||||
/* ALLOCATE and initialize the TypeSpecificPersistentParentEntry_s
|
||||
* structure pointed to by the parentEntry->t field. The common layer
|
||||
* currently only uses this field for salvage metadata, and the default
|
||||
* functionality provided by the NamedBeast supports this default salvage
|
||||
@@ -1643,7 +1643,7 @@ typedef struct CommonVolumeOps_s
|
||||
/* is the given directory empty*/
|
||||
/* LSS must implement this */
|
||||
BOOL (*VOL_isDirectoryEmpty)(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct GeneralMsg_s *genMsg,
|
||||
NamedBeast_s *directory,
|
||||
NINT nameType);
|
||||
|
||||
@@ -1694,7 +1694,7 @@ typedef struct CommonVolumeOps_s
|
||||
|
||||
/* This locates the curName and curNameSpaceMask in the directory, via
|
||||
* an exact binary match. Then it replaces the nameSpacemask with
|
||||
* the newNameSpacemask. NOTE--This function does not validate the
|
||||
* the newNameSpacemask. NOTE--This function does not validate the
|
||||
* new nameSpacemask, it blindly obeys. All validity checking must
|
||||
* be done by the caller previous to calling this function. ALSO,
|
||||
* this function may not be used to set the nameSpaceMask to 0. */
|
||||
@@ -1777,7 +1777,7 @@ typedef struct CommonVolumeOps_s
|
||||
Blknum_t *retNextBlock);
|
||||
/*
|
||||
* Get the real physical extent for the object. We are going to
|
||||
* do it one at a time for now.
|
||||
* do it one at a time for now.
|
||||
*/
|
||||
STATUS (*VOL_getPhysicalExtent)(
|
||||
struct zNSSMsg_s *msg,
|
||||
@@ -1840,8 +1840,8 @@ typedef struct CommonVolumeOps_s
|
||||
#define X_CF_OK_TO_THROTTLE 0x00000002 /* When set this transaction can be
|
||||
* throttled.
|
||||
*/
|
||||
#define X_CF_DEFAULT (X_CF_COMMON_LAYER | X_CF_OK_TO_THROTTLE)
|
||||
/* Default value to pass into
|
||||
#define X_CF_DEFAULT (X_CF_COMMON_LAYER | X_CF_OK_TO_THROTTLE)
|
||||
/* Default value to pass into
|
||||
* beginXLocal common op function */
|
||||
|
||||
/* This is called to end a transaction. */
|
||||
@@ -1996,8 +1996,8 @@ typedef struct CommonVolumeOps_s
|
||||
* in those purged files in the salvage system.
|
||||
* This function will return with at least numberOfBlocks free on the
|
||||
* volume, or else it will return an error.
|
||||
* Purge asynchronously if the asyncPurge flag is set. If number of
|
||||
* blocks is zero and asyncPurge is set, purge upto the high threshold.
|
||||
* Purge asynchronously if the asyncPurge flag is set. If number of
|
||||
* blocks is zero and asyncPurge is set, purge upto the high threshold.
|
||||
* LSS must implement this if it supports salvage */
|
||||
STATUS (*VOL_makeVolumeFreeSpace)(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
@@ -2012,12 +2012,12 @@ typedef struct CommonVolumeOps_s
|
||||
* the selectionCriteria.
|
||||
*
|
||||
* The LSS should fill the beastZids array with the next numBeastsRequested
|
||||
* beasts after lastReturnedBeastZid attempting to satisfy specified
|
||||
* beasts after lastReturnedBeastZid attempting to satisfy specified
|
||||
* selectionCriteria, and return the number actually supplied via the
|
||||
* numBeastsReturned parameter. It should also update the lastBeastReturned
|
||||
* cookie to be presented during the next browse call. Initially
|
||||
* INVALID_ZID is passed in as the cookie. The condition
|
||||
* (numBeastsReturned < numBeastsRequested)
|
||||
* INVALID_ZID is passed in as the cookie. The condition
|
||||
* (numBeastsReturned < numBeastsRequested)
|
||||
* indicates that there are no more beasts available to browse.
|
||||
*
|
||||
* NOTE: Selection Criteria are only a hint to the LSS on why the common
|
||||
@@ -2032,7 +2032,7 @@ typedef struct CommonVolumeOps_s
|
||||
Zid_t *lastBeastReturned, /* inout */
|
||||
Zid_t *beastZids, /* out */
|
||||
NINT *numBeastsReturned); /* out */
|
||||
/* bits are defined in nssPubs.h for Linux userspace access */
|
||||
/* bits are defined in nssPubs.h for Linux userspace access */
|
||||
//#define SELECT_BEASTS_ALL 0x00000000
|
||||
//#define SELECT_BEASTS_FOR_COMPRESSION 0x00000001
|
||||
//#define SELECT_BEASTS_SALVAGEABLE 0x00000002
|
||||
@@ -2074,7 +2074,7 @@ typedef struct CommonVolumeOps_s
|
||||
struct Xaction_s *xAction,
|
||||
struct RootBeast_s *beast,
|
||||
SQUAD usedAdjustment);
|
||||
|
||||
|
||||
/*
|
||||
* This routine removes a user from user space restrictions.
|
||||
*
|
||||
@@ -2103,49 +2103,49 @@ typedef struct CommonVolumeOps_s
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct Volume_s *volume,
|
||||
NINT numEntriesRequested,
|
||||
UserID_t *lastUserReturned,
|
||||
UserID_t *lastUserReturned,
|
||||
COMNUserRest_s *userEntries,
|
||||
NINT *numUsersReturned,
|
||||
LONG allUsersFlag);
|
||||
|
||||
/** allUsersFlag defines **/
|
||||
/** GET_USED_OR_RESTRICTED: Default behavior if neither of the
|
||||
/** GET_USED_OR_RESTRICTED: Default behavior if neither of the
|
||||
** next 2 flags are set then we return the users
|
||||
** that have a used amount or if they have a restriction.
|
||||
** GET_ALL : Get all the users with/without restrictions,
|
||||
** GET_ALL : Get all the users with/without restrictions,
|
||||
** with/without used amounts
|
||||
** GET_ONLY_RESTRICTED: Get only those users that have a restriction.
|
||||
**
|
||||
** GET_COUNT: Get the count of users. Honor the first 2 flags.
|
||||
**
|
||||
** START_AT_COUNT: Return the users, but skip the first n users.
|
||||
**
|
||||
** START_AT_COUNT: Return the users, but skip the first n users.
|
||||
**/
|
||||
#define BROWSE_USERS_GET_USED_OR_RESTRICTED 0x00000000
|
||||
#define BROWSE_USERS_GET_ALL 0x00000001
|
||||
#define BROWSE_USERS_GET_ONLY_RESTRICTED 0x00000002
|
||||
#define BROWSE_USERS_GET_COUNT 0x00000004
|
||||
#define BROWSE_USERS_START_AT_COUNT 0x00000008
|
||||
|
||||
|
||||
STATUS (* VOL_insertMFLEntry)(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct Volume_s *volume,
|
||||
Zid_t zid,
|
||||
Epoch_t epoch,
|
||||
struct Xaction_s *xaction);
|
||||
|
||||
|
||||
STATUS (* VOL_deleteMFLEntry)(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct Volume_s *volume,
|
||||
Zid_t zid,
|
||||
Epoch_t *epoch, /* out */
|
||||
struct Xaction_s *xaction);
|
||||
|
||||
|
||||
STATUS (* VOL_lookupMFLEntry)(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct Volume_s *volume,
|
||||
Zid_t zid,
|
||||
Epoch_t *epoch); /* out */
|
||||
|
||||
|
||||
STATUS (* VOL_enumerateMFL)(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct Volume_s *volume,
|
||||
@@ -2172,17 +2172,17 @@ typedef struct CommonVolumeOps_s
|
||||
* that the Volume_s volume ops are called. The Volume_s fucntion
|
||||
* releases the useCount on the 'beast' and then returns the NSS
|
||||
* error zERR_NOT_SUPPORTED.
|
||||
*
|
||||
*
|
||||
* The return status should either be zOK or a valid NSS error code.
|
||||
*
|
||||
* parmLen The length of parm in bytes.
|
||||
*
|
||||
*
|
||||
* parm A pointer to a buffer which contains the contents of
|
||||
* the command element. If the LSS does not support the
|
||||
* given command element then the LSS should return
|
||||
* the NSS error zERR_NOT_SUPPORTED.
|
||||
*
|
||||
* dataLen The length of commandData in bytes.
|
||||
*
|
||||
* dataLen The length of commandData in bytes.
|
||||
*
|
||||
* commandData A pointer to a buffer where the data for the command is found.
|
||||
*
|
||||
@@ -2193,7 +2193,7 @@ typedef struct CommonVolumeOps_s
|
||||
* retBuf A pointer to a buffer to be used in returning a response to
|
||||
* the command. The contents of this buffer are copied to
|
||||
* the response buffer to satisfy subsequent reads.
|
||||
*
|
||||
*
|
||||
* retLen The length, in bytes, of the data in retBuf.
|
||||
*
|
||||
* NOTE - If the LSS supports this comn op it must do COMN_Release(&beast)
|
||||
@@ -2259,7 +2259,7 @@ typedef struct CommonVolumeOps_s
|
||||
struct Volume_s *volume,
|
||||
Zid_t dirZid,
|
||||
SQUAD usedAdjustment);
|
||||
|
||||
|
||||
/*
|
||||
* This routine removes a directory from the directory quotas.
|
||||
*
|
||||
@@ -2289,7 +2289,7 @@ typedef struct CommonVolumeOps_s
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct Volume_s *volume,
|
||||
NINT numEntriesRequested,
|
||||
Zid_t *lastDirReturned,
|
||||
Zid_t *lastDirReturned,
|
||||
COMNDirQuota_s *dirEntries,
|
||||
NINT *numDirsReturned);
|
||||
|
||||
@@ -2327,7 +2327,7 @@ typedef struct CommonVolumeOps_s
|
||||
NINT action,
|
||||
unicode_t *name,
|
||||
struct Xaction_s *xaction);
|
||||
|
||||
|
||||
STATUS (*VOL_deleteEFLEntry)(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct Volume_s *volume,
|
||||
@@ -2363,10 +2363,10 @@ typedef struct CommonVolumeOps_s
|
||||
#define VOL_EFL_ADMIN_REMOVE_EPOCH 2
|
||||
#define VOL_EFL_ADMIN_RESET_EFL 3
|
||||
#define VOL_EFL_ADMIN_LIST_EPOCHS 4
|
||||
#define VOL_EFL_ADMIN_GET_NAME_SPACE_ID 5
|
||||
#define VOL_EFL_ADMIN_SET_NAME_SPACE_ID 6
|
||||
#define VOL_EFL_ADMIN_GET_INACTIVE_EPOCH_INTERVAL 7
|
||||
#define VOL_EFL_ADMIN_SET_INACTIVE_EPOCH_INTERVAL 8
|
||||
#define VOL_EFL_ADMIN_GET_NAME_SPACE_ID 5
|
||||
#define VOL_EFL_ADMIN_SET_NAME_SPACE_ID 6
|
||||
#define VOL_EFL_ADMIN_GET_INACTIVE_EPOCH_INTERVAL 7
|
||||
#define VOL_EFL_ADMIN_SET_INACTIVE_EPOCH_INTERVAL 8
|
||||
#define VOL_EFL_ADMIN_PING_EPOCH 9
|
||||
#define VOL_EFL_ADMIN_CHECK_EPOCH 10
|
||||
#define VOL_EFL_GET_STATUS 11
|
||||
@@ -2405,12 +2405,12 @@ typedef struct LSSSpecificPackUnpackOps_s
|
||||
*/
|
||||
|
||||
/* calculates PACKED size of beast*/
|
||||
NINT (*packedSize)(
|
||||
NINT (*packedSize)(
|
||||
void *beast); /* beast to get the size of*/
|
||||
|
||||
/* pack the given beast into the given data buffer, returns the updated
|
||||
* DATA pointer after packing*/
|
||||
BYTE *(*pack)(
|
||||
BYTE *(*pack)(
|
||||
void *beast, /* beast we are packing*/
|
||||
BYTE *data); /* address to copy too*/
|
||||
|
||||
@@ -2440,7 +2440,7 @@ typedef struct LSSSpecificPackUnpackOps_s
|
||||
typedef struct AdminVolFile_s
|
||||
{
|
||||
File_s file; /* derived from a file*/
|
||||
Key_t specialBeastDirKey; /* If not zero then it is the key to the
|
||||
Key_t specialBeastDirKey; /* If not zero then it is the key to the
|
||||
* directory were the beast is found */
|
||||
} AdminVolFile_s;
|
||||
|
||||
@@ -2492,7 +2492,7 @@ typedef struct AdminVolFile_s
|
||||
typedef struct PersistentComp_s
|
||||
{
|
||||
Zid_t uncompZid; /* zid of the uncompressed beast */
|
||||
LONG unused[4];
|
||||
LONG unused[4];
|
||||
} NSS_MEDIA_STRUCTURE(PersistentComp_s,unused[4]) PersistentComp_s;
|
||||
|
||||
|
||||
@@ -2605,7 +2605,7 @@ extern void BST_tossAsync(
|
||||
|
||||
extern STATUS BST_flush(void *beast);
|
||||
|
||||
extern STATUS BST_truncate(
|
||||
extern STATUS BST_truncate(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *beast,
|
||||
Blknum_t block,
|
||||
@@ -2632,14 +2632,14 @@ extern void NAMED_BeastCleanupNames(NamedBeast_s *beast, BOOL beastIsLatched);
|
||||
((_volume)->VOLcomnVolOps.VOL_getBeastFromVolume((_genmsg), (_zid), (_volume)))
|
||||
|
||||
#define BST_UNLINK_FROM_ALL_LISTS_NO_TIMER(_beast) \
|
||||
{ \
|
||||
{ \
|
||||
BEASTHASH_Remove((_beast)); \
|
||||
if (QMEMBER(&(_beast)->volLink)) \
|
||||
DQ_RMV((_beast),volLink); \
|
||||
}
|
||||
|
||||
#define BST_UNLINK_FROM_ALL_LISTS(_beast) \
|
||||
{ \
|
||||
#define BST_UNLINK_FROM_ALL_LISTS(_beast) \
|
||||
{ \
|
||||
CANCEL_ALARM((_beast)->mycache.agent.timer); \
|
||||
BST_UNLINK_FROM_ALL_LISTS_NO_TIMER((_beast)); \
|
||||
}
|
||||
@@ -2661,10 +2661,10 @@ extern void BST_MarkCleanAndNotNew(RootBeast_s *beast);
|
||||
#define BST_UNUSE_BEAST(_beast) \
|
||||
(zASSERT((_beast)->useCount > 0),(_beast)->useCount--) /* this MUST only be used internally in very special cases*/
|
||||
|
||||
#define BST_CLEAR_WRITING_STATE(_beast) \
|
||||
#define BST_CLEAR_WRITING_STATE(_beast) \
|
||||
{ \
|
||||
(_beast)->bstState &= ~(BST_STATE_FLUSHING | \
|
||||
BST_STATE_FLUSHING_BY_TIMER | \
|
||||
(_beast)->bstState &= ~(BST_STATE_FLUSHING | \
|
||||
BST_STATE_FLUSHING_BY_TIMER | \
|
||||
BST_STATE_FULL_FLUSH); \
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ extern Buffer_s *COMN_GetFileBlkOrHole(
|
||||
GeneralMsg_s *genMsg,
|
||||
IoMsg_s *ioMsg,
|
||||
Blknum_t *holeBlks);
|
||||
|
||||
|
||||
#define IS_BLOCK_BOUNDARY(_offset, _dataStream) \
|
||||
((((_offset) >> (_dataStream)->NAMEDmycache.bufSizeShift) \
|
||||
<< (_dataStream)->NAMEDmycache.bufSizeShift) == (_offset))
|
||||
@@ -97,7 +97,7 @@ extern STATUS COMN_CopyFilemapToSnapshot(
|
||||
GeneralMsg_s *genMsg,
|
||||
RootBeast_s *beast,
|
||||
Blknum_t blknum);
|
||||
|
||||
|
||||
extern BOOL COMN_ReadSnapOrDontCopyToSnap(
|
||||
RootBeast_s *beast,
|
||||
Blknum_t bitNumber);
|
||||
|
||||
13
include/nwnss/include/comnMacShortName.h
Normal file → Executable file
13
include/nwnss/include/comnMacShortName.h
Normal file → Executable file
@@ -32,9 +32,9 @@
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Share functions to create mangled Mac names (31 char names) from
|
||||
| extended Mac names and to find a zid embedded in a mangled Mac
|
||||
| file name.
|
||||
| Share functions to create mangled Mac names (31 char names) from
|
||||
| extended Mac names and to find a zid embedded in a mangled Mac
|
||||
| file name.
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _COMN_MAC_SHORT_NAME_H_
|
||||
#define _COMN_MAC_SHORT_NAME_H_
|
||||
@@ -44,15 +44,15 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
extern STATUS COMN_MakeShortMacFileName (
|
||||
zInfo_s * zSrcInfo,
|
||||
unicode_t * shortFileName,
|
||||
zInfo_s * zSrcInfo,
|
||||
unicode_t * shortFileName,
|
||||
BYTE * MacByteName);
|
||||
|
||||
extern LONG COMN_GetZidFromMangledName (
|
||||
unicode_t * fileName);
|
||||
|
||||
extern BOOL COMN_VerifyMangledMacName (
|
||||
unicode_t * mangledName,
|
||||
unicode_t * mangledName,
|
||||
unicode_t * fileName);
|
||||
|
||||
|
||||
@@ -61,3 +61,4 @@ extern BOOL COMN_VerifyMangledMacName (
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -45,19 +45,19 @@
|
||||
#define _COMNPARAMS_H_
|
||||
|
||||
#ifndef _MSGGEN_H_
|
||||
# include <include/msgGen.h>
|
||||
# include <msgGen.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XUNICODE_H_
|
||||
#include <library/xUnicode.h>
|
||||
#include <xUnicode.h>
|
||||
#endif
|
||||
|
||||
#ifndef _COMNBEASTS_H_
|
||||
# include <include/comnBeasts.h>
|
||||
# include <comnBeasts.h>
|
||||
#endif
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
# include <public/zParams.h>
|
||||
# include <zParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -90,14 +90,14 @@ typedef struct UserXaction_s UserXaction_s;
|
||||
#define zSAGENT_Z 1
|
||||
#define zSAGENT_NETWARE 2
|
||||
#define zSAGENT_NFS 3
|
||||
#define zSAGENT_HTTP 4
|
||||
#define zSAGENT_CIFS 5
|
||||
#define zSAGENT_HTTP 4
|
||||
#define zSAGENT_CIFS 5
|
||||
#define zSAGENT_LSA 6
|
||||
|
||||
#define zSAGENT_MAX_ID 32 /* the volevent subsystem keeps an array indexed
|
||||
* by semantic agent ID. This is the size of
|
||||
* that array. If we ever need to support more
|
||||
* than this number of semantic agents, this
|
||||
* than this number of semantic agents, this
|
||||
* number needes to be expanded. */
|
||||
|
||||
#if BLKNUM_64 IS_DISABLED
|
||||
@@ -204,7 +204,7 @@ typedef struct COMNVersionInformation_s
|
||||
NINT minorVersion; /* 0-nn */
|
||||
NINT subVersion; /* 0-nn */
|
||||
NINT buildNumber; /* 1-nnnn */
|
||||
NINT apiVersion; /* 1-x */
|
||||
NINT apiVersion; /* 1-x */
|
||||
NINT debugEnabled; /* TRUE or FALSE */
|
||||
NINT reserved[10];
|
||||
} COMNVersionInformation_s;
|
||||
@@ -266,7 +266,7 @@ typedef struct DeleteMsg_s
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef struct FileMapMsg_s
|
||||
{
|
||||
QUAD startingOffset; /* start offset for the map */
|
||||
QUAD startingOffset; /* start offset for the map */
|
||||
NINT extentListCount; /* num elements to fit in ret list */
|
||||
NINT extentListFormat; /* format for the return extent list */
|
||||
void *ret_extentList; /* return buffer for the extents */
|
||||
@@ -287,11 +287,11 @@ typedef struct FileMapMsg_s
|
||||
typedef struct GetNameMsg_s
|
||||
{
|
||||
/* Info for FileType-generic information */
|
||||
NINT getNameMask; /* which optional path info to get */
|
||||
NINT internalFlags; /* Internal only flags for get file name */
|
||||
NINT pathFormat; /* path format to get name in */
|
||||
NINT nameSpaceID; /* namespace to get name in */
|
||||
NINT sizeRetGetName; /* sz of buf to receive info */
|
||||
NINT getNameMask; /* which optional path info to get */
|
||||
NINT internalFlags; /* Internal only flags for get file name */
|
||||
NINT pathFormat; /* path format to get name in */
|
||||
NINT nameSpaceID; /* namespace to get name in */
|
||||
NINT sizeRetGetName; /* sz of buf to receive info */
|
||||
struct zGetName_s *ret_getName; /* buffer to put path info into */
|
||||
} GetNameMsg_s;
|
||||
|
||||
@@ -312,9 +312,9 @@ typedef struct GetNameMsg_s
|
||||
((_info)->infoVersion = (_version), \
|
||||
(_info)->totalBytes = (_size), \
|
||||
((_info)->nextByte = \
|
||||
((_version) == zINFO_VERSION_A) ? \
|
||||
((_version) == zINFO_VERSION_A) ? \
|
||||
offsetof(zInfo_s, variableData) : \
|
||||
(((_version) == zINFO_VERSION_B) ? \
|
||||
(((_version) == zINFO_VERSION_B) ? \
|
||||
offsetof(zInfoB_s, variableData) : \
|
||||
(((_version) == zINFO_VERSION_C) ? \
|
||||
offsetof(zInfoC_s, variableData) : \
|
||||
@@ -329,16 +329,16 @@ typedef struct GetNameMsg_s
|
||||
typedef struct GetInfoMsg_s
|
||||
{
|
||||
/* Info for FileType-generic information */
|
||||
NINT getInfoMask; /* which optional info to get */
|
||||
NINT getInfoMask; /* which optional info to get */
|
||||
struct zInfo_s *ret_getInfo; /* buffer to put info into */
|
||||
NINT nameSpaceID; /* namespace to get name in */
|
||||
struct HardLinkBeast_s *hlFile; /* point to a hardlink file that contains the desired name */
|
||||
NINT nameSpaceID; /* namespace to get name in */
|
||||
struct HardLinkBeast_s *hlFile; /* point to a hardlink file that contains the desired name */
|
||||
/* cnt nameUniquifier; name uniquifier - for name options */
|
||||
|
||||
/* Info for FileType-specific information */
|
||||
NINT getTypeInfoMask; /* which type-specific optional info */
|
||||
NINT sizeRetGetTypeInfo; /* sz of buf for type-specific info */
|
||||
void *ret_getTypeInfo; /* buffer for type-specific info */
|
||||
NINT getTypeInfoMask; /* which type-specific optional info */
|
||||
NINT sizeRetGetTypeInfo; /* sz of buf for type-specific info */
|
||||
void *ret_getTypeInfo; /* buffer for type-specific info */
|
||||
BOOL snapShotFileInfo; /* set to get info on snapshot file */
|
||||
} GetInfoMsg_s;
|
||||
|
||||
@@ -393,7 +393,7 @@ typedef struct GetInfoMsg_s
|
||||
(_infoMsg)->sizeRetGetTypeInfo = (_retTypeInfoSize), \
|
||||
(_infoMsg)->ret_getTypeInfo = (_retTypeInfoBuf), \
|
||||
(_infoMsg)->ret_getInfo = 0, \
|
||||
(_infoMsg)->snapShotFileInfo = FALSE)
|
||||
(_infoMsg)->snapShotFileInfo = FALSE)
|
||||
|
||||
extern STATUS COMN_InfoInitFileName(
|
||||
zInfo_s *info,
|
||||
@@ -420,26 +420,26 @@ typedef struct LinkMsg_s
|
||||
/*---------------------------------------------------------------------------
|
||||
* This defines the message structure for opening a beast
|
||||
*---------------------------------------------------------------------------*/
|
||||
/* Whoever wishes OPEN call to be suspended and tried later due to a
|
||||
/* Whoever wishes OPEN call to be suspended and tried later due to a
|
||||
* conflicting file lock should use OpenWaiting_s as the first field
|
||||
* in their userData passed by OpenMsg
|
||||
*/
|
||||
typedef struct OpenWaiting_s
|
||||
{
|
||||
DQlink_t link;
|
||||
NINT state;
|
||||
UserXaction_s *xaction; /* Xaction that is waiting */
|
||||
{
|
||||
DQlink_t link;
|
||||
NINT state;
|
||||
UserXaction_s *xaction; /* Xaction that is waiting */
|
||||
|
||||
void (*openResumeCallback)( /* If the open request allows open */
|
||||
struct OpenWaiting_s **openWaiting); /* to be suspended because of */
|
||||
/* conflicting file locks, this is */
|
||||
/* the function to call back when */
|
||||
/* open is resumed and finished */
|
||||
void (*openResumeCallback)( /* If the open request allows open */
|
||||
struct OpenWaiting_s **openWaiting); /* to be suspended because of */
|
||||
/* conflicting file locks, this is */
|
||||
/* the function to call back when */
|
||||
/* open is resumed and finished */
|
||||
|
||||
}OpenWaiting_s;
|
||||
|
||||
#define OPEN_WAITING 0x01 /* flag on when file open is suspended*/
|
||||
/* because of conflicting file locks */
|
||||
#define OPEN_WAITING 0x01 /* flag on when file open is suspended*/
|
||||
/* because of conflicting file locks */
|
||||
#define OPEN_RESUMING 0x02 /* Suspended open is during resuming */
|
||||
#define OPEN_CANCELLED 0x04 /* Suspended open is cancelled */
|
||||
|
||||
@@ -447,21 +447,21 @@ typedef struct OpenWaiting_s
|
||||
typedef struct OpenMsg_s
|
||||
{
|
||||
NINT requestedRights; /* (create and open) see pssparms.h*/
|
||||
void *openParms; /* type specific information */
|
||||
void *openParms; /* type specific information */
|
||||
|
||||
OpenWaiting_s *openWaiting; /* userData to call back after open*/
|
||||
/* is resumed */
|
||||
} OpenMsg_s;
|
||||
|
||||
#define COMN_SETUP_OPEN_FILE_MSG(_openMsg, _rights, _opParms) \
|
||||
((_openMsg)->requestedRights = (_rights), \
|
||||
(_openMsg)->openParms = (_opParms), \
|
||||
#define COMN_SETUP_OPEN_FILE_MSG(_openMsg, _rights, _opParms) \
|
||||
((_openMsg)->requestedRights = (_rights), \
|
||||
(_openMsg)->openParms = (_opParms), \
|
||||
(_openMsg)->openWaiting = NULL)
|
||||
|
||||
|
||||
#define COMN_SETUP_RETRY_OPEN_FILE_MSG(_openMsg, _rights, _opParms, _openWaiting) \
|
||||
((_openMsg)->requestedRights = (_rights), \
|
||||
(_openMsg)->openParms = (_opParms), \
|
||||
((_openMsg)->requestedRights = (_rights), \
|
||||
(_openMsg)->openParms = (_opParms), \
|
||||
(_openMsg)->openWaiting = (_openWaiting))
|
||||
|
||||
|
||||
@@ -535,7 +535,7 @@ typedef struct RenameMsg_s
|
||||
typedef struct SearchMsg_s
|
||||
{
|
||||
SearchMapIDP_s srchMap; /* holds ID of searchmap*/
|
||||
NINT srchSeqNum; /* holds current sequence number,
|
||||
NINT srchSeqNum; /* holds current sequence number,
|
||||
* receives next sequence number*/
|
||||
NINT srchOpt; /* search options (see PSSCOMN.H)*/
|
||||
NINT nameType; /* name type to search for */
|
||||
@@ -621,7 +621,7 @@ typedef struct SearchMsg_s
|
||||
* because it used the wrong searchMap */
|
||||
#define SMAPOPT_notReusable 0x00040000 /* if SET, the search map will be
|
||||
* malloc'd when it is created and
|
||||
* it will be free'd when it is
|
||||
* it will be free'd when it is
|
||||
* closed. This should only be
|
||||
* used by semantic agents which
|
||||
* guarantee to cleanup all search
|
||||
@@ -638,8 +638,8 @@ typedef struct SearchMsg_s
|
||||
* called. This option is automatically
|
||||
* cleared after each use*/
|
||||
#define SMAPOPT_doRootdirFlag 0x00200000 /* if SET, then the high nible of the
|
||||
* MAPID is set to 0xf000 if this is the
|
||||
* rootdirectory, else it is zero*/
|
||||
* MAPID is set to 0xf000 if this is the
|
||||
* rootdirectory, else it is zero*/
|
||||
#define SMAPOPT_seqNumber 0x00400000 /* if SET, generate a sequence number*/
|
||||
#define SMAPOPT_searchAllDirs 0x00800000 /* if SET, this searches an entire
|
||||
* subtree. The default is to return
|
||||
@@ -653,7 +653,7 @@ typedef struct SearchMsg_s
|
||||
* files are returned before returning
|
||||
* their containing directories. */
|
||||
#define SMAPOPT_usedDOSafterLONG 0x10000000 /* if SET, this search map was used on
|
||||
* a wildcard search with a long
|
||||
* a wildcard search with a long
|
||||
* namespace, but the long did not
|
||||
* match, so we tried DOS name space
|
||||
* and it worked. Until this search
|
||||
@@ -664,13 +664,13 @@ typedef struct SearchMsg_s
|
||||
* are located, return the access
|
||||
* denied error */
|
||||
#define SMAPOPT_atEndOfDir 0x40000000 /* if set, this search map has
|
||||
* reached the end of the directory
|
||||
* and returned an error--so subsequent
|
||||
* searches should fail)
|
||||
* (internal, only set by NSS */
|
||||
* reached the end of the directory
|
||||
* and returned an error--so subsequent
|
||||
* searches should fail)
|
||||
* (internal, only set by NSS */
|
||||
#define SMAPOPT_inactive 0x80000000 /* if set, this search map is on the
|
||||
* INACTIVE list (internal, only set
|
||||
* by NSS)*/
|
||||
* INACTIVE list (internal, only set
|
||||
* by NSS)*/
|
||||
|
||||
#define SMAPOPT_MODE(mode) ((mode) & 0x0000ffff) /* used to extract the mode
|
||||
* portion of the searchmap operations*/
|
||||
@@ -712,7 +712,7 @@ extern NINT NameTypeNameSpaces[zNTYPE_MAX_DEFINED]; /* Internal only */
|
||||
(((_nType) > zNTYPE_MAX_DEFINED) ? 0 : NameTypeNameSpaces[(_nType)])
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Routine for getting given datastream's physical storage info
|
||||
* Routine for getting given datastream's physical storage info
|
||||
* including that of its compressed stream (if any)
|
||||
* (used to be a macro)
|
||||
*---------------------------------------------------------------------------*/
|
||||
@@ -722,12 +722,12 @@ extern STATUS COMN_GetStorageInfo(
|
||||
GetStorageInfo_s *getStorageInfo);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Get the # blocks currently contributed by given beast to the
|
||||
* Get the # blocks currently contributed by given beast to the
|
||||
* Volume's purgeableBlk count.
|
||||
*---------------------------------------------------------------------------*/
|
||||
STATUS
|
||||
COMN_GetPurgeableBlksCnt(
|
||||
GeneralMsg_s *genMsg,
|
||||
GeneralMsg_s *genMsg,
|
||||
void *voidBeast,
|
||||
QUAD *purgeableBlks); /* out */
|
||||
|
||||
@@ -737,10 +737,10 @@ COMN_GetPurgeableBlksCnt(
|
||||
*---------------------------------------------------------------------------*/
|
||||
void
|
||||
COMN_saveBeastPurgeableBlksCnt(
|
||||
GeneralMsg_s *genMsg,
|
||||
GeneralMsg_s *genMsg,
|
||||
NamedBeast_s *beast,
|
||||
RootBeast_s *compBeast,
|
||||
Blknum_t purgeableBlks);
|
||||
Blknum_t purgeableBlks);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Macros for getting physical storage info. It differs from COMN_GetStorageInfo
|
||||
|
||||
@@ -44,34 +44,34 @@
|
||||
#ifndef _COMNPUBLICS_H_
|
||||
#define _COMNPUBLICS_H_
|
||||
|
||||
#if zNETWARE || (zLINUX && (defined(__KERNEL__) || defined(NSS_USERSPACE)))
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
#ifndef _COMNPARAMS_H_
|
||||
# include <include/comnParams.h>
|
||||
# include <comnParams.h>
|
||||
#endif
|
||||
#include <library/xUnicode.h>
|
||||
#include <xUnicode.h>
|
||||
|
||||
#ifndef _FSMSG_H_
|
||||
# include <include/fsmsg.h>
|
||||
# include <fsmsg.h>
|
||||
#endif
|
||||
|
||||
#ifndef _MSGIO_H_
|
||||
# include <include/msgIO.h>
|
||||
# include <msgIO.h>
|
||||
#endif
|
||||
|
||||
#ifndef _VOLUME_H_
|
||||
# include <include/volume.h>
|
||||
# include <volume.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if zLINUX && !defined(__KERNEL__)
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if zNETWARE || (zLINUX && (defined(__KERNEL__) || defined(NSS_USERSPACE)))
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
/* Pre-define struct(s) so Linux compiler doesn't complain */
|
||||
struct BeastClassRegisterInfo_s;
|
||||
|
||||
@@ -79,7 +79,7 @@ struct BeastClassRegisterInfo_s;
|
||||
|
|
||||
| SPECIAL NOTE:
|
||||
|
|
||||
| NO function can be promoted from the common area to public that
|
||||
| NO function can be promoted from the common area to public that
|
||||
| returns a structure, you must copy the data to a return buffer or
|
||||
| change the function to return an external info structure. All
|
||||
| public function should return STATUS.
|
||||
@@ -105,8 +105,8 @@ extern STATUS COMN_GetMACDataStreamPtr(
|
||||
BOOL *newlyLatched);
|
||||
|
||||
extern STATUS COMN_ResetNameMsgToSearchPattern(
|
||||
GeneralMsg_s *genMsg,
|
||||
NamingMsg_s *nameMsg);
|
||||
GeneralMsg_s *genMsg,
|
||||
NamingMsg_s *nameMsg);
|
||||
|
||||
extern void *COMN_GetPathNameWorkBuffer(
|
||||
GeneralMsg_s *genMsg);
|
||||
@@ -115,7 +115,7 @@ extern void COMN_ReleasePathNameWorkBufferInternal(
|
||||
void *workBuffer);
|
||||
|
||||
/********** COMN_ReleasePathNameWorkBuffer(void **workBuffer) ***********/
|
||||
#define COMN_ReleasePathNameWorkBuffer(_workBuffer) \
|
||||
#define COMN_ReleasePathNameWorkBuffer(_workBuffer) \
|
||||
{ \
|
||||
COMN_ReleasePathNameWorkBufferInternal(*(_workBuffer)); \
|
||||
*(_workBuffer)=NULL; \
|
||||
@@ -137,7 +137,7 @@ extern STATUS COMN_CreateWithCallback(
|
||||
GeneralMsg_s *genMsg,
|
||||
NamingMsg_s *nameMsg,
|
||||
CreateMsg_s *createMsg,
|
||||
FileHandleIDP_s *retFileHandle,
|
||||
FileHandleIDP_s *retFileHandle,
|
||||
void *userParam,
|
||||
STATUS (*createCallBack)(GeneralMsg_s *genMsg,
|
||||
NamingMsg_s *nameMsg,
|
||||
@@ -233,8 +233,8 @@ extern STATUS COMN_SetEOF(zNSSMsg_s *msg);
|
||||
* FileIO prototypes
|
||||
*---------------------------------------------------------------------------*/
|
||||
extern PubBuffer_s *COMN_FastReadCache(
|
||||
MyCache_s *mycache,
|
||||
Blknum_t fileBlk);
|
||||
MyCache_s *mycache,
|
||||
Blknum_t fileBlk);
|
||||
|
||||
extern STATUS COMN_AsyncRead(zNSSMsg_s *msg);
|
||||
|
||||
@@ -338,7 +338,7 @@ extern ContextHandleInfo_s *COMN_DoResolveContextHandle(
|
||||
ContextHandleIDP_s *cxhIDP);
|
||||
|
||||
/* See comments on COMN_DoResolveContextHandle. This releases the use count
|
||||
* on a context handle. It must be called to release any context handle
|
||||
* on a context handle. It must be called to release any context handle
|
||||
* pointed to by a non-NULL ContextHandleIDP_s */
|
||||
extern void COMN_DoReleaseContextHandleIDP(
|
||||
ContextHandleIDP_s *cxhIDP);
|
||||
@@ -532,9 +532,9 @@ STATUS COMN_PoolEvent(
|
||||
NINT state );
|
||||
|
||||
extern STATUS COMN_VolumeAlert(
|
||||
GeneralMsg_s *genMsg,
|
||||
GeneralMsg_s *genMsg,
|
||||
RootBeast_s *beast,
|
||||
Volume_s *volume,
|
||||
Volume_s *volume,
|
||||
struct Buffer_s *buffer,
|
||||
Blknum_t fileBlock,
|
||||
Blknum_t volumeBlock,
|
||||
@@ -571,8 +571,8 @@ extern STATUS COMN_BrowseBeastsInVolume(
|
||||
BOOL onlineOnly,
|
||||
NINT selectionCriteria,
|
||||
NINT numBeastsRequested,
|
||||
Zid_t *lastZidReturned, /* inout */
|
||||
Zid_t *beastZids, /* out */
|
||||
Zid_t *lastZidReturned, /* inout */
|
||||
Zid_t *beastZids, /* out */
|
||||
NINT *numBeastsReturned); /* out */
|
||||
|
||||
extern STATUS COMN_FixVolumeCompStats(
|
||||
@@ -646,7 +646,7 @@ extern SAHandle_s *COMN_DoResolveSemanticAgentHandle(
|
||||
SAHandleIDP_s *sahIDP);
|
||||
|
||||
/* See comments on COMN_DoResolveContextHandle. This releases the use count
|
||||
* on a context handle. It must be called to release any context handle
|
||||
* on a context handle. It must be called to release any context handle
|
||||
* pointed to by a non-NULL ContextHandleIDP_s */
|
||||
extern void COMN_DoReleaseSAgentHandleIDP(
|
||||
SAHandleIDP_s *sahIDP);
|
||||
@@ -711,12 +711,12 @@ extern STATUS COMN_GetNameFromBeast( /* Requires pre-latch, returns name only */
|
||||
NINT nameSpaceID,
|
||||
NINT retNameSize, /* size in unicode characters, not in bytes */
|
||||
unicode_t *retName,
|
||||
NINT *retNameLen); /* this may be NULL if you don't want the length */
|
||||
NINT *retNameLen); /* this may be NULL if you don't want the length */
|
||||
|
||||
extern STATUS COMN_GetFileNameFromZid(
|
||||
GeneralMsg_s *genMsg,
|
||||
Volume_s *volume,
|
||||
Zid_t zid,
|
||||
Zid_t zid,
|
||||
NINT nameSpaceID,
|
||||
unicode_t *name,
|
||||
BOOL appendSeperator);
|
||||
@@ -724,14 +724,14 @@ extern STATUS COMN_GetFileNameFromZid(
|
||||
extern STATUS COMN_GetFileNameFromZid2(
|
||||
GeneralMsg_s *genMsg,
|
||||
Volume_s *volume,
|
||||
Zid_t zid,
|
||||
NINT nameSpaceID,
|
||||
Zid_t zid,
|
||||
NINT nameSpaceID,
|
||||
unicode_t *name,
|
||||
BOOL appendSeperator);
|
||||
|
||||
extern STATUS COMN_ZidToFileName(
|
||||
VolumeID_t *volume,
|
||||
Zid_t zid,
|
||||
Zid_t zid,
|
||||
NINT nameSpaceID,
|
||||
unicode_t *fileName,
|
||||
unicode_t *volName);
|
||||
@@ -739,7 +739,7 @@ extern STATUS COMN_ZidToFileName(
|
||||
extern STATUS EFL_GetNameFromZid(
|
||||
GeneralMsg_s *genMsg,
|
||||
Volume_s *volume,
|
||||
Zid_t zid,
|
||||
Zid_t zid,
|
||||
NINT nameSpaceID,
|
||||
unicode_t *name,
|
||||
NINT *objectType);
|
||||
@@ -852,7 +852,7 @@ extern NINT SYSHotFixSize;
|
||||
extern STATUS DisplayFreePartitions();
|
||||
extern STATUS SalvageSys();
|
||||
extern STATUS ChangeSysQuota(
|
||||
utf8_t quota[]);
|
||||
utf8_t quota[]);
|
||||
extern STATUS ExpandSys(
|
||||
utf8_t passedPartitionID[]);
|
||||
extern STATUS RenameToSys(
|
||||
@@ -874,7 +874,7 @@ extern STATUS COMN_RegisterBeastClass(
|
||||
|
||||
extern STATUS COMN_RegisterBeastClassList(
|
||||
GeneralMsg_s *genMsg,
|
||||
struct BeastClassRegisterInfo_s *beastClassList);
|
||||
struct BeastClassRegisterInfo_s *beastClassList);
|
||||
|
||||
extern STATUS COMN_UnregisterBeastClass(
|
||||
NINT beastClassID);
|
||||
@@ -958,22 +958,22 @@ extern STATUS COMN_GetBeastFullName(
|
||||
*---------------------------------------------------------------------------*/
|
||||
extern void *COMN_LookupByZid(
|
||||
GeneralMsg_s *genMsg,
|
||||
void *volume,
|
||||
Zid_t zid,
|
||||
void *volume,
|
||||
Zid_t zid,
|
||||
NINT latchType,
|
||||
BOOL dontDoVisibilityCheck);
|
||||
|
||||
extern void *COMN_LookupByZidInBeastHash(
|
||||
GeneralMsg_s *genMsg,
|
||||
void *volume,
|
||||
Zid_t zid,
|
||||
void *volume,
|
||||
Zid_t zid,
|
||||
NINT latchType,
|
||||
BOOL dontDoVisibilityCheck);
|
||||
|
||||
extern void *COMN_LookupByZidWhileWildcarding(
|
||||
GeneralMsg_s *genMsg,
|
||||
void *volume,
|
||||
Zid_t zid,
|
||||
void *volume,
|
||||
Zid_t zid,
|
||||
NINT latchType);
|
||||
|
||||
extern STATUS COMN_FlushAndTossBeast(
|
||||
@@ -983,13 +983,13 @@ extern STATUS COMN_FlushAndTossBeast(
|
||||
|
||||
extern void *COMN_LookupByZidInBeastHashAndToss(
|
||||
GeneralMsg_s *genMsg,
|
||||
void *volume,
|
||||
Zid_t zid,
|
||||
void *volume,
|
||||
Zid_t zid,
|
||||
NINT latchType);
|
||||
|
||||
extern void *COMN_BeastTossOldNotInUseBeasts(
|
||||
void *volume,
|
||||
RootBeast_s *beast);
|
||||
void *volume,
|
||||
RootBeast_s *beast);
|
||||
|
||||
#ifdef DEBUG_BEAST_USE_COUNT
|
||||
/*---------------------------------------------------------------------------
|
||||
@@ -999,7 +999,7 @@ extern void COMN_ReleaseInternal(
|
||||
void *voidBeast);
|
||||
|
||||
/********* COMN_Release(void **voidBeast) *************/
|
||||
#define COMN_Release(_voidBeast) \
|
||||
#define COMN_Release(_voidBeast) \
|
||||
{ \
|
||||
RootBeast_s *rb = (RootBeast_s *)*(_voidBeast); \
|
||||
if (rb->rb_whereRelPtr >= RB_NUM_WHERES_TO_KEEP) rb->rb_whereRelPtr = 0; \
|
||||
@@ -1015,13 +1015,13 @@ extern void COMN_UnlatchAndReleaseInternal(
|
||||
NINT latchType);
|
||||
|
||||
/********* COMN_UnlatchAndRelease(void **voidBeast, latchType) *************/
|
||||
#define COMN_UnlatchAndRelease(_voidBeast,_latchType) \
|
||||
#define COMN_UnlatchAndRelease(_voidBeast,_latchType) \
|
||||
{ \
|
||||
RootBeast_s *rb = (RootBeast_s *)*(_voidBeast); \
|
||||
if (rb->rb_whereRelPtr >= RB_NUM_WHERES_TO_KEEP) rb->rb_whereRelPtr = 0; \
|
||||
rb->rb_whereRel[rb->rb_whereRelPtr++] = WHERE; \
|
||||
rb->rb_whereTotalRel++; \
|
||||
COMN_UnlatchAndReleaseInternal(*(_voidBeast),(_latchType)); \
|
||||
COMN_UnlatchAndReleaseInternal(*(_voidBeast),(_latchType)); \
|
||||
*(_voidBeast)=NULL; \
|
||||
}
|
||||
|
||||
@@ -1049,7 +1049,7 @@ extern void COMN_ReleaseInternal(
|
||||
void *voidBeast);
|
||||
|
||||
/********* COMN_Release(void **voidBeast) *************/
|
||||
#define COMN_Release(_voidBeast) \
|
||||
#define COMN_Release(_voidBeast) \
|
||||
{ \
|
||||
COMN_ReleaseInternal(*(_voidBeast)); \
|
||||
*(_voidBeast)=NULL; \
|
||||
@@ -1061,9 +1061,9 @@ extern void COMN_UnlatchAndReleaseInternal(
|
||||
NINT latchType);
|
||||
|
||||
/********* COMN_UnlatchAndRelease(void **voidBeast, latchType) *************/
|
||||
#define COMN_UnlatchAndRelease(_voidBeast,_latchType) \
|
||||
#define COMN_UnlatchAndRelease(_voidBeast,_latchType) \
|
||||
{ \
|
||||
COMN_UnlatchAndReleaseInternal(*(_voidBeast),(_latchType)); \
|
||||
COMN_UnlatchAndReleaseInternal(*(_voidBeast),(_latchType)); \
|
||||
*(_voidBeast)=NULL; \
|
||||
}
|
||||
|
||||
@@ -1092,7 +1092,7 @@ extern void BST_MarkXLocal(RootBeast_s *beast,Xaction_s *xaction);
|
||||
#define COMN_MARK_BEAST_XLOCAL(_bst,_xaction) \
|
||||
(BST_MarkXLocal((_bst),(_xaction)))
|
||||
|
||||
#define COMN_MARK_BEAST_MESSY(_bst) \
|
||||
#define COMN_MARK_BEAST_MESSY(_bst) \
|
||||
{ \
|
||||
zASSERT(!((_bst)->ROOTvolume->VOLenabledAttributes & zATTR_READONLY)); \
|
||||
(((_bst)->bstState |= BST_STATE_MESSY)); \
|
||||
@@ -1101,9 +1101,9 @@ extern void BST_MarkXLocal(RootBeast_s *beast,Xaction_s *xaction);
|
||||
#define COMN_GET_FILE_ATTRIBUTES(nameMsg) \
|
||||
((nameMsg)->curFile->FILEattributes)
|
||||
|
||||
#define COMN_ENABLE() \
|
||||
#define COMN_ENABLE() \
|
||||
{ \
|
||||
Enable(); \
|
||||
Enable(); \
|
||||
PERIODIC_YIELD(); \
|
||||
}
|
||||
|
||||
@@ -1147,7 +1147,7 @@ extern utf8_t *GetErrorFromNumber(
|
||||
|
||||
BOOL COMN_ClusterSoftwareIsCheckingPoolStateChanges( void );
|
||||
|
||||
#if zNETWARE || (zLINUX && (defined(__KERNEL__) || defined(NSS_USERSPACE)))
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
/*---------------------------------------------------------------------------
|
||||
* Management Virtual File Prototypes
|
||||
*---------------------------------------------------------------------------*/
|
||||
@@ -1205,34 +1205,34 @@ extern STATUS zUpdateVolumeObjectInNDS(
|
||||
unicode_t *volNameNew,
|
||||
UserID_t *ndsObjectId);
|
||||
|
||||
extern STATUS COMN_SetupDSIAndLogin(BYTE *LoginObject, BYTE *LoginPassword);
|
||||
extern void COMN_CleanupCallToDSI(void);
|
||||
extern STATUS COMN_SetupDSIAndLogin(BYTE *LoginObject, BYTE *LoginPassword);
|
||||
extern void COMN_CleanupCallToDSI(void);
|
||||
|
||||
extern STATUS COMN_AsyncSetupDSIAndUpdateInNDS(
|
||||
extern STATUS COMN_AsyncSetupDSIAndUpdateInNDS(
|
||||
NINT updateAction,
|
||||
unicode_t *volNameExisting,
|
||||
unicode_t *volNameNew,
|
||||
UserID_t *ndsObjectId,
|
||||
BYTE *ndsLogin,
|
||||
BYTE *ndsPassword);
|
||||
BYTE *ndsPassword);
|
||||
|
||||
#define zCOMN_SetupDSIAndLogin(_p1, _p2, _p3) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
_p1 = COMN_SetupDSIAndLogin(_p2, _p3); \
|
||||
MPKNSS_LOCK(); \
|
||||
_p1 = COMN_SetupDSIAndLogin(_p2, _p3); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
#define zCOMN_CleanupCallToDSI() \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
COMN_CleanupCallToDSI(); \
|
||||
MPKNSS_LOCK(); \
|
||||
COMN_CleanupCallToDSI(); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
|
||||
#define zCOMN_AsyncSetupDSIAndUpdateInNDS(_p1, _p2, _p3, _p4, _p5, _p6, _p7) \
|
||||
{ \
|
||||
MPKNSS_LOCK(); \
|
||||
MPKNSS_LOCK(); \
|
||||
_p1 = COMN_AsyncSetupDSIAndUpdateInNDS(_p2, _p3, _p4, _p5, _p6, _p7); \
|
||||
MPKNSS_UNLOCK(); \
|
||||
}
|
||||
@@ -1259,11 +1259,11 @@ extern NINT COMN_IncludeType; /* BitMask of which type of volumes/pools
|
||||
#define COMN_IT_DEFAULT (COMN_IT_LOCAL | COMN_IT_SHARED)
|
||||
|
||||
#define COMN_CmdSwitchIncludePresent() (COMN_IncludeType & COMN_IT_PRESENT)
|
||||
#define COMN_CmdSwitchIncludeLocal() (COMN_IncludeType & COMN_IT_LOCAL)
|
||||
#define COMN_CmdSwitchIncludeLocal() (COMN_IncludeType & COMN_IT_LOCAL)
|
||||
#define COMN_CmdSwitchIncludeShared() (COMN_IncludeType & COMN_IT_SHARED)
|
||||
#define COMN_CmdSwitchIncludeGet() (COMN_IncludeType)
|
||||
#define COMN_CmdSwitchIncludeGet() (COMN_IncludeType)
|
||||
|
||||
extern NINT COMN_OverrideType; /* BitMask of overrides that a user can
|
||||
extern NINT COMN_OverrideType; /* BitMask of overrides that a user can
|
||||
* specify that modifies how a command works.
|
||||
* Legal bits COMN_OT_SHARED, COMN_OT_CORRUPT
|
||||
* and COMN_OT_QUESTIONS. This
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
@@ -156,7 +156,7 @@ extern DQhead_t HomeTimeOrderList;
|
||||
extern Task_s *lookupTask(Master_s *master, NINT taskID);
|
||||
extern UserXaction_s *lookupXaction(Xid_t xid);
|
||||
extern UserXaction_s *lookupActiveXaction(Xid_t xid);
|
||||
extern UserXaction_s *lookupDefaultXaction (Master_s *master, NINT taskID);
|
||||
extern UserXaction_s *lookupDefaultXaction (Master_s *master, NINT taskID);
|
||||
extern Task_s *allocTask(Master_s *master, NINT taskID);
|
||||
extern UserXaction_s *allocUserXaction(Task_s *task, UserXaction_s *parentXaction);
|
||||
extern HomeXaction_s *allocHomeXaction(UserXaction_s *uxaction);
|
||||
@@ -183,12 +183,12 @@ extern void COMN_CleanupMaster(Master_s *master);
|
||||
|
||||
extern STATUS COMN_BeginTask (
|
||||
GeneralMsg_s *genMsg,
|
||||
Master_s *master,
|
||||
Master_s *master,
|
||||
NINT *taskID);
|
||||
|
||||
extern STATUS COMN_EndTask (
|
||||
GeneralMsg_s *genMsg,
|
||||
Master_s *master,
|
||||
Master_s *master,
|
||||
NINT taskID);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define _COMNVARIABLEDATA_H_
|
||||
|
||||
#ifndef _COMNPARAMS_H_
|
||||
# include <include/comnParams.h>
|
||||
# include <comnParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -102,7 +102,7 @@ typedef STATUS (*RVD_SetXMLInfoFunc_t)(
|
||||
RootBeast_s *beast,
|
||||
NINT bufLen,
|
||||
utf8_t *buf,
|
||||
Xaction_s *xaction,
|
||||
Xaction_s *xaction,
|
||||
BOOL doChange);
|
||||
|
||||
/****************************************************************************
|
||||
@@ -135,9 +135,9 @@ extern STATUS COMN_SetRootVariableDataXMLInfo(
|
||||
RootBeast_s *beast,
|
||||
NINT bufLen,
|
||||
utf8_t *buf,
|
||||
Xaction_s *xaction,
|
||||
Xaction_s *xaction,
|
||||
BOOL doChange);
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* These are functions that may be called by the LSS root beast pack routines.
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#define _COMNZAS_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
//#ifndef _COMNAUTHORIZE_H_
|
||||
@@ -78,7 +78,7 @@ extern "C" {
|
||||
typedef struct ACLEntry_s
|
||||
{ /* an access control list entry */
|
||||
UserID_t trusteeID; /* an authenticated ID */
|
||||
WORD rights; /* the rights mask */
|
||||
WORD rights; /* the rights mask */
|
||||
WORD attributes; /* the mode and status bits */
|
||||
} NSS_MEDIA_STRUCTURE(ACLEntry_s,attributes) ACLEntry_s;
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef struct ACLEntry_s
|
||||
typedef struct VisEntry_s
|
||||
{ /* a visiblity list entry */
|
||||
UserID_t trusteeID; /* an authenticated ID */
|
||||
LONG count; /* count of times used below this entry */
|
||||
LONG count; /* count of times used below this entry */
|
||||
} NSS_MEDIA_STRUCTURE(VisEntry_s,count) VisEntry_s;
|
||||
|
||||
/*
|
||||
@@ -102,14 +102,14 @@ typedef struct VisEntry_s
|
||||
typedef struct V1_ACLEntry_s
|
||||
{ /* an access control list entry (beast version 1)*/
|
||||
LONG trusteeID; /* an authenticated ID */
|
||||
WORD rights; /* the rights mask */
|
||||
WORD rights; /* the rights mask */
|
||||
WORD attributes; /* the mode and status bits */
|
||||
} NSS_MEDIA_STRUCTURE(V1_ACLEntry_s,attributes) V1_ACLEntry_s;
|
||||
|
||||
typedef struct V1_VisEntry_s
|
||||
{ /* a visiblity list entry (beast version 1)*/
|
||||
LONG trusteeID; /* an authenticated ID */
|
||||
LONG count; /* count of times used below this entry */
|
||||
LONG count; /* count of times used below this entry */
|
||||
} NSS_MEDIA_STRUCTURE(V1_VisEntry_s,count) V1_VisEntry_s;
|
||||
|
||||
|
||||
|
||||
@@ -45,17 +45,17 @@
|
||||
#define _CONTROL_H_
|
||||
|
||||
#ifndef _QUE_H_
|
||||
# include <library/que.h>
|
||||
# include <que.h>
|
||||
#endif
|
||||
|
||||
#if HISTOGRAM IS_ENABLED
|
||||
#ifndef _HISTOGRAM_H_
|
||||
# include <include/histogram.h>
|
||||
# include <histogram.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _ALARM_H_
|
||||
# include <include/alarm.h>
|
||||
# include <alarm.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -133,7 +133,7 @@ typedef struct ControlStore_s
|
||||
* if it gets very high, the next block
|
||||
* it permanantly added.
|
||||
*/
|
||||
|
||||
|
||||
#if HISTOGRAM IS_ENABLED
|
||||
Histogram_s histogram;
|
||||
#endif
|
||||
|
||||
112
include/nwnss/include/dbgView.h
Normal file
112
include/nwnss/include/dbgView.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2002 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: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| View NSS items from the assembly debugger.
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "dfi.h"
|
||||
#include "sdBasic.h"
|
||||
|
||||
typedef struct CommandViewInfo_s {
|
||||
/*** Caller must fill in BEFORE register call ***/
|
||||
char *CVI_OwnerName; /* E.G. 'NSS' or 'ZLSS' or 'DPSFAT' */
|
||||
SDM_Table_s *CVI_Table; /* Pointer to table of 'subcommands' that owner supports. */
|
||||
/*** Internal items that register will fill in ***/
|
||||
unsigned int CVI_Index;
|
||||
} CommandViewInfo_s;
|
||||
|
||||
|
||||
|
||||
extern DFI_CallerOptions_s *NSSCo;
|
||||
|
||||
STATUS DBG_CV_Register(
|
||||
CommandViewInfo_s *cvi ); /* Pointer must be valid UNTIL after unregister is called */
|
||||
STATUS DBG_CV_Unregister(
|
||||
CommandViewInfo_s *cvi ); /* Pointer must be valid UNTIL after unregister is called */
|
||||
|
||||
STATUS DBG_CV_DisplayHelp(
|
||||
struct ScreenStruct *screen );
|
||||
|
||||
STATUS DBG_CV_DisplayItem(
|
||||
struct ScreenStruct *screen,
|
||||
CommandViewInfo_s *cvi,
|
||||
SDM_Table_s *table,
|
||||
LONG *linesUsed );
|
||||
|
||||
LONG DBG_CheckForPause(
|
||||
struct ScreenStruct *screen,
|
||||
LONG *linesUsed,
|
||||
LONG linesNeeded);
|
||||
|
||||
STATUS DBG_CommandView(
|
||||
struct ScreenStruct *screen,
|
||||
char **commandL,
|
||||
struct StackFrame *stackFrame );
|
||||
|
||||
STATUS DBG_CommandViewCommand(
|
||||
struct ScreenStruct *screen,
|
||||
char **commandL,
|
||||
struct StackFrame *stackFrame,
|
||||
BOOL onAttempt );
|
||||
|
||||
STATUS DBG_CommandViewHelp(
|
||||
struct ScreenStruct *screen,
|
||||
char **commandL );
|
||||
|
||||
STATUS DBG_CommandViewMemory(
|
||||
struct ScreenStruct *screen,
|
||||
char **commandL,
|
||||
struct StackFrame *stackFrame );
|
||||
|
||||
BOOL DBG_CommandViewMemoryParse(
|
||||
struct ScreenStruct *screen,
|
||||
char **commandL,
|
||||
struct StackFrame *stackFrame,
|
||||
char *structureName,
|
||||
unsigned int structureNameSize, /* Must be at least 3 */
|
||||
ADDR *address );
|
||||
|
||||
STATUS DBG_CommandViewAlpha(
|
||||
struct ScreenStruct *screen,
|
||||
char **commandL );
|
||||
|
||||
STATUS DBG_CommandViewView(
|
||||
struct ScreenStruct *screen,
|
||||
char **commandL );
|
||||
|
||||
STATUS DBG_CommandViewSize(
|
||||
struct ScreenStruct *screen,
|
||||
char **commandL );
|
||||
|
||||
377
include/nwnss/include/dfi.h
Normal file
377
include/nwnss/include/dfi.h
Normal file
@@ -0,0 +1,377 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| DFI - Generic code that understands how to display information
|
||||
/ in XML format given the information structure definition
|
||||
/ (as described by a DFI_DataFormatInformation_s)/
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: gpachner $
|
||||
| $Date: 2007-06-15 04:11:12 +0530 (Fri, 15 Jun 2007) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 2059 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _DFI_H_
|
||||
#define _DFI_H_
|
||||
|
||||
//#ifndef _NWGREENRIVER_
|
||||
//#define _NWGREENRIVER_ /* This define helps asyncio.h */
|
||||
//#endif
|
||||
|
||||
#ifdef NTLIB
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#include "zOmni.h"
|
||||
#include "omni.h"
|
||||
#include "snp.h"
|
||||
|
||||
/* Pre-declare the following structure(s) */
|
||||
struct DFI_CallerOptions_s;
|
||||
struct DFI_DataFormatInformation_s;
|
||||
|
||||
typedef signed int SIZEOF; /* Typedef used to ensure routines are
|
||||
* returning a size and not an error.
|
||||
*/
|
||||
|
||||
#define DFI_OK 0
|
||||
#define DFI_ERROR_CALLER_OPTION_STRUCTURE_NULL 19000
|
||||
#define DFI_ERROR_CALLER_OPTION_STRUCTURE_SIGNATURE_BAD 19001
|
||||
|
||||
|
||||
/* Generic ErrorTracking structure and macros */
|
||||
typedef struct ErrorTracking_s {
|
||||
STATUS ET_Errno;
|
||||
char *ET_ErrnoSetter;
|
||||
} ErrorTracking_s;
|
||||
|
||||
#define ET_SetErrno( _et, _error ) ( ((_et)->ET_Errno = _error), ((_et)->ET_ErrnoSetter = (WHERE)) )
|
||||
#define ET_SetErrnoAndWhere( _et, _error, _where ) ( ((_et)->ET_Errno = _error), ((_et)->ET_ErrnoSetter = (_where)) )
|
||||
#define ET_ClearErrno(_et) ( ((_et)->ET_Errno = zOK), ((_et)->ET_ErrnoSetter = (WHERE)) )
|
||||
#define ET_GetErrno(_et) ((_et)->ET_Errno)
|
||||
#define ET_GetErrnoSetter(_et) ((_et)->ET_ErrnoSetter)
|
||||
|
||||
|
||||
|
||||
/* Macros to set errno in ErrorTracking item in a DFI */
|
||||
#define DFI_SetErrno( _dfi, _error ) (ET_SetErrno( &((_dfi)->DCO_Errno), _error ))
|
||||
#define DFI_SetErrnoAndWhere( _dfi, _error, _where ) (ET_SetErrno( &((_dfi)->DCO_Errno), _error ))
|
||||
#define DFI_ClearErrno(_dfi) (ET_ClearErrno( &((_dfi)->DCO_Errno) ))
|
||||
#define DFI_GetErrno(_dfi) (ET_GetErrno( &((_dfi)->DCO_Errno) ))
|
||||
#define DFI_GetErrnoSetter(_dfi) (ET_GetErrnoSetter( &((_dfi)->DCO_Errno) ))
|
||||
|
||||
|
||||
|
||||
/* Pre-declare circular type dependencies that exist below */
|
||||
typedef struct DFI_CallerOptions_s DFI_CallerOptions_s;
|
||||
typedef struct DFI_DataFormatInformation_s DFI_DataFormatInformation_s;
|
||||
|
||||
typedef STATUS (*DFI_RoutineStructure_t)( DFI_CallerOptions_s *co, DFI_DataFormatInformation_s *dfi, BYTE *buffer, NINT offset, NINT index );
|
||||
|
||||
struct DFI_DataFormatInformation_s {
|
||||
NINT DFI_Type; // See DFI_TYPE_xxx below
|
||||
// STATUS (*DFI_Routine); // Handles abnormal types
|
||||
DFI_RoutineStructure_t DFI_Routine;
|
||||
NINT DFI_Offset; // Not going to work on variable length structures
|
||||
char *DFI_Name; // Name to display
|
||||
NINT DFI_ArrayElements; // Non-zero indicates an ARRAY of DFI_Type types
|
||||
char *DFI_Name2; // If DFI_TYPE_STRUCT_PTR or DFI_TYPE_STRUCT
|
||||
// then the name of the structure.
|
||||
NINT DFI_SizeOf; // If DFI_TYPE_STRUCT then the sizeof the structure
|
||||
struct DFI_DataFormatInformation_s *DFI_List; /* Address of array of DFI's that ends must
|
||||
* end with a DFI_TYPE_END entry. Used only by
|
||||
* the 'standard' handler.
|
||||
*/
|
||||
};
|
||||
|
||||
/* This defines NATIVE types that DFI supports. We support numerous
|
||||
* NATIVE types so that UIs may take advantage of a type. E.G.
|
||||
* a UI may wish to VALID DFI_TYPE_VolumeID_t items or do lookups
|
||||
* on DFI_TYPE_Zid_t.
|
||||
*/
|
||||
#define DFI_TYPE_END 0x0000
|
||||
#define DFI_TYPE_LONG 0x0001
|
||||
#define DFI_TYPE_SLONG DFI_TYPE_LONG // FixFixFix really do a signed then AT LEAST a TYPE name difference
|
||||
#define DFI_TYPE_Blkcnt_t DFI_TYPE_LONG // FixFixFix really own type?????
|
||||
#define DFI_TYPE_WORD 0x0002
|
||||
#define DFI_TYPE_SWORD DFI_TYPE_WORD // FixFixFix really do a signed then AT LEAST a TYPE name difference
|
||||
#define DFI_TYPE_SQUAD 0x0003
|
||||
#define DFI_TYPE_QUAD 0x0004
|
||||
#define DFI_TYPE_Time_t 0x0005
|
||||
#define DFI_TYPE_unicode_t 0x0006
|
||||
#define DFI_TYPE_GUID_t 0x0007
|
||||
#define DFI_TYPE_VolumeID_t 0x0008
|
||||
#define DFI_TYPE_Lsn_t 0x0009
|
||||
#define DFI_TYPE_Blknum_t 0x000a
|
||||
#define DFI_TYPE_QBlknum_t 0x000b /* A QUAD/SQUAD Blknum_t. Used to indicate a Block Number */
|
||||
#define DFI_TYPE_unicode_t_STR 0x000c /* An array that MUST have a NULL terminate unicode string.
|
||||
* This is different that a Unicode_t * in that we known
|
||||
* the buffer size (i.e. the number of elements in the array).
|
||||
*/
|
||||
#define DFI_TYPE_BYTE 0x000d
|
||||
#define DFI_TYPE_Zid_t 0x000e
|
||||
#define DFI_TYPE_unicode_t_ARRAY 0x000f /* Array of unicode_t */
|
||||
#define DFI_TYPE_UserID_t 0x0010
|
||||
#define DFI_TYPE_char_STR 0x0011 /* An array that MUST have a NULL terminate string.
|
||||
* This is different that a char * in that we known
|
||||
* the buffer size (i.e. the number of elements in the array).
|
||||
*/
|
||||
#define DFI_TYPE_EFLEpochMask_t DFI_TYPE_LONG
|
||||
|
||||
#define DFI_TYPE_STRUCT_PTR 0x0112 /* Pointer to a well known structure */
|
||||
#define DFI_TYPE_BYTE_PTR DFI_TYPE_STRUCT_PTR
|
||||
#define DFI_TYPE_NINT_PTR DFI_TYPE_STRUCT_PTR
|
||||
#define DFI_TYPE_PTR_PTR DFI_TYPE_STRUCT_PTR /* Pointer to a pointer */
|
||||
#define DFI_TYPE_unicode_t_PTR DFI_TYPE_STRUCT_PTR
|
||||
#define DFI_TYPE_char_PTR DFI_TYPE_STRUCT_PTR
|
||||
#define DFI_TYPE_UserID_t_PTR DFI_TYPE_STRUCT_PTR
|
||||
#define DFI_TYPE_FUNC_PTR DFI_TYPE_STRUCT_PTR /* FixFixFix - this really shold indicate a FUNCTION pointer */
|
||||
#define DFI_TYPE_STRUCT 0x0113 /* Well known structure */
|
||||
|
||||
#define DFI_TYPE_UNION_HEADER 0x0214
|
||||
#define DFI_TYPE_UNION_TAIL 0x0215
|
||||
|
||||
|
||||
#define DFI_TYPE_Key_t DFI_TYPE_SQUAD // Could have its own type
|
||||
#ifdef __LP64__
|
||||
#define DFI_TYPE_DOSTime_t DFI_TYPE_QUAD // Should be made into its own type
|
||||
#define DFI_TYPE_ADDR DFI_TYPE_QUAD
|
||||
#else
|
||||
#define DFI_TYPE_DOSTime_t DFI_TYPE_LONG // Should be made into its own type
|
||||
#define DFI_TYPE_ADDR DFI_TYPE_LONG
|
||||
#endif
|
||||
#define DFI_TYPE_BOOL DFI_TYPE_NINT // Should be made into its own type
|
||||
#define DFI_TYPE_Seq_t DFI_TYPE_SLONG // Could be made into its own type
|
||||
|
||||
#if BITS_PER_NINT == 32
|
||||
#define DFI_TYPE_NINT DFI_TYPE_LONG
|
||||
#define DFI_TYPE_SNINT DFI_TYPE_SLONG
|
||||
#endif
|
||||
|
||||
#if BITS_PER_NINT == 64
|
||||
#define DFI_TYPE_NINT DFI_TYPE_QUAD
|
||||
#define DFI_TYPE_SNINT DFI_TYPE_SQUAD
|
||||
#endif
|
||||
|
||||
#define DFI_TYPE_STATUS DFI_TYPE_LONG
|
||||
|
||||
|
||||
/*
|
||||
* Used to track options that caller desires.
|
||||
*/
|
||||
struct DFI_CallerOptions_s {
|
||||
NINT DCO_Signature1;
|
||||
#define DCO_SIGNATURE1 0x45497579
|
||||
NINT DCO_OutputType;
|
||||
#define DCO_OUTPUT_TYPE_XML 0x0001 /* Output will be in XML format */
|
||||
#define DCO_OUTPUT_TYPE_ASCII 0x0002 /* Standard output */
|
||||
#define DCO_OUTPUT_TYPE_XML_SHORT 0x0003 /* Output will be in LONG XML format. Attributes names are readable/meaningfull. */
|
||||
NINT DCO_Details;
|
||||
#define DCO_DETAILS_NAME 0x0001 /* Output names of elements. */
|
||||
#define DCO_DETAILS_VALUE 0x0002 /* Output value of elements. */
|
||||
#define DCO_DETAILS_TYPE 0x0004 /* Output type of elements. */
|
||||
#define DCO_DETAILS_ADDRESS 0x0008 /* Output address information of elements. */
|
||||
#define DCO_DETAILS_SIZE 0x0010 /* Output size information of elements. */
|
||||
#define DCO_DETAILS_INDEX 0x0020 /* Output index information of elements. */
|
||||
NINT DCO_ArraySize; /* Non-zero value will cause limit to the number of
|
||||
* array elements displayed.
|
||||
*/
|
||||
NINT DCO_ExpandLevel; /* Number of levels to expand. */
|
||||
void *DCO_LocalAddress; /* Address data is being processed from. */
|
||||
void *DCO_SourceAddress; /* Address that memory is really from. In case of
|
||||
* VDB this is the memory we read in the coredump.
|
||||
* For others it can be the same as the local
|
||||
* buffer address or 0. Block reads would use
|
||||
* zero.
|
||||
*/
|
||||
SNP_PrintBuffer_s *DCO_SNPOutput; /* Normal place to output. */
|
||||
SNP_PrintBuffer_s *DCO_SNPErrors; /* Place to output error messages. */
|
||||
ErrorTracking_s DCO_Errno;
|
||||
Zid_t DCO_Zid; /* Non-zero if looking for a ZID. */
|
||||
NINT DCO_AuthType; /* The auth model type */
|
||||
#define DCO_AUTHTYPE_ZAS 0
|
||||
#define DCO_AUTHTYPE_UNIX 1
|
||||
/* DCO_XML... Points to the strings that caller wishes to use in the
|
||||
* XML file. Added Sep 2003 so I could have a 'short' version of each name
|
||||
* as some zedremote /next of the bt leaf produce multiple GB files.
|
||||
*/
|
||||
/*** Tags ***/
|
||||
char *DCO_XMLTagBasic;
|
||||
char *DCO_XMLTagStructure;
|
||||
/*** Attributes ***/
|
||||
char *DCO_XMLAttributeAddress;
|
||||
char *DCO_XMLAttributeArrayElements;
|
||||
char *DCO_XMLAttributeDate;
|
||||
char *DCO_XMLAttributeIndex;
|
||||
char *DCO_XMLAttributeName;
|
||||
char *DCO_XMLAttributeSize;
|
||||
char *DCO_XMLAttributeType;
|
||||
char *DCO_XMLAttributeTypeCount;
|
||||
char *DCO_XMLAttributeValue;
|
||||
char *DCO_XMLAttributeValueCount;
|
||||
NINT DCO_Signature2;
|
||||
#define DCO_SIGNATURE2 0x444c4c73
|
||||
};
|
||||
|
||||
|
||||
#define DCO_DETAILS_FULL (DCO_DETAILS_NAME|DCO_DETAILS_VALUE|DCO_DETAILS_INDEX|DCO_DETAILS_TYPE|DCO_DETAILS_ADDRESS|DCO_DETAILS_SIZE)
|
||||
#define DCO_DETAILS_DETAIL (DCO_DETAILS_NAME|DCO_DETAILS_VALUE|DCO_DETAILS_INDEX|DCO_DETAILS_TYPE)
|
||||
#define DCO_DETAILS_BRIEF (DCO_DETAILS_NAME|DCO_DETAILS_VALUE|DCO_DETAILS_INDEX)
|
||||
#define DCO_DETAILS_NONE (0)
|
||||
|
||||
|
||||
#define DFI_NAME_NONE "NoNameSpecified"
|
||||
#define DFI_VARIABLE_SIZE_INKNOWN 0
|
||||
|
||||
|
||||
STATUS DFI_DisplayStructure( // Official API routine
|
||||
DFI_CallerOptions_s *co,
|
||||
DFI_DataFormatInformation_s *dfi,
|
||||
BYTE *buffer );
|
||||
|
||||
STATUS DFI_Close( // Official API routine
|
||||
DFI_CallerOptions_s *co );
|
||||
|
||||
STATUS DFI_SNPToStatus(
|
||||
DFI_CallerOptions_s *co, /* Place to stick the error */
|
||||
SNP_PrintBuffer_s *pb, /* Print object the rc is from */
|
||||
int rc,
|
||||
char *where );
|
||||
|
||||
DFI_CallerOptions_s *DFI_Open( // Official API routine
|
||||
SNP_PrintBuffer_s *pbOutput,
|
||||
SNP_PrintBuffer_s *pbErrors,
|
||||
int outputType,
|
||||
int details,
|
||||
int arraySize,
|
||||
int expandLevel,
|
||||
void *localAddress,
|
||||
void *sourceAddress );
|
||||
|
||||
STATUS DFI_Display( // Official API routine
|
||||
DFI_CallerOptions_s *co,
|
||||
DFI_DataFormatInformation_s *dfi,
|
||||
BYTE *buffer,
|
||||
NINT offset );
|
||||
|
||||
int DFI_Display_Type_Blknum_t_ARRAY_With_Count_Blkcnt_t(
|
||||
DFI_CallerOptions_s *co,
|
||||
char *tag,
|
||||
int index,
|
||||
Blknum_t *block,
|
||||
Blkcnt_t *count );
|
||||
|
||||
|
||||
|
||||
char *DFI_UTCTime2Str(
|
||||
#ifdef NTLIB
|
||||
// time_t cTime,
|
||||
LONG cTime,
|
||||
#else
|
||||
Time_t cTime,
|
||||
#endif
|
||||
char *buffer,
|
||||
NINT bufLen );
|
||||
|
||||
SIZEOF DFI_DisplayElement(
|
||||
DFI_CallerOptions_s *co,
|
||||
DFI_DataFormatInformation_s *dfi,
|
||||
BYTE *buffer,
|
||||
NINT offset,
|
||||
NINT index );
|
||||
|
||||
SIZEOF DFI_DisplayElementXML(
|
||||
DFI_CallerOptions_s *co,
|
||||
DFI_DataFormatInformation_s *dfi,
|
||||
BYTE *buffer,
|
||||
NINT offset,
|
||||
NINT index );
|
||||
|
||||
STATUS DFI_DisplayElementASCII(
|
||||
DFI_CallerOptions_s *co,
|
||||
DFI_DataFormatInformation_s *dfi,
|
||||
BYTE *buffer,
|
||||
NINT offset,
|
||||
NINT index );
|
||||
|
||||
|
||||
STATUS DFI_COValidate(
|
||||
DFI_CallerOptions_s *co );
|
||||
|
||||
SIZEOF DFI_DisplayXML(
|
||||
DFI_CallerOptions_s *co,
|
||||
DFI_DataFormatInformation_s *dfi,
|
||||
BYTE *buffer,
|
||||
NINT offset );
|
||||
|
||||
|
||||
STATUS DFI_Display_Header_ARRAY(
|
||||
DFI_CallerOptions_s *co,
|
||||
char *tag,
|
||||
char *typeName,
|
||||
unsigned int arrayElements,
|
||||
unsigned int arraySize,
|
||||
void *address );
|
||||
|
||||
STATUS DFI_Display_Tail_ARRAY(
|
||||
DFI_CallerOptions_s *co,
|
||||
char *tag,
|
||||
char *typeName );
|
||||
|
||||
|
||||
STATUS DFI_Display_Header_Structure(
|
||||
DFI_CallerOptions_s *co,
|
||||
char *tag,
|
||||
char *structureName,
|
||||
unsigned int index,
|
||||
unsigned int arrayElements,
|
||||
unsigned int structureSize, /* As defined by sizeof */
|
||||
void *address );
|
||||
|
||||
STATUS DFI_Display_Tail_Structure(
|
||||
DFI_CallerOptions_s *co,
|
||||
char *structureName,
|
||||
unsigned int structureSize, /* As defined by sizeof */
|
||||
void *address );
|
||||
|
||||
STATUS DFI_Display_Tail_Union(
|
||||
DFI_CallerOptions_s *co,
|
||||
char *unionName,
|
||||
unsigned int unionSize, /* As defined by sizeof */
|
||||
void *address );
|
||||
|
||||
STATUS DFI_Display_Header_Union(
|
||||
DFI_CallerOptions_s *co,
|
||||
char *name,
|
||||
char *unionName,
|
||||
unsigned int index,
|
||||
unsigned int arrayElements,
|
||||
unsigned int unionSize, /* As defined by sizeof */
|
||||
void *address );
|
||||
|
||||
#endif
|
||||
99
include/nwnss/include/dfsLib.h
Normal file
99
include/nwnss/include/dfsLib.h
Normal file
@@ -0,0 +1,99 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1999, 2002 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS)/Distributed File Services (DFS) Module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: stoner $
|
||||
| $Date: 2005-04-13 22:08:08 +0530 (Wed, 13 Apr 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 927 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| DFS Common Library declarations
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef __DFSLIB_H__
|
||||
#define __DFSLIB_H__
|
||||
|
||||
/* Dependencies */
|
||||
#ifndef _ZOMNI_H_
|
||||
# include <zOmni.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* Function like macros */
|
||||
|
||||
/* Macro to yield the CPU at a fixed frequency based on a loop counter */
|
||||
#define DFS_YIELD_AT_MODn_ITERATIONS(_yieldcounter, _yieldperiod) \
|
||||
{ \
|
||||
if (((_yieldcounter) % (_yieldperiod)) == ((_yieldperiod) - 1)) \
|
||||
{ \
|
||||
kYieldThread(); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Macros to set and reset the current thread name */
|
||||
#ifndef __linux__
|
||||
#if zNETWARE && NSS_DEBUG IS_ENABLED
|
||||
#define DFS_SAVE_THREAD_NAME() \
|
||||
BOOL threadNameSaved; \
|
||||
BYTE oldThreadName[MAX_NAME_LENGTH + 1]; \
|
||||
threadNameSaved = (kGetThreadName(kCurrentThread(), oldThreadName, MAX_NAME_LENGTH + 1) == kSUCCESS);
|
||||
|
||||
#define DFS_SET_THREAD_NAME(NewName) \
|
||||
kSetThreadName(kCurrentThread(), NewName);
|
||||
|
||||
#define DFS_RESTORE_THREAD_NAME() \
|
||||
if (threadNameSaved) \
|
||||
{ \
|
||||
(void)kSetThreadName(kCurrentThread(), oldThreadName); \
|
||||
}
|
||||
#else
|
||||
#define DFS_SAVE_THREAD_NAME()
|
||||
|
||||
#define DFS_SET_THREAD_NAME(NewName)
|
||||
|
||||
#define DFS_RESTORE_THREAD_NAME()
|
||||
#endif
|
||||
#else
|
||||
#define DFS_SAVE_THREAD_NAME()
|
||||
|
||||
#define DFS_SET_THREAD_NAME(NewName)
|
||||
|
||||
#define DFS_RESTORE_THREAD_NAME()
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Prototypes */
|
||||
void DFS_DelayThread(LONG DelayTime); /* Delay a thread by a specified time */
|
||||
STATUS DFS_MakeDNTypeless(unicode_t *DSName); /* Strip type identifiers from a DS distinguishes name */
|
||||
NINT DFS_ResolveName(NINT context, NINT flags, const void *dn); /* Resolve an NDS name & authenticate the connection */
|
||||
BOOL DFS_ThreadNameIs(BYTE *NewName, BYTE *OldName); /* Rename a thread and store the original name in caller supplied data */
|
||||
STATUS DFS_YieldAtTimeout(QUAD *LastYieldedAt, LONG Timeout); /* Yield a thread if it has been running for a specified time */
|
||||
|
||||
|
||||
#endif
|
||||
5
include/nwnss/include/dfsLib.imp
Normal file
5
include/nwnss/include/dfsLib.imp
Normal file
@@ -0,0 +1,5 @@
|
||||
DFS_DelayThread
|
||||
DFS_MakeDNTypeless
|
||||
DFS_ResolveName
|
||||
DFS_ThreadNameIs
|
||||
DFS_YieldAtTimeout
|
||||
91
include/nwnss/include/dfsnds.h
Normal file
91
include/nwnss/include/dfsnds.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/***************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001, 2003 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 Distributed File Services (DFS) module
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: nbalachandran $
|
||||
| $Date: 2007-09-22 14:52:05 +0530 (Sat, 22 Sep 2007) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 2221 $
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Define NDS Class and Attribute names used by DFS
|
||||
| All names are UNICODE strings.
|
||||
| Standard NDS names are prfixed with NDS_
|
||||
| DFS schema extensions are prefixed with DFS_
|
||||
+------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _DFSNDS_H_
|
||||
#define _DFSNDS_H_
|
||||
|
||||
/* Standard NDS names are defined in another .h file, but as regular */
|
||||
/* text strings */
|
||||
#include <nwdsnmtp.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* A little preprocessor magic to convert a regular text string */
|
||||
/* to a unicode string */
|
||||
#define PREFIX_STRING(text) L ## text
|
||||
#define UNICODE_STRING(text) PREFIX_STRING(text)
|
||||
|
||||
/* NDS attribute names */
|
||||
#define NDS_ATTR_RESOURCE_NAME UNICODE_STRING(A_HOST_RESOURCE_NAME)
|
||||
#define NDS_ATTR_HOST_SERVER UNICODE_STRING(A_HOST_SERVER)
|
||||
#define NDS_ATTR_OBJECT_CLASS UNICODE_STRING(A_OBJECT_CLASS)
|
||||
#define NDS_ATTR_DESCRIPTION UNICODE_STRING(A_DESCRIPTION)
|
||||
#define NDS_ATTR_ACL UNICODE_STRING(A_ACL)
|
||||
|
||||
/* NDS Rights special "attribute name" strings */
|
||||
#define NDS_RIGHTS_ENTRY_RIGHTS UNICODE_STRING("[Entry Rights]")
|
||||
#define NDS_RIGHTS_ALL_ATTRS_RIGHTS UNICODE_STRING("[All Attributes Rights]")
|
||||
|
||||
/* DFS attribute names */
|
||||
#define DFS_ATTR_DFS_GUID UNICODE_STRING("DFS-Volume-Guid")
|
||||
#define DFS_ATTR_VLDB_HOSTS UNICODE_STRING("DFS-VLDB-Hosts")
|
||||
#define DFS_ATTR_VLDB_BACKEND UNICODE_STRING("VLDB-BackEnd-ID")
|
||||
#define DFS_NET_ADDRESS_ATTR_NAME UNICODE_STRING("Network Address")
|
||||
|
||||
/* NDS back-end VLDB-specific attributes: */
|
||||
#define DFS_ATTR_SERVER_LIST UNICODE_STRING("VLDB-BackEnd-NDS-ServerList")
|
||||
|
||||
/* NDS object class names */
|
||||
#define NDS_CLASS_VOLUME_OBJECT UNICODE_STRING(C_VOLUME)
|
||||
#define NDS_CLASS_SERVER_OBJECT UNICODE_STRING(C_NCP_SERVER)
|
||||
#define NDS_CLASS_OU_OBJECT UNICODE_STRING(C_ORGANIZATIONAL_UNIT)
|
||||
#define NDS_CLASS_ORG_OBJECT UNICODE_STRING(C_ORGANIZATION)
|
||||
|
||||
/* DFS (NDS back-end VLDB) object class names */
|
||||
#define DFS_CLASS_CONTAINER_OBJECT UNICODE_STRING("VLDB-BackEnd-NDS-Container")
|
||||
#define DFS_CLASS_RECORD_OBJECT UNICODE_STRING("VLDB-BackEnd-NDS-Record")
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DFSNDS_H_ */
|
||||
@@ -48,7 +48,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
#include <public/zOmni.h>
|
||||
#include <zOmni.h>
|
||||
#endif
|
||||
|
||||
STATUS LB_GetDSGUID(
|
||||
|
||||
@@ -44,15 +44,15 @@
|
||||
#define _EVENTSYS_H_
|
||||
|
||||
#ifndef _REGISTER_H_
|
||||
# include <include/register.h>
|
||||
# include <register.h>
|
||||
#endif
|
||||
|
||||
#ifndef _ZEVENT_H_
|
||||
# include <public/zEvent.h>
|
||||
# include <zEvent.h>
|
||||
#endif
|
||||
|
||||
#include <public/neb.h>
|
||||
#include <public/nebpub.h>
|
||||
#include <neb.h>
|
||||
#include <nebpub.h>
|
||||
|
||||
/* Pre-define struct(s) so Linux compiler doesn't complain */
|
||||
struct NamingMsg_s;
|
||||
@@ -65,14 +65,14 @@ typedef LONG (*EventWarnProc)(void (*OutputRoutine)(void *controlString,...),
|
||||
LONG parameter,LONG userParameter);
|
||||
typedef void (*EventReportProc)(LONG parameter,LONG userParameter);
|
||||
|
||||
#ifdef __linux__
|
||||
#ifdef __linux__
|
||||
#define ZOS_EventNotificationReg(_rtn,eventType,warnProc,reportProc) \
|
||||
{ \
|
||||
MPKNSS_UNLOCK(); \
|
||||
_rtn = RegisterForEventNotification( \
|
||||
NULL, \
|
||||
(eventType), \
|
||||
EVENT_PRIORITY_OS, \
|
||||
EVENT_PRIORITY_OS, \
|
||||
(EventWarnProc)(warnProc), \
|
||||
(EventReportProc)(reportProc), \
|
||||
0); \
|
||||
@@ -85,7 +85,7 @@ typedef void (*EventReportProc)(LONG parameter,LONG userParameter);
|
||||
_rtn = RegisterForEventNotification( \
|
||||
COMN_Resource.eventRTag, \
|
||||
(eventType), \
|
||||
EVENT_PRIORITY_OS, \
|
||||
EVENT_PRIORITY_OS, \
|
||||
(EventWarnProc)(warnProc), \
|
||||
(EventReportProc)(reportProc), \
|
||||
0); \
|
||||
@@ -111,7 +111,7 @@ typedef void (*EventReportProc)(LONG parameter,LONG userParameter);
|
||||
* registered for this event, and if we generate this event we have
|
||||
* to always create the DirectoryEntry. The only person using this that
|
||||
* we have found so far is NFS.NAM (and NSS does not use this module and
|
||||
* wants NFS.NAM to ignore the event for NSS volumes). Thus, we have
|
||||
* wants NFS.NAM to ignore the event for NSS volumes). Thus, we have
|
||||
* decided NOT to generate this event until we find someone that uses
|
||||
* it and needs it.
|
||||
*
|
||||
@@ -135,14 +135,14 @@ extern STATUS NWSA_EvRep_TrusteeChange(
|
||||
extern STATUS NWSA_EvRep_CloseFile(
|
||||
struct FileHandle_s *fileHandle);
|
||||
|
||||
extern LONG COMN_SendNSSEvent(
|
||||
extern LONG COMN_SendNSSEvent(
|
||||
NINT event,
|
||||
void *data,
|
||||
int dataLength,
|
||||
LONG *denyCode); /* the return code if Operation is Denied */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* NSS Event system defines and structures
|
||||
* NSS Event system defines and structures
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
#define EVENT_Delete_Enter 0 /* "NSS.Delete.Enter" */
|
||||
@@ -171,30 +171,30 @@ extern LONG COMN_SendNSSEvent(
|
||||
#define EVENT_Link_Exit 23 /* "NSS.Link.Exit" */
|
||||
#define EVENT_ChangePoolState_Enter 24 /* "NSS.ChangePoolState.Enter" */
|
||||
#define EVENT_ChangePoolState_Exit 25 /* "NSS.ChangePoolState.Exit" */
|
||||
#define EVENT_PoolCreate_Enter 26 /* "NSS.PoolCreate.Enter" */
|
||||
#define EVENT_PoolCreate_Exit 27 /* "NSS.PoolCreate.Exit" */
|
||||
#define EVENT_PoolDelete_Enter 28 /* "NSS.PoolDelete.Enter" */
|
||||
#define EVENT_PoolDelete_Exit 29 /* "NSS.PoolDelete.Exit" */
|
||||
#define EVENT_PoolResize_Enter 30 /* "NSS.PoolResize.Enter" */
|
||||
#define EVENT_PoolResize_Exit 31 /* "NSS.PoolResize.Exit" */
|
||||
#define EVENT_PoolRename_Enter 32 /* "NSS.PoolRename.Enter" */
|
||||
#define EVENT_PoolRename_Exit 33 /* "NSS.PoolRename.Exit" */
|
||||
#define EVENT_PoolCreate_Enter 26 /* "NSS.PoolCreate.Enter" */
|
||||
#define EVENT_PoolCreate_Exit 27 /* "NSS.PoolCreate.Exit" */
|
||||
#define EVENT_PoolDelete_Enter 28 /* "NSS.PoolDelete.Enter" */
|
||||
#define EVENT_PoolDelete_Exit 29 /* "NSS.PoolDelete.Exit" */
|
||||
#define EVENT_PoolResize_Enter 30 /* "NSS.PoolResize.Enter" */
|
||||
#define EVENT_PoolResize_Exit 31 /* "NSS.PoolResize.Exit" */
|
||||
#define EVENT_PoolRename_Enter 32 /* "NSS.PoolRename.Enter" */
|
||||
#define EVENT_PoolRename_Exit 33 /* "NSS.PoolRename.Exit" */
|
||||
#define EVENT_ChangePoolShared_Enter 34 /* "NSS.ChangePoolShared.Enter" */
|
||||
#define EVENT_ChangePoolShared_Exit 35 /* "NSS.ChangePoolShared.Exit" */
|
||||
#define EVENT_LVolCreate_Enter 36 /* "NSS.LVolumeCreate.Enter" */
|
||||
#define EVENT_LVolCreate_Exit 37 /* "NSS.LVolumeCreate.Exit" */
|
||||
#define EVENT_LVolDelete_Enter 38 /* "NSS.LVolumeDelete.Enter" */
|
||||
#define EVENT_LVolDelete_Exit 39 /* "NSS.LVolumeDelete.Exit" */
|
||||
#define EVENT_LVolRename_Enter 40 /* "NSS.LVolumeRename.Enter" */
|
||||
#define EVENT_LVolRename_Exit 41 /* "NSS.LVolumeRename.Exit" */
|
||||
#define EVENT_LVolSalvage_Enter 42 /* "NSS.LVolumeSalvage.Enter" */
|
||||
#define EVENT_LVolSalvage_Exit 43 /* "NSS.LVolumeSalvage.Exit" */
|
||||
#define EVENT_LVolPurge_Enter 44 /* "NSS.LVolumePurge.Enter" */
|
||||
#define EVENT_LVolPurge_Exit 45 /* "NSS.LVolumePurge.Exit" */
|
||||
#define EVENT_LVolSnapshot_Enter 46 /* "NSS.LVolumeSnapshot.Enter" */
|
||||
#define EVENT_LVolSnapshot_Exit 47 /* "NSS.LVolumeSnapshot.Exit" */
|
||||
#define EVENT_PoolFreeze 48 /* "NSS.PoolFreeze" */
|
||||
#define EVENT_PoolThaw 49 /* "NSS.PoolThaw" */
|
||||
#define EVENT_ChangePoolShared_Exit 35 /* "NSS.ChangePoolShared.Exit" */
|
||||
#define EVENT_LVolCreate_Enter 36 /* "NSS.LVolumeCreate.Enter" */
|
||||
#define EVENT_LVolCreate_Exit 37 /* "NSS.LVolumeCreate.Exit" */
|
||||
#define EVENT_LVolDelete_Enter 38 /* "NSS.LVolumeDelete.Enter" */
|
||||
#define EVENT_LVolDelete_Exit 39 /* "NSS.LVolumeDelete.Exit" */
|
||||
#define EVENT_LVolRename_Enter 40 /* "NSS.LVolumeRename.Enter" */
|
||||
#define EVENT_LVolRename_Exit 41 /* "NSS.LVolumeRename.Exit" */
|
||||
#define EVENT_LVolSalvage_Enter 42 /* "NSS.LVolumeSalvage.Enter" */
|
||||
#define EVENT_LVolSalvage_Exit 43 /* "NSS.LVolumeSalvage.Exit" */
|
||||
#define EVENT_LVolPurge_Enter 44 /* "NSS.LVolumePurge.Enter" */
|
||||
#define EVENT_LVolPurge_Exit 45 /* "NSS.LVolumePurge.Exit" */
|
||||
#define EVENT_LVolSnapshot_Enter 46 /* "NSS.LVolumeSnapshot.Enter" */
|
||||
#define EVENT_LVolSnapshot_Exit 47 /* "NSS.LVolumeSnapshot.Exit" */
|
||||
#define EVENT_PoolFreeze 48 /* "NSS.PoolFreeze" */
|
||||
#define EVENT_PoolThaw 49 /* "NSS.PoolThaw" */
|
||||
|
||||
#define MAX_NSS_EVENTS 50
|
||||
|
||||
@@ -215,15 +215,15 @@ extern void UnregisterNSSEventProducers();
|
||||
extern void ReportProduceEventError(char *name,STATUS status);
|
||||
|
||||
/** Macros for the NEB interface **/
|
||||
#define REG_EVENT_PROD(_reg, _name, _parm, _flags) \
|
||||
{ \
|
||||
STATUS _status; \
|
||||
#define REG_EVENT_PROD(_reg, _name, _parm, _flags) \
|
||||
{ \
|
||||
STATUS _status; \
|
||||
\
|
||||
_reg.PRIVersion = NEB_PRODUCER_VERSION1; \
|
||||
_reg.PRIVersion = NEB_PRODUCER_VERSION1; \
|
||||
_reg.PRIProducerName = MSGNot("NSS"); \
|
||||
_reg.PRIEventName = _name; \
|
||||
_reg.PRIUserParameter = (void *)_parm; \
|
||||
_reg.PRIEventFlags = _flags; \
|
||||
_reg.PRIEventFlags = _flags; \
|
||||
_reg.PRIOwnerID = COMN_Resource.moduleHandle; \
|
||||
_reg.PRIProducerESR = (void *)EventProducerCallback; \
|
||||
_reg.PRISecurityToken = 0; \
|
||||
@@ -238,11 +238,11 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
} \
|
||||
NEBEventInfo[_parm].producerID = (NINT)_reg.PRIProducerID; \
|
||||
NEBEventInfo[_parm].eventID = (NINT)_reg.PRIEventID; \
|
||||
}
|
||||
}
|
||||
|
||||
#define INIT_EVENT_BLOCK(_evblk, _parm, _data) \
|
||||
{ \
|
||||
_evblk.EBVersion = NEB_EVENT_VERSION1; \
|
||||
_evblk.EBVersion = NEB_EVENT_VERSION1; \
|
||||
_evblk.EBStamp = EVENT_BLOCK_STAMP; \
|
||||
_evblk.EBRTag = COMN_Resource.eventBlkRTag; \
|
||||
_evblk.EBProducerID = (void *)NEBEventInfo[_parm].producerID; \
|
||||
@@ -253,7 +253,7 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
|
||||
#define INIT_EVENT_BLOCK2(_evblk, _parm, _data, _length) \
|
||||
{ \
|
||||
_evblk.EBVersion = NEB_EVENT_VERSION1; \
|
||||
_evblk.EBVersion = NEB_EVENT_VERSION1; \
|
||||
_evblk.EBStamp = EVENT_BLOCK_STAMP; \
|
||||
_evblk.EBRTag = COMN_Resource.eventBlkRTag; \
|
||||
_evblk.EBProducerID = (void *)NEBEventInfo[_parm].producerID; \
|
||||
@@ -262,78 +262,78 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
_evblk.EBEventData = (void *)_data; \
|
||||
}
|
||||
|
||||
#define INIT_EVENT_ID_STATUS(_id, _status) \
|
||||
#define INIT_EVENT_ID_STATUS(_id, _status) \
|
||||
{ \
|
||||
EnterExitEventID++; \
|
||||
_id = EnterExitEventID; \
|
||||
_status = ENTER_EVENT_SUCCESS; \
|
||||
}
|
||||
|
||||
#define INIT_PATH_INFO(_data, _namemsg) \
|
||||
{ \
|
||||
_data.volID = (_namemsg->curvol) ? \
|
||||
_namemsg->curvol->VOLvolumeID : \
|
||||
_namemsg->volumeID; \
|
||||
_data.zid = (_namemsg->curDataStream) ? \
|
||||
_namemsg->curDataStream->NAMEDzid : \
|
||||
#define INIT_PATH_INFO(_data, _namemsg) \
|
||||
{ \
|
||||
_data.volID = (_namemsg->curvol) ? \
|
||||
_namemsg->curvol->VOLvolumeID : \
|
||||
_namemsg->volumeID; \
|
||||
_data.zid = (_namemsg->curDataStream) ? \
|
||||
_namemsg->curDataStream->NAMEDzid : \
|
||||
_namemsg->dataStreamZid; \
|
||||
}
|
||||
|
||||
#define INIT_SRC_PATH_INFO(_data, _namemsg) \
|
||||
{ \
|
||||
_data.srcVolID = (_namemsg->curvol) ? \
|
||||
_namemsg->curvol->VOLvolumeID : \
|
||||
_namemsg->volumeID; \
|
||||
_data.srcZid = (_namemsg->curDataStream) ? \
|
||||
_namemsg->curDataStream->NAMEDzid : \
|
||||
#define INIT_SRC_PATH_INFO(_data, _namemsg) \
|
||||
{ \
|
||||
_data.srcVolID = (_namemsg->curvol) ? \
|
||||
_namemsg->curvol->VOLvolumeID : \
|
||||
_namemsg->volumeID; \
|
||||
_data.srcZid = (_namemsg->curDataStream) ? \
|
||||
_namemsg->curDataStream->NAMEDzid : \
|
||||
_namemsg->dataStreamZid; \
|
||||
}
|
||||
|
||||
#define INIT_DST_PATH_INFO(_data, _namemsg) \
|
||||
{ \
|
||||
_data.dstVolID = (_namemsg->curvol) ? \
|
||||
_namemsg->curvol->VOLvolumeID : \
|
||||
_namemsg->volumeID; \
|
||||
_data.dstZid = (_namemsg->curDataStream) ? \
|
||||
_namemsg->curDataStream->NAMEDzid : \
|
||||
#define INIT_DST_PATH_INFO(_data, _namemsg) \
|
||||
{ \
|
||||
_data.dstVolID = (_namemsg->curvol) ? \
|
||||
_namemsg->curvol->VOLvolumeID : \
|
||||
_namemsg->volumeID; \
|
||||
_data.dstZid = (_namemsg->curDataStream) ? \
|
||||
_namemsg->curDataStream->NAMEDzid : \
|
||||
_namemsg->dataStreamZid; \
|
||||
}
|
||||
|
||||
#define INIT_TIME_INFO(_times, _bst) \
|
||||
#define INIT_TIME_INFO(_times, _bst) \
|
||||
{ \
|
||||
if ((_bst != NULL) && (COMN_IsDerivedFrom(_bst, zFTYPE_FILE))) \
|
||||
if ((_bst != NULL) && (COMN_IsDerivedFrom(_bst, zFTYPE_FILE))) \
|
||||
{ \
|
||||
_times.accessedTime =((File_s *)_bst)->FILEaccessedTime; \
|
||||
_times.createdTime =((File_s *)_bst)->FILEcreatedTime; \
|
||||
_times.modifiedTime =((File_s *)_bst)->FILEmodifiedTime; \
|
||||
_times.accessedTime =((File_s *)_bst)->FILEaccessedTime; \
|
||||
_times.createdTime =((File_s *)_bst)->FILEcreatedTime; \
|
||||
_times.modifiedTime =((File_s *)_bst)->FILEmodifiedTime; \
|
||||
_times.metaDataModifiedTime=((File_s *)_bst)->FILEmetaDataModifiedTime;\
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_times.accessedTime = INVALID_UTC_TIME; \
|
||||
_times.createdTime = INVALID_UTC_TIME; \
|
||||
_times.modifiedTime = INVALID_UTC_TIME; \
|
||||
_times.metaDataModifiedTime = INVALID_UTC_TIME; \
|
||||
_times.accessedTime = INVALID_UTC_TIME; \
|
||||
_times.createdTime = INVALID_UTC_TIME; \
|
||||
_times.modifiedTime = INVALID_UTC_TIME; \
|
||||
_times.metaDataModifiedTime = INVALID_UTC_TIME; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define INIT_ENTER_EVENT(_genmsg, _namemsg, _evblk, _parm, _enter, _id) \
|
||||
{ \
|
||||
_enter.enterExitID = _id; \
|
||||
_enter.connID = _genmsg->pssConn.id; \
|
||||
_enter.taskID = _genmsg->taskID; \
|
||||
_enter.connID = _genmsg->pssConn.id; \
|
||||
_enter.taskID = _genmsg->taskID; \
|
||||
INIT_PATH_INFO(_enter, _namemsg); \
|
||||
INIT_EVENT_BLOCK(_evblk, _parm, &_enter); \
|
||||
}
|
||||
|
||||
#define INIT_RENAME_ENTER_EVENT(_genmsg, _srcnamemsg, _evblk, \
|
||||
_parm, _enter, _id, _newname, _renmsg, _targetDirZid) \
|
||||
{ \
|
||||
#define INIT_RENAME_ENTER_EVENT(_genmsg, _srcnamemsg, _evblk, \
|
||||
_parm, _enter, _id, _newname, _renmsg, _targetDirZid) \
|
||||
{ \
|
||||
_enter.enterExitID = _id; \
|
||||
_enter.connID = _genmsg->pssConn.id; \
|
||||
_enter.taskID = _genmsg->taskID; \
|
||||
_enter.connID = _genmsg->pssConn.id; \
|
||||
_enter.taskID = _genmsg->taskID; \
|
||||
INIT_SRC_PATH_INFO(_enter, _srcnamemsg); \
|
||||
_enter.dstZid = _targetDirZid; \
|
||||
_enter.dstZid = _targetDirZid; \
|
||||
_enter.dstName = _newname; \
|
||||
_enter.renameFlags = _renmsg->renameFlags; \
|
||||
INIT_EVENT_BLOCK(_evblk, _parm, &_enter); \
|
||||
@@ -345,21 +345,21 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
{ \
|
||||
if (_evblk.EBConsumingConsumer != NULL) \
|
||||
{ \
|
||||
SetErrno(_genmsg, (NINT)_evblk.EBParm1); \
|
||||
SetErrno(_genmsg, (NINT)_evblk.EBParm1); \
|
||||
if (_evblk.EBParm0 == zOK) \
|
||||
_status = zOK; \
|
||||
else \
|
||||
_status = zFAILURE; \
|
||||
_status = zFAILURE; \
|
||||
goto _retlabel; \
|
||||
} \
|
||||
} \
|
||||
else if (_status == OPERATION_DENIED) \
|
||||
{ \
|
||||
SetErrno(_genmsg, (NINT)_evblk.EBParm1); \
|
||||
SetErrno(_genmsg, (NINT)_evblk.EBParm1); \
|
||||
if (_evblk.EBParm1 == zOK) \
|
||||
_status = zOK; \
|
||||
else \
|
||||
_status = zFAILURE; \
|
||||
_status = zFAILURE; \
|
||||
goto _retlabel; \
|
||||
} \
|
||||
else if ((_status == EVENT_DENIED) || (_status == INVALID_PARAMETER)) \
|
||||
@@ -368,7 +368,7 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
} \
|
||||
}
|
||||
|
||||
#define INIT_EXIT_EVENT(_status, _genmsg, _evblk, _parm, _exit, _id) \
|
||||
#define INIT_EXIT_EVENT(_status, _genmsg, _evblk, _parm, _exit, _id) \
|
||||
{ \
|
||||
_exit.enterExitID = _id; \
|
||||
zASSERT((_status == zOK) || (GetErrno((_genmsg)) != zOK)); \
|
||||
@@ -376,20 +376,20 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
INIT_EVENT_BLOCK(_evblk, _parm, &_exit); \
|
||||
}
|
||||
|
||||
#define INIT_CREATE_ENTER_EVENT(_genmsg, _namemsg, _evblk, _parm, _enter, \
|
||||
#define INIT_CREATE_ENTER_EVENT(_genmsg, _namemsg, _evblk, _parm, _enter, \
|
||||
_id, _bname, _createmsg, _retfilehandle) \
|
||||
{ \
|
||||
_enter.enterExitID = (_id); \
|
||||
_enter.connID = (_genmsg)->pssConn.id; \
|
||||
_enter.taskID = (_genmsg)->taskID; \
|
||||
_enter.enterExitID = (_id); \
|
||||
_enter.connID = (_genmsg)->pssConn.id; \
|
||||
_enter.taskID = (_genmsg)->taskID; \
|
||||
INIT_PATH_INFO(_enter, (_namemsg)); \
|
||||
_enter.name = (_bname); \
|
||||
_enter.fileType = (_createmsg)->beastClassID; \
|
||||
_enter.fileAttributes = (_createmsg)->attributes; \
|
||||
_enter.createFlags = (_createmsg)->createFlags; \
|
||||
_enter.createParms = (_createmsg)->createParms; \
|
||||
_enter.requestedRights = (_createmsg)->requestedRights; \
|
||||
_enter.createAndOpen = (NINT)(_retfilehandle); \
|
||||
_enter.name = (_bname); \
|
||||
_enter.fileType = (_createmsg)->beastClassID; \
|
||||
_enter.fileAttributes = (_createmsg)->attributes; \
|
||||
_enter.createFlags = (_createmsg)->createFlags; \
|
||||
_enter.createParms = (_createmsg)->createParms; \
|
||||
_enter.requestedRights = (_createmsg)->requestedRights; \
|
||||
_enter.createAndOpen = (NINT)(_retfilehandle); \
|
||||
INIT_EVENT_BLOCK(_evblk, _parm, &_enter); \
|
||||
}
|
||||
|
||||
@@ -399,45 +399,45 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
if (_status == zOK) \
|
||||
{ \
|
||||
_exit.retOpenCreateAction = (_createmsg)->ret_openCreateAction; \
|
||||
_exit.retKey = (_retfilehandle) ? (_retfilehandle)->key : 0; \
|
||||
_exit.retZid = (_namemsg)->curDataStream->NAMEDzid; \
|
||||
_exit.retVolID = (_namemsg)->curvol->VOLvolumeID; \
|
||||
_exit.retKey = (_retfilehandle) ? (_retfilehandle)->key : 0; \
|
||||
_exit.retZid = (_namemsg)->curDataStream->NAMEDzid; \
|
||||
_exit.retVolID = (_namemsg)->curvol->VOLvolumeID; \
|
||||
INIT_TIME_INFO(_exit.times, (_namemsg)->curFile); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_exit.retOpenCreateAction = 0; \
|
||||
_exit.retKey = 0; \
|
||||
_exit.retOpenCreateAction = 0; \
|
||||
_exit.retKey = 0; \
|
||||
INIT_TIME_INFO(_exit.times, NULL); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define INIT_OPEN_ENTER_EVENT(_enter, _openmsg) \
|
||||
{ \
|
||||
_enter.requestedRights = (_openmsg)->requestedRights; \
|
||||
_enter.openParms = (_openmsg)->openParms; \
|
||||
#define INIT_OPEN_ENTER_EVENT(_enter, _openmsg) \
|
||||
{ \
|
||||
_enter.requestedRights = (_openmsg)->requestedRights; \
|
||||
_enter.openParms = (_openmsg)->openParms; \
|
||||
}
|
||||
|
||||
#define INIT_OPEN_EXIT_EVENT(_exit, _status, _namemsg, _retfilehandle) \
|
||||
{ \
|
||||
if (_status == zOK) \
|
||||
if (_status == zOK) \
|
||||
{ \
|
||||
_exit.retKey = _retfilehandle ? (_retfilehandle)->key : 0; \
|
||||
_exit.retZid = (_namemsg)->curDataStream->NAMEDzid; \
|
||||
_exit.retVolID = (_namemsg)->curvol->VOLvolumeID; \
|
||||
_exit.retKey = _retfilehandle ? (_retfilehandle)->key : 0; \
|
||||
_exit.retZid = (_namemsg)->curDataStream->NAMEDzid; \
|
||||
_exit.retVolID = (_namemsg)->curvol->VOLvolumeID; \
|
||||
INIT_TIME_INFO(_exit.times, (_namemsg)->curFile); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_exit.retKey = 0; \
|
||||
_exit.retKey = 0; \
|
||||
INIT_TIME_INFO(_exit.times, NULL); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define INIT_CLOSE_ENTER_EVENT(_genmsg, _evblk, _parm, _enter, _fh, _id) \
|
||||
{ \
|
||||
#define INIT_CLOSE_ENTER_EVENT(_genmsg, _evblk, _parm, _enter, _fh, _id) \
|
||||
{ \
|
||||
_enter.enterExitID = _id; \
|
||||
_enter.connID = (_genmsg)->pssConn.id; \
|
||||
_enter.connID = (_genmsg)->pssConn.id; \
|
||||
_enter.key = (_fh)->door.dr_key; \
|
||||
_enter.fhState = (_fh)->fhState; \
|
||||
INIT_TIME_INFO(_enter.times, (_fh)->file); \
|
||||
@@ -446,23 +446,23 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
|
||||
#define INIT_CLOSE_EXIT_EVENT(_exit, _filedel, _status) \
|
||||
{ \
|
||||
_exit.opRetCode = _status; \
|
||||
_exit.fileDeleted = _filedel; \
|
||||
_exit.opRetCode = _status; \
|
||||
_exit.fileDeleted = _filedel; \
|
||||
}
|
||||
|
||||
#define INIT_MODIFY_ENTER_EVENT(_infomsg, _enter) \
|
||||
{ \
|
||||
_enter.modifyInfoMask = _infomsg->modifyInfoMask; \
|
||||
_enter.modifyTypeInfoMask = _infomsg->modifyTypeInfoMask; \
|
||||
_enter.modifyInfo = _infomsg->modifyInfo; \
|
||||
_enter.modifyTypeInfo = _infomsg->modifyTypeInfo; \
|
||||
_enter.modifyInfoMask = _infomsg->modifyInfoMask; \
|
||||
_enter.modifyTypeInfoMask = _infomsg->modifyTypeInfoMask; \
|
||||
_enter.modifyInfo = _infomsg->modifyInfo; \
|
||||
_enter.modifyTypeInfo = _infomsg->modifyTypeInfo; \
|
||||
}
|
||||
|
||||
#define INIT_SIZE_ENTER_EVENT(_genmsg, _evblk, _parm, _enter, _fh, \
|
||||
_flags, _cureof, _neweof, _id) \
|
||||
{ \
|
||||
#define INIT_SIZE_ENTER_EVENT(_genmsg, _evblk, _parm, _enter, _fh, \
|
||||
_flags, _cureof, _neweof, _id) \
|
||||
{ \
|
||||
_enter.enterExitID = _id; \
|
||||
_enter.connID = _genmsg->pssConn.id; \
|
||||
_enter.connID = _genmsg->pssConn.id; \
|
||||
_enter.key = _fh->door.dr_key; \
|
||||
_enter.setSizeFlags = _flags; \
|
||||
_enter.curEOF = _cureof; \
|
||||
@@ -477,14 +477,14 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
|
||||
#define INIT_ADD_TRUSTEE_ENTER_EVENT(_enter, _trusteeId, _rights, _attr) \
|
||||
{ \
|
||||
_enter.trusteeID = _trusteeId; \
|
||||
_enter.trusteeID = _trusteeId; \
|
||||
_enter.rights = _rights; \
|
||||
_enter.attributes = _attr; \
|
||||
}
|
||||
|
||||
#define INIT_REMOVE_TRUSTEE_ENTER_EVENT(_enter, _trusteeId, _flag) \
|
||||
{ \
|
||||
_enter.trusteeID = _trusteeId; \
|
||||
_enter.trusteeID = _trusteeId; \
|
||||
_enter.purgedFileFlag = _flag; \
|
||||
}
|
||||
|
||||
@@ -494,9 +494,9 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
_enter.authorizeFlag = _flag; \
|
||||
}
|
||||
|
||||
#define INIT_VOL_STATE_ENTER_EVENT( _evblk, _parm, _enter, _id, _vol, \
|
||||
#define INIT_VOL_STATE_ENTER_EVENT( _evblk, _parm, _enter, _id, _vol, \
|
||||
_oState, _nState, _mode) \
|
||||
{ \
|
||||
{ \
|
||||
_enter.enterExitID = _id; \
|
||||
_enter.oldState = _oState; \
|
||||
_enter.newState = _nState; \
|
||||
@@ -513,8 +513,8 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
INIT_EVENT_BLOCK(_evblk, _parm, &_enter); \
|
||||
}
|
||||
|
||||
#define INIT_VOL_STATE_EXIT_EVENT(_exit, _vol, _oState, _mode) \
|
||||
{ \
|
||||
#define INIT_VOL_STATE_EXIT_EVENT(_exit, _vol, _oState, _mode) \
|
||||
{ \
|
||||
_exit.oldState = _oState; \
|
||||
_exit.newState = _vol->state; \
|
||||
_exit.mode = _mode; \
|
||||
@@ -529,12 +529,12 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
} \
|
||||
}
|
||||
|
||||
#define INIT_LINK_ENTER_EVENT(_genmsg, _srcnamemsg, _dstnamemsg, \
|
||||
#define INIT_LINK_ENTER_EVENT(_genmsg, _srcnamemsg, _dstnamemsg, \
|
||||
_evblk, _parm, _enter, _id, _newname, _linkmsg) \
|
||||
{ \
|
||||
{ \
|
||||
_enter.enterExitID = _id; \
|
||||
_enter.connID = _genmsg->pssConn.id; \
|
||||
_enter.taskID = _genmsg->taskID; \
|
||||
_enter.connID = _genmsg->pssConn.id; \
|
||||
_enter.taskID = _genmsg->taskID; \
|
||||
INIT_SRC_PATH_INFO(_enter, _srcnamemsg); \
|
||||
INIT_DST_PATH_INFO(_enter, _dstnamemsg); \
|
||||
_enter.dstName = _newname; \
|
||||
@@ -544,17 +544,17 @@ extern void ReportProduceEventError(char *name,STATUS status);
|
||||
|
||||
#define INIT_POOL_STATE_ENTER_EVENT(_evblk, _parm, _enter, _id, _pool, \
|
||||
_oState, _nState, _mode) \
|
||||
{ \
|
||||
{ \
|
||||
_enter.enterExitID = _id; \
|
||||
_enter.oldState = _oState; \
|
||||
_enter.newState = _nState; \
|
||||
_enter.mode = _mode; \
|
||||
_enter.poolID = _pool->POOLvolumeID; \
|
||||
_enter.poolID = _pool->POOLvolumeID; \
|
||||
INIT_EVENT_BLOCK(_evblk, _parm, &_enter); \
|
||||
}
|
||||
|
||||
#define INIT_POOL_STATE_EXIT_EVENT(_exit, _pool, _oState, _mode) \
|
||||
{ \
|
||||
#define INIT_POOL_STATE_EXIT_EVENT(_exit, _pool, _oState, _mode) \
|
||||
{ \
|
||||
_exit.oldState = _oState; \
|
||||
_exit.newState = _pool->state; \
|
||||
_exit.mode = _mode; \
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#define MIN_BUFS_PER_ENCRYPTED_VOLUME (1)
|
||||
#define MAX_BUFS_PER_ENCRYPTED_VOLUME (1000)
|
||||
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__)) || defined(NSS_USERSPACE)
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
extern NINT Pages_Per_Encrypted_Volume;
|
||||
|
||||
/* This is no more than a structure to define a linked list of buffers used to
|
||||
@@ -61,7 +61,7 @@ typedef struct EncryptedBufPage_s
|
||||
} EncryptedBufPage_s;
|
||||
#endif
|
||||
|
||||
/* This structure contains info needed to support encrypted volumes. A pointer to this stucture
|
||||
/* This structure contains info needed to support encrypted volumes. A pointer to this stucture
|
||||
is provided in Volume_s->v_crypt and if non-null, points to this structure
|
||||
*/
|
||||
typedef struct PersistentVolumeCrypt_s {
|
||||
@@ -77,7 +77,7 @@ typedef struct PersistentVolumeCrypt_s {
|
||||
} NSS_MEDIA_STRUCTURE(PersistentVolumeCrypt_s,macLen) PersistentVolumeCrypt_s;
|
||||
|
||||
typedef struct VolumeKey_s {
|
||||
BYTE key[ENCRYPTED_VOLUME_KEY_LENGTH]; /* 128-bit AES key */
|
||||
BYTE key[ENCRYPTED_VOLUME_KEY_LENGTH]; /* 128-bit AES key */
|
||||
BYTE iv[16]; /* 128-bit IV for AES */
|
||||
NINT numCryptBuffers; /* number of buffers allocated for crypt work */
|
||||
PersistentVolumeCrypt_s p; /* persistent data, created at volume init time */
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
#define _EXTATTRBEAST_H_
|
||||
|
||||
#ifndef _COMNPARAMS_H_
|
||||
#include <include/comnParams.h>
|
||||
#include <comnParams.h>
|
||||
#endif
|
||||
|
||||
#ifndef _COMNBEASTS_H_
|
||||
#include <include/comnBeasts.h>
|
||||
#include <comnBeasts.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
#define _FSM_H_
|
||||
|
||||
#ifndef _QUE_H_
|
||||
# include <library/que.h>
|
||||
# include <que.h>
|
||||
#endif
|
||||
|
||||
#ifndef _MAILBOX_H_
|
||||
# include <include/mailbox.h>
|
||||
# include <mailbox.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -90,7 +90,7 @@ extern "C" {
|
||||
<dd>Pop ITEM off the FSM stack. Converts ITEM to TYPE
|
||||
passed in. Used to retrive arguments or return
|
||||
values placed on stack.
|
||||
<dt>FSM_DELETE(fsm)
|
||||
<dt>FSM_DELETE(fsm)
|
||||
<dd>Just deletes an item from stack. Does not retieve it.
|
||||
<dt>FSM_RUN(fsm)
|
||||
<dd>Pops top of stack and immediately calls the function thus
|
||||
@@ -103,7 +103,7 @@ extern "C" {
|
||||
fast path.
|
||||
<dt>FSM_RUN_VALUE(fsm, value)
|
||||
<dd>Like FSM_RUN but lets us "return" a value to the called function.
|
||||
Note: VALUE
|
||||
Note: VALUE
|
||||
<dt>FSM_READY_VALUE(fsm, value)
|
||||
<dd>Like FSM_READY but lets us "return" a value to the requestor.
|
||||
<dt>FSM_READY_ALL(queue)
|
||||
@@ -227,7 +227,7 @@ extern NINT fsmKick();
|
||||
{ \
|
||||
FsmLite_s *Fsm = (FsmLite_s *)(_f); \
|
||||
\
|
||||
Fsm->action = (voidfunc_t)(_action); \
|
||||
Fsm->action = (_action); \
|
||||
zASSERT(Fsm->action != NULL); \
|
||||
FSM_ENQ(Fsm); \
|
||||
}
|
||||
@@ -324,7 +324,7 @@ typedef struct FsmInst_s
|
||||
{
|
||||
NINT mailDone;
|
||||
NINT fsmDone;
|
||||
}FsmInst_s;
|
||||
}FsmInst_s;
|
||||
|
||||
extern FsmInst_s FsmInst;
|
||||
|
||||
|
||||
@@ -39,15 +39,15 @@
|
||||
#define _FSMSG_H_
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
# include <public/zOmni.h>
|
||||
# include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _NSS_MSG_H_
|
||||
# include <include/msg.h>
|
||||
# include <msg.h>
|
||||
#endif
|
||||
|
||||
#ifndef _ZFSMSG_H_
|
||||
# include <public/zFsMsg.h>
|
||||
# include <zFsMsg.h>
|
||||
#endif
|
||||
|
||||
extern mManager_s *FileMgr;
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
#ifndef _FULLDIRECTORYINFO_H_
|
||||
#define _FULLDIRECTORYINFO_H_
|
||||
|
||||
#include <library/xUnicode.h>
|
||||
#include <xUnicode.h>
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -49,7 +49,7 @@ extern "C" {
|
||||
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
#include <public/zOmni.h>
|
||||
#include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _NSS_STRING_H_
|
||||
@@ -138,8 +138,6 @@ extern void LB_GUIDGenerate( GUID_t *retGuid );
|
||||
(memcmp((_guid1),(_guid2),sizeof(GUID_t)))
|
||||
*/
|
||||
|
||||
extern QUAD GUID_getTime(void);
|
||||
extern void GUID_init(void);
|
||||
extern int LB_GUIDValidate( GUID_t *TESTGuid );
|
||||
|
||||
STATUS LB_GUIDFromUTF8( utf8_t *p, GUID_t *guid );
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
#define _HARDLINK_H_
|
||||
|
||||
#ifndef _COMNBEASTS_H_
|
||||
#include <include/comnBeasts.h>
|
||||
#include <comnBeasts.h>
|
||||
#endif
|
||||
|
||||
#ifndef _MSGGEN_H_
|
||||
#include <include/msgGen.h>
|
||||
#include <msgGen.h>
|
||||
#endif
|
||||
|
||||
#ifndef _VOLUME_H_
|
||||
#include <include/volume.h>
|
||||
#include <volume.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ extern HardLinkBeast_s *HL_doCreateHardLinkBeast(
|
||||
Xaction_s *xaction);
|
||||
|
||||
extern STATUS HL_doDestroyHardLinkBeast(
|
||||
GeneralMsg_s *genMsg,
|
||||
GeneralMsg_s *genMsg,
|
||||
HardLinkBeast_s *hlBeast,
|
||||
File_s *inodeBeast,
|
||||
Xaction_s *xaction);
|
||||
@@ -120,7 +120,7 @@ extern File_s *HL_CheckIfHardlinkAndReturnPrimary(
|
||||
NINT latchType);
|
||||
|
||||
extern CommonBeastOps_s HardLinkBeastComnOps;
|
||||
extern const char Module[];
|
||||
extern const char Module[];
|
||||
extern NINT HL_NewLocalVolumeBeastVersion;
|
||||
extern NINT HL_NewSharedVolumeBeastVersion;
|
||||
extern void HL_StartUpgradeProcess(Volume_s *switchDef, NINT shareFlags);
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
| (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 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.
|
||||
| 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.
|
||||
| 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
|
||||
| To contact Novell about this file by physical or electronic mail,
|
||||
| you may find current contact information at www.novell.com
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
@@ -43,7 +43,15 @@
|
||||
#define _HISTOGRAM_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include <omni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _INLINES_H_
|
||||
#include <inlines.h>
|
||||
#endif
|
||||
|
||||
#ifndef _PARSE_H_
|
||||
#include <parse.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -52,7 +60,6 @@ extern "C" {
|
||||
|
||||
/* Pre-define struct(s) so Linux compiler doesn't complain */
|
||||
struct ScreenStruct;
|
||||
struct PCLSwitchDef_s;
|
||||
|
||||
typedef struct Histogram_s
|
||||
{
|
||||
@@ -75,44 +82,44 @@ STATUS registerHistogram(
|
||||
BOOL *isEnabled,
|
||||
Histogram_s *histogram);
|
||||
|
||||
STATUS doDisplayHistogram(
|
||||
STATUS doDisplayHistogram (
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT options,
|
||||
void *userParm);
|
||||
|
||||
STATUS doDisableHistogram(
|
||||
STATUS doDisableHistogram (
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT options,
|
||||
void *userParm);
|
||||
|
||||
STATUS doClearHistogram(
|
||||
STATUS doClearHistogram (
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT options,
|
||||
void *userParm);
|
||||
|
||||
STATUS doListHistograms(
|
||||
STATUS doListHistograms (
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT options,
|
||||
void *userParm);
|
||||
|
||||
STATUS doEnableHistogram(
|
||||
STATUS doEnableHistogram (
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
NINT options,
|
||||
void *userParm);
|
||||
|
||||
#if HISTOGRAM IS_ENABLED
|
||||
|
||||
#define INC_HISTOGRAM(_hist) (incHistogram(&(_hist)))
|
||||
#define DEC_HISTOGRAM(_hist) (--((_hist).currentCount))
|
||||
#define ZERO_HISTOGRAM(_hist) (bzero(&(_hist), sizeof(Histogram_s)))
|
||||
#define EVENT_HISTOGRAM(_hist, _event) (eventHistogram(&(_hist), (_event)))
|
||||
#define INC_HISTOGRAM(_hist) (incHistogram( &(_hist)))
|
||||
#define DEC_HISTOGRAM(_hist) (--((_hist).currentCount))
|
||||
#define ZERO_HISTOGRAM(_hist) (bzero( &(_hist), sizeof(Histogram_s)))
|
||||
#define EVENT_HISTOGRAM(_hist, _event) (eventHistogram( &(_hist), (_event)))
|
||||
|
||||
#else
|
||||
|
||||
#define INC_HISTOGRAM(_hist) ((void)0)
|
||||
#define DEC_HISTOGRAM(_hist) ((void)0)
|
||||
#define ZERO_HISTOGRAM(_hist) ((void)0)
|
||||
#define EVENT_HISTOGRAM(_hist, _event) ((void)0)
|
||||
#define INC_HISTOGRAM(_hist) ((void) 0)
|
||||
#define DEC_HISTOGRAM(_hist) ((void) 0)
|
||||
#define ZERO_HISTOGRAM(_hist) ((void) 0)
|
||||
#define EVENT_HISTOGRAM(_hist) ((void) 0)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -132,7 +139,64 @@ typedef struct Timer_s
|
||||
NINT suspended;
|
||||
} Timer_s;
|
||||
|
||||
extern Timer_s *CurrentTimer;
|
||||
extern Timer_s *CurrentTimer;
|
||||
|
||||
#define TIMER Timer_s tiMer
|
||||
#define SAVE_TIMER Timer_s *saveTiMer
|
||||
|
||||
#define START_TIMER() \
|
||||
{ \
|
||||
zASSERT(CurrentTimer == NULL); \
|
||||
\
|
||||
tiMer.running = 0; \
|
||||
tiMer.suspended = 0; \
|
||||
CurrentTimer = &tiMer; \
|
||||
tiMer.start = LB_CycleCount(); \
|
||||
}
|
||||
|
||||
#define STOP_TIMER(_histRunning, _histSuspended) \
|
||||
{ \
|
||||
if (CurrentTimer) \
|
||||
{ \
|
||||
NINT end; \
|
||||
\
|
||||
zASSERT(CurrentTimer == &tiMer); \
|
||||
\
|
||||
end = LB_CycleCount(); \
|
||||
CurrentTimer->running += end - CurrentTimer->start; \
|
||||
eventHistogram( &(_histRunning), CurrentTimer->running); \
|
||||
if (CurrentTimer->suspended) \
|
||||
{ \
|
||||
eventHistogram( &(_histSuspended), CurrentTimer->suspended);\
|
||||
} \
|
||||
CurrentTimer = NULL; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SUSPEND_TIMER() \
|
||||
{ \
|
||||
if (CurrentTimer) \
|
||||
{ \
|
||||
NINT end; \
|
||||
\
|
||||
end = LB_CycleCount(); \
|
||||
CurrentTimer->running += end - CurrentTimer->start; \
|
||||
CurrentTimer->start = end; \
|
||||
saveTiMer = CurrentTimer; \
|
||||
CurrentTimer = NULL; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RESUME_TIMER() \
|
||||
{ \
|
||||
NINT end; \
|
||||
\
|
||||
zASSERT(CrrentTimer == NULL); \
|
||||
end = LB_CycleCount(); \
|
||||
CurrentTimer = saveTiMer; \
|
||||
CurrentTimer->suspended += end - CurrentTimer->start; \
|
||||
CurrentTimer->start = end; \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
#define _HMC_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
# include <library/omni.h>
|
||||
# include <omni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _QUE_H_
|
||||
# include <library/que.h>
|
||||
#ifndef _MSGGEN_H_
|
||||
# include <msgGen.h>
|
||||
#endif
|
||||
|
||||
struct Buffer_s;
|
||||
@@ -82,3 +82,4 @@ void HMC_UpdatePrivateCacheSizeUI(NINT newBlockTotal);
|
||||
const char *HMC_CacheName(void);
|
||||
|
||||
#endif /* ifndef _HMC_H_ */
|
||||
|
||||
|
||||
38
include/nwnss/include/http.imp
Normal file
38
include/nwnss/include/http.imp
Normal file
@@ -0,0 +1,38 @@
|
||||
HttpQueryInfo
|
||||
HttpReturnString
|
||||
HttpReturnPathBuffers
|
||||
HttpReturnDataAvailBuffer
|
||||
HttpReturnDataTxBuffer
|
||||
HttpReturnHeaderVersion
|
||||
HttpSendDataSprintf
|
||||
HttpOpenResponseHeaderTag
|
||||
HttpAddResponseHeaderTags
|
||||
HttpAddResponseHeaderDateTag
|
||||
HttpAddResponseHeaderContentTypeTag
|
||||
HttpAddResponseHeaderLastModifiedTag
|
||||
HttpSendResponseHeader
|
||||
HttpAddResponseHeaderStringContentType
|
||||
HttpAddResponseHeaderContentLengthTag
|
||||
HttpSendSuccessfulResponse
|
||||
HttpSendErrorResponse
|
||||
HttpSendDataResponse
|
||||
HttpSendDataFlush
|
||||
HttpEndDataResponse
|
||||
RegisterServiceMethod
|
||||
DeRegisterServiceMethod
|
||||
RegisterFileSystemServiceMethodEx
|
||||
DeRegisterFileSystemServiceMethod
|
||||
serviceGetConnectionNumber
|
||||
HttpGetContext
|
||||
HttpSetContext
|
||||
HttpExtractInternetTimeFromString
|
||||
HttpLocalTimeToInternetTime
|
||||
HttpInternetTimeToString
|
||||
HttpCheckIfModifiedSinceTime
|
||||
HttpStackIpInformation
|
||||
HttpSendDataTxBuffer
|
||||
HttpUnConvertName
|
||||
HttpConvertName
|
||||
HttpScanServiceMethods
|
||||
HttpReturnRequestMethod
|
||||
HttpReturnPostDataBuffer
|
||||
@@ -38,7 +38,7 @@
|
||||
#define _ID_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
#include <library/omni.h>
|
||||
#include "omni.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -46,8 +46,6 @@
|
||||
* for trustee ids.
|
||||
*/
|
||||
|
||||
#define zINVALID_USERID zINVALID_GUID
|
||||
|
||||
#define MAX_IDS 0x800000 /* Max number of ids we will try
|
||||
* to handle.
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#define _INST_H_
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
# include <public/zOmni.h>
|
||||
# include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -162,7 +162,7 @@ typedef struct PageInst_s
|
||||
QUAD pgRequest; /* Pages given back by xRequestPage */
|
||||
QUAD pgContig; /* Pages given back by xRequestContiguousPages */
|
||||
} PageInst_s;
|
||||
|
||||
|
||||
|
||||
extern Inst_s Inst;
|
||||
extern PageInst_s PageInst;
|
||||
|
||||
215
include/nwnss/include/ipuAccess.h
Normal file
215
include/nwnss/include/ipuAccess.h
Normal file
@@ -0,0 +1,215 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 1995-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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) support module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
|
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _IPUACCESS_H_
|
||||
#define _IPUACCESS_H_
|
||||
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
/*--- ipuAccess -------------------------------------------------------------
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Global definitions
|
||||
+-------------------------------------------------------------------------*/
|
||||
/*- defined message types -*/
|
||||
#define IPU_MSG_PROCESSPHASE 1 // process the next phase
|
||||
#define IPU_MSG_STATUS 2 // get status of ipu
|
||||
#define IPU_MSG_CONFIG 3 // set process information
|
||||
|
||||
/*- config message mask bits -*/
|
||||
#define IPU_SET_TYPE 0x00000001 // mask to set conversion type
|
||||
#define IPU_SET_NWVOLNAME 0x00000002 // mask to set nw volume name
|
||||
#define IPU_SET_NSSVOLNAME 0x00000004 // mask to set nss volume name
|
||||
#define IPU_SET_VOLCONFIRM 0x00000008 // mask to confirm volume selection
|
||||
#define IPU_SET_VOLPURGE 0x00000010 // mask to activate purge phase
|
||||
#define IPU_SET_DECOMPRESS 0x00000020 // mask to activate decompress phase
|
||||
#define IPU_SET_FINALCONFIRM 0x00000040 // mask to confirm final conversion
|
||||
#define IPU_SET_ABORT 0x00000080 // mask to activate abort sequence
|
||||
#define IPU_SET_RESET 0x00000100 // mask to reset ipu process
|
||||
|
||||
/*- message return code -*/
|
||||
#define IPU_ERR_INVALIDMSGTYPE 51000 // (C738h) invalid message type
|
||||
|
||||
/*- defined return message completed codes -*/
|
||||
#define IPU_INFO_OK 50100 // (C3B4h) valid information
|
||||
#define IPU_INFO_FAILURE 50101 // (C3B5h) invalid information
|
||||
#define IPU_INFO_PROCESSED 50102 // (C3B6h) phase has been processed
|
||||
|
||||
/*- defined completion status -*/
|
||||
#define IPU_STATUS_OK 50500 // (C544h) success on last action
|
||||
#define IPU_STATUS_IDLE 50501 // (C545h) ipu not working (waiting)
|
||||
#define IPU_STATUS_WORKING 50502 // (C546h) conversion in progress
|
||||
|
||||
#define IPU_STATUS_INPROGRESS 50503 // (C547h) working on this phase
|
||||
#define IPU_STATUS_INITFAILED 50504 // (C548h) phase failed
|
||||
#define IPU_STATUS_UPDATEFAILED 50505 // (C549h) phase failed
|
||||
#define IPU_STATUS_UPGRTYPEFAILED 50506 // (C54Ah) phase failed
|
||||
#define IPU_STATUS_NWVERIFYFAILED 50507 // (C54Bh) phase failed
|
||||
#define IPU_STATUS_NSSVERIFYFAILED 50508 // (C54Ch) phase failed
|
||||
#define IPU_STATUS_MOUNTFAILED 50509 // (C54Dh) phase failed
|
||||
#define IPU_STATUS_READFATFAILED 50510 // (C54Eh) phase failed
|
||||
#define IPU_STATUS_PURGEFAILED 50511 // (C54Fh) phase failed
|
||||
#define IPU_STATUS_DECOMPFAILED 50512 // (C550h) phase failed
|
||||
#define IPU_STATUS_COUNTFATFAILED 50513 // (C551h) phase failed
|
||||
#define IPU_STATUS_FREESPACEFAILED 50514 // (C552h) phase failed
|
||||
#define IPU_STATUS_SACHAINFAILED 50515 // (C553h) phase failed
|
||||
#define IPU_STATUS_BLKSNEEDEDFAILED 50516 // (C554h) phase failed
|
||||
#define IPU_STATUS_STARTUPGRFAILED 50517 // (C555h) phase failed
|
||||
#define IPU_STATUS_FLUSHNSSFAILED 50518 // (C556h) phase failed
|
||||
#define IPU_STATUS_ABORTED 50519 // (C557h) abort conversion process
|
||||
#define IPU_STATUS_CONFORMATION 50520 // (C558h) must set the confirm bit
|
||||
|
||||
/*- ipu conversion can be stopped -*/
|
||||
#define IPU_SAFETOSTOP 50800 // (C670h) safe to abort or restart
|
||||
|
||||
|
||||
/*- ipu state machine phase types -*/
|
||||
#define IPU_PHASE_INIT 0 // value of phase and phasedone
|
||||
#define IPU_PHASE_UPDATE 1 // value of phase and phasedone
|
||||
#define IPU_PHASE_TYPEVERIFY 2 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLVERIFY 3 // value of phase and phasedone
|
||||
#define IPU_PHASE_NSSVOLVERIFY 4 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLMOUNT1 5 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLREADFAT1 6 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLPURGE 7 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLREADFAT2 8 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLDECOMPRESS 9 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLREADFAT3 10 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLFATCOUNT 11 // value of phase and phasedone
|
||||
#define IPU_PHASE_SETFREESPACE 12 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLSACHAININIT 13 // value of phase and phasedone
|
||||
#define IPU_PHASE_BLOCKSNEEDED 14 // value of phase and phasedone
|
||||
#define IPU_PHASE_NWVOLMOUNT2 15 // value of phase and phasedone
|
||||
#define IPU_PHASE_STARTUPGRADE 16 // value of phase and phasedone
|
||||
#define IPU_PHASE_FLUSHNSS 17 // value of phase and phasedone
|
||||
#define IPU_PHASE_NOFLUSHNSS 18 // value of phase and phasedone
|
||||
#define IPU_PHASE_CLEANUP 19 // value of phase and phasedone
|
||||
#define IPU_PHASE_EXIT 20 // value of phase and phasedone
|
||||
|
||||
/*- ipu upgrade types -*/
|
||||
#define IPU_COPY_TYPE 0 // copy conversion type
|
||||
#define IPU_UPGRADE_TYPE 1 // inplace upgrade conversion type
|
||||
#define IPU_INVALID_TYPE -1 // invalid conversion type
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Data Prototypes needed
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
/*- this is the header for all messages -*/
|
||||
typedef struct IPUAccMsg_s
|
||||
{
|
||||
LONG msg_type; // std. - message type
|
||||
LONG msg_step; // std. - message single step if not zOK
|
||||
LONG ret_code; // std. - message return code
|
||||
} IPUAccMsg_s;
|
||||
|
||||
/*- this is the status message -*/
|
||||
typedef struct ipuMsgStatus_s
|
||||
{
|
||||
IPUAccMsg_s msg; // header and master message object
|
||||
|
||||
LONG status; // ipu status
|
||||
|
||||
LONG phase; // (set internal) current or next phase
|
||||
LONG phasedone; // (set internal) last phase completed
|
||||
LONG safetoquit; // (set internal) flag - safe to abort or reset
|
||||
LONG abortflag; // (set user/internal) flag - abort status
|
||||
LONG upgradetype; // (set user) type of upgrade
|
||||
LONG blocksfree; // (set internal) source volume free blocks
|
||||
LONG blocksneeded; // (set internal) source free blocks needed
|
||||
char namesrc[32]; // (set user) netware source volume name
|
||||
char namedest[128]; // (set user) nss destination volume name
|
||||
LONG volconfirm; // (set user) confirm volume selection
|
||||
LONG dopurge; // (set user) purge all deleted files
|
||||
LONG dodecompress; // (set user) decompress all files
|
||||
LONG finalconfirm; // (set user) confirm final media conversion
|
||||
LONG initstatus; // (set internal) phase status
|
||||
LONG updatestatus; // (set internal) phase status
|
||||
LONG typestatus; // (set internal) phase status
|
||||
LONG nwvolverifystatus; // (set internal) phase status
|
||||
LONG nssvolverifystatus; // (set internal) phase status
|
||||
LONG mountstatus; // (set internal) phase status
|
||||
LONG readfatstatus; // (set internal) phase status
|
||||
LONG purgestatus; // (set internal) phase status
|
||||
LONG decompressstatus; // (set internal) phase status
|
||||
LONG volfatcountstatus; // (set internal) phase status
|
||||
LONG freespacestatus; // (set internal) phase status
|
||||
LONG sachaininitstatus; // (set internal) phase status
|
||||
LONG blocksneededstatus; // (set internal) phase status
|
||||
LONG startupgradestatus; // (set internal) phase status
|
||||
LONG flushnssstatus; // (set internal) phase status
|
||||
LONG noflushstatus; // (set internal) phase status
|
||||
LONG cleanupstatus; // (set internal) phase status
|
||||
LONG exitstatus; // (set internal) phase status
|
||||
LONG nwtotaldircnt; // (set internal) total directories to process
|
||||
LONG nwtotalfilecnt; // (set internal) total files to process
|
||||
LONG nwdirsdone; // (set internal) process count of directory
|
||||
LONG nwfilesdone; // (set internal) process count of files
|
||||
} ipuMsgStatus_s;
|
||||
|
||||
/*- this is the config message -*/
|
||||
typedef struct ipuMsgConfig_s
|
||||
{
|
||||
IPUAccMsg_s msg; // header and master message object
|
||||
|
||||
LONG setinfomask; // config mask bits
|
||||
|
||||
LONG upgradetype; // upgrade type
|
||||
char namesrc[32]; // netware source volume name (16 char name)
|
||||
char namedest[128]; // nss destination volume name (64 char name)
|
||||
|
||||
} ipuMsgConfig_s;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
| Function Prototypes needed
|
||||
+-------------------------------------------------------------------------*/
|
||||
extern STATUS zIPU_Access(IPUAccMsg_s *msg); // ipu command input
|
||||
|
||||
#define ZOS_CloseFileIPU(_p1,_p2,_p3,_p4) \
|
||||
{ \
|
||||
MPKNSS_UNLOCK(); \
|
||||
_p1 = CloseFile(_p2,_p3, _p4); \
|
||||
MPKNSS_LOCK(); \
|
||||
}
|
||||
|
||||
|
||||
#endif /* _IPUACCESS_H_ */
|
||||
247
include/nwnss/include/jsdebug.h
Normal file
247
include/nwnss/include/jsdebug.h
Normal file
@@ -0,0 +1,247 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) / Distributed File Services (DFS)
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: stoner $
|
||||
| $Date: 2005-04-13 22:08:08 +0530 (Wed, 13 Apr 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 927 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| DFS communications declarations - TCP transport
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _JSDEBUG_H_
|
||||
#define _JSDEBUG_H_
|
||||
|
||||
/* Global dependencies */
|
||||
#if zNETWARE
|
||||
#ifndef __PROCDEFS_H__
|
||||
#include <procdefs.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _OMNI_H_
|
||||
#include <omni.h>
|
||||
#endif
|
||||
#if zNETWARE
|
||||
#ifndef _COMNPUBLICS_H_
|
||||
#include <comnPublics.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Debug macro */
|
||||
#if zNETWARE && NSS_DEBUG IS_ENABLED
|
||||
|
||||
/* Debug only dependencies */
|
||||
|
||||
|
||||
// Default debug message colour
|
||||
#define DEBUG_COLOUR YELLOW
|
||||
|
||||
/*
|
||||
There MUST be a storage declaration for the following
|
||||
two screen structures in a source file for any module
|
||||
that uses macros/functions in this header file.
|
||||
*/
|
||||
extern struct ScreenStruct *ScreenID; /* Debug screen */
|
||||
extern struct ScreenStruct *StatScreenID; /* Debug statistics screen */
|
||||
extern SPINLOCK StatScrSync; /* Synchronisation object for statistics screen */
|
||||
|
||||
void JS_InitDebugScreens(void);
|
||||
void JS_CloseDebugScreens(void);
|
||||
void JSTCP_InitDebugScreens(void);
|
||||
void JSTCP_CloseDebugScreens(void);
|
||||
void JSMSG_InitDebugScreens(void);
|
||||
void JSMSG_CloseDebugScreens(void);
|
||||
|
||||
#define DEBUG_TEXT0(dbgFormat) if (ScreenID != NULL) \
|
||||
{ \
|
||||
OutputToScreenWithAttribute(ScreenID, \
|
||||
DEBUG_COLOUR, \
|
||||
dbgFormat); \
|
||||
}
|
||||
#define DEBUG_TEXT1(dbgFormat, dbgArg1) if (ScreenID != NULL) \
|
||||
{ \
|
||||
OutputToScreenWithAttribute(ScreenID, \
|
||||
DEBUG_COLOUR, \
|
||||
dbgFormat, \
|
||||
dbgArg1); \
|
||||
}
|
||||
#define DEBUG_TEXT2(dbgFormat, dbgArg1, dbgArg2) if (ScreenID != NULL) \
|
||||
{ \
|
||||
OutputToScreenWithAttribute(ScreenID, \
|
||||
DEBUG_COLOUR, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2); \
|
||||
}
|
||||
#define DEBUG_TEXT3(dbgFormat, dbgArg1, dbgArg2, dbgArg3) if (ScreenID != NULL) \
|
||||
{ \
|
||||
OutputToScreenWithAttribute(ScreenID, \
|
||||
DEBUG_COLOUR, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2, \
|
||||
dbgArg3); \
|
||||
}
|
||||
#define DEBUG_TEXT4(dbgFormat, dbgArg1, dbgArg2, dbgArg3, dbgArg4) if (ScreenID != NULL) \
|
||||
{ \
|
||||
OutputToScreenWithAttribute(ScreenID, \
|
||||
DEBUG_COLOUR, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2, \
|
||||
dbgArg3, \
|
||||
dbgArg4); \
|
||||
}
|
||||
|
||||
|
||||
#define DEBUG_STAT0(dbgFormat) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT1(dbgFormat, dbgArg1) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat, \
|
||||
dbgArg1); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT2(dbgFormat, dbgArg1, dbgArg2) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT3(dbgFormat, dbgArg1, dbgArg2, dbgArg3) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2, \
|
||||
dbgArg3); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT4(dbgFormat, dbgArg1, dbgArg2, dbgArg3, dbgArg4) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2, \
|
||||
dbgArg3, \
|
||||
dbgArg4); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT_XY0(x, y, dbgFormat) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
PositionOutputCursor(StatScreenID, y, x); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT_XY1(x, y, dbgFormat, dbgArg1) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
PositionOutputCursor(StatScreenID, y, x); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat, \
|
||||
dbgArg1); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT_XY2(x, y, dbgFormat, dbgArg1, dbgArg2) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
PositionOutputCursor(StatScreenID, y, x); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT_XY3(x, y, dbgFormat, dbgArg1, dbgArg2, dbgArg3) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
PositionOutputCursor(StatScreenID, y, x); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2, \
|
||||
dbgArg3); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#define DEBUG_STAT_XY4(x, y, dbgFormat, dbgArg1, dbgArg2, dbgArg3, dbgArg4) if (StatScreenID != NULL) \
|
||||
{ \
|
||||
kMutexLock(StatScrSync); \
|
||||
PositionOutputCursor(StatScreenID, y, x); \
|
||||
OutputToScreenWithAttribute(StatScreenID, \
|
||||
LGREEN, \
|
||||
dbgFormat, \
|
||||
dbgArg1, \
|
||||
dbgArg2, \
|
||||
dbgArg3, \
|
||||
dbgArg4); \
|
||||
kMutexUnlock(StatScrSync); \
|
||||
}
|
||||
#else
|
||||
#define DEBUG_TEXT0(dbgFormat)
|
||||
#define DEBUG_TEXT1(dbgFormat, dbgArg1)
|
||||
#define DEBUG_TEXT2(dbgFormat, dbgArg1, dbgArg2)
|
||||
#define DEBUG_TEXT3(dbgFormat, dbgArg1, dbgArg2, dbgArg3)
|
||||
#define DEBUG_TEXT4(dbgFormat, dbgArg1, dbgArg2, dbgArg3, dbgArg4)
|
||||
#define DEBUG_STAT0(dbgFormat)
|
||||
#define DEBUG_STAT1(dbgFormat, dbgArg1)
|
||||
#define DEBUG_STAT2(dbgFormat, dbgArg1, dbgArg2)
|
||||
#define DEBUG_STAT3(dbgFormat, dbgArg1, dbgArg2, dbgArg3)
|
||||
#define DEBUG_STAT4(dbgFormat, dbgArg1, dbgArg2, dbgArg3, dbgArg4)
|
||||
#define DEBUG_STAT_XY0(x, y, dbgFormat)
|
||||
#define DEBUG_STAT_XY1(x, y, dbgFormat, dbgArg1)
|
||||
#define DEBUG_STAT_XY2(x, y, dbgFormat, dbgArg1, dbgArg2)
|
||||
#define DEBUG_STAT_XY3(x, y, dbgFormat, dbgArg1, dbgArg2, dbgArg3)
|
||||
#define DEBUG_STAT_XY4(x, y, dbgFormat, dbgArg1, dbgArg2, dbgArg3, dbgArg4)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
148
include/nwnss/include/jsmsgMessageMgmt.h
Normal file
148
include/nwnss/include/jsmsgMessageMgmt.h
Normal file
@@ -0,0 +1,148 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) / Distributed File Services (DFS)
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: nbalachandran $
|
||||
| $Date: 2007-07-11 17:00:46 +0530 (Wed, 11 Jul 2007) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 2086 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Internal definitions and declarations required
|
||||
/ by free message list management routines
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
#ifndef _JSMSGMESSAGEMGMT_H_
|
||||
#define _JSMSGMESSAGEMGMT_H_
|
||||
|
||||
|
||||
/* Dependencies */
|
||||
#ifndef _OMNI_H_
|
||||
#include <omni.h>
|
||||
#endif
|
||||
#ifndef _JSMSG_H_
|
||||
#include <jsmsg.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* Manifest constants */
|
||||
#ifndef __linux__
|
||||
#define JS_MAX_LARGE_BUFFERS (192) /* Default high water mark for messages with large buffers */
|
||||
#define JS_MAX_MEDIUM_BUFFERS (1024) /* Default high water mark for messages with medium buffers */
|
||||
#define JS_MAX_SMALL_BUFFERS (8192) /* Default high water mark for messages with small buffers */
|
||||
#else
|
||||
#define JS_MAX_LARGE_BUFFERS (4) /* Default high water mark for messages with large buffers */
|
||||
#define JS_MAX_MEDIUM_BUFFERS (64) /* Default high water mark for messages with medium buffers */
|
||||
#define JS_MAX_SMALL_BUFFERS (256) /* Default high water mark for messages with small buffers */
|
||||
#endif
|
||||
#define JS_MESSAGE_SIZE_COUNT (3) /* The number of default message sizes */
|
||||
#define JS_MESSAGE_SIZE_INDEX_LARGE (2) /* The index number for the element to store information on messages with large buffers in arrays of message related data */
|
||||
#define JS_MESSAGE_SIZE_INDEX_MEDIUM (1) /* The index number for the element to store information on messages with medium buffers in arrays of message related data */
|
||||
#define JS_MESSAGE_SIZE_INDEX_SMALL (0) /* The index number for the element to store information on messages with small buffers in arrays of message related data */
|
||||
#ifndef __linux__
|
||||
#define JS_MIN_LARGE_BUFFERS (2) /* Default low water mark for messages with large buffers */
|
||||
#define JS_MIN_MEDIUM_BUFFERS (32) /* Default low water mark for messages with medium buffers */
|
||||
#define JS_MIN_SMALL_BUFFERS (128) /* Default low water mark for messages with small buffers */
|
||||
#else
|
||||
#define JS_MIN_LARGE_BUFFERS JS_MAX_LARGE_BUFFERS /* Default low water mark for messages with large buffers */
|
||||
#define JS_MIN_MEDIUM_BUFFERS JS_MAX_MEDIUM_BUFFERS /* Default low water mark for messages with medium buffers */
|
||||
#define JS_MIN_SMALL_BUFFERS JS_MAX_SMALL_BUFFERS /* Default low water mark for messages with small buffers */
|
||||
#endif
|
||||
#define JS_CPU_PAGE_LENGTH_BYTES (0x1000) /* The number of bytes in a CPU page */
|
||||
#define JS_CPU_PAGE_SIZE_MASK (0x0FFF) /* AND mask to select offset in a page when used with a memory address */
|
||||
|
||||
#define JS_ALLOC_HWM_LOCK_NAME "JS HWM Lock: " /* The default name for an allocation high water mark access semaphore (lock size is appended to this string when used) */
|
||||
#define JS_ALLOC_HWM_LOCK_NAME_LEN_BYTES (20) /* The length in bytes of the longest allocation high water mark name */
|
||||
|
||||
#define JS_ALLOC_MESSAGE_LIST_LOCK_NAME "JS Alloc Msg Lock" /* The name for the lock that is used to control access to the allocated message list */
|
||||
|
||||
#define JS_FREE_MESSAGE_LIST_LOCK_NAME "JS Free Queue Lock: " /* The default name for a free message list access lock (lock size is appended to this string when used) */
|
||||
#define JS_FREE_MESSAGE_LIST_LOCK_NAME_LEN_BYTES (27) /* The length in bytes of the longest free message list access lock name */
|
||||
|
||||
#define JS_SIZE_LARGE_NAME "Large" /* The text name for messages with large buffers */
|
||||
#define JS_SIZE_MEDIUM_NAME "Medium" /* The text name for messages with medium buffers */
|
||||
#define JS_SIZE_SMALL_NAME "Small" /* The text name for messages with small buffers */
|
||||
|
||||
|
||||
#define JS_UNKNOWN_NAME "Unknown" /* Used when a size parameter does not match the default supoprted sizes */
|
||||
|
||||
#define JS_THREAD_NAME_ALLOC "JSMSG: Allocate Message" /* Name used to rename a thread when it calls JS_AllocateMessage() */
|
||||
#define JS_THREAD_NAME_DUP_MSG "JSMSG: Duplicate Message" /* Name used to rename a thread when it calls JS_DuplicateMessage() */
|
||||
#define JS_THREAD_NAME_GET_DEF_MSG_SIZES "JSMSG: Get Default Message Sizes" /* Name used to rename a thread when it calls JS_GetDefaultMessageSizes() */
|
||||
#define JS_THREAD_NAME_RETIRE "JSMSG: Retire Message" /* Name used to rename a thread when it calls JS_RetireMessage() */
|
||||
|
||||
|
||||
/*
|
||||
New types
|
||||
*/
|
||||
|
||||
/* The general communication message type */
|
||||
typedef struct JS_MESSAGE_s
|
||||
{
|
||||
JS_CommMsg_s Msg; /* The message as it is seen by consumers */
|
||||
LONG Pages; /* The number of CPU pages that the message is stored in (if it is an exact multiple of the page size), or zero */
|
||||
BOOL ExternalBuffer; /* TRUE if the Msg.MessageData field was not allocated by Jetstream */
|
||||
GUID_t OwnerID; /* Set to the original owner of the message when an external buffer is used */
|
||||
QUAD TimeQueued; /* Set to the current time when a message is placed in a queue */
|
||||
BOOL Allocated; /* Set to FALSE when message is on a free list */
|
||||
DQlink_t AllocList; /* Links allocated messages */
|
||||
void *Allocator; /* Points to the caller that allocated the message */
|
||||
} JS_MESSAGE_t;
|
||||
|
||||
|
||||
/*
|
||||
Function prototypes - Internal only
|
||||
|
||||
Prototypes for exported functions can be found in jsmsg.h. If any exported
|
||||
functions are added to jsmsgMessageMgmt.c do not put their prototypes here,
|
||||
put them in jsmsg.h
|
||||
*/
|
||||
STATUS JS_AddMessageToFreeList(JS_CommMsg_s * Message); /* Place a message on the appropriate free message list */
|
||||
STATUS JS_CleanFreeMessageLists(void); /* Empty the contents of the free message lists */
|
||||
STATUS JS_CreateFreeMessageListLocks(void); /* Create access locks for the free message lists */
|
||||
JS_CommMsg_s * JS_CreateMessage(size_t MessageSize); /* Create a jetstream message */
|
||||
STATUS JS_DestroyFreeMessageListLocks(void); /* Free the access locks for the free message lists */
|
||||
STATUS JS_DestroyMessage(JS_CommMsg_s * Message); /* Free a Jetstream message */
|
||||
JS_CommMsg_s * JS_FastAllocateMessage(size_t MessageSize, LONG MaxTimeToWait, BOOL IgnoreHWM); /* Minimal cost message allocation - FOR INTERNAL USE ONLY */
|
||||
STATUS JS_InitialiseBufferManager(void); /* Initialise the state of the message management module */
|
||||
void JS_LockFreeMessageList(LONG ListIndex); /* Exercise the access lock for a free message list */
|
||||
LONG JS_PopulateFreeMessageList(LONG MessageSize, LONG NumberToCreate, LONG SizeIndex); /* Initialise the free message lists to the low water mark counts */
|
||||
void JS_ResetMessageContents(JS_CommMsg_s * Message); /* Reset the contents of a message */
|
||||
JS_CommMsg_s * JS_TakeMessage(size_t MessageSize, LONG MaxTimeToWait, BOOL IgnoreHWM); /* Remove a message from a free message list or create a new one */
|
||||
void JS_UnlockFreeMessageList(LONG ListIndex); /* Release an access lock held on a free message list */
|
||||
STATUS JS_CreateAllocHWMLocks(void);
|
||||
STATUS JS_DestroyAllocHWMLocks(void);
|
||||
STATUS JS_SignalHWMLock(NINT listIndex);
|
||||
BOOL JS_WaitOnHWMLock(NINT listIndex, LONG maxTimeToWait);
|
||||
|
||||
/* Deletes the SHM and SEM that are still present in the system, usually after an Jet Stream kill */
|
||||
void JS_CleanupMsgMgmtResources(void);
|
||||
|
||||
#endif
|
||||
|
||||
140
include/nwnss/include/jsmsgPresInt.h
Normal file
140
include/nwnss/include/jsmsgPresInt.h
Normal file
@@ -0,0 +1,140 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) / Distributed File Services (DFS) Module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: stoner $
|
||||
| $Date: 2005-04-13 22:08:08 +0530 (Wed, 13 Apr 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 927 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Provide internal definitions for jsmsgPresentation.c
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _JSMSGPRESINT_H_
|
||||
#define _JSMSGPRESINT_H_
|
||||
|
||||
/* Dependencies */
|
||||
#ifndef _JSMSGSESSION_H_
|
||||
#include <jsmsgSession.h>
|
||||
#endif
|
||||
|
||||
/* New types */
|
||||
|
||||
/*
|
||||
This structure implements the state information for sessions for which
|
||||
a consumer wants isolated receive queueing. Each entry in the vertical
|
||||
list (linked by SessionLink) is a queue of messages received on a
|
||||
particular session for the consumer state object that holds the head of
|
||||
the queue.
|
||||
*/
|
||||
typedef struct JS_SessionQNode_s
|
||||
{
|
||||
unicode_t *Session; /* Session ID for which a dispatched receive queue is required */
|
||||
DQlink_t SessionLink; /* Links all dispatched sessions for a consumer into a list */
|
||||
DQhead_t MessageQueue; /* Received mesasge queue for the dispatched session */
|
||||
LONG Messages; /* Number of messages in the receive queue */
|
||||
SEMAPHORE RxSignal; /* Trigger to wake-up the consumer if a message is received for the session associated with this instance of this structure and the consumer requested a receive event */
|
||||
BOOL EventModeEnabled; /* TRUE if the consumer requested a receive event for this dispatched session */
|
||||
} JS_SESSION_Q_NODE_s;
|
||||
|
||||
/*
|
||||
Internal format of connect and disconnect messages
|
||||
*/
|
||||
typedef struct JS_ConnectMessage_s
|
||||
{
|
||||
GUID_t SourceModule; /* Module ID of module making the connection */
|
||||
LONG Address; /* IP address to connect to (network byte order */
|
||||
SEMAPHORE Trigger; /* Signaled when the connection is created or connect failed */
|
||||
unicode_t * Session; /* Session created */
|
||||
BOOL CallerTimeout; /* Caller sets to TRUE if it has timed out waiting for the connect */
|
||||
} JS_ConnectMessage_s;
|
||||
|
||||
typedef struct JS_DisconnectMessage_s
|
||||
{
|
||||
GUID_t SourceModule; /* Module ID of the module making the disconnection */
|
||||
SEMAPHORE Trigger; /* Signaled when the disconnect completes or fails */
|
||||
BOOL Waiting; /* TRUE while the consumer is still waiting for the completion of the disconnect */
|
||||
JS_SESSION_t * Session; /* The session to disconnect */
|
||||
} JS_DisconnectMessage_s;
|
||||
|
||||
|
||||
// manifest constants
|
||||
#define JS_THREAD_NAME_ALLOC "JSMSG: Allocate Message" /* Name used to rename a thread when it calls JS_AllocateMessage() */
|
||||
#define JS_THREAD_NAME_DEQ "JSMSG: De-queue Message" /* Name used to rename a thread when it calls JS_DequeueMessage() */
|
||||
#define JS_THREAD_NAME_DEREG "JSMSG: Module De-register" /* Name used to rename a thread when it calls JS_DeregisterModule() */
|
||||
#define JS_THREAD_NAME_FAIL_DISCONN "JSMSG: Disconnect for failed connect" /* Name used for a thread that disconencts a physical session for which a logical session could not be created */
|
||||
#define JS_THREAD_NAME_EVT "JSMSG: Request Receive Event" /* Name used to rename a thread when it calls JS_RequestReceiveEvent() */
|
||||
#define JS_THREAD_NAME_Q "JSMSG: Queue Message" /* Name used to rename a thread when it calls JS_QueueMessage() */
|
||||
#define JS_THREAD_NAME_SDEQ "JSMSG: De-queue a Dispatched Message" /* Name used to rename a thread when it calls JS_DequeueDispatchedMessage() */
|
||||
#define JS_THREAD_NAME_SDISP "JSMSG: Dispatch Session" /* Name used to rename a thread when it calls JS_DispatchSession() */
|
||||
#define JS_THREAD_NAME_SET_MSG_SESSION "JSMSG: Set Message Session" /* Name used to rename a thread when it calls JS_SetMessageSession() */
|
||||
#define JS_THREAD_NAME_SEVT "JSMSG: Request Event on Dispatch Queue" /* Name used to rename a thread when it calls JS_RequestDispatchedSessionReceiveEvent() */
|
||||
#define JS_THREAD_NAME_SUNDISP "JSMSG: Undispatch Session" /* Name used to rename a thread when it calls JS_UndispatchSession() */
|
||||
|
||||
#define JS_CONNECT_TIMEOUT (3000) /* Time to wait for a connect to complete, 3 seconds */
|
||||
#define JS_DEFAULT_STACK_SIZE_BYTES (8192 - 16) /* Default stack size for a new thread created by Jetstream */
|
||||
|
||||
|
||||
/* Global data */
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
STATUS JS_CleanFreeQueues(void); /* Empty the contents of the free message pools */
|
||||
#if zNETWARE
|
||||
void * JS_FailureDisconnect(THREAD ThreadHandle, void *Argument); /* Disconnect a physical session for which a logical session could not be created */
|
||||
#else
|
||||
void * JS_FailureDisconnect(void *Argument); /* Disconnect a physical session for which a logical session could not be created */
|
||||
#endif
|
||||
|
||||
STATUS JS_InitialiseBufferManager(void); /* Setup the free message pools */
|
||||
STATUS JS_InitialisePresentationInterface(void); /* Initialise the consumer interfaces */
|
||||
|
||||
/* Free queue locking */
|
||||
STATUS JS_CreateFreeQueueLocks(void); /* Create the access locks for the free message pools */
|
||||
STATUS JS_DestroyFreeQueueLocks(void); /* Destroy the access locks for the free message pools */
|
||||
|
||||
/* Consumer list management */
|
||||
JS_SESSION_Q_NODE_s * JS_CreateSessionNode(unicode_t *Session, SEMAPHORE RxSignal); /* Create an entry in the dispatched session list for a consumer */
|
||||
void JS_NewIncarnation(void); /* Generate a new incarnation number for Jetstream in response to a state change */
|
||||
|
||||
/* Transport and module list locking */
|
||||
STATUS JS_LockTransportAndModuleQueues(void); /* Lock both the transport and consumer lists */
|
||||
STATUS JS_UnlockTransportAndModuleQueues(void); /* Unlock both the transport and consumer lists */
|
||||
|
||||
/* Internal message processing */
|
||||
STATUS JS_ProcessConnectResponse(JS_ConnectMessage_s * ConnectMessage); /* Process a JIC connect response */
|
||||
STATUS JS_ProcessDDisconnectResponse(JS_DisconnectMessage_s * DisconnectMessage); /* Process a JIC disconnect response */
|
||||
STATUS JS_QueueMessageForConsumer(GUID_t TargetModule, JS_CommMsg_s * Message);
|
||||
STATUS JS_QueueMessageForLocalTarget(GUID_t TargetID, JS_CommMsg_s * Message);
|
||||
STATUS JS_QueueMessageForTransport(GUID_t TransportID, JS_CommMsg_s * Message); /* Place a message in the send queue for a transport */
|
||||
STATUS JS_ShutdownPresentationInterface(void); /* Cleanup the consumer interfaces */
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
65
include/nwnss/include/jsmsgPresentation.h
Normal file
65
include/nwnss/include/jsmsgPresentation.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2000 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) / Distributed File Services (DFS)
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: stoner $
|
||||
| $Date: 2005-04-13 22:08:08 +0530 (Wed, 13 Apr 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 927 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Provide session interfaces to presentation layer (consumer) modules
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _JSMSGPRESENTATION_H_
|
||||
#define _JSMSGPRESENTATION_H_
|
||||
|
||||
/* Dependencies */
|
||||
#ifndef _JSMSG_H_
|
||||
#include <jsmsg.h>
|
||||
#endif
|
||||
#ifndef _JSMSGMESSAGEMGMT_H_
|
||||
#include <jsmsgMessageMgmt.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
Manifest constants
|
||||
*/
|
||||
|
||||
|
||||
/* New types */
|
||||
#ifndef __linux__
|
||||
typedef struct JS_SESSION_t JS_SESSION_t; /* Pre-declare a place holder type for logical sessions */
|
||||
#endif
|
||||
|
||||
|
||||
/* Declarations for globals with extern access */
|
||||
extern const GUID_t JS_PRESENTATION_LAYER_ID; /* GUID of the Jetstream internal consumer */
|
||||
extern const GUID_t JS_NO_MODULE; /* GUID indicating no specific module is supplied */
|
||||
|
||||
|
||||
#endif
|
||||
112
include/nwnss/include/jsmsgSessInt.h
Normal file
112
include/nwnss/include/jsmsgSessInt.h
Normal file
@@ -0,0 +1,112 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) / Distributed File Services (DFS)
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: stoner $
|
||||
| $Date: 2005-04-13 22:08:08 +0530 (Wed, 13 Apr 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 927 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Provide session interfaces to a transport layer module, internal
|
||||
/ definitions
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _JSMSGSESSINT_H_
|
||||
#define _JSMSGSESSINT_H_
|
||||
|
||||
#ifdef __linux__
|
||||
#include "jsmsgSession.h"
|
||||
#endif
|
||||
|
||||
/* New types */
|
||||
typedef struct JS_TRANSPORT_NODE_s
|
||||
{
|
||||
DQlink_t TransportLink;
|
||||
DQhead_t SendQ;
|
||||
#ifndef __linux__
|
||||
LONG Messages;
|
||||
#endif
|
||||
GUID_t TransportID;
|
||||
SEMAPHORE TxSignal;
|
||||
BOOL EventModeEnabled;
|
||||
#ifndef __linux__
|
||||
LONG BuffersControlled;
|
||||
#endif
|
||||
}JS_TRANSPORT_NODE_s;
|
||||
|
||||
typedef struct JS_SESSION_NODE_t
|
||||
{
|
||||
DQlink_t Link;
|
||||
JS_SESSION_t * Session;
|
||||
} JS_SESSION_NODE_t;
|
||||
|
||||
|
||||
/* Manifest constants */
|
||||
#define JS_CONNECT_SEMAPHORE_NAME "JSMSG Connect" /* Name for a semaphore used to signal connect completion */
|
||||
#define JS_DISCONNECT_SEMAPHORE_NAME "JSMSG Disconnect" /* Name for a semaphore used to signal disconnect completion */
|
||||
#define JS_THREAD_NAME_CONN "JSMSG: Connect" /* Name used to rename a thread when it calls JS_Connect() */
|
||||
#define JS_THREAD_NAME_DISCONN "JSMSG: Disconnect" /* Name used to rename a thread when it calls JS_Disconnect() */
|
||||
#define JS_THREAD_NAME_FIND_LOG_SESSION "JSMSG: Find Logical Session" /* Name used to rename a thread when it calls JS_FindLogicalSession() */
|
||||
#define JS_THREAD_NAME_GETTXMSG "JSMSG: Dequeue a Tx Message" /* Name used to rename a thread when it calls JS_GetTxMessage() */
|
||||
#define JS_THREAD_NAME_REQTXEVT "JSMSG: Request a Tx Event" /* Name used to rename a thread when it calls JS_RequestTransmitEvent() */
|
||||
#define JS_THREAD_NAME_RXMSG "JSMSG: Receive Message" /* Name used to rename a thread when it calls JS_ReceiveMessage() */
|
||||
#define JS_THREAD_NAME_TDEREG "JSMSG: De-register Transport" /* Name used to rename a thread when it calls JS_DeregisterTransport() */
|
||||
#define JS_THREAD_NAME_TREG "JSMSG: Register Transport" /* Name used to rename a thread when it calls JS_RegisterTransport() */
|
||||
#define JS_THREAD_NAME_UPDT_LOG_SESSION "JSMSG: Update Logical Session" /* Name used to rename a thread when it calls JS_UpdateLogicalSessionState() */
|
||||
|
||||
#define JS_CONTROL_FAILURE (0xFFFFFFFF) /* General failure COntrolCode for messages */
|
||||
#define JS_CONTROL_CONNECT_REQ (0x00000001) /* ControlCode for a connect request */
|
||||
#define JS_CONTROL_CONNECT_RESP (0x00000002) /* ControlCode for a connect response */
|
||||
#define JS_CONTROL_DISCONNECT_REQ (0x00000003) /* ControlCode for a disconnect request */
|
||||
#define JS_CONTROL_DISCONNECT_RESP (0x00000004) /* ControlCode for a disconnect response */
|
||||
|
||||
#define JS_DEFAULT_SESSION_BIT_RATE (28800) /* Assumed bit rate for sessions until actual rate is discovered */
|
||||
#define JS_NAME_OFFSET_IN_SESSION (offsetof(JS_SESSION_t, ObjectName)) /* Offset in bytes from start of a session to the consumer session field */
|
||||
#define JS_TO_SESSION_LIST_HEAD_TRIGGER_LEVEL (10) /* Number of iterations to find a session before it is moved to the list head */
|
||||
|
||||
// Generated GUID for TCP Module ID {C383455E-4E83-11d3-AB6E-0008C7D3AF2D}
|
||||
extern const GUID_t JS_TCP_MODULE_ID; /* Extern access to the module ID for the TCP transport */
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
STATUS JS_ConnectLogicalSession(JS_SESSION_t *Session, GUID_t TransportID, void * TransportSession, BOOL MadeHere); /* Create a logical session for a physical session */
|
||||
JS_SESSION_t * JS_CreateLogicalSession(void); /* Create an empty logical session */
|
||||
JS_TRANSPORT_NODE_s * JS_CreateTransportNode(GUID_t ModuleID, SEMAPHORE TxSignal); /* Create a transport list entry */
|
||||
STATUS JS_DestroyLogicalSession(JS_SESSION_t *Session); /* Destroy a logical session */
|
||||
void JS_DetachMessageFromSession(JS_CommMsg_s * Message); /* Disociate a message from a session */
|
||||
STATUS JS_DisconnectLogicalSession(JS_SESSION_t * Session); /* Begin the disconnect process for a session */
|
||||
JS_TRANSPORT_NODE_s * JS_FindTransportID(GUID_t ModuleID); /* Find a transport module's list node */
|
||||
STATUS JS_InitialiseSessionInterface(void); /* Initialise the transport interfaces */
|
||||
BOOL JS_IsSessionInSessionList(JS_SESSION_t *Session); /* Confirms a session is in the session list */
|
||||
JS_SESSION_t * JS_LogicalSessionFromAppSession(unicode_t *AppSession); /* Convert a consumer session ID to a logical session */
|
||||
STATUS JS_MoveLogicalSessionToListHead(JS_SESSION_t * Session); /* Move a logical session to the head of the session list (speeds finding it) */
|
||||
STATUS JS_SetSessionName(unicode_t *Session, unicode_t *NewName); /* Set the authenticated name of the remote end of a session */
|
||||
STATUS JS_ShutdownSessionInterface(void); /* Closedown the transport interfaces */
|
||||
|
||||
|
||||
#endif
|
||||
100
include/nwnss/include/jsmsgSession.h
Normal file
100
include/nwnss/include/jsmsgSession.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) / Distributed File Services (DFS) module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: stoner $
|
||||
| $Date: 2006-08-10 04:52:08 +0530 (Thu, 10 Aug 2006) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 1470 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Provide session interfaces to a transport layer module
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _JSMSGSESSION_H_
|
||||
#define _JSMSGSESSION_H_
|
||||
|
||||
/* Dependencies */
|
||||
#ifndef _JSMSG_H_
|
||||
#include <jsmsg.h>
|
||||
#endif
|
||||
|
||||
/* New types */
|
||||
|
||||
/*
|
||||
This structure defines a Jetstream logical session.
|
||||
The address of the ObjectName field is the consumer logical session
|
||||
*/
|
||||
typedef struct JS_SESSION_t
|
||||
{
|
||||
DQlink_t Link; /* Link between sessions */
|
||||
DQlink_t DebugLink;
|
||||
GUID_t TransportID; /* GUID of the transport that hosts the physical session associated with the logical session represented by an instance of this structure */
|
||||
void * TransportSession; /* The address of the physical session, only used to allow transport modules to find a logical session for a physical one */
|
||||
BOOL Connected; /* TRUE if no attempt has been made to disconnect the session, actual disconnect may happen long after request */
|
||||
BOOL ConnectionMadeHere; /* TRUE if the connection was made from this node */
|
||||
BOOL Disconnecting; /* TRUE if a disconnect is in progress */
|
||||
LONG UseCount; /* Count of the number of messages associated with this session */
|
||||
BOOL Destroy; /* TRUE if a disconnect was requested and the use count has reached zero */
|
||||
LONG LastSendDuration; /* Time in milliseconds that it took to complete the last send */
|
||||
LONG PendingSends; /* Count of pending sends when LastSendDuration was updated */
|
||||
LONG PendingBits; /* Number of bits pending send */
|
||||
LONG LastReceiveQDelay; /* Time in milliseconds that the last message taken from a consumer receive queue spent on that queue */
|
||||
LONG SessionBitRate; /* The average bit rate for recent transmissions on this session */
|
||||
unicode_t ObjectName[256]; /* This must be the last field in this structure */
|
||||
} JS_SESSION_t;
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/* Module Registration */
|
||||
STATUS JS_RegisterTransport(GUID_t ModuleID, SEMAPHORE TxSignal); /* Register a transport module */
|
||||
STATUS JS_DeregisterTransport(GUID_t ModuleID); /* De-register a transport module */
|
||||
|
||||
/* Communications management */
|
||||
STATUS JS_Connect(GUID_t TransportID, void * TransportSession, BOOL MadeHere); /* Used by a transport to create a logical session associated with a physical session */
|
||||
STATUS JS_Disconnect(void * Session, BOOL FromHere); /* Used by a transport to indicate a physical session has been closed */
|
||||
|
||||
/* Message Communication */
|
||||
STATUS JS_RequestTransmitEvent(GUID_t ModuleID); /* Used by a transport module to request an event when a message is available in its transmit queue */
|
||||
JS_CommMsg_s * JS_GetTxMessage(GUID_t ModuleID); /* Used by a transport module to obtain a message for transmission */
|
||||
STATUS JS_RxMessage(JS_CommMsg_s * Message, GUID_t TargetModule); /* Used by a transport module to supply a received message to a consumer */
|
||||
|
||||
/* Message Management */
|
||||
STATUS JS_SetMessageSession(JS_CommMsg_s * Message, unicode_t * Session); /* Used to set the logical session a message is associated with */
|
||||
|
||||
/* Session management */
|
||||
JS_SESSION_t * JS_FindLogicalSession(void * TransportSession); /* Used by a transport module to find the logical session associated with a physical session */
|
||||
STATUS JS_UpdateLogicalSessionState(GUID_t TransportID, /* Called by a transport to notify logical session state changes, e.g. sends completing, etc. */
|
||||
void *PhysicalSession,
|
||||
LONG CompleteSends,
|
||||
LONG CompleteBits,
|
||||
LONG NewBitRate,
|
||||
BOOL InstantaneousBitRate);
|
||||
void JS_ReleaseSession(JS_SESSION_t *session); /* Decrement session's use count */
|
||||
|
||||
#endif
|
||||
@@ -44,23 +44,23 @@
|
||||
#define _LATCH_H_
|
||||
|
||||
#ifndef _PSSMPK_H_
|
||||
# include <include/pssmpk.h>
|
||||
# include <pssmpk.h>
|
||||
#endif
|
||||
|
||||
#ifndef _QUE_H_
|
||||
# include <library/que.h>
|
||||
# include <que.h>
|
||||
#endif
|
||||
|
||||
#ifndef _PSSDEBUG_H_
|
||||
# include <include/pssDebug.h>
|
||||
# include <pssDebug.h>
|
||||
#endif
|
||||
|
||||
#ifndef _FSM_H_
|
||||
# include <include/fsm.h>
|
||||
# include <fsm.h>
|
||||
#endif
|
||||
|
||||
#ifndef _PARSE_H_
|
||||
#include <include/parse.h>
|
||||
#include <parse.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -297,14 +297,6 @@ typedef struct Latch_s
|
||||
// Under Linux RunningProcess is a macro
|
||||
extern ADDR RunningProcess;
|
||||
#endif
|
||||
#if defined(__linux__) && !defined(__KERNEL__)
|
||||
#ifndef _SCHEDULE_H_
|
||||
# include <include/schedule.h>
|
||||
#endif
|
||||
#ifndef RunningProcess
|
||||
# define RunningProcess ThreadId()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CLEAR_THREAD(_latch) ((_latch)->L_thread = 0)
|
||||
#define SET_THREAD(_latch) ((_latch)->L_thread = RunningProcess)
|
||||
@@ -517,18 +509,18 @@ extern void LBL_xSignal(Latch_s *);
|
||||
{ \
|
||||
_latch->count = 1; \
|
||||
SET_FSM(_latch, fsm); \
|
||||
((void (*)(struct FsmLite_s *))(action))(fsm); \
|
||||
action(fsm); \
|
||||
} \
|
||||
else if ((_latch->count > IDLE_LATCH_STATE) \
|
||||
&& (CIR_EMPTY(_latch->waiting))) \
|
||||
{ \
|
||||
++_latch->count; \
|
||||
CLEAR_THREAD(_latch); \
|
||||
((void (*)(struct FsmLite_s *))(action))(fsm); \
|
||||
action(fsm); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
LBL_fsmSwait(_latch, fsm, (voidfunc_t)(action)); \
|
||||
LBL_fsmSwait(_latch, fsm, action); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -587,11 +579,11 @@ extern void LBL_xSignal(Latch_s *);
|
||||
{ \
|
||||
_latch->count = X_LATCH_STATE; \
|
||||
SET_FSM(_latch, fsm); \
|
||||
((void (*)(struct FsmLite_s *))(action))(fsm); \
|
||||
action(fsm); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
LBL_fsmXwait(_latch, fsm, (voidfunc_t)(action)); \
|
||||
LBL_fsmXwait(_latch, fsm, action); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -674,17 +666,17 @@ extern void LBL_xSignal(Latch_s *);
|
||||
{ \
|
||||
_latch->count = X_LATCH_STATE; \
|
||||
SET_FSM(_latch, fsm); \
|
||||
((void (*)(struct FsmLite_s *))(action))(fsm); \
|
||||
action(fsm); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
LBL_sSignal(_latch); \
|
||||
LBL_fsmXwait(_latch, fsm, (voidfunc_t)(action)); \
|
||||
LBL_fsmXwait(_latch, fsm, action); \
|
||||
} \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
LBL_fsmXwait(_latch, fsm, (voidfunc_t)(action)); \
|
||||
LBL_fsmXwait(_latch, fsm, action); \
|
||||
} \
|
||||
}
|
||||
|
||||
@@ -893,18 +885,18 @@ extern void LBL_unLatch(Latch_s * STRING_ARG);
|
||||
#define S_LATCH(latch) ((void)LBL_sLatch(latch WHENCE))
|
||||
#define S_NOWAIT(latch, rtn) (rtn = LBL_sNoWait(latch WHENCE))
|
||||
#define FSM_S_LATCH(latch, fsm, action) \
|
||||
((void)LBL_fsmSlatch(latch,fsm,(voidfunc_t)(action) WHENCE))
|
||||
((void)LBL_fsmSlatch(latch,fsm,action WHENCE))
|
||||
|
||||
#define X_LATCH(latch) ((void)LBL_xLatch(latch WHENCE))
|
||||
#define X_NOWAIT(latch, rtn) (rtn = LBL_xNoWait(latch WHENCE))
|
||||
#define FSM_X_LATCH(latch, fsm, action) \
|
||||
((void)LBL_fsmXlatch(latch,fsm,(voidfunc_t)(action) WHENCE))
|
||||
((void)LBL_fsmXlatch(latch,fsm,action WHENCE))
|
||||
#define X_BARRIER(latch) ((void)LBL_xBarrier(latch WHENCE))
|
||||
|
||||
#define UP_LATCH(latch) ((void)LBL_upLatch(latch WHENCE))
|
||||
#define UP_NOWAIT(latch, rtn) (rtn = LBL_upNoWait(latch WHENCE))
|
||||
#define FSM_UP_LATCH(latch, fsm, action) \
|
||||
((void)LBL_fsmUpLatch(latch,fsm,(voidfunc_t)(action) WHENCE))
|
||||
((void)LBL_fsmUpLatch(latch,fsm,action WHENCE))
|
||||
|
||||
#define DOWN_LATCH(latch) LBL_downLatch(latch WHENCE)
|
||||
#define UNS_LATCH(latch) LBL_unsLatch(latch WHENCE)
|
||||
@@ -955,17 +947,17 @@ extern void DBGL_DumpLatches(
|
||||
char **commandL);
|
||||
|
||||
#define LATCH_HASH_COUNT (1<<10) /** 1024 **/
|
||||
#define LATCH_HASH_MASK (LATCH_HASH_COUNT-1)
|
||||
#define LATCH_HASH_MASK (LATCH_HASH_COUNT-1)
|
||||
|
||||
extern STKtop_t DBGL_LatchPages;
|
||||
|
||||
|
||||
|
||||
#endif /* NSS_DEBUG */
|
||||
|
||||
extern NINT Latch_All();
|
||||
extern NINT Latch_Free();
|
||||
extern NINT Latch_All();
|
||||
extern NINT Latch_Free();
|
||||
extern NINT Latch_Holder();
|
||||
extern NINT Latch_Waiter();
|
||||
extern NINT Latch_Waiter();
|
||||
|
||||
STATUS doLatchInstDisplay (
|
||||
struct PCLSwitchDef_s *switchDef,
|
||||
|
||||
50
include/nwnss/include/linuxmpk.h
Normal file
50
include/nwnss/include/linuxmpk.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| Copyright (C) 2002-2003 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
|
||||
|
|
||||
|***************************************************************************/
|
||||
/****************************************************************************
|
||||
*
|
||||
* File Name: linuxmpk.h
|
||||
*
|
||||
* File Created: 07/07/2003
|
||||
*
|
||||
* Engineering Contact: K.Y. Srinivasan
|
||||
*
|
||||
* Target Platform: COMMON_SOURCE
|
||||
*
|
||||
*
|
||||
* File Description:
|
||||
* An implementation of the NetWare MP in the Linux Kernel. We have
|
||||
* initially imlemented a subset of the APIs and semantics.
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef LINUX_MPK_H
|
||||
#define LINUX_MPK_H
|
||||
|
||||
#include "mpk.h"
|
||||
#include "mpkmisc.h"
|
||||
#include "mpkerrno.h"
|
||||
#include "nebmpk.h"
|
||||
#include "nebprivate.h"
|
||||
#include "mpkutil.h"
|
||||
|
||||
|
||||
#endif /* LINUX_MPK_H */
|
||||
@@ -39,7 +39,7 @@
|
||||
#define _LSA_H_
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
#include <public/zOmni.h>
|
||||
#include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _LINUX_LIMIS_H
|
||||
@@ -64,7 +64,7 @@ enum {
|
||||
LSA_ROOT_INO = 1,
|
||||
LSA_NAME_LEN = (3*NAME_MAX), /* Account for UTF 8 names */
|
||||
LSA_MAX_FILE_SIZE = 1LL << 43,
|
||||
LSA_VERSION = 1, /* Increment when on disk inode format changes */
|
||||
LSA_VERSION = 1, /* Increment when on disk inode format changes */
|
||||
LSA_MAGIC_SB = 1853059840
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ struct LsaSuper_s
|
||||
struct inode *sb_inode;
|
||||
|
||||
#define LSA_ROOT_PATH 6 /* Add 6 for _IV_ and :/ */
|
||||
BYTE sb_volName[zMAX_COMPONENT_NAME+LSA_ROOT_PATH]; /* volume/pool
|
||||
BYTE sb_volName[zMAX_COMPONENT_NAME+LSA_ROOT_PATH]; /* volume/pool
|
||||
name with :/ added */
|
||||
};
|
||||
|
||||
@@ -121,11 +121,7 @@ extern int LSA_GetOptions(
|
||||
|
||||
typedef struct LsaInode_s {
|
||||
struct File_s *li_beast;
|
||||
#ifdef NSS_USERSPACE
|
||||
struct inode *li_inode;
|
||||
#else
|
||||
struct inode li_inode;
|
||||
#endif
|
||||
} LsaInode_s;
|
||||
|
||||
|
||||
@@ -256,3 +252,4 @@ extern struct inode *lsa_get_inode(VolumeID_t *volID, Zid_t zid);
|
||||
extern struct inode *(*Ptr_lsa_get_inode)(VolumeID_t *volID, Zid_t zid);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#define _MAILBOX_H_
|
||||
|
||||
#ifndef _OMNI_H_
|
||||
# include <library/omni.h>
|
||||
# include <omni.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -80,7 +80,7 @@ extern "C" {
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
/*- Deposit Message Type Defined
|
||||
/*- Deposit Message Type Defined
|
||||
|
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
@@ -118,3 +118,5 @@ extern STATUS ZLSS_SetPoolShared(struct block_device *dev, BOOL sharedstate);
|
||||
#endif
|
||||
|
||||
#endif /* _MAL_H_ */
|
||||
|
||||
|
||||
|
||||
@@ -39,27 +39,21 @@
|
||||
#define _MANAGE_H_
|
||||
|
||||
#ifndef _XMLNSS_H_
|
||||
# include <public/xmlNSS.h>
|
||||
# include <xmlNSS.h>
|
||||
#endif
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
# include <public/zParams.h>
|
||||
# include <zParams.h>
|
||||
#endif
|
||||
|
||||
#if zLINUX && !defined(__KERNEL__)
|
||||
|
||||
#ifndef MPKNSS_LOCK
|
||||
#define MPKNSS_LOCK() ((void) 0)
|
||||
#endif
|
||||
#ifndef MPKNSS_UNLOCK
|
||||
#define MPKNSS_UNLOCK() ((void) 0)
|
||||
#endif
|
||||
#ifndef ASSERT_MPKNSS_LOCK
|
||||
#define ASSERT_MPKNSS_LOCK() ((void) 0)
|
||||
#endif
|
||||
|
||||
// The following comes from clstrlib.h
|
||||
#define NWCLSTR_LIBNAME "libncssdk.so"
|
||||
#define NWCLSTR_LIBNAME "libncssdk.so"
|
||||
typedef enum _CLSTR_ERRORS {
|
||||
CLSTR_OK,
|
||||
CLSTR_UNKNOWN,
|
||||
@@ -134,15 +128,15 @@ typedef struct FreezeThawEntry_s
|
||||
* indicates that FTE_ThawStatus is valid. Also
|
||||
* indicates that FTE_ThawOpRetCode is valid.
|
||||
*/
|
||||
STATUS FTE_ThawStatus; /* Status from zPoolThaw call (valid
|
||||
* when FTE_ThawIsDone is TRUE).
|
||||
*/
|
||||
STATUS FTE_ThawStatus; /* Status from zPoolThaw call (valid
|
||||
* when FTE_ThawIsDone is TRUE).
|
||||
*/
|
||||
BOOL FTE_FreezeIsDone; /* TRUE when zPoolFreeze is done and indicates
|
||||
* that FTE_FreezeStatus is valid.
|
||||
*/
|
||||
STATUS FTE_FreezeStatus; /* Status from zPoolFreeze call (valid
|
||||
* when FTE_FreezeIsDone is TRUE).
|
||||
*/
|
||||
STATUS FTE_FreezeStatus; /* Status from zPoolFreeze call (valid
|
||||
* when FTE_FreezeIsDone is TRUE).
|
||||
*/
|
||||
// OneShot_s FI_Timer; /* Timer used for timeout generation */
|
||||
// FsmLite_s FTE_zPoolFreezeFSMLite;
|
||||
BOOL FTE_ThreadScheduled;
|
||||
@@ -163,7 +157,7 @@ typedef struct FreezeThawEntry_s
|
||||
LONG FTE_TimeOut;
|
||||
LONG FTE_TimeOutUTCTime; /* UTC of when time out should occur */
|
||||
struct FreezeApplicationStatus_s *FTE_FreezeApplicationStatus;
|
||||
void *FTE_ThawKey;
|
||||
void *FTE_ThawKey;
|
||||
unicode_t FTE_PoolName[zMAX_COMPONENT_NAME];
|
||||
} FreezeThawEntry_s;
|
||||
|
||||
@@ -216,7 +210,7 @@ void MANAGE_Shutdown();
|
||||
|
||||
#if zLINUX && !defined(__KERNEL__)
|
||||
STATUS LINUX_GetPoolSnapshotType(
|
||||
BOOL openEVMSEngine,
|
||||
BOOL openEVMSEngine,
|
||||
utf8_t *poolName,
|
||||
POOLSNAP_TYPE *snapshotType);
|
||||
#endif
|
||||
@@ -234,8 +228,8 @@ STATUS MNSS_GetTagContents(
|
||||
STATUS MNSS_ProcessElements(
|
||||
struct VirtInfo_s *virtInfo,
|
||||
utf8_t *parentTag,
|
||||
struct XML_ElementInfo_s *parentElement,
|
||||
struct SiblingElements_s *elements);
|
||||
struct XML_ElementInfo_s *parentElement,
|
||||
struct SiblingElements_s *elements);
|
||||
|
||||
STATUS MANAGE_nssCommand(
|
||||
NINT parmLen,
|
||||
|
||||
66
include/nwnss/include/manageNDS.h
Normal file
66
include/nwnss/include/manageNDS.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) support module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Prototypes for kernel functions in ManageNDS.c
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _MANAGE_NDS_H_
|
||||
#define _MANAGE_NDS_H_
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
#include <zParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern STATUS MNDS_CheckVolumesPool(
|
||||
char *volName,
|
||||
utf8_t *poolName,
|
||||
BOOL *matchedPool);
|
||||
|
||||
extern STATUS DoesPoolExist(utf8_t *poolName, VolumeID_t *poolID, NDSid_t *ndsID);
|
||||
|
||||
extern STATUS DoesVolumeExist(utf8_t *volName);
|
||||
|
||||
extern STATUS SetNDSInfoOnPool(unicode_t *uniPoolName, zInfo_s *info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MANAGE_NDS_H_ */
|
||||
|
||||
@@ -39,22 +39,22 @@
|
||||
#define _MANAGENLM_H_
|
||||
|
||||
#ifndef _MGMT_H_
|
||||
# include <internal/mgmt.h>
|
||||
# include <mgmt.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XMLNSS_H_
|
||||
# include <public/xmlNSS.h>
|
||||
# include <xmlNSS.h>
|
||||
#endif
|
||||
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
#ifndef _MMPUBLIC_H_
|
||||
#include <support/lnxmbINC/mmpublic.h>
|
||||
#include <mmpublic.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
#ifndef _VOLUME_H_
|
||||
#include <include/volume.h>
|
||||
#include <volume.h>
|
||||
#endif
|
||||
|
||||
#ifndef _CLSTRLIB_H_
|
||||
@@ -137,7 +137,7 @@ typedef struct Partition_Info_s
|
||||
NINT type;
|
||||
OBID devID;
|
||||
OBID mirrorID;
|
||||
OBID partID;
|
||||
OBID partID;
|
||||
LONG devStatus;
|
||||
LONG devUnitSize;
|
||||
QUAD freeSpaceSize;
|
||||
@@ -149,7 +149,7 @@ typedef struct Pool_Segment_s
|
||||
{
|
||||
DQlink_t next;
|
||||
OBID devID;
|
||||
OBID partID; // In the case of mirroring, this is the mirrorID
|
||||
OBID partID; // In the case of mirroring, this is the mirrorID
|
||||
QUAD offset;
|
||||
QUAD numSector;
|
||||
LONG devUnitSize;
|
||||
@@ -331,7 +331,7 @@ STATUS GetBeastInfoXML(
|
||||
BOOL getCompBeastInfo,
|
||||
Zid_t zid,
|
||||
NINT typeOfInfo, /* in */
|
||||
NINT *bufLen, /* in/out */
|
||||
NINT *bufLen, /* in/out */
|
||||
utf8_t *buf);
|
||||
|
||||
STATUS SetBeastInfoXML(
|
||||
@@ -340,7 +340,7 @@ STATUS SetBeastInfoXML(
|
||||
Zid_t zid,
|
||||
BOOL ignoreOpenFile,
|
||||
BOOL oldDataMatch,
|
||||
NINT bufLen, /* in */
|
||||
NINT bufLen, /* in */
|
||||
utf8_t *buf);
|
||||
|
||||
STATUS DeleteBeast(
|
||||
@@ -466,13 +466,13 @@ extern char *MLIB_GetPoolStateName(
|
||||
#if zLINUX && !defined(__KERNEL__)
|
||||
extern STATUS LINUX_GetPoolSharedState(
|
||||
BOOL openEVMSEngine,
|
||||
utf8_t *poolName,
|
||||
utf8_t *poolName,
|
||||
BOOL *isShared);
|
||||
#endif
|
||||
|
||||
#if zNETWARE || (zLINUX && defined(__KERNEL__))
|
||||
extern STATUS MLIB_GetPoolSharedState(
|
||||
const utf8_t *poolName,
|
||||
const utf8_t *poolName,
|
||||
BOOL *isShared);
|
||||
|
||||
extern STATUS ModifyNFAPAutoExec(
|
||||
|
||||
71
include/nwnss/include/managePool.h
Normal file
71
include/nwnss/include/managePool.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) support module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: gpachner $
|
||||
| $Date: 2007-09-12 01:30:36 +0530 (Wed, 12 Sep 2007) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 2198 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Prototypes for kernel functions in ManageNDS.c
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _MANAGE_POOL_H_
|
||||
#define _MANAGE_POOL_H_
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
#include <zParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define EVMS_DEVICE_PATH "/dev/evms/"
|
||||
|
||||
extern NINT GetPoolLSSType(unicode_t *uniPoolName);
|
||||
|
||||
extern STATUS ChangePoolState(unicode_t *uniPoolName, NINT newPoolState, NINT mode);
|
||||
|
||||
extern STATUS GetPoolID(unicode_t *uni_poolName, VolumeID_t *poolID);
|
||||
|
||||
extern NINT GetPoolState(unicode_t *uniPoolName);
|
||||
|
||||
extern STATUS GetNextVolumeInfo(unicode_t *uniPoolName, BOOL firstTime, BOOL deletedVolume, GUID_t *cookie, unicode_t *uniVolName, NINT uniVolNameLen);
|
||||
|
||||
extern STATUS GetLSSFeatures(LONG lssID, QUAD *volSupportedFeatures, QUAD *volDefaultEnabledFeatures, QUAD *volChangableFeatures);
|
||||
|
||||
extern STATUS DismountAndRemovePoolVolumesEntries(utf8_t *poolName, BOOL removeMountPointFolder);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MANAGE_POOL_H_ */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001-2002 Novell, Inc.
|
||||
| (C) Copyright 2001-2003 Novell, Inc.
|
||||
| All Rights Reserved.
|
||||
|
|
||||
| This program is free software; you can redistribute it and/or
|
||||
@@ -20,49 +20,45 @@
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| NetWare Loadable Storage Services (LSS) module
|
||||
| Novell Storage Services (NSS) support module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: $
|
||||
| $Date: $
|
||||
| $Author: ajack $
|
||||
| $Date: 2006-12-14 21:29:37 +0530 (Thu, 14 Dec 2006) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: $
|
||||
| $Revision: 1770 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Prototypes for kernel functions in ManageServer.c
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _COMNAUDIT_H_
|
||||
#define _COMNAUDIT_H_
|
||||
#ifndef _MANAGE_SERVER_H_
|
||||
#define _MANAGE_SERVER_H_
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
#include <zParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef AUDIT_KERNEL_OTHER
|
||||
#define AUDIT_KERNEL_OTHER 1316
|
||||
#endif
|
||||
|
||||
extern BOOL NSSLAF_AuditEnabled;
|
||||
|
||||
extern void NSSLAF_LogTrusteeChange(
|
||||
GeneralMsg_s *genMsg,
|
||||
NamingMsg_s *nameMsg,
|
||||
LONG mode,
|
||||
UserID_t *trustee,
|
||||
NINT rights,
|
||||
NINT attributes,
|
||||
NINT inheritedRights);
|
||||
|
||||
#define NSSLAF_MODE_ADD_TRUSTEE 1
|
||||
#define NSSLAF_MODE_REMOVE_TRUSTEE 2
|
||||
#define NSSLAF_MODE_SET_INHERITED_RIGHTS 3
|
||||
|
||||
extern STATUS GetNextPoolName(BOOL firstTime,
|
||||
SQUAD *cookie,
|
||||
unicode_t *uniName,
|
||||
NINT uniNameLen,
|
||||
BOOL noSnapshot,
|
||||
NINT *poolState,
|
||||
BOOL *isShared,
|
||||
QUAD *enabledAttr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* #ifdef _COMNAUDIT_H_ */
|
||||
#endif /* _MANAGE_SERVER_H_ */
|
||||
|
||||
72
include/nwnss/include/manageUserSpaceRestr.h
Normal file
72
include/nwnss/include/manageUserSpaceRestr.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) support module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Prototypes for kernel functions in manageUserSpaceRestr.c
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _MANAGE_USERSPACERESTR_H_
|
||||
#define _MANAGE_USERSPACERESTR_H_
|
||||
|
||||
/*#ifndef _ZPARAMS_H_
|
||||
#include <zParams.h>
|
||||
#endif
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern STATUS GetNextUserInVolume(
|
||||
unicode_t *uniVolName,
|
||||
UserID_t *lastUser,
|
||||
SQUAD *restrictionAmount,
|
||||
SQUAD *usedAmount,
|
||||
NINT *numEntries);
|
||||
|
||||
extern STATUS SetUserSpaceRestriction(
|
||||
unicode_t *uniVolName,
|
||||
NDSid_t userGUID,
|
||||
SQUAD quota);
|
||||
|
||||
extern STATUS GetUserSpaceRestriction(
|
||||
unicode_t *uniVolName,
|
||||
NDSid_t userGUID,
|
||||
SQUAD *usedAmount,
|
||||
SQUAD *restrictionAmount);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MANAGE_USERSPACERESTR_H_ */
|
||||
|
||||
128
include/nwnss/include/manageVolume.h
Normal file
128
include/nwnss/include/manageVolume.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services (NSS) support module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: gpachner $
|
||||
| $Date: 2007-09-12 01:30:36 +0530 (Wed, 12 Sep 2007) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 2198 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Prototypes for kernel functions in ManageVolume.c
|
||||
|
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _MANAGE_VOLUME_H_
|
||||
#define _MANAGE_VOLUME_H_
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
#include <zParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MANAGE_VOLUME_ERROR_FINDING_POOL 0
|
||||
#define MANAGE_VOLUME_ERROR_CREATING_VOLUME 1
|
||||
#define MANAGE_VOLUME_ERROR_FINDING_VOLUME 2
|
||||
#define MANAGE_VOLUME_ERROR_LOCK_VOLUME 3
|
||||
#define MANAGE_VOLUME_ERROR_SETTING_VOLUME_ATTRS 4
|
||||
#define MANAGE_VOLUME_ERROR_GET_ROOT_KEY 5
|
||||
#define MANAGE_VOLUME_ERROR_OPEN_ADMIN 6
|
||||
#define MANAGE_VOLUME_ERROR_GETTING_VOLUME_INFO 7
|
||||
#define MANAGE_VOLUME_ERROR_CONVERT_VOL_PASSWORD 8
|
||||
#define MANAGE_VOLUME_ERROR_ACTIVATING_VOLUME 9
|
||||
#define MANAGE_VOLUME_ERROR_DEACTIVATING_VOLUME 10
|
||||
#define MANAGE_VOLUME_ERROR_VOLUME_NOT_ACTIVE 11
|
||||
#define MANAGE_VOLUME_ERROR_REMOVING_USER 12
|
||||
#define MANAGE_VOLUME_ERROR_OUT_OF_MEMORY 13
|
||||
#define MANAGE_VOLUME_ERROR_IOCTL_FAILED 14
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DELETE_ACTION_SALVAGE,
|
||||
DELETE_ACTION_PAUSE,
|
||||
DELETE_ACTION_CONTINUE,
|
||||
DELETE_ACTION_PURGE
|
||||
} deletedVolumeAction_t;
|
||||
|
||||
extern NINT GetAuthModelID(utf8_t *name);
|
||||
extern STATUS CreateVolumeInPool(unicode_t *poolName,
|
||||
unicode_t *volumeName,
|
||||
NINT authModelID,
|
||||
GUID_t volumeGUID,
|
||||
unicode_t *password,
|
||||
BOOL *isClustered,
|
||||
NINT *errIndex);
|
||||
extern STATUS SetNDSInfoOnVolume(unicode_t *uniVolName, zVolumeInfo_s *info, BOOL lock, BOOL onlineOnly);
|
||||
extern STATUS ModifyVolumeAttributes(unicode_t *uniVolName,
|
||||
NINT modifyInfoMask,
|
||||
zVolumeInfo_s *info,
|
||||
NINT readAhead,
|
||||
NINT *errIndex);
|
||||
extern STATUS GetNSSVolumeHostPool(utf8_t *volumeName, utf8_t *poolName);
|
||||
extern STATUS GetDeletedVolumeLSSInfo(
|
||||
utf8_t *volumeName,
|
||||
unicode_t *uni_volName,
|
||||
utf8_t *buf,
|
||||
NINT bufLen,
|
||||
NINT *retLen);
|
||||
extern STATUS NSSVolumeFound(unicode_t *uni_volName,
|
||||
BOOL include_internal,
|
||||
BOOL *isDeleted,
|
||||
NINT *readAhead,
|
||||
NINT *volumeState,
|
||||
utf8_t *authModelName,
|
||||
UserID_t *volNameGUID);
|
||||
extern STATUS GetZInfo(BYTE *path, QUAD getInfoMask, zInfo_s *info, NINT *errIndex);
|
||||
extern STATUS RemoveNSSVolume(unicode_t *uniVolName);
|
||||
extern STATUS GetNDSNameFromGUID(unicode_t *uniVolName, utf8_t *objectName);
|
||||
extern STATUS RenameNSSVolume(unicode_t *uniVolName, unicode_t *uniNewName);
|
||||
extern STATUS ChangeVolumeState(unicode_t *uniVolName,
|
||||
BOOL activateVolume,
|
||||
utf8_t *volumePassword,
|
||||
NINT *errIndex);
|
||||
extern STATUS PerformDeletedVolumeAction(unicode_t *uniVolName, deletedVolumeAction_t action);
|
||||
extern STATUS RenameSalvagedVolume(unicode_t *uniVolName, unicode_t *uniNewName, NINT *state);
|
||||
extern STATUS RemoveUserFromIDStore(unicode_t *volumeName, UserID_t *userID, NINT *errIndex);
|
||||
extern STATUS GetNextVolumeName(BOOL firstTime,
|
||||
SQUAD *cookie,
|
||||
unicode_t *uniName,
|
||||
NINT uniNameLen,
|
||||
BOOL *isLogical);
|
||||
extern STATUS DismountAndRemoveVolumeEntries(utf8_t *volumeName,
|
||||
utf8_t **returnMsg,
|
||||
BOOL lazyUmount,
|
||||
BOOL removeMountPointFolder);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _MANAGE_VOLUME_H_ */
|
||||
|
||||
75
include/nwnss/include/mdb_dev.h
Normal file
75
include/nwnss/include/mdb_dev.h
Normal file
@@ -0,0 +1,75 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2007 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 (PSS) module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-30 12:40:58 -0700 (Thu, 30 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Defines structures and commands for the
|
||||
| character special device for reading/writing
|
||||
| kernel memory for debugging tools.
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _MDB_DEV_H_
|
||||
#define _MDB_DEV_H_ 1
|
||||
|
||||
#define DEV_NAME "kmdb"
|
||||
#define FULL_DEV_NAME "/dev/" DEV_NAME
|
||||
|
||||
enum { MDB_READ, /* Read size bytes from kernel memory */
|
||||
MDB_WRITE, /* Write size bytes of data to kernel memory */
|
||||
MDB_PID2TASK, /* Convert a pid to a task pointer */
|
||||
MDB_PAGE_READ, /* Read data from an unmapped page */
|
||||
MDB_PAGE_WRITE, /* Write data to an unmapped page */
|
||||
MDB_OPS };
|
||||
|
||||
typedef struct Mdb_s {
|
||||
unsigned mdb_cmd; /* Command */
|
||||
union {
|
||||
struct {
|
||||
unsigned mdb_size; /* Size of user buffer */
|
||||
unsigned long mdb_buf; /* User buffer */
|
||||
unsigned long mdb_addr; /* Address to read/write */
|
||||
};
|
||||
struct {
|
||||
unsigned pid_pid; /* Pid to convert */
|
||||
unsigned long pid_task; /* Task for pid */
|
||||
};
|
||||
struct {
|
||||
unsigned pg_size; /* Size of user buffer */
|
||||
unsigned long pg_buf; /* User buffer */
|
||||
unsigned long pg_addr; /* struct page address */
|
||||
unsigned long pg_offset; /* Offset in page */
|
||||
};
|
||||
};
|
||||
} Mdb_s;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
833
include/nwnss/include/mpk.h
Normal file
833
include/nwnss/include/mpk.h
Normal file
@@ -0,0 +1,833 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2002-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| File Name: mpk.h
|
||||
|
|
||||
| File Created: 07/07/2003
|
||||
|
|
||||
| Engineering Contact: K.Y. Srinivasan
|
||||
|
|
||||
| Target Platform: COMMON_SOURCE
|
||||
|
|
||||
|
|
||||
| File Description:
|
||||
| An implementation of the NetWare MP in the Linux Kernel. We have
|
||||
| initially imlemented a subset of the APIs and semantics.
|
||||
|***************************************************************************
|
||||
|
|
||||
| $Author: rjorgensen $
|
||||
| $Date: 2006-05-23 21:57:29 +0530 (Tue, 23 May 2006) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 1370 $
|
||||
|
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MPK_H
|
||||
#define MPK_H
|
||||
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/signal.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <asm/semaphore.h>
|
||||
#include <linux/completion.h>
|
||||
|
||||
#ifdef _OMNI_H_
|
||||
#ifdef PAGE_SIZE
|
||||
#undef PAGE_SIZE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "nwcore.h"
|
||||
|
||||
/*
|
||||
* MPK type definitions.
|
||||
*/
|
||||
#ifdef ADDR
|
||||
#undef ADDR
|
||||
#endif
|
||||
|
||||
#define MAX_NAME_LENGTH 103 /* Must be 1 less than a
|
||||
* multiple of 4
|
||||
* to force proper alignment of
|
||||
* structs
|
||||
*/
|
||||
#define MPK_MAX_CONCURRENCY 128
|
||||
#define THREAD_ATTRIBUTE_JOINABLE 0x00000001
|
||||
#define NOT_BOUND_TO_CPU -1
|
||||
|
||||
/*
|
||||
* One of Paul's files zomni.h defines these types.
|
||||
*/
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned int LONG;
|
||||
typedef unsigned long ADDR;
|
||||
#endif
|
||||
|
||||
#ifdef _OMNI_H_
|
||||
#define PAGE_SIZE 4096
|
||||
#endif
|
||||
typedef int BOOLEAN;
|
||||
|
||||
typedef int ERROR;
|
||||
typedef unsigned int UINT32;
|
||||
typedef unsigned int UINT;
|
||||
typedef unsigned int PROCESSOR;
|
||||
typedef unsigned long FLAGS;
|
||||
typedef void CONTEXT;
|
||||
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define MPK_MAX_MODULES 10
|
||||
|
||||
typedef struct mpkPrivateData {
|
||||
unsigned long size;
|
||||
char *lowAddr;
|
||||
char *highAddr;
|
||||
char *nextAlloc;
|
||||
char *nextFree;
|
||||
unsigned long nextFreeSize;
|
||||
} mpkPrivateData_t;
|
||||
|
||||
|
||||
typedef struct mpkModuleMgmt {
|
||||
void (*mainFunc)(void *);
|
||||
void *arg;
|
||||
int inUse;
|
||||
}mpkModuleMgmt_t;
|
||||
|
||||
typedef struct workMgmtStruct {
|
||||
spinlock_t lock;
|
||||
int numWorkElements;
|
||||
int numWorkThreads;
|
||||
int numWorkThreadsActive;
|
||||
struct WorkToDoStructure *first;
|
||||
struct WorkToDoStructure *last;
|
||||
struct semaphore sema;
|
||||
struct WorkToDoStructure *prioFirst;
|
||||
struct WorkToDoStructure *prioLast;
|
||||
unsigned int numPrioWorksActive;
|
||||
} workMgmt_t;
|
||||
|
||||
#define COND_SIGNATURE 0x99999999
|
||||
typedef struct kCondition {
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
long numWaiters;
|
||||
unsigned long condSignature;
|
||||
struct semaphore sema;
|
||||
} kCondition_t;
|
||||
|
||||
typedef kCondition_t *CONDITION;
|
||||
typedef kCondition_t *KCONDITION;
|
||||
|
||||
#define CALLOUT_SIGNATURE 0x77777777
|
||||
|
||||
typedef struct callOutStruct {
|
||||
unsigned long coutSignature;
|
||||
void (*pFunction)(void *); // function to call
|
||||
void *FunctionArgument; // function arg
|
||||
UINT32 TimeOutValue; // timeout value in ticks (1tick = 10ms)
|
||||
char fired;
|
||||
char scheduled;
|
||||
struct timer_list linuxTimer;
|
||||
} CALLOUT_STRUCT;
|
||||
|
||||
|
||||
#define RWMUTEX_SIGNATURE 0x88888888
|
||||
|
||||
typedef struct structRwMutex {
|
||||
unsigned long rwMutexSignature;
|
||||
spinlock_t lock;
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
unsigned int numReaders;
|
||||
unsigned int numReadersWaiting;
|
||||
unsigned int lockState; /*0: free; 1: reader; 2: writer*/
|
||||
pid_t owner;
|
||||
int writerBlocked;
|
||||
struct semaphore readerSema;
|
||||
struct semaphore writerSema;
|
||||
} rwMutex_t;
|
||||
|
||||
typedef rwMutex_t * RWLOCK;
|
||||
|
||||
|
||||
#define BARRIER_SIGNATURE 0x66666666
|
||||
typedef struct structBarrier {
|
||||
spinlock_t lock;
|
||||
unsigned long barrierSignature;
|
||||
unsigned int barrierCount;
|
||||
unsigned int numCheckedIn;
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
struct semaphore sema;
|
||||
} barrier_t;
|
||||
typedef barrier_t *BARRIER;
|
||||
|
||||
|
||||
#define RWSPIN_LOCK_SIGNATURE 0x55555555
|
||||
typedef struct structRwSpinLock {
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
unsigned long rwSpinLockSignature;
|
||||
rwlock_t rwLock;
|
||||
} rwSpinLock_t;
|
||||
|
||||
typedef rwSpinLock_t *SPINRWLOCK;
|
||||
|
||||
#define SPIN_LOCK_SIGNATURE 0x44444444
|
||||
typedef struct structSpinLock {
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
unsigned long spinLockSignature;
|
||||
spinlock_t lock;
|
||||
} SPINLOCK;
|
||||
|
||||
struct WorkToDoStructure;
|
||||
|
||||
typedef void WorkHandler(struct WorkToDoStructure *);
|
||||
|
||||
typedef struct WorkToDoStructure {
|
||||
struct WorkToDoStructure *next;
|
||||
WorkHandler *ProcedureToCall;
|
||||
unsigned long wtdSignature;
|
||||
LONG PollCountAmount;
|
||||
void *arg;
|
||||
} workToDo_t;
|
||||
|
||||
#define MPK_MUTEX_SIGNATURE 0x33333333
|
||||
#define MUTEX_NO_OWNER -1
|
||||
|
||||
typedef struct structMutex {
|
||||
unsigned long mutexSignature;
|
||||
pid_t owner;
|
||||
int recursionDepth;
|
||||
struct semaphore sema;
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
} mpkMutex_t;
|
||||
|
||||
typedef mpkMutex_t * MUTEX;
|
||||
|
||||
|
||||
#define MPK_SEMAPHORE_SIGNATURE 0x22222222
|
||||
|
||||
typedef struct structSemaphore {
|
||||
unsigned long semaSignature;
|
||||
struct semaphore sema;
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
} mpkSema_t;
|
||||
|
||||
typedef mpkSema_t *SEMAPHORE;
|
||||
|
||||
|
||||
typedef struct LoadDefinitionStructure {
|
||||
int TBD;
|
||||
} LoadDefinitionStructure_t;
|
||||
|
||||
|
||||
#define MPK_THREAD_SIGNATURE 0x11111111
|
||||
typedef struct structThread{
|
||||
unsigned long threadSignature;
|
||||
nwPid_t idState;
|
||||
int numSuspenders;
|
||||
int legacyEnterCount;
|
||||
int error;
|
||||
char name[MAX_NAME_LENGTH+1];
|
||||
char inInitState;
|
||||
char inSuspension;
|
||||
char suspendRequest;
|
||||
char exitRequest;
|
||||
char threadDetached;
|
||||
char joinRequest;
|
||||
char foreignThread;
|
||||
char anonThread;
|
||||
unsigned long flags;
|
||||
void *(*func)(struct structThread *, void *);
|
||||
void *arg;
|
||||
void *exitStatus;
|
||||
void *privData;
|
||||
struct semaphore threadSema;
|
||||
struct semaphore threadSuspendSema;
|
||||
struct semaphore threadExitSema;
|
||||
struct completion threadExited;
|
||||
struct timer_list threadTimer;
|
||||
mpkPrivateData_t threadPrivState;
|
||||
unsigned long mpkEnterCount;
|
||||
sigset_t mpkOldMask;
|
||||
struct semaphore *semaHandle;
|
||||
int semaError;
|
||||
} mpkThread_t;
|
||||
|
||||
typedef mpkThread_t *THREAD;
|
||||
|
||||
|
||||
/*
|
||||
* int initThreadPrivState(mpkThread_t *thisThread, unsigned long size)
|
||||
* Initialize the thread private state. The parameter "size" specifies
|
||||
* the arena size. The function returns 0 to indicate success; a non-zero
|
||||
* value is returned to indicate failure.
|
||||
*
|
||||
* Calling/Exit State:
|
||||
* May block.
|
||||
*/
|
||||
|
||||
int initThreadPrivState(mpkThread_t *thisThread, unsigned long size);
|
||||
|
||||
/*
|
||||
* void deInitThreadPrivState(mpkThread_t *thisThread)
|
||||
* De-initialize the private state associated with the thread.
|
||||
*
|
||||
* Calling/Exit State:
|
||||
* May block.
|
||||
*/
|
||||
|
||||
void deInitThreadPrivState(mpkThread_t *thisThread);
|
||||
|
||||
/*
|
||||
* int mpkReSizeThreadPrivateState(unsigned long size)
|
||||
* Resize the the thread private arena. The parameter "size" specifies the
|
||||
* new arena size. The function returns 0 to indicate success; a non-zero
|
||||
* value is returned to indicate failure. The function will fail, if the
|
||||
* private area currently associated with the thread is being used.
|
||||
*
|
||||
* Calling/Exit State:
|
||||
* May block.
|
||||
*
|
||||
* Remarks: On failure, the previous state will not be changed. It is legal to
|
||||
* invoke this API on a thread that may not have any private area associated
|
||||
* with it.
|
||||
*/
|
||||
|
||||
int mpkReSizeThreadPrivateState(unsigned long size);
|
||||
|
||||
/*
|
||||
* unsigned int mpkGetPrivateAreaSize(void)
|
||||
* Get the size of the private area.
|
||||
*
|
||||
* Calling/Exit State: None.
|
||||
*/
|
||||
|
||||
unsigned int mpkGetPrivateAreaSize(void);
|
||||
|
||||
/*
|
||||
* unsigned int mpkGetPrivateFreeSize(void)
|
||||
* Get the size of the free space in the private area.
|
||||
*
|
||||
* Calling/Exit State: None.
|
||||
*/
|
||||
|
||||
unsigned int mpkGetPrivateFreeSize(void);
|
||||
|
||||
/*
|
||||
* void *mpkPrivateAlloc(unsigned long size)
|
||||
* Allocate the specified number of bytes from the thread private.
|
||||
*
|
||||
* Calling/Exit State:
|
||||
* Does not block.
|
||||
*
|
||||
* Remarks:
|
||||
* The private arena will be managed as a stack (LIFO).
|
||||
*/
|
||||
|
||||
void *mpkPrivateAlloc(unsigned long size);
|
||||
|
||||
/*
|
||||
* void mpkPrivateFree(void *ptr, unsigned long size)
|
||||
* Free a previously allocatted memory.
|
||||
*
|
||||
* Calling/Exit State:
|
||||
* Does not block.
|
||||
*
|
||||
* Remarks:
|
||||
* The stack force LIFO - the memory being freed must have been the once
|
||||
* allocatted last.
|
||||
*/
|
||||
|
||||
void mpkPrivateFree(void *ptr, unsigned long size);
|
||||
|
||||
void linuxMpkInit(void);
|
||||
void linuxMpkDeInit(void);
|
||||
|
||||
/*
|
||||
* Subset of the MPK APIs.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Create a thread. A non-NUL value is returned on success; a NULL value
|
||||
* is returned on failure.
|
||||
*/
|
||||
THREAD kStartThread(BYTE *ThreadName, // Name of the thread
|
||||
void *(*func)(THREAD, void *), // start function
|
||||
void *stackAddress, // Ignored on Linux
|
||||
LONG StackSize, // Ignored on Linux
|
||||
void *argument // Arg to the start function
|
||||
);
|
||||
|
||||
/*
|
||||
* Create a thread and put it in an initial state; without scheduling it.
|
||||
* A non-NULL returns
|
||||
*/
|
||||
|
||||
THREAD kCreateThread(BYTE *ThreadName, // Name of the thread
|
||||
void *(*func)(THREAD, void *), // start function
|
||||
void *stackAddress, // Ignored on Linux
|
||||
LONG StackSize, // Ignored on Linux
|
||||
void *argument // Arg to the start function
|
||||
);
|
||||
|
||||
/*
|
||||
* Schedule a thread created via kCreateThread()
|
||||
*/
|
||||
|
||||
ERROR kScheduleThread(THREAD handle);
|
||||
|
||||
/*
|
||||
* Get the handle on the calling thread
|
||||
*/
|
||||
|
||||
THREAD kCurrentThread(void);
|
||||
|
||||
/*
|
||||
* Get the name of the specified thread.
|
||||
*/
|
||||
|
||||
ERROR kGetThreadName(THREAD handle, // specified thread
|
||||
BYTE *buffer, // buffer to fill the name
|
||||
LONG bufSize // size of buffer
|
||||
);
|
||||
|
||||
/*
|
||||
* Set the thread name.
|
||||
*/
|
||||
|
||||
ERROR kSetThreadName( THREAD handle, // specified thread
|
||||
BYTE *newName // new name
|
||||
);
|
||||
|
||||
/*
|
||||
* Yield the calling thread.
|
||||
*/
|
||||
|
||||
void kYieldThread(void);
|
||||
|
||||
/*
|
||||
* Delay the calling thread.
|
||||
*
|
||||
*/
|
||||
|
||||
ERROR kDelayThread(UINT delayAmount //delay in milliseconds
|
||||
);
|
||||
|
||||
/*
|
||||
* Suspend the specified thread.
|
||||
*/
|
||||
|
||||
ERROR kSuspendThread(THREAD handle // specified thread
|
||||
);
|
||||
|
||||
/*
|
||||
* Resume the specified thread.
|
||||
*/
|
||||
|
||||
ERROR kResumeThread(THREAD handle // specified thread
|
||||
);
|
||||
|
||||
/*
|
||||
* Post state to destroy (kill) a thread. If a NULL handle is passed,
|
||||
* the calling thread is specified.
|
||||
*/
|
||||
|
||||
ERROR kDestroyThread(THREAD handle // specified thread
|
||||
);
|
||||
|
||||
/*
|
||||
* Terminate the calling thread.
|
||||
*/
|
||||
|
||||
void kExitThread(void *ExitStatus // exit status
|
||||
);
|
||||
|
||||
/*
|
||||
* Join a thread.
|
||||
*/
|
||||
|
||||
ERROR kGetThreadExitCode(THREAD handle, //
|
||||
void **exitStatus);
|
||||
|
||||
|
||||
/*
|
||||
* Check for suspension or kill.
|
||||
*/
|
||||
|
||||
ERROR kThreadCheckForSuspendKill(void);
|
||||
|
||||
/*
|
||||
* Get the thread attributes.
|
||||
*/
|
||||
|
||||
ERROR kGetThreadAttributes(THREAD handle, // specified thread
|
||||
UINT32 *attributes
|
||||
);
|
||||
|
||||
/*
|
||||
* Set thread attributes.
|
||||
*/
|
||||
|
||||
ERROR kSetThreadAttributes(THREAD handle, // specified thread
|
||||
UINT32 attributes
|
||||
);
|
||||
|
||||
/*
|
||||
* Get thread specific data.
|
||||
*/
|
||||
|
||||
void *kGetUserThreadData(THREAD handle);
|
||||
|
||||
/*
|
||||
* Set thread specific data.
|
||||
*/
|
||||
|
||||
ERROR kSetUserThreadData(THREAD handle, //specified thread
|
||||
void *data
|
||||
);
|
||||
|
||||
/*
|
||||
* Bind the thread to the specified processor; not supported initially
|
||||
*/
|
||||
|
||||
ERROR kBindThread(THREAD handle, // specified thread
|
||||
PROCESSOR cpu // specified processor
|
||||
);
|
||||
|
||||
/*
|
||||
* Unbind the specified thread. Not supported initially.
|
||||
*/
|
||||
|
||||
ERROR kUnbindThread(THREAD handle);
|
||||
|
||||
/*
|
||||
* Get current binding. Not supported initially.
|
||||
*/
|
||||
|
||||
PROCESSOR kCurrentThreadBinding(THREAD handle);
|
||||
|
||||
/*
|
||||
* Get efective binding; not supported initially.
|
||||
*/
|
||||
|
||||
ERROR kGetEffectiveBinding(THREAD handle, LONG *binding);
|
||||
|
||||
/*
|
||||
* Get the register state. not supported initially.
|
||||
*/
|
||||
|
||||
ERROR kGetThreadContext(THREAD handle, CONTEXT *contextp);
|
||||
|
||||
/*
|
||||
* Get the stack information for the specified thread. Not supported
|
||||
* initially
|
||||
*/
|
||||
|
||||
ERROR kGetThreadStackInfo(THREAD handle, LONG *stackp, LONG *stkSize);
|
||||
|
||||
/*
|
||||
* Set the kernel stack for the calling thread; not supported.
|
||||
*/
|
||||
|
||||
ERROR kSetThreadKernelStackInfo(LONG stackp, LONG stkSize);
|
||||
|
||||
/*
|
||||
* Get the available stack space.
|
||||
*/
|
||||
|
||||
LONG kGetCurrentAvailableStackSize(void);
|
||||
|
||||
/*
|
||||
* Netware binding management (legacy code support)
|
||||
*/
|
||||
|
||||
void kExitNetWare(void);
|
||||
|
||||
void kEnterNetWare(void);
|
||||
|
||||
/*
|
||||
* Preemption management; not supported initially.
|
||||
*/
|
||||
|
||||
ERROR kSetNLMPreemption(
|
||||
struct LoadDefinitionStructure *ModuleHandle,
|
||||
BOOLEAN PreemptionFlag);
|
||||
|
||||
|
||||
/*
|
||||
* Manage preemption on code segments. Not supported initially.
|
||||
*/
|
||||
ERROR kSetCodePreemption(ADDR startAddr, LONG length, BOOLEAN prmptFlag);
|
||||
|
||||
/*
|
||||
* Turn off preemption.
|
||||
*/
|
||||
|
||||
ERROR kEnterCriticalSection(void);
|
||||
|
||||
/*
|
||||
* Enable preemption;
|
||||
*/
|
||||
|
||||
ERROR kExitCriticalSection(void);
|
||||
|
||||
/*
|
||||
* Check to see if the calling thread is in a critical section;
|
||||
*/
|
||||
|
||||
BOOLEAN kGetCriticalSectionStatus(void);
|
||||
|
||||
/*
|
||||
* Synch primitives; spin locks.
|
||||
*/
|
||||
|
||||
ERROR kSpinLockInit(SPINLOCK *lockp);
|
||||
|
||||
void kSpinLock(SPINLOCK *lockp);
|
||||
|
||||
ERROR kSpinTryLock(SPINLOCK *lockp);
|
||||
|
||||
void kSpinUnlock(SPINLOCK *lockp);
|
||||
|
||||
FLAGS kSpinLockDisable(SPINLOCK *lockp);
|
||||
|
||||
ERROR kSpinTryLockDisable(SPINLOCK *lockp, FLAGS *flags);
|
||||
|
||||
void kSpinUnlockRestore(SPINLOCK *lockp, FLAGS flags);
|
||||
|
||||
/*
|
||||
* Synch primitives; sleep locks.
|
||||
*/
|
||||
|
||||
MUTEX kMutexAlloc(BYTE *MutexName);
|
||||
ERROR kMutexFree(MUTEX handle);
|
||||
ERROR kMutexLock(MUTEX lock);
|
||||
ERROR kMutexTryLock(MUTEX lock);
|
||||
ERROR kMutexUnlock(MUTEX lock);
|
||||
UINT kMutexWaitCount(MUTEX lock);
|
||||
|
||||
/*
|
||||
* Synch primitives; semaphores.
|
||||
*/
|
||||
|
||||
SEMAPHORE kSemaphoreAlloc(BYTE *name, UINT count);
|
||||
ERROR kSemaphoreFree(SEMAPHORE sema);
|
||||
ERROR kSemaphoreWait(SEMAPHORE sema);
|
||||
ERROR kSemaphoreTry(SEMAPHORE sema);
|
||||
/*
|
||||
* semaTimedWait not currently supported.
|
||||
*/
|
||||
ERROR kSemaphoreTimedWait(SEMAPHORE sema, UINT timeout); //timeout in ms.
|
||||
ERROR kSemaphoreSignal(SEMAPHORE sema);
|
||||
UINT kSemaphoreExamineCount(SEMAPHORE sema);
|
||||
UINT kSemaphoreWaitCount(SEMAPHORE sema);
|
||||
|
||||
/*
|
||||
* Synch primitives; read/write sleep lock.
|
||||
*/
|
||||
|
||||
RWLOCK kRWLockAlloc(BYTE *RWLockName);
|
||||
|
||||
ERROR kRWLockFree(RWLOCK handle);
|
||||
|
||||
ERROR kRWReadLock(RWLOCK handle);
|
||||
|
||||
ERROR kRWReadTryLock(RWLOCK handle);
|
||||
|
||||
ERROR kRWReadUnlock(RWLOCK handle);
|
||||
|
||||
ERROR kRWWriteLock(RWLOCK handle);
|
||||
|
||||
ERROR kRWWriteTryLock(RWLOCK handle);
|
||||
|
||||
ERROR kRWWriteUnlock(RWLOCK handle);
|
||||
|
||||
ERROR kRWWriterToReader(RWLOCK handle);
|
||||
|
||||
ERROR kRWReaderToWriter(RWLOCK handle);
|
||||
|
||||
/*
|
||||
* Synch primitives; read/write spin lock: not implemented.
|
||||
*/
|
||||
|
||||
SPINRWLOCK kSpinRWLockAlloc(BYTE *name);
|
||||
|
||||
ERROR kSpinRWLockFree(SPINRWLOCK handle);
|
||||
|
||||
ERROR kSpinRWReadLock(SPINRWLOCK handle);
|
||||
|
||||
ERROR kSpinRWReadUnlock(SPINRWLOCK handle);
|
||||
|
||||
ERROR kSpinRWWriteLock(SPINRWLOCK handle);
|
||||
|
||||
ERROR kSpinRWWriteUnlock(SPINRWLOCK handle);
|
||||
|
||||
|
||||
/*
|
||||
* Synch primitives; Condition variables.
|
||||
*/
|
||||
|
||||
ERROR kCVAlloc(BYTE *name, KCONDITION *handle);
|
||||
ERROR kCVDestroy(KCONDITION handle);
|
||||
ERROR kCVWait(KCONDITION handle, SPINLOCK *lp);
|
||||
ERROR kCVTimedWait(KCONDITION handle, SPINLOCK *lp, LONG timeOut);
|
||||
ERROR kCVSignal(KCONDITION handle);
|
||||
ERROR kCVBroadcast(KCONDITION handle);
|
||||
|
||||
/*
|
||||
* Synch primitives; Barriers.
|
||||
*/
|
||||
|
||||
BARRIER kBarrierAlloc(BYTE *name, UINT value);
|
||||
|
||||
ERROR kBarrierFree(BARRIER handle);
|
||||
|
||||
ERROR kBarrierWait(BARRIER handle);
|
||||
|
||||
ERROR kBarrierIncrement(BARRIER handle);
|
||||
|
||||
ERROR kBarrierDecrement(BARRIER handle);
|
||||
|
||||
ERROR kBarrierThreadCount(BARRIER handle, UINT *count);
|
||||
|
||||
ERROR kBarrierWaitCount(BARRIER handle, UINT *count);
|
||||
|
||||
/*
|
||||
* Atomic functions: to be implemented.
|
||||
*/
|
||||
|
||||
#include "mpkatomic.h"
|
||||
|
||||
/*
|
||||
* Sleep wakeup primitives.
|
||||
*/
|
||||
|
||||
void kSleep(void);
|
||||
ERROR kWakeUp(THREAD handle);
|
||||
|
||||
/*
|
||||
* Queue and list APIs: Not implemented; the application can implement this.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Timeout APIs; call out will be made in the timer interrupt context.
|
||||
*/
|
||||
|
||||
ERROR kScheduleCallOut(CALLOUT_STRUCT *cp);
|
||||
|
||||
ERROR kCancelCallOut(CALLOUT_STRUCT *cp);
|
||||
|
||||
/*
|
||||
* Get the granularity of ticks.
|
||||
*/
|
||||
|
||||
UINT GetTimerMinorTicksPerSecond(void);
|
||||
|
||||
/*
|
||||
* Polling functions; not implemented.
|
||||
*/
|
||||
|
||||
/*
|
||||
* worktodo apis.
|
||||
*/
|
||||
|
||||
ERROR kScheduleWorkToDo(struct WorkToDoStructure *work);
|
||||
ERROR kSchedulePrioWorkToDo(struct WorkToDoStructure *work);
|
||||
|
||||
ERROR kScheduleWorkToDoDirected(struct WorkToDoStructure *work,
|
||||
PROCESSOR cpuNumber);
|
||||
|
||||
ERROR kCancelWorkToDo(struct WorkToDoStructure *work);
|
||||
|
||||
ERROR kScheduleFastWorkToDo(struct WorkToDoStructure *work);
|
||||
|
||||
ERROR kScheduleFastWorkToDoLocal(struct WorkToDoStructure *work);
|
||||
|
||||
ERROR kScheduleFastWorkToDoDirected(struct WorkToDoStructure *work,
|
||||
PROCESSOR cpuNumber);
|
||||
|
||||
/*
|
||||
* Processor management APIs: partially implemented.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Get the CPU ID on which the calling thread is executing.
|
||||
*/
|
||||
|
||||
PROCESSOR kReturnCurrentProcessorID(void);
|
||||
|
||||
/*
|
||||
* Get the number of processors in the system.
|
||||
*/
|
||||
|
||||
LONG kReturnPhysicalProcessorCount(void);
|
||||
|
||||
/*
|
||||
* An Api to register a module with MPK. The registered function will be
|
||||
* invoked in the context of an MPK thread,
|
||||
*/
|
||||
|
||||
void mpkRegisterMainFunc(void (*mainFunc)(void *), void *, char *name);
|
||||
|
||||
/*
|
||||
* Linux thread migration APIs.
|
||||
*/
|
||||
|
||||
/*
|
||||
* void mpkEnter(void)
|
||||
* Transform a standard Linux (thread/process) to an MPK thread. This function
|
||||
* needs to be called before executing code written to the MPK on Linux.
|
||||
* The function may block.
|
||||
*
|
||||
* Calling/Exit State:
|
||||
* The function may block.
|
||||
*
|
||||
* Remarks:
|
||||
* We will support recurssive invocation of this function on the same thread.
|
||||
*/
|
||||
|
||||
void mpkEnter(void);
|
||||
|
||||
/*
|
||||
* void mpkExit(void)
|
||||
* Migrate the thread out of the MPK environment. The function does not block.
|
||||
* Prior to returning from the MPK environment, invoke this API.
|
||||
*/
|
||||
|
||||
void mpkExit(void);
|
||||
|
||||
int nkEventBusInit(void);
|
||||
int nkEventBusDeInit(void);
|
||||
void mpkSemaphoreInit(mpkSema_t *sema, char *name, int count);
|
||||
|
||||
|
||||
#endif /* MPK_H*/
|
||||
223
include/nwnss/include/mpkatomic.h
Normal file
223
include/nwnss/include/mpkatomic.h
Normal file
@@ -0,0 +1,223 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2002-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| File Name: mpkatomic.h
|
||||
|
|
||||
| File Created: 07/07/2003
|
||||
|
|
||||
| Engineering Contact: K.Y. Srinivasan
|
||||
|
|
||||
| Target Platform: COMMON_SOURCE
|
||||
|
|
||||
|
|
||||
| File Description:
|
||||
| An implementation of the NetWare MP in the Linux Kernel. We have
|
||||
| initially imlemented a subset of the APIs and semantics.
|
||||
|***************************************************************************
|
||||
|
|
||||
| $Author: blarsen $
|
||||
| $Date: 2006-09-06 03:03:38 +0530 (Wed, 06 Sep 2006) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 1522 $
|
||||
|
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MPK_ATOMIC_H
|
||||
#define MPK_ATOMIC_H
|
||||
|
||||
#ifndef LOCK
|
||||
#if defined (CONFIG_SMP) || defined (MPK_DEBUG)
|
||||
#define LOCK "lock ; "
|
||||
#else
|
||||
#define LOCK ""
|
||||
#endif
|
||||
#endif
|
||||
#include <linux/version.h>
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6))
|
||||
#include <asm/atomic.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* void atomic_inc(LONG *loc)
|
||||
* Atomically increment the location pointed to by loc.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ void mpk_atomic_inc(LONG *loc)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
LOCK "incl %0"
|
||||
:"=m" (*loc)
|
||||
:"m" (*loc)
|
||||
: "memory", "flags");
|
||||
}
|
||||
|
||||
/*
|
||||
* void atomic_dec(LONG *loc)
|
||||
* Atomically decrement the location pointed to by loc.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ void mpk_atomic_dec(LONG *loc)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
LOCK "decl %0"
|
||||
:"=m" (*loc)
|
||||
:"m" (*loc)
|
||||
: "memory", "flags");
|
||||
}
|
||||
|
||||
/*
|
||||
* void atomic_add(LONG *loc, LONG val)
|
||||
* Atomically add value to the location pointed to by loc.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ void mpk_atomic_add(LONG *loc, LONG val)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
LOCK "addl %1,%0"
|
||||
:"=m" (*loc)
|
||||
:"ir" (val), "m" (*loc)
|
||||
: "memory", "flags");
|
||||
}
|
||||
|
||||
/*
|
||||
* void atomic_sub(LONG *loc, LONG val)
|
||||
* Atomically add value to the location pointed to by loc.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ void mpk_atomic_sub(LONG *loc, LONG val)
|
||||
{
|
||||
__asm__ __volatile__(
|
||||
LOCK "subl %1,%0"
|
||||
:"=m" (*loc)
|
||||
:"ir" (val), "m" (*loc)
|
||||
: "memory", "flags");
|
||||
}
|
||||
|
||||
/*
|
||||
* LONG atomic_bts(LONG *bitBase, LONG bitOffset)
|
||||
* Atomically set the specified bit position in the word pointed to by
|
||||
* bitBase. Return the original value of the bit.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ LONG atomic_bts(LONG *base, LONG bitOffset)
|
||||
{
|
||||
LONG retVal;
|
||||
__asm__ __volatile__(
|
||||
LOCK "btsl %2, %1\n\t"
|
||||
"movl $0, %0\n\t"
|
||||
"adcl %0, %0"
|
||||
:"=r" (retVal), "+m" (*base)
|
||||
:"rI" (bitOffset)
|
||||
: "memory", "flags");
|
||||
return (retVal);
|
||||
}
|
||||
|
||||
/*
|
||||
* LONG atomic_btr(LONG *bitBase, LONG bitOffset)
|
||||
* Atomically clear the specified bit position in the word pointed to by
|
||||
* bitBase. Return the original value of the bit.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ LONG atomic_btr(LONG *base, LONG bitOffset)
|
||||
{
|
||||
LONG retVal;
|
||||
__asm__ __volatile__(
|
||||
LOCK "btrl %2, %1\n\t"
|
||||
"movl $0, %0\n\t"
|
||||
"adcl %0, %0"
|
||||
:"=r" (retVal), "+m" (*base)
|
||||
:"rI" (bitOffset)
|
||||
: "memory", "flags");
|
||||
return (retVal);
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6))
|
||||
/*
|
||||
* LONG atomic_xchg(LONG *loc, LONG *value)
|
||||
* Atomically exchange the value at memory location "loc" with the value at
|
||||
* the location at "value". The original value at "loc" will be returned.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ LONG atomic_xchg(LONG *loc, LONG *value)
|
||||
{
|
||||
LONG oldValue;
|
||||
__asm__ __volatile__(
|
||||
LOCK "xchgl %1,%0\n\t"
|
||||
: "=r" (oldValue), "+m" (*loc)
|
||||
: "0" (*value)
|
||||
: "memory");
|
||||
return (oldValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* LONG atomic_addAndReturn(LONG *loc, LONG value)
|
||||
* Atomically add the value to the location pointed to by loc. The new
|
||||
* value is returned.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ LONG atomic_addAndReturn(LONG *loc, LONG value)
|
||||
{
|
||||
LONG oldValue;
|
||||
__asm__ __volatile__(
|
||||
"movl %1, %2\n\t"
|
||||
LOCK "xaddl %1,%0\n\t"
|
||||
"addl %1, %2"
|
||||
: "+m" (*loc), "+r" (value), "+r" (oldValue)
|
||||
:
|
||||
: "memory");
|
||||
return (oldValue);
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6))
|
||||
/*
|
||||
* LONG atomic_cmpxchg(LONG *loc, LONG compareValue, LONG newValue)
|
||||
* Atomically compare the "compareValue" with value pointed to by "loc";
|
||||
* if they are same, exchange the value at "loc" with the new value.
|
||||
* In all cases, the original value at "loc" is returned.
|
||||
*/
|
||||
|
||||
static
|
||||
__inline__ LONG atomic_cmpxchg(LONG *loc, LONG compareValue, LONG newValue)
|
||||
{
|
||||
LONG oldValue;
|
||||
__asm__ __volatile__(
|
||||
LOCK "cmpxchgl %2, %1"
|
||||
: "=a" (oldValue), "+m" (*loc)
|
||||
: "r" (newValue), "0" (compareValue)
|
||||
: "memory", "flags");
|
||||
return (oldValue);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MPK_ATOMIC_H*/
|
||||
78
include/nwnss/include/mpkerrno.h
Normal file
78
include/nwnss/include/mpkerrno.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2002-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| File Name: mpkerrno.h
|
||||
|
|
||||
| File Created: 07/07/2003
|
||||
|
|
||||
| Engineering Contact: K.Y. Srinivasan
|
||||
|
|
||||
| Target Platform: COMMON_SOURCE
|
||||
|
|
||||
|
|
||||
| File Description:
|
||||
| An implementation of the NetWare MP in the Linux Kernel. We have
|
||||
| initially imlemented a subset of the APIs and semantics.
|
||||
|***************************************************************************
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MPK_ERRNO_H
|
||||
#define MPK_ERRNO_H
|
||||
|
||||
#define kSUCCESS 0
|
||||
#define ERROR_INVALID_THREAD 1
|
||||
#define ERROR_REQUEST_DENIED 2
|
||||
#define ERROR_THREAD_DETACHED 3
|
||||
#define ERROR_FAILURE 4
|
||||
#define ERROR_INVALID_PARAMETER 5
|
||||
#define ERROR_CPU_NUMBER_INVALID 6
|
||||
#define ERROR_STACK_OVERFLOW 7
|
||||
#define ERROR_STACK_POINTER_OUT_OF_RANGE 7
|
||||
#define kBUSY -1
|
||||
#define ERROR_INVALID_MUTEX 8
|
||||
#define ERROR_NOT_LOCK_OWNER 9
|
||||
#define ERROR_INVALID_SEMAPHORE 10
|
||||
#define ERROR_INVALID_CALLOUT 11
|
||||
#define ERROR_INVALID_RESOURCE_TAG 12
|
||||
#define ERROR_INVALID_SPIN_RWLOCK 13
|
||||
#define ERROR_INVALID_BARRIER 14
|
||||
#define ERROR_INVALID_RWLOCK 15
|
||||
#define ERROR_ALREADY_OWNER 16
|
||||
#define ERROR_INVALID_KERNEL_CV 17
|
||||
|
||||
/*
|
||||
* Error codes for lists ans queues.
|
||||
*/
|
||||
#define ERROR_INVALID_LIST 18
|
||||
#define ERROR_NO_MEMORY 19
|
||||
#define ERROR_INVALID_QUE 20
|
||||
#define ERROR_INVALID_QUE_LIGHT 21
|
||||
|
||||
#define ERROR_TIMEOUT 22
|
||||
#endif /* MPK_ERRNO_H */
|
||||
185
include/nwnss/include/mpkmisc.h
Normal file
185
include/nwnss/include/mpkmisc.h
Normal file
@@ -0,0 +1,185 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2002-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| File Name: mpkmisc.h
|
||||
|
|
||||
| File Created: 07/07/2003
|
||||
|
|
||||
| Engineering Contact: K.Y. Srinivasan
|
||||
|
|
||||
| Target Platform: COMMON_SOURCE
|
||||
|
|
||||
|
|
||||
| File Description:
|
||||
| An implementation of the NetWare MP in the Linux Kernel. We have
|
||||
| initially imlemented a subset of the APIs and semantics.
|
||||
|***************************************************************************
|
||||
|
|
||||
| $Author: vandana $
|
||||
| $Date: 2005-08-10 01:03:51 +0530 (Wed, 10 Aug 2005) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 1177 $
|
||||
|
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MPK_MISC_H
|
||||
#define MPK_MISC_H
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include "mpk.h"
|
||||
/*
|
||||
* Memory Management.
|
||||
*/
|
||||
|
||||
typedef struct memAcct {
|
||||
void (*func)(unsigned int);
|
||||
} memAcct_t;
|
||||
|
||||
|
||||
void memMgmtInit(void);
|
||||
|
||||
/*
|
||||
* Flags for allocation.
|
||||
*/
|
||||
|
||||
#define MPK_SLEEP_OK GFP_KERNEL
|
||||
#define MPK_SLEEP_NOT_OK GFP_ATOMIC
|
||||
|
||||
/*
|
||||
* Byte allocator.
|
||||
*/
|
||||
|
||||
|
||||
void *mpkAlloc(size_t, int);
|
||||
|
||||
void mpkFree(const void *);
|
||||
|
||||
/*
|
||||
* Page allocator
|
||||
*/
|
||||
|
||||
void *mpkPageAlloc(unsigned long, int);
|
||||
void mpkPageFree(void *);
|
||||
|
||||
/*
|
||||
* int
|
||||
* mpkRegisterMemPressureCallBack
|
||||
* (void (*callBack)(unsigned int pagesNeeded))
|
||||
* This API registers a callback with the system. This function will be
|
||||
* invoked in a thread context when memory pressure in the system is acute.
|
||||
* The argument passed to the callback function will specify the number of
|
||||
* pages to be given back to the system.
|
||||
*/
|
||||
|
||||
int mpkRegisterMemPressureCallBack(void (*callBack)(unsigned int pagesNeeded));
|
||||
void mpkDeRegisterMemPressureCallBack(void);
|
||||
|
||||
/*
|
||||
* AESPROC support.
|
||||
*/
|
||||
|
||||
typedef struct AESProcessStructure {
|
||||
void (*AProcessToCall)(struct AESProcessStructure *);
|
||||
LONG AWakeUpDelayAmount;
|
||||
struct callOutStruct timeout;
|
||||
struct WorkToDoStructure work;
|
||||
} AESProcessStruct_t;
|
||||
|
||||
void ScheduleSleepAESProcessEvent(AESProcessStruct_t *aesp);
|
||||
void ScheduleNoSleepAESProcessEvent(AESProcessStruct_t *aesp);
|
||||
|
||||
void CancelSleepAESProcessEvent(AESProcessStruct_t *aesp);
|
||||
void CancelNoSleepAESProcessEvent(AESProcessStruct_t *aesp);
|
||||
|
||||
/*
|
||||
* Other misc functions and data symbols.
|
||||
*/
|
||||
|
||||
void Abend(const char *message);
|
||||
void EnterDebugger(void);
|
||||
|
||||
struct DateTimeStruct /* Also defined in UTILA.ASM */
|
||||
{
|
||||
unsigned int year;
|
||||
unsigned int month;
|
||||
unsigned int day;
|
||||
unsigned int hour;
|
||||
unsigned int minute;
|
||||
unsigned int second;
|
||||
int timeZoneAdjust; /* Must set for
|
||||
ConvertToSecondsRelative1970 */
|
||||
unsigned int dayOfWeek; /* Returned by ConvertSecondsToDateTime */
|
||||
};
|
||||
|
||||
/*
|
||||
* Flags passed to date and time formatting routines
|
||||
*/
|
||||
|
||||
#define EN_INCLUDE_SECONDS 0x01 /* Include seconds in time*/
|
||||
#define EN_INCLUDE_WEEKDAY 0x02 /*Include the day of the week in date*/
|
||||
#define EN_USE_ALPHA_MONTH 0x04 /*Use month name, not number*/
|
||||
#define EN_USE_4_DIGIT_YEAR 0x08 /* Print four digit year*/
|
||||
#define EN_USE_ABBREV_MONTH 0x10 /*Use month abbreviation, not number*/
|
||||
|
||||
void FormatDateAndTime(
|
||||
BYTE *buffer,
|
||||
LONG year,
|
||||
LONG month,
|
||||
LONG day,
|
||||
LONG hour,
|
||||
LONG minute,
|
||||
LONG second,
|
||||
LONG flags);
|
||||
|
||||
long long GetSuperHighResolutionTimer(void);
|
||||
|
||||
//size_t SizeOfAllocBlock(void *addr);
|
||||
|
||||
#define MMU_ERROR 1
|
||||
/*
|
||||
* Access types.
|
||||
*/
|
||||
#define MMU_SUPERVISOR_READ 5
|
||||
#define MMU_SUPERVISOR_WRITE 5
|
||||
|
||||
|
||||
LONG ValidateAddressRangePresent(void *address, LONG range, LONG flag);
|
||||
|
||||
LONG NVMGetHighestPhysivalAddress(void);
|
||||
|
||||
/*
|
||||
* Global variables (a subset) exposed by NetWare.
|
||||
*/
|
||||
|
||||
extern volatile LONG UpTimeInSeconds;
|
||||
|
||||
extern LONG CurrentNumberOfCacheBuffers;
|
||||
|
||||
extern LONG NestedInterruptCount;
|
||||
|
||||
#define RunningProcess ((ADDR)kCurrentThread())
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* MPK_MISC_H */
|
||||
525
include/nwnss/include/mpkutil.h
Normal file
525
include/nwnss/include/mpkutil.h
Normal file
@@ -0,0 +1,525 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2002-2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| File Name: mpkutil.h
|
||||
|
|
||||
| File Created: 07/07/2003
|
||||
|
|
||||
| Engineering Contact: K.Y. Srinivasan
|
||||
|
|
||||
| Target Platform: COMMON_SOURCE
|
||||
|
|
||||
|
|
||||
| File Description:
|
||||
| Utilities for supporting MPK on Linux.
|
||||
|***************************************************************************
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
****************************************************************************/
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include "mpk.h"
|
||||
|
||||
typedef void * HANDLE;
|
||||
|
||||
typedef long long SINT64;
|
||||
|
||||
/*
|
||||
* Signatures for lists and qs.
|
||||
*/
|
||||
|
||||
#define MPK_DOUBLY_LINKED_LIST_SIGNATURE 0x88888888
|
||||
#define MPK_QUEUE_SIGNATURE 0x99999999
|
||||
#define MPK_QUEUE_LIGHT_SIGNATURE 0xAAAAAAAA
|
||||
|
||||
/*
|
||||
* Definition of a singly linked list node.
|
||||
*/
|
||||
typedef struct _listNode {
|
||||
struct _listNode *next;
|
||||
struct _listNode *prev;
|
||||
} LIST_NODE;
|
||||
|
||||
/*
|
||||
* Doubly linked list head.
|
||||
*/
|
||||
|
||||
typedef struct doublyLinkedListHead {
|
||||
LIST_NODE *first;
|
||||
LIST_NODE *last;
|
||||
unsigned int nodeCount;
|
||||
unsigned long signature;
|
||||
rwMutex_t *rwLock;
|
||||
} doublyLinkedListHead_t;
|
||||
|
||||
|
||||
/*
|
||||
* Allocate a doubly linked list head.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListAlloc(HANDLE *listHeadHandle);
|
||||
|
||||
/*
|
||||
* Free the list head.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListFree(HANDLE listHeadHandle);
|
||||
|
||||
/*
|
||||
* Initialize the specified doubly linked list.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListInit(HANDLE listHeadHandle);
|
||||
|
||||
/*
|
||||
* Add an element to the list.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListAddElement(HANDLE listHeadHandle,
|
||||
LIST_NODE *node);
|
||||
|
||||
/*
|
||||
* Add an element without acquiring the lock.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListAddElementNoLock(HANDLE listHeadHandle,
|
||||
LIST_NODE *node);
|
||||
|
||||
/*
|
||||
* Delete an element from the list.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListDeleteElement(HANDLE listHeadHandle,
|
||||
LIST_NODE *node);
|
||||
|
||||
/*
|
||||
* Delete an element without acquiring the lock.
|
||||
*/
|
||||
ERROR kDoublyLinkedListDeleteElementNoLock(HANDLE listHeadHandle,
|
||||
LIST_NODE *node);
|
||||
|
||||
/*
|
||||
* Acquire the read lock on the list.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListReadLock(HANDLE listHeadHandle);
|
||||
|
||||
/*
|
||||
* Release the read lock on the list.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListReadUnlock(HANDLE listHeadHandle);
|
||||
|
||||
/*
|
||||
* Acquire the write lock on the list.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListWriteLock(HANDLE listHeadHandle);
|
||||
|
||||
/*
|
||||
* Release the write lock on the list.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListWriteUnlock(HANDLE listHeadHandle);
|
||||
|
||||
/*
|
||||
* Get the first element of a list.
|
||||
*/
|
||||
|
||||
ERROR kDoublyLinkedListGetFirstElementNoLock(HANDLE listHeadHandle,
|
||||
LIST_NODE **node);
|
||||
|
||||
/*
|
||||
* Given an element of a list return the next element.
|
||||
*/
|
||||
|
||||
#define kDoublyLinkedListGetNextElement(node) \
|
||||
((node)->next)
|
||||
|
||||
/*
|
||||
* Given an element of a list return the previous element.
|
||||
*/
|
||||
|
||||
#define kDoublyLinkedListGetPrevElement(node) \
|
||||
((node)->prev)
|
||||
|
||||
/*
|
||||
* Queue functions.
|
||||
*/
|
||||
|
||||
typedef struct qlink {
|
||||
|
||||
struct qlink *link;
|
||||
void *ptr;
|
||||
SINT64 value;
|
||||
} QLINK;
|
||||
|
||||
typedef struct queueHeader {
|
||||
QLINK *first;
|
||||
QLINK *last;
|
||||
SPINLOCK lock;
|
||||
unsigned long signature;
|
||||
unsigned long nodeCount;
|
||||
KCONDITION condVar;
|
||||
} queueHeader_t;
|
||||
|
||||
typedef void * QUE;
|
||||
|
||||
/*
|
||||
* Allocate a queue.
|
||||
*/
|
||||
QUE kAllocQue(void);
|
||||
|
||||
/*
|
||||
* Allocate a queue; the caller cannot block
|
||||
*/
|
||||
|
||||
QUE kAllocQueNoSleep(void);
|
||||
|
||||
/*
|
||||
* Free a previously allocated queue.
|
||||
*/
|
||||
|
||||
ERROR kFreeQue(QUE QueHandle);
|
||||
|
||||
/*
|
||||
* Retrieve the number of elements in the queue.
|
||||
*/
|
||||
|
||||
LONG kQueCount(QUE QueHandle);
|
||||
|
||||
/*
|
||||
* Retrieve the number of elements in the queue; without any checks.
|
||||
*/
|
||||
|
||||
LONG kQueCountNoCheck(QUE QueHandle);
|
||||
|
||||
/*
|
||||
* Enqueue an element on the queue.
|
||||
*/
|
||||
|
||||
ERROR kEnQue(QUE QueHandle, QLINK *newNode);
|
||||
|
||||
/*
|
||||
* Enqueue an element without acquiring the lock.
|
||||
*/
|
||||
|
||||
ERROR kEnQueNoLock(QUE QueHandle, QLINK *newNode);
|
||||
|
||||
/*
|
||||
* Enqueue the element using the key to locate the position to enqueue.
|
||||
*/
|
||||
|
||||
ERROR kEnQueOrdered(QUE QueHandle, QLINK *newNode, SINT64 value);
|
||||
|
||||
/*
|
||||
* Enqueue the element using the key to locate the position to enqueue.
|
||||
* Does not acquire the lock.
|
||||
*/
|
||||
|
||||
ERROR kEnQueOrderedNoLock(QUE QueHandle, QLINK *newNode, SINT64 value);
|
||||
|
||||
/*
|
||||
* Add a new element at the head of the queue.
|
||||
*/
|
||||
|
||||
ERROR kPushQue(QUE QueHandle, QLINK *newNode);
|
||||
|
||||
/*
|
||||
* Add a new element at the head of the queue without acquiring the lock.
|
||||
*/
|
||||
|
||||
ERROR kPushQueNoLock(QUE QueHandle, QLINK *newNode);
|
||||
|
||||
/*
|
||||
* Push the element using the key to order the queue; ascending order.
|
||||
*/
|
||||
|
||||
ERROR
|
||||
kPushQueOrdered(QUE QueHandle, QLINK *newNode, SINT64 value);
|
||||
|
||||
|
||||
/*
|
||||
* Push the element using the key to order the queue; ascending order without
|
||||
* acquiring the lock.
|
||||
*/
|
||||
|
||||
ERROR kPushQueOrderedNoLock(QUE QueHandle, QLINK *newNode, SINT64 value );
|
||||
|
||||
/*
|
||||
* Dequeue the node at the head of the queue.
|
||||
*/
|
||||
|
||||
QLINK *kDeQue(QUE QueHandle);
|
||||
|
||||
/*
|
||||
* Dequeue the node at the head of the queue; without acquiring the lock.
|
||||
*/
|
||||
|
||||
QLINK *kDeQueNoLock(QUE QueHandle );
|
||||
|
||||
/*
|
||||
* Dequeue the specified element.
|
||||
*/
|
||||
|
||||
QLINK *kDeQueByQLINK(QUE QueHandle, QLINK *node);
|
||||
|
||||
/*
|
||||
* Dequeue the specified element, without acquiring the lock.
|
||||
*/
|
||||
|
||||
QLINK *kDeQueByQLINKNoLock(QUE QueHandle, QLINK *newNode);
|
||||
|
||||
/*
|
||||
* Dequeue an element from the head of the queue. If no the queue is
|
||||
* empty, block.
|
||||
*/
|
||||
|
||||
QLINK *kDeQueWait(QUE QueHandle);
|
||||
|
||||
|
||||
/*
|
||||
* Dequeue an element from the head of the queue. If no the queue is
|
||||
* empty, block. We will not acquire the lock on the queue.
|
||||
*/
|
||||
QLINK *kDeQueWaitNoLock(QUE QueHandle);
|
||||
|
||||
/*
|
||||
* Dequeue all elements in the queue.
|
||||
*/
|
||||
|
||||
QLINK *kDeQueAll(QUE QueHandle);
|
||||
|
||||
|
||||
/*
|
||||
* Dequeue all elements in the queue. The queue lock is not acquired.
|
||||
*/
|
||||
|
||||
QLINK *kDeQueAllNoLock(QUE QueHandle);
|
||||
|
||||
/*
|
||||
* Return the first elementin the quue without acquiring the lock.
|
||||
* The element is NOT removed from the queue.
|
||||
*/
|
||||
|
||||
QLINK *kFirstQLINKNoLock(QUE QueHandle);
|
||||
|
||||
|
||||
/*
|
||||
* Light-weight queues! Singly linked.
|
||||
*/
|
||||
|
||||
typedef struct qlinkLight {
|
||||
struct qlinkLight *next;
|
||||
} QLINK_LIGHT;
|
||||
|
||||
/*
|
||||
* The header structure.
|
||||
*/
|
||||
|
||||
typedef struct queueLightHeader {
|
||||
QLINK_LIGHT *first;
|
||||
QLINK_LIGHT *last;
|
||||
SPINLOCK lock;
|
||||
unsigned long signature;
|
||||
unsigned int nodeCount;
|
||||
KCONDITION condVar;
|
||||
} queueLightHeader_t;
|
||||
|
||||
typedef void * QUE_LIGHT;
|
||||
|
||||
/*
|
||||
* Allocate a light-weight queue.
|
||||
*/
|
||||
|
||||
QUE_LIGHT kAllocQueLight(void);
|
||||
|
||||
/*
|
||||
* Allocate a light-weight queue without blocking.
|
||||
*/
|
||||
|
||||
QUE_LIGHT kAllocQueLightNoSleep(void);
|
||||
|
||||
/*
|
||||
* Free a previously allocated light-weight queue.
|
||||
*/
|
||||
|
||||
ERROR kFreeQueLight(QUE_LIGHT queue);
|
||||
|
||||
/*
|
||||
* Return the number of elements in the queue.
|
||||
*/
|
||||
UINT kQueLightCount(QUE_LIGHT queue);
|
||||
|
||||
/*
|
||||
* Enqueue the specified element on the queue.
|
||||
*/
|
||||
|
||||
ERROR kEnQueLight(QUE_LIGHT queue, QLINK_LIGHT *newNode);
|
||||
|
||||
/*
|
||||
* Enqueue the specified element on the queue; without acquiring the lock.
|
||||
*/
|
||||
|
||||
ERROR kEnQueLightNoLock( QUE_LIGHT queue, QLINK_LIGHT *newNode );
|
||||
|
||||
/*
|
||||
* Enqueue the element at the head of the list.
|
||||
*/
|
||||
|
||||
ERROR kPushQueLight(QUE_LIGHT queue, QLINK_LIGHT *newNode);
|
||||
|
||||
/*
|
||||
* Enqueue the element at the head of the list without acquiring the lock.
|
||||
*/
|
||||
|
||||
ERROR kPushQueLightNoLock(QUE_LIGHT queue, QLINK_LIGHT *newNode);
|
||||
|
||||
/*
|
||||
* Dequeue an element from the queue.
|
||||
*/
|
||||
|
||||
QLINK_LIGHT *kDeQueLight(QUE_LIGHT queue);
|
||||
|
||||
|
||||
/*
|
||||
* Dequeue an element from the queue; without acquiring the lock.
|
||||
*/
|
||||
|
||||
QLINK_LIGHT *kDeQueLightNoLock(QUE_LIGHT queue);
|
||||
|
||||
/*
|
||||
* Dequeue the specified element.
|
||||
*/
|
||||
|
||||
QLINK_LIGHT *kDeQueLightByQueLink(QUE_LIGHT queue, QLINK_LIGHT *newNode);
|
||||
|
||||
/*
|
||||
* Dequeue the specified element without acquiring the lock.
|
||||
*/
|
||||
|
||||
QLINK_LIGHT
|
||||
*kDeQueLightByQueLinkNoLock(QUE_LIGHT queue, QLINK_LIGHT *new);
|
||||
|
||||
|
||||
/*
|
||||
* Attempt to dequue an element; if the queue is empty block.
|
||||
*/
|
||||
QLINK_LIGHT *kDeQueLightWait(QUE_LIGHT queue);
|
||||
|
||||
|
||||
/*
|
||||
* Attempt to dequue an element; if the queue is empty block. No locks
|
||||
* are acquired.
|
||||
*/
|
||||
|
||||
QLINK_LIGHT *kDeQueLightWaitNoLock(QUE_LIGHT queue);
|
||||
|
||||
/*
|
||||
* Dequeue all the elements in the queue.
|
||||
*/
|
||||
|
||||
QLINK_LIGHT *kDeQueLightAll(QUE_LIGHT queue);
|
||||
|
||||
/*
|
||||
* Dequeue all the elements in the queue without acquiring the lock.
|
||||
*/
|
||||
|
||||
QLINK_LIGHT *kDeQueLightAllNoLock(QUE_LIGHT queue);
|
||||
|
||||
/*
|
||||
* Get the first element of the queue without acquiring the lock. The element
|
||||
* is NOT dequeued.
|
||||
*/
|
||||
|
||||
QLINK_LIGHT *kFirstQueLinkLightNoLock(QUE_LIGHT queue);
|
||||
|
||||
/*
|
||||
* File I/O APIs from MPK.
|
||||
* The return value will be -1 to indicate a failure; we will
|
||||
* support a per-thread errno; where additional error value will
|
||||
* be stored.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END 2
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Error management functions:
|
||||
*/
|
||||
|
||||
void mpkSetErrno(int error);
|
||||
|
||||
int mpkGetErrno(void);
|
||||
|
||||
#define errno mpkGetErrno()
|
||||
|
||||
/*
|
||||
* Open the specified file.
|
||||
* Refer to the open manual page for details.
|
||||
*/
|
||||
|
||||
int mpkOpen(char *name, int flags, int mode);
|
||||
|
||||
/*
|
||||
* Close an open file.
|
||||
* Refer to the manual page for close(2) for details
|
||||
*/
|
||||
|
||||
int mpkClose(int fd);
|
||||
|
||||
/*
|
||||
* read a file.
|
||||
* Refer to the read(2) manual page for details.
|
||||
*/
|
||||
|
||||
ssize_t mpkRead(int fd, void *buf, size_t count);
|
||||
|
||||
/*
|
||||
* Write to an open file.
|
||||
* Refer to the write(2) manual page for details.
|
||||
*/
|
||||
|
||||
ssize_t mpkWrite(int fd, const void *buf, size_t count);
|
||||
|
||||
/*
|
||||
* seek into a file.
|
||||
* Refer to lseek(2) manual page for details.
|
||||
*/
|
||||
|
||||
off_t mpkSeek(int fd, off_t offset, int whence);
|
||||
@@ -39,19 +39,19 @@
|
||||
#define _NSS_MSG_H_
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
# include <public/zOmni.h>
|
||||
# include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _ZMSG_H_
|
||||
# include <public/zMsg.h>
|
||||
# include <zMsg.h>
|
||||
#endif
|
||||
|
||||
#ifndef _QUE_H_
|
||||
# include <library/que.h>
|
||||
# include <que.h>
|
||||
#endif
|
||||
|
||||
#ifndef _SLAB_H
|
||||
# include <include/slab.h>
|
||||
# include <slab.h>
|
||||
#endif
|
||||
|
||||
typedef void *(*objfunc_t)(); /* Function returns a pointer to an object */
|
||||
|
||||
@@ -45,19 +45,19 @@
|
||||
#define _MSGGEN_H_
|
||||
|
||||
#ifndef _ZOMNI_H_
|
||||
# include <public/zOmni.h>
|
||||
# include <zOmni.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XSTRING_H_
|
||||
# include <library/xString.h>
|
||||
# include <xString.h>
|
||||
#endif
|
||||
|
||||
#ifndef _LATCH_H_
|
||||
# include <include/latch.h>
|
||||
# include <latch.h>
|
||||
#endif
|
||||
|
||||
#ifndef _XERROR_H_
|
||||
# include <include/xError.h>
|
||||
# include <xError.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -220,7 +220,7 @@ typedef struct GeneralMsg_s
|
||||
* about Logical Volumes in a Pool.
|
||||
*/
|
||||
#define ALLOW_INACTIVE_VOLUME 0x0080 /* Set by purgeLog processing to
|
||||
* cause volume lookups to not
|
||||
* cause volume lookups to not
|
||||
* require the volume to be active
|
||||
*/
|
||||
#define UPDATE_EXISTING_BEAST 0x0200 /* When unpacking the beast, it is
|
||||
@@ -229,7 +229,7 @@ typedef struct GeneralMsg_s
|
||||
* used by XLSS.
|
||||
*/
|
||||
#define DO_NOT_CHECK_SPACE_QUOTA 0x0400 /* If set, do not check for user space
|
||||
* restriction and directory space
|
||||
* restriction and directory space
|
||||
* restriction
|
||||
*/
|
||||
#define ALLOW_BST_STATE_PURGING 0x0800 /* WARNING --- DO NOT USE THIS
|
||||
@@ -239,7 +239,7 @@ typedef struct GeneralMsg_s
|
||||
* to be looked up even if it's
|
||||
* state is BST_STATE_PURGING, but
|
||||
* only if it has a non-zero use
|
||||
* count.
|
||||
* count.
|
||||
*/
|
||||
|
||||
#define COMN_GENMSG_RESOLVE_CONNECTION(genMsg) \
|
||||
|
||||
@@ -45,19 +45,19 @@
|
||||
#define _MSGIO_H_
|
||||
|
||||
#ifndef _MSGGEN_H_
|
||||
# include <include/msgGen.h>
|
||||
# include <msgGen.h>
|
||||
#endif
|
||||
|
||||
#ifndef _LATCH_H_
|
||||
# include <include/latch.h>
|
||||
# include <latch.h>
|
||||
#endif
|
||||
|
||||
#ifndef _FSM_H_
|
||||
# include <include/fsm.h>
|
||||
# include <fsm.h>
|
||||
#endif
|
||||
|
||||
#ifndef _ZPARAMS_H_
|
||||
# include <public/zParams.h>
|
||||
# include <zParams.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -207,7 +207,7 @@ typedef struct IoMsg_s
|
||||
* ahead all requested blocks
|
||||
*/
|
||||
#define ALLOC_BLOCKS_CONTIGUOUS 0x04 /* If set, allocate the blocks
|
||||
* contiguously
|
||||
* contiguously
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -1,476 +0,0 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (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 interface into name spaces.
|
||||
|
|
||||
| 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 _NAME_H_
|
||||
#define _NAME_H_
|
||||
|
||||
#ifndef _COMNBEASTS_H_
|
||||
#include <include/comnBeasts.h>
|
||||
#endif
|
||||
|
||||
#ifndef _NAMESPACE_H_
|
||||
#include <include/nameSpace.h>
|
||||
#endif
|
||||
|
||||
#include <library/xUnicode.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Pre-define struct(s) so Linux compiler doesn't complain */
|
||||
struct FullDirectoryInfo_s;
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Defines
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/* preferably prime numbers since these numbers are used for hashing */
|
||||
#define MIN_NAME_CACHE_SIZE 17 /* The minimum number of entries that */
|
||||
/* can be set for the name cache. */
|
||||
#define DEFAULT_NAME_CACHE_SIZE 2111 /* The maximum number of entries that */
|
||||
/* can be set for the name cache. */
|
||||
#define DEFAULT_MAX_NAME_CACHE_SIZE 100000 /* Default maximum size of the name cache */
|
||||
#define MAX_NAME_CACHE_SIZE 1000000 /* The largest maximum size that can be set */
|
||||
/* for the name cache. */
|
||||
#define DEFAULT_CACHE_NAME_LEN 110 /* length of nameBuffer in default name cache entry */
|
||||
/* Long enough for one 36 character null terminated */
|
||||
/* unicode string and one 36 character unterminated */
|
||||
/* ASCII string */
|
||||
#define NAME_CACHE_OPTIMIZE_PERIOD 300 /* Interval between name cache optimizer executions */
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Structures
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/* when you add fields to this structure update the init area in nameCache.c */
|
||||
typedef struct NameCacheCtrl_s
|
||||
{
|
||||
QUAD changeCount; /* incremented each time an entry is added */
|
||||
QUAD uniGets; /* number of unicode cache gets */
|
||||
QUAD uniHits; /* number of unicode cache hits */
|
||||
QUAD uniPositiveHits; /* number of unicode cache hits for existing beasts */
|
||||
QUAD uniNegativeHits; /* number of unicode cache hits for non-existing beasts */
|
||||
QUAD asciiGets; /* number of ASCII cache gets */
|
||||
QUAD asciiHits; /* number of ASCII cache hits */
|
||||
QUAD asciiPositiveHits; /* number of ASCII cache hits for existing beasts */
|
||||
QUAD asciiNegativeHits; /* number of ASCII cache hits for non-existing beasts */
|
||||
QUAD numAllocs; /* number of times we allocated a packet */
|
||||
QUAD numNegativeAdds; /* number of adds of a negative entry */
|
||||
QUAD unusedEntryHit; /* number of times we got an entry from the unused list */
|
||||
QUAD numUnusedFrees; /* number of times we freed a packet from the unused list */
|
||||
QUAD numCountChanged; /* number of times the count had changed during add */
|
||||
QUAD numAlreadyAdded; /* number of times an entry was already added when we went to add */
|
||||
QUAD numVictimSelected; /* number of entries that have been victim selected */
|
||||
QUAD numRemoved; /* number of entries removed (not victom selected) */
|
||||
NINT maxEntries; /* max allowed entries in the cache */
|
||||
NINT maxSize; /* max value that maxEntries can grow to */
|
||||
NINT numEntries; /* number of entries in the cache */
|
||||
NINT numUnusedEntries; /* number of unused cache entries */
|
||||
NINT minValidSize; /* minimum value of maxEntries before an invalidate should occur */
|
||||
NINT maxValidSize; /* minimum value of maxEntries before an invalidate should occur */
|
||||
NINT lastInvalidateSize; /* value of maxEntries at last invalidate */
|
||||
Latch_s latch; /* latch to control changes in this structure */
|
||||
NINT numHashEntries; /* number of entries in each hash table */
|
||||
DQhead_t *uniHash; /* pointer to unicode hash array */
|
||||
DQhead_t *asciiHash; /* pointer to ASCII hash array */
|
||||
DQhead_t LRUqueue; /* head of the Least Recently Used queue */
|
||||
DQhead_t unusedQueue; /* head of the unused cache packets queue */
|
||||
FsmLite_s fsm; /* FSM for optimiser */
|
||||
OneShot_s nameOptAlarm; /* One shot event structure used to periodically trigger a re-size */
|
||||
LONG nameOptFlags; /* Flags to determine if Optimizer has been
|
||||
* scheduled, if unload is in progress
|
||||
*/
|
||||
#define NAME_OPT_FLAGS_SCHEDULED 0x00000001
|
||||
#define NAME_OPT_FLAGS_UNINIT 0x00000002
|
||||
} NameCacheCtrl_s;
|
||||
|
||||
typedef struct NameCacheNode_s
|
||||
{
|
||||
DQlink_t uniHashLink; /* unicode hash list link field (used by unusedQueue too) */
|
||||
DQlink_t asciiHashLink; /* ASCII hash list link field */
|
||||
DQlink_t LRUlink; /* LRU link field */
|
||||
Zid_t zid; /* zid for the entry (value to return)*/
|
||||
Zid_t parentZid; /* parent zid for the entry (key)*/
|
||||
VolumeID_t volGuid; /* guid for the volume (key)*/
|
||||
NINT nameSpaceID; /* name space mask for the entry (key)*/
|
||||
NINT nameType; /* name Type for the entry (key)*/
|
||||
unicode_t *uniName; /* Pointer to the unicode name */
|
||||
NINT asciiNameLen; /* length of the ASCII name */
|
||||
char *asciiName; /* Pointer to the ASCII Name */
|
||||
NINT nameBufferLen; /* length of the nameBuffer in Bytes */
|
||||
BYTE nameBuffer[1]; /* buffer which holds the names (keys)*/
|
||||
} NameCacheNode_s;
|
||||
|
||||
struct nameCacheOptimizerStats_s
|
||||
{
|
||||
NINT resizeCount; /* Number of times we've re-sized the name cache */
|
||||
NINT noResizeCount; /* Number of times we've executed the optimiser and not re-sized the cache */
|
||||
NINT optimizeCount; /* Number of times we've invalidated the name cache on re-size */
|
||||
NINT maxSize; /* Maximum size the name cache has been */
|
||||
NINT minSize; /* Minimum size the name cache has been */
|
||||
NINT maxChange; /* Largest change in size in the name cache */
|
||||
NINT minChange; /* Smallest change in size in the name cache */
|
||||
NINT maxInvalidateChange; /* Maximum change in size that caused an invalidate */
|
||||
NINT minInvalidateChange; /* Smallest change in size that caused an invalidate */
|
||||
NINT maxPctInvalidateChange; /* Largest percentage change in cache size */
|
||||
NINT maxReqdNodeDestroys; /* Maximum number of cache nodes that needed to be destroyed following a re-size */
|
||||
};
|
||||
extern struct nameCacheOptimizerStats_s NameCacheOptimizerStats;
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* Functions for manipulating names in beasts
|
||||
*---------------------------------------------------------------------------*/
|
||||
extern STATUS NAME_InsertAndMangleName(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *beast, /*beast to insert*/
|
||||
void *primaryBeast, /*primary, if beast is a hardlink */
|
||||
void *directory, /*directory to insert into*/
|
||||
NINT primaryNameSpaceID,
|
||||
NINT nameType,
|
||||
unicode_t *name,
|
||||
NINT flags,
|
||||
Xaction_s *xaction,
|
||||
// cnt NINT *retNameUniquifier,
|
||||
NINT *retBeastNamesAdded, /*Optional--NULL is allowed */
|
||||
NINT *retDirNamesAdded); /*Optional--Null is allowed */
|
||||
|
||||
#define INSNAMEFL_NULL_FLAG 0x00000000
|
||||
#define INSNAMEFL_NEW_PARENT_AUTH 0x00000001 /* If set, the names are for
|
||||
* a new parent so the authorization
|
||||
* info should be updated */
|
||||
#define INSNAMEFL_DIRECTORY_ONLY 0x00000002 /* If set, the names are only
|
||||
* added in directory, there'll be no
|
||||
* name operations on beast. This is
|
||||
* useful for some LSS (such as CD9660)
|
||||
* which only want to unpack file names
|
||||
* instead of create all file beasts
|
||||
*/
|
||||
extern STATUS NAME_WillAddToSalvage(
|
||||
struct NamedBeast_s *beast,
|
||||
struct NamedBeast_s *dir,
|
||||
NINT flags,
|
||||
struct ParentEntry_s *pentry);
|
||||
|
||||
extern STATUS NAME_RemoveAllNames(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *beast, /*beast to insert*/
|
||||
void *primaryBeast, /*primary beast if one exists */
|
||||
void *directory, /*directory to remove from*/
|
||||
NINT flags, /*flags passed to beast remove routine*/
|
||||
Xaction_s *xaction,
|
||||
NINT *retBeastNamesRemoved, /*Optional--NULL is allowed */
|
||||
NINT *retDirNamesRemoved, /*Optional--Null is allowed */
|
||||
ParentEntry_s *savedParentEntry); /*Optional--Null is allow, if non-null original parent entry is returned */
|
||||
|
||||
extern STATUS NAME_doAddName(
|
||||
GeneralMsg_s *genMsg,
|
||||
NamedBeast_s *beast,
|
||||
ParentEntry_s *pentry,
|
||||
NINT nameSpaceMask,
|
||||
unicode_t *name,
|
||||
NINT nsFlags);
|
||||
|
||||
#define REMNAMEFL_REMOVE_ALL_NAMES 0x00000000 /* default -- names will be
|
||||
* removed from the beast and the
|
||||
* parent directory, and the parent
|
||||
* entry is deleted. */
|
||||
#define REMNAMEFL_KEEP_BEAST_NAMES 0x00000001 /* if SET, keep the beast names
|
||||
* and only remove names from the
|
||||
* parent directory. */
|
||||
#define REMNAMEFL_KEEP_PARENT_ENTRY 0x00000002 /* if SET, keep the empty
|
||||
* parent entry in the beast because we
|
||||
* are renaming and we will shortly
|
||||
* re-insert names back into the
|
||||
* parrent*/
|
||||
#define REMNAMEFL_ATOMIC 0x00000004 /* If SET, the remove will
|
||||
* be atomic, either all of the name
|
||||
* entries will be removed, or none
|
||||
* of them will. */
|
||||
#define REMNAMEFL_REMOVE_PARENT_AUTH 0x00000008 /* If set, the names are for
|
||||
* a parent that is being removed, so
|
||||
* the authorization info should be
|
||||
* updated */
|
||||
#define REMNAMEFL_ADD_TO_SALVAGE 0x00000010 /* If set, the name will be
|
||||
* added to the salvage system if
|
||||
* it is appropriate to do so */
|
||||
#define REMNAMEFL_ERROR_BACKOUT 0x00000020 /* If set, the names are being
|
||||
* removed as part of an error backout
|
||||
* and it is OK if a name is not in
|
||||
* the directory. */
|
||||
|
||||
extern STATUS NAME_MoveDeletedNames(
|
||||
GeneralMsg_s *genMsg,
|
||||
void *voidBeast, /*beast whose names are to be moved*/
|
||||
void *voidSrcDir, /*directory to move from */
|
||||
void *voidTargetDir, /*directory to insert into*/
|
||||
/* cnt NINT srcNameUniquifier, uniquifier of srcNames to be moved */
|
||||
Xaction_s *xaction
|
||||
/* cnt NINT *retNameUniquifier*/);
|
||||
|
||||
extern BOOL NAME_HasThisParentZID(
|
||||
void *beast,
|
||||
Zid_t parentZid);
|
||||
|
||||
extern BOOL NAME_HasThisNameUniquifier(
|
||||
void *beast
|
||||
/* cnt NINT nameUniquifier*/);
|
||||
|
||||
extern STATUS NAME_GetParentZid(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *beast,
|
||||
/* cnt NINT nameUniquifier, */
|
||||
Zid_t *retParentZid,
|
||||
NINT *retNameType);
|
||||
|
||||
extern ParentEntry_s *NAME_GetParentEntry(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *beast
|
||||
/* cnt NINT nameUniquifier*/);
|
||||
|
||||
extern STATUS NAME_GetNameTypeInfo(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *beast,
|
||||
/* cnt NINT nameUniquifier, */
|
||||
TypeSpecificPersistentParentEntry_s **nameTypeInfo);
|
||||
|
||||
extern BOOL NAME_BeastHasNameInParent(
|
||||
void *beast,
|
||||
Zid_t parentZid,
|
||||
NINT nameSpaceID,
|
||||
NINT nameType,
|
||||
unicode_t *name);
|
||||
|
||||
extern BOOL NAME_AllNamesInSalvage(
|
||||
void *void_beast);
|
||||
|
||||
BOOL NAME_ThisIsLastUndeletedName(
|
||||
ParentEntry_s *pentry,
|
||||
NamedBeast_s *beast);
|
||||
|
||||
//extern BOOL NAME_BeastHasWildcardName(
|
||||
// void *void_beast,
|
||||
// NINT nameUniquifier,
|
||||
// NINT nameSpaceID,
|
||||
// NINT nameType,
|
||||
// unicode_t *wildcardPattern);
|
||||
|
||||
extern STATUS NAME_GetFirstNameFromBeast(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *voidBeast,
|
||||
NINT retNameSize, /* may be 0 */
|
||||
unicode_t *retName, /* may be NULL */
|
||||
NINT *retNameSpaceID, /* may be NULL */
|
||||
NINT *retNameType, /* may be NULL */
|
||||
NINT *retNameLen); /* may be NULL */
|
||||
|
||||
extern STATUS NAME_RenameBeast(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *srcBeast,
|
||||
void *primaryBeast,
|
||||
void *srcDir,
|
||||
void *targetDir,
|
||||
unicode_t *srcName,
|
||||
unicode_t *newName,
|
||||
struct NameSpace_s *nameSpace,
|
||||
NINT srcNameType,
|
||||
NINT newNameType,
|
||||
struct RenameMsg_s *renMsg,
|
||||
Xaction_s *xaction); /* May be NULL -- In fact is usually NULL */
|
||||
|
||||
extern void *NAME_FindNameInAsciiNameCache(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct File_s *directory,
|
||||
struct NameSpace_s *nameSpace,
|
||||
NINT nameType,
|
||||
NINT asciiNameLen,
|
||||
char *asciiName,
|
||||
NINT latchType,
|
||||
BOOL dontDoVisibilityCheck
|
||||
/* cnt NINT *retNameUniquifier*/);
|
||||
|
||||
extern Zid_t NAME_FindZidForNameInDir(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *directory,
|
||||
struct NameSpace_s *nameSpace,
|
||||
NINT nameType,
|
||||
unicode_t *name,
|
||||
NINT asciiNameLen, /* May be 0. If non-zero, will add ASCII name to name Cache */
|
||||
char *asciiName, /* May be NULL if asciiNameLen is 0 */
|
||||
BOOL negativeNameCacheFlag
|
||||
/* cnt NINT *retNameUniquifier*/);
|
||||
|
||||
|
||||
extern void *NAME_FindNameInDir(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
void *directory,
|
||||
struct NameSpace_s *nameSpace,
|
||||
NINT nameType,
|
||||
unicode_t *name,
|
||||
NINT asciiNameLen, /* May be 0. If non-zero, will add ASCII name to name Cache */
|
||||
char *asciiName, /* May be NULL if asciiNameLen is 0 */
|
||||
NINT latchType,
|
||||
BOOL negativeNameCacheFlag,
|
||||
BOOL dontDoVisibilityCheck
|
||||
/* cnt NINT *retNameUniquifier*/);
|
||||
|
||||
extern void *NAME_FindNameInDirSpecialRules(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct NamingMsg_s *nameMsg,
|
||||
struct NameSpace_s **dosNameSpace,
|
||||
BOOL negativeNameCacheFlag,
|
||||
BOOL dontDoVisibilityCheck
|
||||
/* cnt NINT *retNameUniquifier*/);
|
||||
|
||||
extern STATUS NAME_RemoveBeastlessNameFromDir(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
Zid_t badzid,
|
||||
void *directory,
|
||||
struct NameSpace_s *nameSpace,
|
||||
NINT nameType,
|
||||
struct FullDirectoryInfo_s *nameInfo);
|
||||
|
||||
extern void NAME_RemoveStrandedParentEntry(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct NamedBeast_s *beast,
|
||||
struct ParentEntry_s *pentry,
|
||||
struct Xaction_s *xaction);
|
||||
|
||||
extern STATUS NAME_CacheInit();
|
||||
|
||||
extern void NAME_CacheUninit();
|
||||
|
||||
extern void NAME_AddNameToCache(
|
||||
QUAD count,
|
||||
Volume_s *volume,
|
||||
Zid_t parentZid,
|
||||
struct NameSpace_s *nameSpace,
|
||||
NINT nameType,
|
||||
unicode_t *uniName,
|
||||
NINT asciiNameLen, /* May be 0 */
|
||||
char *asciiName, /* May be NULL if asciiNameLen is 0 */
|
||||
Zid_t zid
|
||||
/* cnt NINT nameUniquifier*/);
|
||||
|
||||
extern Zid_t NAME_GetNameFromCacheUnicode(
|
||||
VolumeID_t *volume,
|
||||
Zid_t parentZid,
|
||||
struct NameSpace_s *nameSpace,
|
||||
NINT nameType,
|
||||
unicode_t *uniName,
|
||||
BOOL *negativeEntryFlag,
|
||||
QUAD *count
|
||||
/* cnt NINT *retNameUniquifier*/ );
|
||||
|
||||
extern Zid_t NAME_GetNameFromCacheAscii(
|
||||
VolumeID_t *volume,
|
||||
Zid_t parentZid,
|
||||
struct NameSpace_s *nameSpace,
|
||||
NINT nameType,
|
||||
NINT asciiNameLen,
|
||||
char *asciiName,
|
||||
BOOL *negativeEntryFlag,
|
||||
QUAD *count
|
||||
/* cnt NINT *retNameUniquifier*/);
|
||||
|
||||
|
||||
extern STATUS NAME_RemoveNameFromCache(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
Volume_s *volume,
|
||||
Zid_t parentZid,
|
||||
NINT nameSpaceMask,
|
||||
NINT nameType,
|
||||
unicode_t *uniName,
|
||||
NINT nsFlag);
|
||||
|
||||
extern BOOL NAME_MatchAttributes(
|
||||
NINT beastAttributes,
|
||||
struct zMatchAttr_s *matchAttr);
|
||||
|
||||
extern STATUS NAME_HardLinkSetMatchAttributesInDirectory(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct File_s *curFile,
|
||||
struct File_s *curDir,
|
||||
NINT newFileAttributes,
|
||||
NINT oldFileAttributes,
|
||||
struct Xaction_s *xaction);
|
||||
|
||||
extern STATUS NAME_SetMatchAttributesInDirectory(
|
||||
struct GeneralMsg_s *genMsg,
|
||||
struct File_s *curFile,
|
||||
struct File_s *curDir,
|
||||
/* cnt NINT fileNameUniquifier, */
|
||||
NINT newFileAttributes,
|
||||
NINT oldFileAttributes,
|
||||
struct Xaction_s *xaction);
|
||||
|
||||
|
||||
extern void NAME_InvalidateCacheEntriesForVolume(
|
||||
VolumeID_t *volume);
|
||||
|
||||
extern void NAME_InvalidateCacheEntriesForDirectory(
|
||||
VolumeID_t *volume,
|
||||
Zid_t directoryZid);
|
||||
|
||||
extern void NAME_Reoptimize(
|
||||
void);
|
||||
|
||||
extern void NAME_ReoptimizeStarter(
|
||||
void);
|
||||
|
||||
extern NameCacheCtrl_s NameCache;
|
||||
|
||||
#if NSS_DEBUG IS_ENABLED
|
||||
extern CONST unicode_t *NAME_GetFirstNameForDebug(void *voidBeast);
|
||||
extern void ZAS_DisplayNameCache(void);
|
||||
#endif
|
||||
|
||||
extern BOOL NameCacheEnabled;
|
||||
extern BOOL AsciiNameCacheEnabled;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -42,14 +42,14 @@
|
||||
+-------------------------------------------------------------------------*/
|
||||
#ifndef _NAMESPACE_H_
|
||||
#define _NAMESPACE_H_
|
||||
#include <library/xUnicode.h>
|
||||
#include <xUnicode.h>
|
||||
|
||||
#ifndef _COMNPARAMS_H_
|
||||
# include <include/comnParams.h>
|
||||
# include <comnParams.h>
|
||||
#endif
|
||||
|
||||
#ifndef _COMNBEASTS_H_
|
||||
# include <include/comnBeasts.h>
|
||||
# include <comnBeasts.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -81,7 +81,7 @@ struct NameSpace_s
|
||||
{
|
||||
AdminVolFile_s avfile; /* derived from*/
|
||||
NINT nSpaceID; /* name space ID*/
|
||||
unicode_t *name; /* pointer to name of namespace*/
|
||||
unicode_t *name; /* pointer to name of namespace*/
|
||||
NINT flags; /* name space flags, defined below */
|
||||
NameSpaceOps_s *nSpaceOps; /* Pointer to Name Space Specific Ops */
|
||||
};
|
||||
@@ -106,7 +106,7 @@ struct NameSpace_s
|
||||
* This structure is used to track the parsing status of a path string. The
|
||||
* original source path string can be NULL-terminated ASCII, ASCII with a
|
||||
* length or NULL-terminated unicode.
|
||||
*
|
||||
*
|
||||
* This structure is used to track the parsing of the path, one component
|
||||
* at a time. Each component may be optionally returned in ASCII with length
|
||||
* or NULL-terminate unicode. The content of the component determines which
|
||||
@@ -116,11 +116,11 @@ struct NameSpace_s
|
||||
* bypass the translation to unicode and skip the full unicode validation if
|
||||
* the partially validated ASCII component string exists in the ASCII name
|
||||
* cache.
|
||||
*
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
typedef struct ScanComponentMsg_s
|
||||
{
|
||||
NINT scanFlags; /* These flags maintain state information
|
||||
NINT scanFlags; /* These flags maintain state information
|
||||
* across the entire path parsing process. */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
@@ -129,7 +129,7 @@ typedef struct ScanComponentMsg_s
|
||||
* not set.
|
||||
*-----------------------------------------------------------------------*/
|
||||
char *asciiSrcPath; /* Input ASCII Source path */
|
||||
NINT asciiSrcLength; /* Length of asciiSrcPath. This should be -1
|
||||
NINT asciiSrcLength; /* Length of asciiSrcPath. This should be -1
|
||||
* if asciiSrcPath NULL Terminated */
|
||||
NINT uniConversionType; /* if == NSS_UNI_CONVERSION_NSPACE_DEFAULT then
|
||||
* use the nameSpace default ascii to unicode
|
||||
@@ -156,7 +156,7 @@ typedef struct ScanComponentMsg_s
|
||||
unicode_t *uniSrcPath; /* Input unicode source path buffer. This could
|
||||
* point to a buffer originally passed in as
|
||||
* unicode, or it could point to a unicode
|
||||
* component which has been translated from
|
||||
* component which has been translated from
|
||||
* ASCII */
|
||||
unicode_t *uniWorkBuffer2; /* Must point to a work buffer which can be used
|
||||
* to store the final scanned uincode component.
|
||||
@@ -189,7 +189,7 @@ typedef struct ScanComponentMsg_s
|
||||
* next component is scanned. The common layer
|
||||
* resets them each time it calls the name
|
||||
* space to scan the next component */
|
||||
unicode_t *retUniSrcPath; /* This is filled in with a ptr to any
|
||||
unicode_t *retUniSrcPath; /* This is filled in with a ptr to any
|
||||
* remaining unicode unscanned path data. It is
|
||||
* set to a NULL if no more unicode path data
|
||||
* is left to be scanned. */
|
||||
@@ -214,7 +214,7 @@ typedef struct ScanComponentMsg_s
|
||||
#define NSSFL_asciiBreakNotSpecial 0x00000008
|
||||
#define NSSFL_insertAsciiBreaks 0x00000010
|
||||
#define NSSFL_parsingFirstComponent 0x00000020
|
||||
#define NSSFL_volumeNameOverrideAllowed 0x00000040
|
||||
#define NSSFL_volumeNameOverrideAllowed 0x00000040
|
||||
#define NSSFL_noPathSeparatorsAllowed 0x00000080
|
||||
#define NSSFL_moreComponentsFollow 0x00000100
|
||||
#define NSSFL_forceConvertToUnicode 0x00000200
|
||||
@@ -252,11 +252,11 @@ typedef struct ScanComponentMsg_s
|
||||
(_scanMsg)->asciiValidCharBitMap = (_bitMap), \
|
||||
(_scanMsg)->asciiWorkBuffer = (char *)(_workBuf), \
|
||||
(_scanMsg)->uniWorkBuffer1 = \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME), \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME), \
|
||||
(_scanMsg)->uniSrcPath = NULL, \
|
||||
(_scanMsg)->uniWorkBuffer2 = \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME + \
|
||||
(zMAX_COMPONENT_NAME * sizeof(unicode_t))))
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME + \
|
||||
(zMAX_COMPONENT_NAME * sizeof(unicode_t))))
|
||||
|
||||
/* This macro is used to setup a scanMsg for scanning a unicode string */
|
||||
#define NSPACE_SETUP_UNICODE_SCAN_MSG(_scanMsg,_sFlags,_srcPath,_workBuf) \
|
||||
@@ -266,10 +266,10 @@ typedef struct ScanComponentMsg_s
|
||||
(_scanMsg)->uniSrcPath = (_srcPath), \
|
||||
(_scanMsg)->asciiWorkBuffer = (char *)(_workBuf), \
|
||||
(_scanMsg)->uniWorkBuffer1 = \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME), \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME), \
|
||||
(_scanMsg)->uniWorkBuffer2 = \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME + \
|
||||
(zMAX_COMPONENT_NAME * sizeof(unicode_t))))
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME + \
|
||||
(zMAX_COMPONENT_NAME * sizeof(unicode_t))))
|
||||
|
||||
/* This macro is used to setup a scanMsg for scanning a UTF8 string */
|
||||
#define NSPACE_SETUP_UTF8_SCAN_MSG(_scanMsg,_sFlags,_srcPath,_srcLen,_workBuf) \
|
||||
@@ -280,11 +280,11 @@ typedef struct ScanComponentMsg_s
|
||||
(_scanMsg)->asciiValidCharBitMap = NULL, \
|
||||
(_scanMsg)->asciiWorkBuffer = (char *)(_workBuf), \
|
||||
(_scanMsg)->uniWorkBuffer1 = \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME), \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME), \
|
||||
(_scanMsg)->uniSrcPath = NULL, \
|
||||
(_scanMsg)->uniWorkBuffer2 = \
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME + \
|
||||
(zMAX_COMPONENT_NAME * sizeof(unicode_t))))
|
||||
(unicode_t *)((_workBuf) + zMAX_COMPONENT_NAME + \
|
||||
(zMAX_COMPONENT_NAME * sizeof(unicode_t))))
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of Name Space Ops code.
|
||||
|
||||
78
include/nwnss/include/napi.h
Normal file
78
include/nwnss/include/napi.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2003 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| Novell Storage Services module
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
|
|
||||
| $Author: taysom $
|
||||
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
||||
|
|
||||
| $RCSfile$
|
||||
| $Revision: 465 $
|
||||
|
|
||||
|---------------------------------------------------------------------------
|
||||
| This module is used to:
|
||||
| Defines/structures and prototypes that users of nssLnxLib need.
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#include "omni.h"
|
||||
|
||||
// Unit tests
|
||||
#define FDAT_UNIT_TEST
|
||||
|
||||
void FormatDateAndTime(
|
||||
BYTE *buffer, /* Buffer for results */
|
||||
LONG year, /* Year */
|
||||
LONG month, /* Month */
|
||||
LONG day, /* Day */
|
||||
LONG hour, /* Hour */
|
||||
LONG minute, /* Minute */
|
||||
LONG second, /* Second */
|
||||
LONG flags); /* Format flags */
|
||||
|
||||
/*
|
||||
Flags passed to date and time formatting routines
|
||||
*/
|
||||
#define EN_INCLUDE_SECONDS 0x01 /* Include seconds in time */
|
||||
#define EN_INCLUDE_WEEKDAY 0x02 /* Include the day of the week in date */
|
||||
#define EN_USE_ALPHA_MONTH 0x04 /* Use month name, not number */
|
||||
#define EN_USE_4_DIGIT_YEAR 0x08 /* Print four digit year */
|
||||
#define EN_USE_ABBREV_MONTH 0x10 /* Use month abbreviation, not number */
|
||||
|
||||
/*
|
||||
Buffer lengths required for formatting dates and times. The numeric
|
||||
format lengths are known, but those with text for the day of the week
|
||||
and the month are padded, since we don't know how long they may be
|
||||
after translation
|
||||
*/
|
||||
#define EN_TIME_LEN 11 /* HH:MM:SSam */
|
||||
#define EN_DATE_LEN 11 /* MM/DD/YYYY */
|
||||
#define EN_DATE_TIME_LEN 23 /* MM/DD/YYYY HH:MM:SSam */
|
||||
#define EN_TEXT_DATE_LEN 80 /* Wednesday September 31, 1990 HH:MM:SSam*/
|
||||
|
||||
|
||||
|
||||
#ifdef FDAT_UNIT_TEST
|
||||
int FDAT_UnitTest();
|
||||
#endif
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/****************************************************************************
|
||||
| NSS userspace NDP application context compatibility.
|
||||
|
|
||||
| The original NDP shared sources include <include/ndp_app.h> on the application side,
|
||||
| but the delivered source snapshot only carries the equivalent ndpmod context
|
||||
| layout. Keep this header limited to the context fields used by the shared
|
||||
| NDP sources so the Novell shared *.c.h files can be wrapped unchanged.
|
||||
+-------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef NDP_APP_H
|
||||
#define NDP_APP_H
|
||||
|
||||
#include <include/ndp_comn.h>
|
||||
|
||||
typedef struct ndpAppOptions_t {
|
||||
/* Use the shared ndp_debug global instead of per-context debug state. */
|
||||
int unused;
|
||||
} ndpAppOptions_t;
|
||||
|
||||
typedef struct ndpContext_t {
|
||||
char *appName;
|
||||
GUID_t appGuid;
|
||||
GUID_t appGuidPrime;
|
||||
ndpAppOptions_t options;
|
||||
ndp_guidmsgcontext_t *ndpMsgQueueContext;
|
||||
ndp_guidlistcontext_t *guidListContext;
|
||||
} ndpContext_t;
|
||||
|
||||
#endif /* NDP_APP_H */
|
||||
@@ -161,13 +161,13 @@
|
||||
#endif /* ((defined(__KERNEL__) && defined(NO_MOD_LOCKING)) \
|
||||
|| (! defined(__KERNEL__) && defined(NO_APP_LOCKING))) */
|
||||
|
||||
#include <library/omni.h> /* for "GUID_t" --- DO NOT USE zOmni.h !!! */
|
||||
#include <omni.h> /* for "GUID_t" --- DO NOT USE zOmni.h !!! */
|
||||
|
||||
#undef QUE_MACRO
|
||||
#define QUE_MACRO ENABLE
|
||||
#undef QUE_CHECK
|
||||
#define QUE_CHECK DISABLE
|
||||
#include <library/que.h> /* for queue NSS definitions/macros */
|
||||
#include <que.h> /* for queue NSS definitions/macros */
|
||||
|
||||
/******************************************************************************
|
||||
*******************************************************************************
|
||||
@@ -723,3 +723,4 @@ void ndp_deregisterGuid(
|
||||
GUID_t *guidPrime);
|
||||
|
||||
#endif /* NDP_COMN_H */
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
BYTE node[6];
|
||||
};
|
||||
#else
|
||||
# include <library/omni.h> /* for "GUID_t" --- DO NOT USE zOmni.h !!! */
|
||||
# include <omni.h> /* for "GUID_t" --- DO NOT USE zOmni.h !!! */
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
@@ -67,3 +67,4 @@ extern GUID_t ndpAppGuid;
|
||||
extern GUID_t ndpModGuid;
|
||||
|
||||
#endif /* NDP_GUIDS_H */
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
# include <mpk.h>
|
||||
#endif
|
||||
|
||||
// Not in Here // #include <include/ndp_guids.h>
|
||||
// Not in Here // #include <ndp_guids.h>
|
||||
|
||||
/*****************************************************************************
|
||||
* Unless otherwise stated, DNs are in:
|
||||
@@ -58,7 +58,7 @@
|
||||
* The NDP ID Broker Message Handling Routine
|
||||
* These routines run in their own threads...
|
||||
******************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
void *ndp_idBroker_messagehandler(
|
||||
THREAD thread,
|
||||
void *_threadContext);
|
||||
@@ -106,7 +106,7 @@ int ndp_cleanup_idBroker(void);
|
||||
/*****************************************************************************
|
||||
* uid To FDN
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_namGetUserFDNfromUID(
|
||||
int uid,
|
||||
unicode_t **userFDN);
|
||||
@@ -120,7 +120,7 @@ int ndp_namGetUserFDNfromUID_handler(
|
||||
/*****************************************************************************
|
||||
* DN To GUID - with create flag
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPMapDNToGUID(
|
||||
int create,
|
||||
unicode_t *dn,
|
||||
@@ -135,7 +135,7 @@ int ndp_NCPMapDNToGUID_handler(
|
||||
/*****************************************************************************
|
||||
* Return Tree Name (unicode)
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPLocalTreeName(
|
||||
size_t treeNameSize,
|
||||
unicode_t *treeName);
|
||||
@@ -154,7 +154,7 @@ int ndp_NCPLocalTreeName_handler(
|
||||
* ERR_INSUFFICIENT_BUFFER. guidSevCount will be the count of guids which
|
||||
* exist.
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPMapDNToSEV(
|
||||
unicode_t *dn,
|
||||
size_t *guidSEVCount,
|
||||
@@ -170,7 +170,7 @@ int ndp_NCPMapDNToSEV_handler(
|
||||
/*****************************************************************************
|
||||
* GUID To Management Level
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPMapGUIDToMgtLevel(
|
||||
size_t guidCount,
|
||||
GUID_t *guids,
|
||||
@@ -186,7 +186,7 @@ int ndp_NCPMapGUIDToMgtLevel_handler(
|
||||
/*****************************************************************************
|
||||
* Map GUID To DN
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPMapGUIDToDN(
|
||||
GUID_t *guid,
|
||||
size_t dnSize,
|
||||
@@ -201,7 +201,7 @@ int ndp_NCPMapGUIDToDN_handler(
|
||||
/*****************************************************************************
|
||||
* GUID To UID
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPMapGUIDToUID(
|
||||
GUID_t *guid,
|
||||
LONG *uid);
|
||||
@@ -215,7 +215,7 @@ int ndp_NCPMapGUIDToUID_handler(
|
||||
/*****************************************************************************
|
||||
* UID To GUID
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPMapUIDToGUID(
|
||||
LONG uid,
|
||||
GUID_t *guid);
|
||||
@@ -229,7 +229,7 @@ int ndp_NCPMapUIDToGUID_handler(
|
||||
/*****************************************************************************
|
||||
* Get UID From Name
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_GetUIDFromName(
|
||||
unsigned char *name,
|
||||
LONG *uid);
|
||||
@@ -243,7 +243,7 @@ int ndp_GetUIDFromName_handler(
|
||||
/*****************************************************************************
|
||||
* Generate Volume Key Info for an encrypted volume
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_GenerateVolumeKeyInfo(
|
||||
unicode_t *volumePassword, /* volume password for the new volume */
|
||||
BYTE *retKey, /* ptr to 16 byte buffer to receive the new key */
|
||||
@@ -258,7 +258,7 @@ int ndp_GenerateVolumeKeyInfo_handler(
|
||||
/*****************************************************************************
|
||||
* Extract Volume Key Info for an encrypted volume
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_ExtractVolumeKeyInfo(
|
||||
unicode_t *volumePassword, /* volume password for the new volume */
|
||||
BYTE *volP, /* ptr to 128 byte persistent portion of VolumeKey_s */
|
||||
@@ -278,7 +278,7 @@ int ndp_ExtractVolumeKeyInfo_handler(
|
||||
* if already registered (-2)
|
||||
* if invalid function pointer (-1)
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_register_NCPNotifyDNChange(
|
||||
void (*NCPNotifyDNChange)(unicode_t *oldDN, unicode_t *newDN) );
|
||||
#endif
|
||||
@@ -287,7 +287,7 @@ int ndp_register_NCPNotifyDNChange(
|
||||
* Notification If DN Has Been Renamed Or Deleted
|
||||
* If newDN is 0, the object has been deleted
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPNotifyDNChange_handler(
|
||||
GUID_t *srcGuid,
|
||||
LONG length,
|
||||
@@ -305,7 +305,7 @@ int ndp_NCPNotifyDNChange_handler(
|
||||
* if already registered (-2)
|
||||
* if invalid function pointer (-1)
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_register_NCPNotifySEVChange(
|
||||
void (*NCPNotifySEVChange)(GUID_t *guid) );
|
||||
#endif
|
||||
@@ -313,7 +313,7 @@ int ndp_register_NCPNotifySEVChange(
|
||||
/*****************************************************************************
|
||||
* Notification If SEV (Security Equivalence Vector) Has Been Changed
|
||||
*****************************************************************************/
|
||||
#if defined(__KERNEL__) || defined(NSS_USERSPACE)
|
||||
#ifdef __KERNEL__
|
||||
int ndp_NCPNotifySEVChange_handler(
|
||||
GUID_t *srcGuid,
|
||||
LONG length,
|
||||
@@ -324,3 +324,4 @@ int ndp_NCPNotifySEVChange_handler(
|
||||
*/
|
||||
|
||||
#endif /* NDP_IDBROKER_H */
|
||||
|
||||
|
||||
@@ -40,16 +40,16 @@
|
||||
|
||||
|
||||
#ifdef __KERNEL__
|
||||
# include <include/ndp_comn.h>
|
||||
# include <ndp_comn.h>
|
||||
# include <ndp_mod.h>
|
||||
#else
|
||||
/* NOTE: ndp_comn.h needs included before anything else in application land */
|
||||
# include <include/ndp_comn.h>
|
||||
# include <include/ndp_app.h>
|
||||
# include <include/ndp_msg.h>
|
||||
# include <ndp_comn.h>
|
||||
# include <ndp_app.h>
|
||||
# include <ndp_msg.h>
|
||||
#endif
|
||||
|
||||
#include <include/ndp_guids.h>
|
||||
#include <ndp_guids.h>
|
||||
|
||||
/******************************************************************************
|
||||
*******************************************************************************
|
||||
@@ -69,3 +69,4 @@ void ndp_messagehandler(
|
||||
unsigned char *data);
|
||||
|
||||
#endif /* NDP_MESSAGEHANDLER_H */
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
#ifndef NDP_MSG_H
|
||||
#define NDP_MSG_H
|
||||
|
||||
#include <public/zOmni.h>
|
||||
// Not in Here // #include <include/ndp_guids.h>
|
||||
#include <zOmni.h>
|
||||
// Not in Here // #include <ndp_guids.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
@@ -216,3 +216,4 @@ int ndpmsgop_NCPNotifySEVChange(
|
||||
GUID_t *guid);
|
||||
|
||||
#endif /* NDP_MSG_H */
|
||||
|
||||
|
||||
359
include/nwnss/include/nebprivate.h
Normal file
359
include/nwnss/include/nebprivate.h
Normal file
@@ -0,0 +1,359 @@
|
||||
/****************************************************************************
|
||||
|
|
||||
| (C) Copyright 2001 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
|
||||
|
|
||||
|***************************************************************************
|
||||
|
|
||||
| File Name: nkeventpri.h
|
||||
| Created by: Clyde Griffin
|
||||
| Date created: 11/1/1998
|
||||
|
|
||||
| %version: 6 %
|
||||
| %derived_by: cgriffin %
|
||||
| %date_modified: Fri Oct 19 17:54:39 2001 %
|
||||
|
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __NKEVENTPRI_H__
|
||||
#define __NKEVENTPRI_H__
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
/***************************************************************************/
|
||||
/****************************** include files ******************************/
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/*************************** macro definitions *****************************/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifndef NEB_STATUS
|
||||
#define NEB_STATUS int
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
typedef unsigned int *uintptr_t;
|
||||
#endif
|
||||
|
||||
|
||||
#define NEB_EVENT_VERSION1 1
|
||||
#define NEB_PRODUCER_VERSION1 1
|
||||
#define NEB_CONSUMER_VERSION1 1
|
||||
#define NEB_FILTER_VERSION1 1
|
||||
|
||||
#define EVENT_BLOCK_STAMP 0x4B4C4245 /* 'KLBE' */
|
||||
|
||||
#define EVENT_BLOCK_SIGNATURE 0x42545645 /* 'BTVE' */
|
||||
|
||||
#define MAX_EVENT_USER_NAME_LENGTH 80 /* Includes NULL terminator */
|
||||
|
||||
#define MAX_FILTER_NAME_LENGTH 80 /* Includes NULL terminator */
|
||||
|
||||
#define MAX_EVENT_NAME_LENGTH 256 /* Included NULL terminator */
|
||||
|
||||
/* Event flags */
|
||||
#define MAY_NOT_SLEEP_BIT 0x00000001
|
||||
#define SORT_LOW_TO_HIGH_BIT 0x00000002
|
||||
#define CONSUMABLE_BIT 0x00000004
|
||||
#define NO_SA_BIT 0x00000008
|
||||
#define NO_AUDITOR_BIT 0x00000010
|
||||
#define NO_CHECK_BIT 0x00000020
|
||||
/* Data is NESL encapsulated data */
|
||||
#define NESL_DATA_BIT 0x00000040
|
||||
/* NESL shim's way of telling neb how to resolve bit definitions */
|
||||
/* with regular NEB components. */
|
||||
#define NESL_SHIM_BIT 0x00000080
|
||||
#define EF_UNDEFINED_MASK !(MAY_NOT_SLEEP_BIT | SORT_LOW_TO_HIGH_BIT | \
|
||||
CONSUMABLE_BIT | NO_SA_BIT | NO_AUDITOR_BIT | NO_CHECK_BIT | \
|
||||
NESL_DATA_BIT | NESL_SHIM_BIT)
|
||||
#define DATA_FILTERED_BIT 0x80000000
|
||||
|
||||
/* ProducerFlags */
|
||||
#define UNIQUE_PRODUCER_BIT 0x00000001
|
||||
|
||||
/* ConsumerFlags */
|
||||
#define CONSUMABLE_CONSUMER_BIT 0x00000001
|
||||
#define ACCESS_CONTROL_CHECK_BIT 0x00000002
|
||||
|
||||
/* Shared (Producer/Consumer)Flags */
|
||||
#define EVENT_CLASS_BIT 0x40000000
|
||||
#define SMP_ENABLED_BIT 0x80000000
|
||||
|
||||
/* User types */
|
||||
#define PRODUCER 0
|
||||
#define SECURITY_AUTHORITY_CONSUMER 1
|
||||
#define AUDITOR_CONSUMER 2
|
||||
#define CHECK_CONSUMER 3
|
||||
#define SYNCHRONOUS_CONSUMER 4
|
||||
#define ASYNCHRONOUS_CONSUMER 5
|
||||
#define DEBUG_CONSUMER 6
|
||||
#define RESERVED 7
|
||||
|
||||
/* Consumer Notify type codes */
|
||||
#define NOTIFY_AUDITOR 0
|
||||
|
||||
#define VALIDATE_PRODUCER_REGISTRATION 1
|
||||
#define VALIDATE_CHECK_CONSUMER_REGISTRATION 2
|
||||
#define VALIDATE_SYNC_CONSUMER_REGISTRATION 3
|
||||
#define VALIDATE_ASYNC_CONSUMER_REGISTRATION 4
|
||||
|
||||
#define NOTIFY_SECURITY_AUTHORITY 5
|
||||
#define VERIFY_CHECK_CONSUMER 6
|
||||
#define VERIFY_SYNC_CONSUMER 7
|
||||
#define VERIFY_ASYNC_CONSUMER 8
|
||||
|
||||
#define NOTIFY_CHECK_CONSUMER 9
|
||||
#define NOTIFY_SYNCHRONOUS_CONSUMER 10
|
||||
#define NOTIFY_ASYNCHRONOUS_CONSUMER 11
|
||||
#define NOTIFY_DEBUGGER 12
|
||||
|
||||
#define NOTIFY_PRODUCER_UNREGISTRATION 13
|
||||
#define NOTIFY_CHECK_CONSUMER_UNREGISTRATION 14
|
||||
#define NOTIFY_SYNC_CONSUMER_UNREGISTRATION 15
|
||||
#define NOTIFY_ASYNC_CONSUMER_UNREGISTRATION 16
|
||||
|
||||
#define NOTIFY_REGISTRATION_FAILED 17
|
||||
|
||||
#define NOTIFY_PROD_OF_CONS_REG 18
|
||||
#define NOTIFY_PROD_OF_CONS_UNREG 19
|
||||
|
||||
#define NOTIFY_CONS_OF_PROD_REG 20
|
||||
#define NOTIFY_CONS_OF_PROD_UNREG 21
|
||||
|
||||
#define ADD_CONS_TO_FILTER 22
|
||||
#define REMOVE_CONS_FROM_FILTER 23
|
||||
#define VALIDATE_FILTER 24
|
||||
#define NOTIFY_FILTER 25
|
||||
|
||||
#define SIDE_BAND_MESSAGE 26
|
||||
|
||||
#define NOTIFY_CHECK_OPERATION_DENIED 27
|
||||
|
||||
/* Consumer ESR ccodes */
|
||||
/* Security Authority, Auditor, and Check Consumers ESR ccodes bits */
|
||||
#define ACCESS_APPROVED 0x00000000
|
||||
#define ACCESS_DENIED 0x00000001
|
||||
#define AUDITOR_APPROVED 0x00000000
|
||||
#define AUDITOR_DENIED 0x00000002
|
||||
#define CCODE_RESERVED 0x7F0000FC
|
||||
#define USER_DEFINABLE 0x00FFFF00
|
||||
#define FUNCTION_NOT_SUPPORTED 0x80000000
|
||||
|
||||
/* Synchronous consumer ESR ccodes */
|
||||
#define EVENT_NOT_CONSUMED 0x00000000
|
||||
#define EVENT_CONSUMED 0x00000001
|
||||
#define FUNCTION_NOT_SUPPORTED 0x80000000
|
||||
|
||||
/* Produce Event ccodes */
|
||||
#define SUCCESS 0
|
||||
#define INVALID_PARAMETER -1
|
||||
#define EVENT_DENIED -2
|
||||
#define OPERATION_DENIED -3
|
||||
|
||||
/* Send Event ccodes */
|
||||
#define SUCCESS 0
|
||||
#define INVALID_PARAMETER -1
|
||||
#define SIDEBAND_NOT_SUPPORTED -2
|
||||
|
||||
/* RegisterProducer ccodes */
|
||||
#define SUCCESS 0
|
||||
#define INVALID_PARAMETER -1
|
||||
#define OUT_OF_RESOURCES -2
|
||||
#define EVENT_CONFLICT -3
|
||||
#define REGISTRATION_DENIED -4
|
||||
#define PRODUCER_NOT_UNIQUE -5
|
||||
|
||||
/* RegisterConsumer ccodes */
|
||||
#define SUCCESS 0
|
||||
#define INVALID_PARAMETER -1
|
||||
#define OUT_OF_RESOURCES -2
|
||||
#define EVENT_CONFLICT -3
|
||||
#define REGISTRATION_DENIED -4
|
||||
#define CONSUMER_ALREADY_REGISTERED -5
|
||||
#define INVALID_CONSUMER_TYPE -6
|
||||
#define INVALID_FILTER -7
|
||||
|
||||
/* RegisterFilter ccodes */
|
||||
#define SUCCESS 0
|
||||
#define INVALID_PARAMETER -1
|
||||
#define OUT_OF_RESOURCES -2
|
||||
#define DUPLICATE_FILTER -3
|
||||
|
||||
/***************************************************************************/
|
||||
/******************** imported type and tag declarations *******************/
|
||||
/***************************************************************************/
|
||||
|
||||
/***************************************************************************/
|
||||
/******************* exported type and tag declarations ********************/
|
||||
/***************************************************************************/
|
||||
|
||||
struct EventBlock
|
||||
{
|
||||
uint32_t EBVersion;
|
||||
uint32_t EBStamp;
|
||||
struct EventBlock *EBILink;
|
||||
struct ResourceTagStructure *EBRTag;
|
||||
|
||||
void *EBLink;
|
||||
void *EBProducerID;
|
||||
void *EBProducerWorkSpace;
|
||||
void *EBConsumingConsumer;
|
||||
|
||||
uint32_t EBEventDataLength;
|
||||
void *EBEventData;
|
||||
union DataBlock
|
||||
{
|
||||
uint8_t B8[16];
|
||||
uint16_t B16[8];
|
||||
uint32_t B32[4];
|
||||
} EBShortData;
|
||||
|
||||
uint32_t EBEventNotifyType;
|
||||
void *EBUserParameter;
|
||||
|
||||
void *EBParm0;
|
||||
void *EBParm1;
|
||||
uint32_t EBEventFlags;
|
||||
uint32_t EBReserved[1];
|
||||
};
|
||||
|
||||
struct ProducerRegistrationInfo
|
||||
{
|
||||
uint32_t PRIVersion;
|
||||
char *PRIProducerName;
|
||||
char *PRIEventName;
|
||||
void *PRIUserParameter;
|
||||
uint32_t PRIEventFlags;
|
||||
struct LoadDefinitionStructure *PRIOwnerID;
|
||||
NEB_STATUS (*PRIProducerESR)(
|
||||
struct EventBlock *eventBlock);
|
||||
void *PRISecurityToken;
|
||||
uint32_t PRIProducerFlags;
|
||||
uint32_t PRIPriority;
|
||||
void *PRIEventID;
|
||||
void *PRIProducerID;
|
||||
};
|
||||
|
||||
struct ConsumerRegistrationInfo
|
||||
{
|
||||
uint32_t CRIVersion;
|
||||
char *CRIConsumerName;
|
||||
char *CRIEventName;
|
||||
void *CRIUserParameter;
|
||||
uint32_t CRIEventFlags;
|
||||
struct LoadDefinitionStructure *CRIOwnerID;
|
||||
NEB_STATUS (*CRIConsumerESR)(
|
||||
struct EventBlock *eventBlock);
|
||||
void *CRISecurityToken;
|
||||
uint32_t CRIConsumerFlags;
|
||||
char *CRIFilterName;
|
||||
uint32_t CRIFilterDataLength;
|
||||
void *CRIFilterData;
|
||||
NEB_STATUS (*CRIConsumerCallback)(
|
||||
struct EventBlock *eventBlock);
|
||||
uint32_t CRIConsumerType;
|
||||
uint32_t CRIOrder;
|
||||
void *CRIConsumerID;
|
||||
};
|
||||
|
||||
struct FilterRegistrationInfo
|
||||
{
|
||||
uint32_t FRIVersion;
|
||||
char *FRIFilterName;
|
||||
struct LoadDefinitionStructure *FRIOwnerID;
|
||||
NEB_STATUS (*FRIFilterESR)(
|
||||
struct EventBlock *eventBlock);
|
||||
void *FRIFilterID;
|
||||
};
|
||||
|
||||
struct EventInformation
|
||||
{
|
||||
uint32_t numberOfProducers;
|
||||
uint32_t numberOfSynchronousConsumers;
|
||||
uint32_t numberOfAsynchronousConsumers;
|
||||
uint32_t eventFlags;
|
||||
uint32_t eventProducedCount;
|
||||
char *eventName;
|
||||
};
|
||||
|
||||
/***************************************************************************/
|
||||
/******************** imported data object declarations ********************/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/******************* exported data object definitions **********************/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/******************** imported function declarations ***********************/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/******************** exported function declarations ***********************/
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************************************************************/
|
||||
/****************************** end of file ********************************/
|
||||
/***************************************************************************/
|
||||
#endif /* __NKEVENTPRI_H__ */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user