diff --git a/include/nwnss/include/repairUser.h b/include/nwnss/include/repairUser.h new file mode 100644 index 0000000..eeb5301 --- /dev/null +++ b/include/nwnss/include/repairUser.h @@ -0,0 +1,74 @@ +/**************************************************************************** + | + | (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 + | + |*************************************************************************** + | + | Shared structures between kernel engine and user interface + | + |--------------------------------------------------------------------------- + | + | $Author: taysom $ + | $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ + | + | $RCSfile$ + | $Revision: 465 $ + | + |--------------------------------------------------------------------------- + | This module is used to: + | + | Shared structures between kernel engine and user interface + | + +-------------------------------------------------------------------------*/ +#ifndef _REPAIRUSER_H_1236812F3bE +#define _REPAIRUSER_H_1236812F3bE + +#if zLINUX +#define RAV_MEDIA_STRUCTURE() __attribute__((packed)) +#define RAV_MEDIA_UNION() __attribute__((packed)) +#endif + +#if zNETWARE +#define RAV_MEDIA_STRUCTURE() +#define RAV_MEDIA_UNION() +#endif + + // Legal values for tag OR ZS_DebugLevel field of zPOOL_RAV_SET_WITH_KEY +#define ZRP_DEBUG_LOG_ALL 0x00000001 /* Single bit to turn on full debug into log */ +#define ZRP_DEBUG_LOG_IO_CACHE_HITS 0x00000002 +#define ZRP_DEBUG_LOG_IO_WRITES 0x00000004 +#define ZRP_DEBUG_LOG_IO_READS 0x00000008 +#define ZRP_DEBUG_LOG_IO (ZRP_DEBUG_LOG_IO_READS|ZRP_DEBUG_LOG_IO_WRITES|ZRP_DEBUG_LOG_IO_CACHE_HITS) +#define ZRP_DEBUG_LOG_GENERAL_INFO 0x00000010 // General Information +#define ZRP_DEBUG_LOG_GENERAL_WARNING 0x00000020 +#define ZRP_DEBUG_LOG_GENERAL_ERROR 0x00000040 +#define ZRP_DEBUG_LOG_GENERAL (ZRP_DEBUG_LOG_GENERAL_INFO|ZRP_DEBUG_LOG_GENERAL_WARNING|ZRP_DEBUG_LOG_GENERAL_ERROR) + +typedef struct ZSR_LossLimits_s +{ + BOOL ZLL_PruneIV; // Default should be FALSE. Pruning IV you cause multiple Volumes to be destroyed!!! + BOOL ZLL_PruneUnknownLosses; // Default should be FALSE. It is best to get user input as unknown files may be destroyed!!! +//g QUAD ZLL_BlockLossMax; // Currently not used as Rebuild does not track. At prune decission time we + // have not counted NT blocks (and other trees we rebuld) therefore we really + // do not know how many blocks we have lost. + QUAD ZLL_FileLossMax; // Maximum number of files to lose per VOLUME. If rebuild detects that more files + // than this will be lost then rebuild ABORTS. +} RAV_MEDIA_STRUCTURE() ZSR_LossLimits_s; + +#endif diff --git a/include/nwnss/support/lnxmbINC/alert.h b/include/nwnss/support/lnxmbINC/alert.h new file mode 100644 index 0000000..83a146e --- /dev/null +++ b/include/nwnss/support/lnxmbINC/alert.h @@ -0,0 +1,247 @@ +#ifndef __ALERT_H__ +#define __ALERT_H__ + +/***************************************************************************** + * + * (C) Copyright 1988-1997 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 + * + * $RCSfile$ + * $Revision: 465 $ + * $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ + * $Author: taysom $ + * + ****************************************************************************/ + + +// +// An Alert ID is comprised of two parts: +// A unique ModuleNumber (which is allotted) and an alert # +// which is under the control of the developer. +// +// The Alert module # specifies which module is generating the +// alert and the alert # can then be used for a specific alert +// generated by that module. +// + +#define ALERT_ID(ModuleNumber, AlertNumber) ((ModuleNumber) | (AlertNumber)) + +#define GET_MODULE_NUMBER_FROM_ALERTID(ALERTID) ((ALERTID) >> 16) + +// +// +// NLM developers may use any ModuleNumber in the range +// 0x8000???? to 0xffff????. The range 0x0001???? to 0x7fff???? +// is reserved for Novell. The value 0x0000???? is considered +// an invalid Alert ID and is used for all legacy alerts. +// + +// +// Allotted ModuleNumbers: +// + +#define ALERT_BINDERY 0x01020000 /* Bindery Subject in BINDERY.NLM */ +#define ALERT_OS 0x01030000 /* OS Event Subject */ +#define ALERT_LLC 0x01040000 /* Sunnyvale, Kitty Shih, LLC */ +#define ALERT_SDLC 0x01050000 /* Sunnyvale, Kitty Shih, SDLC stack */ +#define ALERT_REMOTE 0x01060000 /* RCONSOLE NLM */ +#define ALERT_MLID 0x01070000 /* Provo, MLID Lan Drivers (Don Shulz) */ +#define ALERT_QLLC 0x01080000 /* Sunnyvale, Kitty Shih, QLLC */ +#define ALERT_UPS 0x01090000 /* UPS monitor nlm*/ +#define ALERT_DS 0x010a0000 /* Directory Service in DS.NLM */ +#define ALERT_RSPX 0x010c0000 /* RSPX NLM */ +#define ALERT_R232 0x010d0000 /* R232 NLM */ +#define ALERT_TIME_SYNC 0x010e0000 /* TIMESYNC NLM */ +#define ALERT_CLIB 0x010f0000 /* CLIB NLM */ +#define ALERT_PRINT 0x01100000 /* Print Team */ +#define ALERT_NRS 0x01200000 /* Novell Replication Services */ +#define ALERT_DNS 0x01300000 /* IP/Domain Name Services */ +#define ALERT_DHCP 0x01400000 /* DHCP Services */ +#define ALERT_MM 0x01500000 /* Media Manager */ + + +// +// WARNING!!!: +// If You change these size or structures you must make the +// change in event.h also. +// + +#define AlertMessageBufferSize 256 +#define MaxStationsInList 32 + +/* Pre-declare the following structure(s) */ +struct LoadDefinitionStructure; + +typedef struct +{ + void *pNetworkManagementAttribute; + LONG nwAlertFlags; + LONG nwTargetStation; // Valid only if + // NOTIFY_CONNECTION_BIT + // bit is set. Specifies a + // a single station if + // TargetStationIsAPointer bit + // is NOT set, else points to + // a station count preceeded + // list of stations to be notified. + LONG nwTargetNotificationBits; + LONG nwAlertID; + LONG nwAlertLocus; + LONG nwAlertClass; + LONG nwAlertSeverity; + void *nwAlertDataPtr; // For legacy APIs. + void (*nwAlertDataFree)(void *nwAlertDataPtr); // For Legacy APIs. + BYTE *nwControlString; + LONG nwControlStringMessageNumber; +} NetWareAlertStructure; + +// +// Note that these alert codes are also defined in ALERTS.INC. +// + +// +// Values for nwAlertFlags field. +// + +#define QueueThisAlertMask 0x00000001 /* bit 0 */ +#define AlertIDValidMask 0x00000002 /* bit 1 */ +#define AlertLocusValidMask 0x00000004 /* bit 2 */ +#define AlertEventNotifyOnlyMask 0x00000008 /* bit 3 */ +#define AlertNoEventNotifyMask 0x00000010 /* bit 4 */ +#define AlertMessageNumberValid 0x00010000 /* bit 16 */ +#define NoDisplayAlertUID 0x00200000 /* bit 21 */ +#define AlertNoRingBell 0x00400000 /* bit 22 */ +#define AlertIDNotUniqueBit 0x00800000 /* bit 23 */ +#define OldStyleSystemAlertMask 0x01000000 /* bit 24 */ +#define OldStyleINWSystemAlertMask 0x02000000 /* bit 25 */ +#define OverloadMessageNumFieldBit 0x04000000 /* bit 26 -- used to indicate message number field can be ptr or number */ +#define NoDisplayLocusBit 0x10000000 /* bit 28 */ +#define NoDisplayAlertIDBit 0x20000000 /* bit 29 */ +#define OverrideNotificationBits 0x40000000 /* bit 30 - Netman */ +#define TargetStationIsAPointer 0x80000000 /* bit 31 */ + +#define Alert300Mask (AlertIDValidMask | AlertLocusValidMask | \ + OldStyleSystemAlertMask) +#define Alert311Mask (AlertIDValidMask | OldStyleINWSystemAlertMask) +#define Alert320Mask (AlertIDValidMask | AlertMessageNumberValid | \ + AlertLocusValidMask | NoDisplayAlertIDBit) +#define QAlertMask (AlertIDValidMask | AlertLocusValidMask | \ + NoDisplayAlertIDBit | QueueThisAlertMask) +#define QAlert320Mask (Alert320Mask | QueueThisAlertMask) + +// +// CONSUMER ERROR NOTIFICATION. +// Values for nwTargetNotificationBits field. +// + +#define NOTIFY_CONNECTION_BIT 0x00000001 +#define NOTIFY_EVERYONE_BIT 0x00000002 +#define NOTIFY_ERROR_LOG_BIT 0x00000004 +#define NOTIFY_CONSOLE_BIT 0x00000008 +#define NOTIFY_QUEUE_MESSAGE 0x10000000 // Use if alert is to be queued. +#define DONT_NOTIFY_NMAGENT 0x80000000 + + +// +// ERROR LOCUS IDENTIFIERS. +// Values for nwAlertLocus field. +// + +#define LOCUS_UNKNOWN 0 +#define LOCUS_MEMORY 1 +#define LOCUS_FILESYSTEM 2 +#define LOCUS_DISKS 3 +#define LOCUS_LANBOARDS 4 +#define LOCUS_COMSTACKS 5 +#define LOCUS_TTS 7 +#define LOCUS_BINDERY 8 +#define LOCUS_STATION 9 +#define LOCUS_ROUTER 10 +#define LOCUS_LOCKS 11 +#define LOCUS_KERNEL 12 +#define LOCUS_UPS 13 +#define LOCUS_SERVICE_PROTOCOL 14 +#define LOCUS_SFT_III 15 +#define LOCUS_RESOURCE_TRACKING 16 +#define LOCUS_NLM 17 +#define LOCUS_OS_INFORMATION 18 +#define LOCUS_CACHE 19 + +// +// ERROR CLASSES. +// Values for nwAlertClass field. +// + +#define CLASS_UNKNOWN 0 +#define CLASS_OUT_OF_RESOURCE 1 +#define CLASS_TEMP_SITUATION 2 +#define CLASS_AUTHORIZATION_FAILURE 3 +#define CLASS_INTERNAL_ERROR 4 +#define CLASS_HARDWARE_FAILURE 5 +#define CLASS_SYSTEM_FAILURE 6 +#define CLASS_REQUEST_ERROR 7 +#define CLASS_NOT_FOUND 8 +#define CLASS_BAD_FORMAT 9 +#define CLASS_LOCKED 10 +#define CLASS_MEDIA_FAILURE 11 +#define CLASS_ITEM_EXISTS 12 +#define CLASS_STATION_FAILURE 13 +#define CLASS_LIMIT_EXCEEDED 14 +#define CLASS_CONFIGURATION_ERROR 15 +#define CLASS_LIMIT_ALMOST_EXCEEDED 16 +#define CLASS_SECURITY_AUDIT_INFO 17 +#define CLASS_DISK_INFORMATION 18 +#define CLASS_GENERAL_INFORMATION 19 +#define CLASS_FILE_COMPRESSION 20 +#define CLASS_PROTECTION_VIOLATION 21 +#define CLASS_VIRTUAL_MEMORY 22 + +// +// ERROR SEVERITY LEVELS. +// Values for nwAlertSeverity field. +// + +#define SEVERITY_INFORMATIONAL 0 // Counters or Gauges reached thresholds. +#define SEVERITY_WARNING 1 // Configuration errors, etc. No Damage. +#define SEVERITY_RECOVERABLE 2 // Hot Fix disk, etc. Work-around made. +#define SEVERITY_CRITICAL 3 // Disk Mirror failure, etc. Fix-up + // attempted +#define SEVERITY_FATAL 4 // Resource fatally affected--shut down. +#define SEVERITY_OPERATION_ABORTED 5 // The operation cannot complete... + // ramifications unknown. +#define SEVERITY_NONOS_UNRECOVERABLE 6 // Operation cannot complete... + // ramifications will not affect OS. + + +typedef struct +{ + LONG stationCount; + LONG stationList[MaxStationsInList]; +} StationListStruct; + +struct LoadDefinitionStructure; +void NetWareAlert(struct LoadDefinitionStructure *nlm, + NetWareAlertStructure *nwAlert, + LONG ParameterCount, ...); + + +#endif /* __ALERT_H__ */ + +// ************************************************************************ +// ************************** END OF FILE ********************************* +// ************************************************************************ diff --git a/include/nwnss/support/lnxmbINC/errors.h b/include/nwnss/support/lnxmbINC/errors.h new file mode 100644 index 0000000..78e62b8 --- /dev/null +++ b/include/nwnss/support/lnxmbINC/errors.h @@ -0,0 +1,280 @@ +#ifndef __ERRORS_H__ +#define __ERRORS_H__ +/***************************************************************************** + * + * (C) Copyright 1988-1994 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 + * + * $RCSfile$ + * $Revision: 465 $ + * $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ + * $Author: taysom $ + * + ****************************************************************************/ + + +/* ERROR CODES */ + +#define OK 000 +#define ERR_INSUFFICIENT_SPACE 001 +#define ERR_TTS_OUT_OF_RESOURCES 002 + +#define ERR_REVOKE_HANDLE_RIGHTS_NOT_FOUND 115 /* 0x73 - also defined in locks.h */ +#define ERR_REMOTE_NOT_ALLOWED 116 /* 0x74 - also defined in locks.h */ +#define ERR_UNKNOWN_SUCCESS_OR_FAILURE 117 /* 0x75 */ +#define ERR_BUFFER_NOT_LONG_ALIGNED 118 /* 0x76 */ +#define ERR_BUFFER_TOO_SMALL 119 /* 0x77 */ +#define ERR_VOLUME_FLAG_NOT_SET 120 /* 0x78 */ +#define ERR_NO_ITEMS_FOUND 121 /* 0x79 */ +#define ERR_CONNECTION_ALREADY_TEMPORARY 122 /* 0x7a */ +#define ERR_CONNECTION_ALREADY_LOGGED_IN 123 /* 0x7b */ +#define ERR_CONNECTION_NOT_AUTHENTICATED 124 /* 0x7c */ +#define ERR_CONNECTION_NOT_LOGGED_IN 125 /* 0x7d */ +#define ERR_NCP_BOUNDARY_CHECK_FAILED 126 /* 0x7e */ +#define ERR_LOCK_WAITING 127 /* 0x7f */ +#define ERR_LOCK_FAIL 128 /* 0x80 */ +#define ERR_OUT_OF_HANDLES 129 /* 0x81 */ +#define ERR_NO_OPEN_PRIVILEGE 130 /* 0x82 */ +#define ERR_HARD_IO_ERROR 131 /* 0x83 */ +#define ERR_NO_CREATE_PRIVILEGE 132 /* 0x84 */ +#define ERR_NO_CREATE_DELETE_PRIVILEGE 133 /* 0x85 */ +#define ERR_R_O_CREATE_FILE 134 /* 0x86 */ +#define ERR_CREATE_FILE_INVALID_NAME 135 /* 0x87 */ +#define ERR_INVALID_FILE_HANDLE 136 /* 0x88 */ +#define ERR_NO_SEARCH_PRIVILEGE 137 /* 0x89 */ +#define ERR_NO_DELETE_PRIVILEGE 138 /* 0x8a */ +#define ERR_NO_RENAME_PRIVILEGE 139 /* 0x8b */ +#define ERR_NO_SET_PRIVILEGE 140 /* 0x8c */ +#define ERR_SOME_FILES_IN_USE 141 /* 0x8d */ +#define ERR_ALL_FILES_IN_USE 142 /* 0x8e */ +#define ERR_SOME_READ_ONLY 143 /* 0x8f */ +#define ERR_ALL_READ_ONLY 144 /* 0x90 */ +#define ERR_SOME_NAMES_EXIST 145 /* 0x91 */ +#define ERR_ALL_NAMES_EXIST 146 /* 0x92 */ +#define ERR_NO_READ_PRIVILEGE 147 /* 0x93 */ +#define ERR_NO_WRITE_PRIVILEGE 148 /* 0x94 */ +#define ERR_FILE_DETACHED 149 /* 0x95 */ +#define ERR_NO_ALLOC_SPACE 150 /* 0x96 */ +#define ERR_TARGET_NOT_A_SUBDIRECTORY 150 /* 0x97 */ +#define ERR_NO_SPOOL_SPACE 151 /* 0x97 */ +#define ERR_INVALID_VOLUME 152 /* 0x98 */ +#define ERR_DIRECTORY_FULL 153 /* 0x99 */ +#define ERR_RENAME_ACROSS_VOLUME 154 /* 0x9a */ +#define ERR_BAD_DIR_HANDLE 155 /* 0x9b */ +#define ERR_INVALID_PATH 156 /* 0x9c */ +#define ERR_NO_SUCH_EXTENSION 156 /* 0x9d */ +#define ERR_NO_DIR_HANDLES 157 /* 0x9d */ +#define ERR_BAD_FILE_NAME 158 /* 0x9e */ +#define ERR_DIRECTORY_ACTIVE 159 /* 0x9f */ +#define ERR_DIRECTORY_NOT_EMPTY 160 /* 0xa0 */ +#define ERR_DIRECTORY_IO_ERROR 161 /* 0xa1 */ +#define ERR_IO_LOCKED 162 /* 0xa2 */ +#define ERR_TRANSACTION_RESTARTED 163 /* 0xa3 */ +#define ERR_RENAME_DIR_INVALID 164 /* 0xa4 */ +#define ERR_INVALID_OPENCREATE_MODE 165 /* 0xa5 */ +#define ERR_ALREADY_IN_USE 166 /* 0xa6 */ +#define ERR_INVALID_RESOURCE_TAG 167 /* 0xa7 */ +#define ERR_ACCESS_DENIED 168 /* 0xa8 */ + +#define ERR_INVALID_DATA_STREAM 190 /* 0xbe */ +#define ERR_INVALID_NAME_SPACE 191 /* 0xbf */ +#define ERR_NO_ACCOUNTING_PRIVILEGES 192 /* 0xc0 */ +#define ERR_NO_ACCOUNT_BALANCE 193 /* 0xc1 */ +#define ERR_CREDIT_LIMIT_EXCEEDED 194 /* 0xc2 */ +#define ERR_TOO_MANY_HOLDS 195 /* 0xc3 */ +#define ERR_ACCOUNTING_DISABLED 196 /* 0xc4 */ +#define ERR_LOGIN_LOCKOUT 197 /* 0xc5 */ +#define ERR_NO_CONSOLE_RIGHTS 198 /* 0xc6 */ + +#define ERR_Q_IO_FAILURE 208 /* 0xd0 */ +#define ERR_NO_QUEUE 209 /* 0xd1 */ +#define ERR_NO_Q_SERVER 210 /* 0xd2 */ +#define ERR_NO_Q_RIGHTS 211 /* 0xd3 */ +#define ERR_Q_FULL 212 /* 0xd4 */ +#define ERR_NO_Q_JOB 213 /* 0xd5 */ +#define ERR_NO_Q_JOB_RIGHTS 214 /* 0xd6 */ +#define ERR_UNENCRYPTED_NOT_ALLOWED 214 /* 0xd6 */ +#define ERR_Q_IN_SERVICE 215 /* 0xd7 */ +#define ERR_DUPLICATE_PASSWORD 215 /* 0xd7 */ +#define ERR_Q_NOT_ACTIVE 216 /* 0xd8 */ +#define ERR_PASSWORD_TOO_SHORT 216 /* 0xd8 */ +#define ERR_Q_STN_NOT_SERVER 217 /* 0xd9 */ +#define ERR_MAXIMUM_LOGINS_EXCEEDED 217 /* 0xd9 */ +#define ERR_Q_HALTED 218 /* 0xda */ +#define ERR_BAD_LOGIN_TIME 218 /* 0xda */ +#define ERR_Q_MAX_SERVERS 219 /* 0xdb */ +#define ERR_NODE_ADDRESS_VIOLATION 219 /* 0xdb */ +#define ERR_LOG_ACCOUNT_EXPIRED 220 /* 0xdc */ +#define ERR_BAD_PASSWORD 222 /* 0xde */ +#define ERR_PASSWORD_EXPIRED 223 /* 0xdf */ +#define ERR_NO_LOGIN_CONNECTIONS_AVAILABLE 224 /* 0xe0 */ + +#define ERR_WRITE_TO_GROUP_PROPERTY 232 /* 0xe8 */ +#define ERR_MEMBER_ALREADY_EXISTS 233 /* 0xe9 */ +#define ERR_NO_SUCH_MEMBER 234 /* 0xea */ +#define ERR_PROPERTY_NOT_GROUP 235 /* 0xeb */ +#define ERR_NO_SUCH_VALUE_SET 236 /* 0xec */ +#define ERR_PROPERTY_ALREADY_EXISTS 237 /* 0xed */ +#define ERR_OBJECT_ALREADY_EXISTS 238 /* 0xee */ +#define ERR_ILLEGAL_NAME 239 /* 0xef */ +#define ERR_ILLEGAL_WILDCARD 240 /* 0xf0 */ +#define ERR_BINDERY_SECURITY 241 /* 0xf1 */ +#define ERR_NO_OBJECT_READ_RIGHTS 242 /* 0xf2 */ +#define ERR_NO_OBJECT_RENAME_RIGHTS 243 /* 0xf3 */ +#define ERR_NO_OBJECT_DELETE_RIGHTS 244 /* 0xf4 */ +#define ERR_NO_OBJECT_CREATE_RIGHTS 245 /* 0xf5 */ +#define ERR_NO_PROPERTY_DELETE_RIGHTS 246 /* 0xf6 */ +#define ERR_NO_PROPERTY_CREATE_RIGHTS 247 /* 0xf7 */ +#define ERR_NO_PROPERTY_WRITE_RIGHTS 248 /* 0xf8 */ +#define ERR_NO_PROPERTY_READ_RIGHTS 249 /* 0xf9 */ +#define ERR_TEMP_REMAP 250 /* 0xfa */ +#define ERR_UNKNOWN_REQUEST 251 /* 0xfb */ +#define ERR_NO_SUCH_PROPERTY 251 /* 0xfb */ +#define ERR_MESSAGE_QUEUE_FULL 252 /* 0xfc */ +#define ERR_TARGET_ALREADY_HAS_MESSAGE 252 /* 0xfc */ +#define ERR_NO_SUCH_OBJECT 252 /* 0xfc */ +#define ERR_BAD_STATION_NUMBER 253 /* 0xfd */ +#define ERR_BINDERY_LOCKED 254 /* 0xfe */ +#define ERR_DIR_LOCKED 254 /* 0xfe */ +#define ERR_SPOOL_DELETE 254 /* 0xfe */ +#define ERR_TRUSTEE_NOT_FOUND 254 /* 0xfe */ +#define ERR_HARD_FAILURE 255 /* 0xff */ +#define ERR_FILE_NAME 255 /* 0xff */ +#define ERR_FILE_EXISTS 255 /* 0xff */ +#define ERR_CLOSE_FCB 255 /* 0xff */ +#define ERR_IO_BOUND 255 /* 0xff */ +#define ERR_NO_SPOOL_FILE 255 /* 0xff */ +#define ERR_BAD_SPOOL_PRINTER 255 /* 0xff */ +#define ERR_BAD_PARAMETER 255 /* 0xff */ +#define ERR_NO_FILES_FOUND 255 /* 0xff */ +#define ERR_NO_TRUSTEE_CHANGE_PRIVILEGE 255 /* 0xff */ +#define ERR_TARGET_NOT_LOGGED_IN 255 /* 0xff */ +#define ERR_TARGET_NOT_ACCEPTING_MESSAGES 255 /* 0xff */ +#define ERR_MUST_FORCE_DOWN 255 /* 0xff */ +#define ERR_CHECKSUM_REQUIRED 255 /* 0xff */ +#define ERR_SERVICE_ALREADY_LOADED 256 /* 0x100 */ +#define ERR_SERVICE_NOT_LOADED 257 /* 0x101 */ +#define ERR_INCORRECT_VERSION 258 /* 0x102 */ +#define ERR_NO_MEMORY_READ_ACCESS 259 /* 0x103 */ +#define ERR_NO_MEMORY_WRITE_ACCESS 260 /* 0x104 */ + +/* The following errors are returned in a LONG */ +#define ERR_MODULE_NOT_UNLOADED 513 +#define ERR_MODULE_NOT_LOADED 514 +#define ERR_UNABLE_TO_MOUNT_VOLUME 515 +#define ERR_UNABLE_TO_DISMOUNT_VOLUME 516 +#define ERR_UNABLE_TO_ADD_NAME_SPACE 517 +#define ERR_UNABLE_TO_SET_PARAMETER_VALUE 518 +#define ERR_UNABLE_TO_EXECUTE_NCF_FILE 519 + +/****************************************************************************/ +/* + +The following sections catagorize error codes by the routines that return +them +------------------------------------------------------------------------------ +Return codes from login procedures + + ERR_LOG_ACCOUNT_EXPIRED + ERR_NODE_ADDRESS_VIOLATION + ERR_BAD_LOGIN_TIME + ERR_MAXIMUM_LOGINS_EXCEEDED + ERR_PASSWORD_TOO_SHORT + ERR_DUPLICATE_PASSWORD + ERR_UNENCRYPTED_NOT_ALLOWED + ERR_LOGIN_LOCKOUT + ERR_PASSWORD_EXPIRED + ERR_BAD_PASSWORD + + Note that ERR_BAD_PASSWORD is used for two reasons + 1) on a login call, it means the password was correct, but it has + expired and all grace logins have been used up. + 2) on a change password call, it means that the old password given was + correct, but the account is not allowed to change the password + (typical of the GUEST account). + ERR_BAD_PASSWORD is not used to indicate that an incorrect password was + given, instead 255 indicates that the given password was invalid, + no such account exists, etc. + +------------------------------------------------------------------------------ +Return codes from accounting procedures + + ERR_NO_ACCOUNTING_PRIVILEGES + ERR_NO_ACCOUNT_BALANCE + ERR_CREDIT_LIMIT_EXCEEDED + ERR_TOO_MANY_HOLDS + ERR_ACCOUNTING_DISABLED + +------------------------------------------------------------------------------ +Return codes from queue procedures + + ERR_Q_IO_FAILURE + ERR_NO_QUEUE + ERR_NO_Q_SERVER + ERR_NO_Q_RIGHTS + ERR_Q_FULL + ERR_NO_Q_JOB + ERR_NO_Q_JOB_RIGHTS + ERR_Q_IN_SERVICE + ERR_Q_NOT_ACTIVE + ERR_Q_STN_NOT_SERVER + ERR_Q_HALTED + ERR_Q_MAX_SERVERS + +------------------------------------------------------------------------------ +Return codes from broadcast procedures + + ERR_TARGET_NOT_LOGGED_IN + ERR_TARGET_NOT_ACCEPTING_MESSAGES + ERR_TARGET_ALREADY_HAS_MESSAGE + +------------------------------------------------------------------------------ +Return codes from bindery procedures + + ERR_HARD_FAILURE Unrecoverable error (disk error, etc.) + ERR_BINDERY_LOCKED + ERR_NO_SUCH_OBJECT + ERR_NO_SUCH_PROPERTY + ERR_NO_PROPERTY_READ_RIGHTS + ERR_NO_PROPERTY_WRITE_RIGHTS + ERR_NO_PROPERTY_CREATE_RIGHTS No Property Creation or Change privileges + ERR_NO_PROPERTY_DELETE_RIGHTS + ERR_NO_OBJECT_CREATE_RIGHTS No Object Creation or Change privileges + ERR_NO_OBJECT_DELETE_RIGHTS + ERR_NO_OBJECT_RENAME_RIGHTS + ERR_NO_OBJECT_READ_RIGHTS No Object Read (Property Scan) privileges + ERR_BINDERY_SECURITY Attempt to change security to bindery-only status + ERR_ILLEGAL_WILDCARD + ERR_ILLEGAL_NAME + ERR_OBJECT_ALREADY_EXISTS + ERR_PROPERTY_ALREADY_EXISTS + ERR_NO_SUCH_VALUE_SET No property value to retrieve (in read/write) + ERR_PROPERTY_NOT_GROUP Set request made for non-set property + ERR_NO_SUCH_MEMBER Set request for non-existent member + ERR_MEMBER_ALREADY_EXISTS Setadd request for member already in set + ERR_WRITE_TO_GROUP_PROPERTY Attempt to Write Property to a set + + OK Operation successfully completed +------------------------------------------------------------------------------ +*/ + +/****************************************************************************/ +/****************************************************************************/ + + +#endif /* __ERRORS_H__ */ diff --git a/include/nwnss/support/lnxmbINC/event.h b/include/nwnss/support/lnxmbINC/event.h new file mode 100644 index 0000000..a3eef7e --- /dev/null +++ b/include/nwnss/support/lnxmbINC/event.h @@ -0,0 +1,1331 @@ +#ifndef __EVENT_H__ +#define __EVENT_H__ + +/***************************************************************************** + * + * (C) Copyright 1988-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 + * + * $RCSfile$ + * $Revision: 465 $ + * $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ + * $Author: taysom $ + * + ****************************************************************************/ + + +// +// WARNING!!!: +// The defintions are also used by CLIB, and are +// made available in the SDK through a separate +// header file. Ensure that modifications to this +// file are in sync with CLIB's SDK header files. +// + + + +#define EnumerateForConnection 0x00000001 +#define EnumerateForKnownEvents 0x00000002 + +// +// A consumer registering for an event sets +// this flag in the event type (which is being +// subscribed to) to denote that the consumer +// is MT safe. This allows us to distinguish +// MT safe consumers from MT unsafe ones. +// + +#define EVENT_CONSUMER_MT_SAFE 0x40000000 + +typedef struct QueuedEventStructure +{ + struct QueuedEventStructure *next; + LONG type; + void *parameter; + BYTE data[1]; +} QueuedEventStruct_t; + +#define INDEX_MASK 0xffff +#define MAX_INDEXS 0x10000 + +/* events with lower priority will be notified first */ +#define EVENT_PRIORITY_OS 0 +#define EVENT_PRIORITY_APPLICATION 20 +#define EVENT_PRIORITY_DEVICE 40 + +#define EVENT_CAN_SLEEP 1 + +#define EVENT_VOL_SYS_MOUNT 0 + /* parameter is undefined. Report Routine will be called immediately + * after vol SYS has been mounted. + */ + +#define EVENT_VOL_SYS_DISMOUNT 1 + /* parameter is undefined . Warn Routine and Report Routine will be + * called before vol SYS is dismounted. + */ + +#define EVENT_ANY_VOL_MOUNT 2 + /* parameter is volume number. Report Routine will be called immediately + * after any volume is mounted. + */ + +#define EVENT_ANY_VOL_DISMOUNT 3 + /* parameter is volume number. Warn Routine and Report Routine will be + * called before any volume is dismounted. + */ + +#define EVENT_DOWN_SERVER 4 + /* parameter is undefined. Warn Routine and Report Routine will be + * called before the server is shut down. The DS.NLM uses this event + * to shutdown the database. If you DS services, use the + * EVENT_PRE_DOWN_SERVER event instead. + */ + +#define EVENT_CHANGE_TO_REAL_MODE 5 + /* parameters is a flag mask containing the following. + * #define REAL_MODE_NESTED_INTERRRUPTS 0x00000001 + * #define REAL_MODE_INTERRUPTS_DISABLED 0x00000002 + * + * Report routine will be called before the server changes to real mode. + * This event is marked as may NOT sleep, however in most cases it + * really can. Some drivers needed to block until their device had + * finished outstanding IOs, so they have implemented a work around to + * the fact that this event may NOT sleep, by calling EndSleepNotAllowed + * doing whatever they needed to do (including blocking) and then + * calling StartSleepNotAllowed. Others needing to do the same should + * use the same method, however they must remember that if either + * the in debugger or ISR flag is set, we are in the context of the + * debugger and they cannot block or enable interrupts and therefore + * should not do the work around. + */ + +#define EVENT_RETURN_FROM_REAL_MODE 6 + /* parameters is a flag mask containing the following. + * #define REAL_MODE_NESTED_INTERRRUPTS 0x00000001 + * #define REAL_MODE_INTERRUPTS_DISABLED 0x00000002 + * + * Report routine will be called after the server has returned + * from real mode. + */ + +#define EVENT_EXIT_TO_DOS 7 + /* parameter is undefined. The Report Routine will be called before the + * server exits to DOS. + */ + +// +// EVENT_EXIT_TO_DOS: +// Even though this event is supposed to be non-blocking, many drivers +// do actually block EVEN while in the debugger! This typically happens +// when exiting to DOS from the debugger using the "q" debugger command. +// + +#define EVENT_MODULE_UNLOAD 8 + /* parameter is module handle. Warn Routine and Report Routine will be + * called when a module is unloaded from the console command line. Only + * the Report Routine will be called when a module unloads itself. + */ + +#define EVENT_CLEAR_CONNECTION 9 + /* parameter is connection number. Report Routine is called before the + * connection is cleared. + */ + +#define EVENT_LOGIN_CONNECTION 10 +#define EVENT_LOGIN_USER 10 + /* parameter is connection number. Report Routine is called after the + * connection has been logged in. + */ + +#define EVENT_CREATE_BINDERY_OBJ 11 + /* parameter is object ID. Report Routine is called after the object is + * created and entered in the bindery. + */ + +#define EVENT_DELETE_BINDERY_OBJ 12 + /* parameter is object ID. Report Routine is called before the object is + * removed from the bindery. + */ + +#define EVENT_CHANGE_SECURITY 13 + /* parameter is a pointer a structure of type EventSecurityChangeStruct. + * Report Routine is called after a security + * equivalence change has occurred. + */ + +#define EVENT_ACTIVATE_SCREEN 14 + /* Parameter is screen ID. Report routine is called after the + * screen becomes the active screen. + */ + +#define EVENT_UPDATE_SCREEN 15 + /* Parameter is screen ID. Report routine is called after a change is + * made to the screen image. + */ + +#define EVENT_UPDATE_CURSOR 16 + /* Parameter is screen ID. Report routine is called after a change to + * the cursor position or state occurs. + */ + +#define EVENT_KEY_WAS_PRESSED 17 + /* Parameter is undefined. Report routine is called whenever a + * key on the keyboard is pressed (including shift/alt/control). + * This routine is called at interrupt time. + */ + +#define EVENT_DEACTIVATE_SCREEN 18 + /* Parameter is screen ID. Report routine is called when the + * screen becomes inactive. + */ + +#define EVENT_TRUSTEE_CHANGE 19 + /* Parameter is a pointer to type struct EventTrusteeChangeStruct. The + * report routine is called everytime there is a change to a trustee in + * the file system. Shouldn't sleep. + */ + +#define EVENT_OPEN_SCREEN 20 + /* Parameter is the screen ID for the newly created screen. The report + * routine will be called after the screen is created. + */ + +#define EVENT_CLOSE_SCREEN 21 + /* Parameter is the screen ID for the screen that will be closed. The + * report routine will be called before the screen is closed. + */ + +#define EVENT_MODIFY_DIR_ENTRY 22 + /* Parameter is a pointer to a structure of type EventModifyDirEntryStruct + * which contains the modify information. The report routine will be + * called right after the entry is changed but before the directory + * entry is unlocked. The report routine must not go to sleep. + */ + +#define EVENT_NO_RELINQUISH_CONTROL 23 + /* Parameter is the running process. This will be called when the + * timer detects that a process is hogging the processor. The report + * routine must not sleep. + */ + +#define EVENT_SYSTEM_ALERT 24 + /* Parameter is a pointer to a structure of type EventSystemAlertStruct + * which contains the modify information. The report routine will be + * called whenever a system alert is generated. The report routine may + * sleep. + *********** NOTE - this event is no longer generated in v3.2 ************* + */ + +#define EVENT_CLIB_DEFINED_1 25 +#define EVENT_CLIB_DEFINED_2 26 + +#define EVENT_MODULE_LOAD 27 + /* parameter is module handle. The report routine will be called + * after a module has loaded. + */ + +// +// The next two events, EVENT_CREATE_PROCESS and EVENT_DESTROY_PROCESS +// are issued only for legacy threads. They are not issued for MPK +// threads. These events are considered obsolete. The MT safe events +// EVENT_CREATE_THREAD and EVENT_DESTROY_THREAD should be used instead. +// Since the legacy threads are always created and destroyed on processor +// 0, these events will never be issued on any processor other than 0. +// + +#define EVENT_CREATE_PROCESS 28 + /* parameter is the PID of the process being created. It is called + * after the process is created. The report routine may not sleep. + */ + +#define EVENT_DESTROY_PROCESS 29 + /* parameter is the PID of the process being destroyed. It is called + * before the process is actually destroyed. The report routine may not + * sleep. + */ + +#define EVENT_INW_SYS_ALERT 30 + /* Parameter is a pointer to a structure of type + * EventINWSystemAlertStruct. The report routine may sleep. + * + *********** NOTE - this event is no longer generated in v3.2 ************* + */ + +#define EVENT_END_OF_TASK 31 + /* Parameter is a pointer to a structure of type EndOfTaskStruct. The + * report routine is called before the end of task is actually performed + * and may sleep. + */ + +#define EVENT_NEW_PUBLIC 32 + /* Parameter is a pointer to a length preceded string which is the name + * of the new public entry point. This event may not sleep. + */ + +#define EVENT_PROTOCOL_BIND 33 + /* Parameter is a pointer to a structure of type EventProtocolBindStruct. + * This event is generated every time a board is bound to a protocol. + * This event may sleep. + */ + +#define EVENT_PROTOCOL_UNBIND 34 + /* Parameter is a pointer to a structure of type EventProtocolBindStruct. + * This event is generated every time a board is unbound from a protocol. + * This event may sleep. + */ + +#define EVENT_GENERIC 35 + +#define EVENT_VOL_AUDIT_RESET 36 + /* Parameter is the Volume Number + * This event is generated when the audit file for the indicated volume + * is reset. + * This event may sleep + */ + +#define EVENT_ALLOCATE_CONNECTION 37 + /* parameter is connection number. Report Routine is called after the + * connection is allocated. + */ + +#define EVENT_LOGOUT_CONNECTION 38 + /* parameter is connection number. Report Routine is called before the + * connection is logged out. + */ + +#define EVENT_MLID_REGISTER 39 + /* parameter is board number. Report Routine is called after the MLID + * is registered. + */ + +#define EVENT_MLID_DEREGISTER 40 + /* parameter is board number. Report Routine is called before the MLID + * is deregistered. + */ + +#define EVENT_DATA_MIGRATION 41 + /* Parameter is a pointer to a structure of type EventDataMigrationInfo. + * This event is generated when a file's data has been migrated. + */ + +#define EVENT_DATA_DEMIGRATION 42 + /* Parameter is a pointer to a structure of type EventDataMigrationInfo. + * This event is generated when a file's data has been de-migrated. + */ + +#define EVENT_QUEUE_ACTION 43 + /* Parameter is a pointer to a structure of type EventQueueNote. + * This event is generated when a queue is activated, deactivated, + * created, or deleted. + */ + +#define EVENT_NETWARE_ALERT 44 + /* Parameter is a pointer to a structure of type EventNetwareAlertStruct. + * This event is generated anytime the following alert calls are + * made: + * SystemAlert NW 3.0 + * QueueSystemAlert NW 3.0 + * INWSystemAlert NW 3.11 (temp) + * INWQueueSystemAlert NW 3.11 (temp) + * NetWareAlert NW 3.2 + * + * The report routine may sleep. + */ + +#define EVENT_INIT_STATE 45 + /* Parameter is a value indication the stage we are at in the + * initialization process. 0 - Start of OSMain, 1 - Before Startup, + * 2 - After Startup, 3 - Before Autoexec, 4 - After Autoexec. + * The report routine may sleep. + */ + +#define EVENT_CREATE_OBJECT 46 + /* Parameter is a pointer to a structure of type EventBinderyObject + * or EventDSObject + */ + +#define EVENT_DELETE_OBJECT 47 + /* Parameter is a pointer to a structure of type EventBinderyObject + * or EventDSObject + */ + +#define EVENT_RENAME_OBJECT 48 + /* Parameter is a pointer to a structure of type EventBinderyObject + * or EventDSObject + */ + +#define EVENT_VALUE_CHANGE 49 + /* Parameter is a pointer to a structure of type EventBinderyObject + * or EventDSObject + */ + +#define EVENT_CLOSE_FILE 50 + /* Parameter is a pointer to a structure of type EventCloseFileInfo. */ + +#define EVENT_CHANGE_TIME 51 + /* This event is given when the time is changed by a call to + * SetTimeFromVector or when Time Synchronization schedules + * a nonuniform adjustment. The parameter is the UTC time (in seconds) + * before the time change. The current time is available from the OS. + * Since you have no way of knowing the magnitudue of the time change, + * nor whether it has taken place or is scheduled for the next clock + * interrupt, you must detect the time change on your own. In general, + * if current time is less than old time, or at least two seconds ahead + * of old time, then the time change has been applied. You must wait + * for one of those conditions to be sure that the time change has + * "settled down" before you can assume that the event has "happened." + */ + +#define EVENT_MOVE_OBJECT 52 + /* Parameter is a pointer to a structure of type EventBinderyObject + * or EventDSObject + */ + +#define EVENT_VALUE_ADD 53 + /* Parameter is a pointer to a structure of type EventBinderyObject + * or EventDSObject + */ + +#define EVENT_VALUE_DEL 54 + /* Parameter is a pointer to a structure of type EventBinderyObject + * or EventDSObject + */ + +#define EVENT_DM_KEY_MODIFIED 55 + /* Parameter is a pointer to a structure of type EventDMKeyModified + */ + +#define EVENT_MODULE_UNLOADED 56 + /* Parameter is module handle. Report Routine will be called after the + * NLM's exit routine has been called, after his resources have been + * returned to the OS, and after he has been unlinked from the OS's lists. + * The only thing left of this NLM is the memory for his load definition + * structure, data image, and code image. + */ + +#define EVENT_REMOVE_PUBLIC 57 + /* Parameter is the address of the public entry point. This only happens + * on module unload. + */ + +#define EVENT_DS_EVENT 58 + /* Parameter is the address of a DS defined event structure */ + +#define EVENT_UNICODE 59 + /* Parameter is the address of a UNICODE defined event structure */ + + +#define EVENT_ALTERNATE_MOUNT_VOLUME 63 + /* called when NetWare is not aware of the volume name to be mounted, */ + /* Parameter is used to pass a event structure EventAlternateMountVolume.*/ + /* This event report is allowed to sleep, also the return code is in the */ + /* structre, after it has been processed. */ + +#define EVENT_CONSOLE_CONFIG_COMMAND 64 + /* called when the console command CONFIG is typed on the server command */ + /* line. The event report is allowed to sleep. The console screen handle */ + /* pointer is passed as the only parameter */ + +#define EVENT_CONSOLE_VERSION_COMMAND 65 + /* called when the console command VERSION is typed on the server command */ + /* line. The event report is allowed to sleep. A pointer to the structure */ + /* struct EventConfigVersionCmdInfo to help in the displaying to the screen */ + +#define EVENT_PRE_LOAD_NLM 66 + /* called while an NLM is being loaded but before most of the work is + * done. The data and code segments have not been allocated yet. The + * event report is allowed to sleep. The parameter is a pointer to an + * NLM Load File Header structure. + */ + +#define EVENT_LOW_MEMORY 67 + /* called when the cache memory allocator tries to allocate a cache block + * and fails; only one event per minute will be generated. It happens + * in conjunction with the netware alert. The event report can block. + * The parameter is a zero. This event is mainly for OS2 based NetWare + * so it can try to borrow memory back from OS2. + */ + +#define EVENT_COMPRESS_FILE 68 + /* at the beginning of a file compression after all pre-checks have + successfully completed. A CompressStatus_t structure will be + passed as the parameter. + */ +#define EVENT_DECOMPRESS_FILE 69 + /* at the beginning of a file decompression after all pre-checks have + successfully completed. A DecompressStatus_t structure will be + passed as the parameter. + */ + +#define EVENT_ABEND_NOTIFY 70 + /* Called after an Abend, before prompting the user if he wants to + do diagnostics or exit. A pointer to the Stack Frame will be + passed as a parameter. This event report is not allowed to sleep. + */ + +/* NW 4.20 only */ +#define EVENT_DO_DIAGNOSTICS 71 + /* Called when the user requests diagnostics to be done. (Either + when prompted after an Abend or from the internal debugger.) + A pointer to the Stack Frame will be passed as a parameter. + This event report is not allowed to sleep. + */ + +#define EVENT_MODULE_LOAD_FAIL 72 + /* Called when an NLM load fails. The parameter is a pointer to a + * Structure of type EventNLMLoadFailStruct. This event may sleep. + */ + +#define EVENT_USER_RESTRICTIONS 73 + /* Called when AddUserRestrictions or DeleteUserRestrictions is + called. The parameter is a pointer to a structure of type + EventUserRestrictionsStruct. This event may sleep. + */ + +#define EVENT_DAYLIGHT_SAVINGS_TIME_CHANGED 74 + /* in 4.20 */ + +#define EVENT_ABEND_LOG 75 + /* Called when be are building an abend log file entry. The parameter + * is a pointer to a buffer containing the log entry. The buffer is + * a 4K buffer, and can be added to as needed. This event may not + * sleep. + */ + +#define EVENT_PAGE_TABLE_CHANGE 76 + /* Called when the page tables are changed. This is useful for syncing + * up multiple page tables on multiple CPUs or with memory protection + * domains. The parameter is the logical address where something was + * mapped in or mapped out. This event cannot sleep. + */ + +#define EVENT_NAME_SPACE_ADDED 77 + /* Called when a Name Space is added to a volume. The parameter is a + * pointer to the EventAddNameSpaceStruc. This event may sleep. + */ + +#define EVENT_SET_PARAMETER_CHANGED 78 + /* Called when a set parameter is changed. The parameter is a + * pointer to the EventSetParameter. This event may sleep. + */ + +#define EVENT_NAME_SERVICE_STATE_CHANGE 79 + /* Called when the name service is loaded or unloaded or + * the bindery state changes (open or closed). The + * parameter is defined as follows: + * Bit Number Definition + * 0 Name Service Loaded if set + * 16 Bindery is open + * + * all other bits are reserved and set to zero + */ + +#define EVENT_IPX_INTERNAL_NET_NUMBER_SET 80 + /* Called when IPX Internal Net Number is set. The parameter + * passed to the notification routine is the IPX net number. + * PLEASE NOTE THE NET NUMBER IS IN NETWORK ORDER (HI-LO). + * This event may sleep. + */ + +#define EVENT_DOWN_ROUTER 81 + /* This event is generated when the OS wants the router, + * to go down. + * This event may & will sleep + */ + +#define EVENT_IOCONFIG_CHANGE 82 + /* This event is generated each time the IOConfigurationList */ + /* is modified. The parameter points to a structure whose first */ + /* element is 1 for add and 2 for delete, and second element is */ + /* a pointer to the IOConfigurationStructure being added or removed. */ + /* This event may NOT sleep. */ + +#define EVENT_SERVER_SHUTDOWN 83 + /* parameter is undefined. This is called after everything has + * been stop or shutdown when downing the server. + */ + +#define EVENT_PROCESSOR_ONLINE_OFFLINE 84 + /* parameter is the processor number. This event is generated each + * time the number of on line or off line processors changes. Since + * a spinlock is acquired, to prevent multiple processors from coming + * and going concurrently, this event may NOT sleep. + */ + +#define EVENT_CDBE_REPOPULATION_NEEDED 85 + /* Called when a cdbe database has been deleted while the system + * is currently operating. This event may NOT sleep. + */ + +#define EVENT_PROTOCOL_POST_BIND 86 + /* Parameter is a pointer to a structure of type EventProtocolBindStruct. + * This event is generated every time a board is bound to a protocol. + * This event may sleep. + */ + +#define EVENT_PROTOCOL_REGISTERED 87 + /* Generated when a Protocol is registered. The parameter is a + * pointer to the EventProtocolRegisteredStruct. This event may sleep. */ + +#define EVENT_PROTOCOL_UNREGISTERED 88 + /* Generated when a Protocol is unregistered. The parameter is a + * pointer to the EventProtocolRegisteredStruct. This event may sleep. */ + +#define EVENT_DEBUGGER_ACTIVE_CHANGED 89 + /* parameter is the debuggerActive flag value. This event is generated + * each time the value of debuggerActive is modified. This event may + * NOT sleep and may not invoke any procedure not available at debug + * time. + */ + +#define EVENT_CONNECTION_STATE_CHANGE 90 + /* parameter is the connection number. This event is generated each + * time the connection transitions from licenced to not licenced or + * from not licenced to licenced. It doesn't track logging in or + * logging out. It can block. + */ + +// +// These two events (EVENT_PROCESSOR_ON_LINE and EVENT_PROCESSOR_OFF_LINE +// are defined to be MT safe events. This means that the consumers of +// these two events are expected to be MT safe, and they don't have to +// declare themselves to be MT safe explicitly at registration time. +// + +#define EVENT_PROCESSOR_ON_LINE 91 + /* parameter is the processor number. This event is generated each + * time a processor is brought ON LINE. Since a spinlock is acquired, + * to prevent multiple processors from coming and going concurrently, + * this event may NOT sleep. + */ + +#define EVENT_PROCESSOR_OFF_LINE 92 + /* parameter is the processor number. This event is generated each + * time a processor is taken OFF LINE. Since a spinlock is acquired, + * to prevent multiple processors from coming and going concurrently, + * this event may NOT sleep. + */ + +#define EVENT_INTERRUPT_HANDLER_CHANGE 93 + /* parameter is the interrupt number. This event is generated each + * time an interrupt service routine is hooked or unhooked from the + * OS level interrupt service routine. Since a spinlock is acquired, + * to protect the interrupt vector pool this event may NOT sleep. + */ + +#define EVENT_BEFORE_LOAD_NLM 94 + /* called while an NLM is being loaded, after all module dependencies + * have been taken care of, but before this NLM load gets the load + * semaphore. The event report is allowed to sleep. The parameter is + * a pointer to an NLM Load File Header structure. + */ + +#define EVENT_NLM_ADDED 95 + /* called while an NLM is being added to an address space. The event + * report is allowed to sleep. The Parameter is a pointer to an address + * space structure. + */ + +#define EVENT_NLM_REMOVED 96 + /* called while an NLM is being removed from an address space. The event + * report is allowed to sleep. The Parameter is a pointer to an address + * space structure. + */ + +#define EVENT_ADDRESS_SPACE_CREATED 97 + /* called while an address space is being created. The event + * report is allowed to sleep. The Parameter is a pointer to an address + * space structure. + */ + +#define EVENT_ADDRESS_SPACE_DELETED 98 + /* called while an address space is being deleted. The event + * report is allowed to sleep. The Parameter is a pointer to an address + * space structure. This pointer may not be dereferenced. It's only use + * will be to match values in data structures tracking current address + * spaces. + */ + +#define EVENT_RESOURCE_TAG_ACQUIRED 99 + /* called when an NLM allocates a resource tag. The event + * report is allowed to sleep. The Parameter is a pointer to a + * Load Definition Structure. + */ + +#define EVENT_SWAPFILE_ADDED 100 + /* This event gets called when a new swapfile is created/added. + * The parameter is the same handle that is received if you call + * GetOsInformation. + */ + +#define EVENT_SWAPFILE_DELETED 101 + /* This event gets called when a swapfile is Deleted. + * The parameter is the same handle that is received if you call + * GetOsInformation. + */ + +#define EVENT_MODULE_LOAD_PRE_INIT 102 + /* This event gets called while an NLM is being loaded. The event is + * generated after the code, data, messages, etc. are read into memory + * and fixed up, but just before the NLM's initialization code is run. + * The parameter is a module handle. + */ + +#define EVENT_RESOURCE_TYPE_ADD 103 + /* called when an NLM calls RegisterTrackedResource to add a new + * resource type. This event is generated right after the resource + * type has been added. The parameter is the resource type signature. + * This event is allowed to sleep. + */ + +#define EVENT_RESOURCE_TYPE_DELETE 104 + /* called when an NLM calls UnRegisterTrackedResource to remove a + * resource type. This event is generated right after the resource + * type is deleted. The parameter is the resource type signature. + * This event is allowed to sleep. + */ + +#define EVENT_SET_PARM_CATEGORY_ADD 105 + /* Called when RegisterSetParameterCategory to add a new set parameter + * category. This event is generated right after the category has been + * added. The parameter is a pointer to a EventSetParameterCategory + * structure. This event is allowed to sleep. + */ + +#define EVENT_SET_PARM_CATEGORY_REMOVE 106 + /* Called when DeRegisterSetParameterCategory to remove a set parameter + * category. This event is generated right after the category is + * removed. The parameter is a pointer to a EventSetParameterCategory + * structure. This event is allowed to sleep. + */ + +#define EVENT_SET_PARM_ADD 107 + /* Called when RegisterSetParameter to add a new set parameter + * This event is generated right after the set parameter has been + * added. The parameter is a pointer to a EventSetParameter + * structure. This event is allowed to sleep. + */ + +#define EVENT_SET_PARM_REMOVE 108 + /* Called when DeRegisterSetParameter to remove a set parameter + * This event is generated right after the set parameter is removed. + * The parameter is a pointer to a EventSetParameter + * structure. This event is allowed to sleep. + */ + +#define EVENT_WAIT_FOR_KEY 109 + /* Called to signal that a screen is looking for input. + * The parameter is the screen ID with the low bit set on entry + * and the low bit clear on exit. This event is allowed to sleep. + */ + +#define EVENT_BEGIN_CREATE_SWAP_FILE 110 + /* Called just before a swap file is going to be created. This is to + * allow CPR or anyone else that would like to save a existing swap + * swapfile before a new one is created. The parameter is the volume + * number. The swapfile file name is always at the root and always + * named _SWAP_.MEM. + */ + +#define EVENT_NETWORK_REGISTERED_OR_DEREGISTERED_FOR_NCP_SERVICES 111 + /* Called to signal that a Network address has been registered for + * NCP services on it (Parameter == 0) or a NCP Services have been + * deregistered for a Network address (Parameter == 1). + * This event is allowed to sleep. + */ + +#define EVENT_MODULE_UNLOAD_FAIL 112 + /* Called if the Unload of a module fails for any reason. + * The ModuleHandle will be the parameter. + */ + +#define EVENT_ANY_VOL_DISMOUNT_END 113 + /* parameter is volume number. Warn Routine and Report Routine will be + * called after the volume is dismounted. + */ + +#define EVENT_SYS_VOL_DISMOUNT_END 114 + /* parameter is undefined . Warn Routine and Report Routine will be + * called after the SYS volume is dismounted. + */ + +#define EVENT_MODULE_UNLOAD_POST_EXIT_ROUTINE 115 + /* Parameter is the module handle. Report routine will be called after + * the NLM's exit routine has been called but before anything is cleaned + * up. This event is allowed to sleep. + */ + +#define EVENT_VOLUME_NDS_OBJECT_ID_CHANGED 116 + /* Parameter is a pointer to the structure EventVolNDSObjectID. + * This event is allowed to sleep. + */ + +#define EVENT_TTS_OUT_OF_RESOURCES 117 + /* Parameter is a pointer to the structure EventTTSOutOfResourcesStruct + * This event is allowed to sleep. + */ + +#define EVENT_LOCALE_FILE_CHANGED 118 + /* Parameter is a NOP because the only information that is needed is the + * fact that the config information changed. + */ + +#define EVENT_UNICODE_STANDARD_CONVERTER_CHANGED 119 + /* Parameter is undefined. An NLM has overridden the Standard Unicode + * Converter DLL. Any NLMs using Standard Converter calls (NWUS...) + * will automatically use the new converter. Any NLMs which have loaded + * an extended converter will need to unload and reload their converter + * to use the new codepage. This event is allowed to sleep. */ + +/* SPD #200605 Jim A. Nicolet 6-30-98 */ +#define EVENT_VOLUME_LOW_SPACE 120 + /* Parameter is a pointer to the structure EventVolumeLowSpaceStruct. + * This event is allowed to sleep + */ + + +#define EVENT_SCREEN_MODE_CHANGE 121 +/* Reseting the screen mode resets the character set. We need to have it + reloaded if it is something other than the default +*/ + +#define EVENT_SAVE_OR_RELOAD_WORKING_SET 122 +/* Parameter is pointer to the structure struct EventWorkingSet. This event is + generated when the server needs to save the current working set or to reload + the working set from the registry. This event is allowed to sleep. +*/ + + +// +// Events 123 and 124 were EVENT_CREATE_APPLICATION and EVENT_DESTROY_APPLICATION. +// These don't exist anymore. However, there could still some Novell Internal +// NLMs which are registering these two events. Till all such NLMs discontinue using +// these events, we will skip these two numbers. +// + + +//#define available event 123 +//#define available event 124 + +// +// These events are issued for MPK threads AS WELL AS legacy +// threads. +// These events are defined to be MT safe, which means that +// the consumers of these two events have to be MT safe, and +// don't have to specify so explicitly at registration time. +// +#define EVENT_CREATE_THREAD 125 + +#define EVENT_DESTROY_THREAD 126 + +#define EVENT_ADDRESS_SPACE_FAULT 127 + /* called when a protection fault has occurred that will cause and + * address space to be removed. The Parameter is a pointer to an address + * space structure. This event is called before the address space is removed. + */ + +#define EVENT_PORTAL_NEWS 128 + /* Parameter is a pointer to struct EventPortalNewsStruct. This event is allowed to sleep. */ + +#define EVENT_PRE_DOWN_SERVER 129 + /* parameter is undefined. Report Routine will be + * called before the server is shutdown and the EVENT_DOWN_SERVER + * event is generated. + */ + +#define EVENT_SEARCH_PATH 130 + /* called when a search path has been added, removed, or switch from dos to sys. The Parameter is a + * pointer to EventSearchStruc structure. This event is sleepable. + */ + +#define EVENT_PM_CHANGE_NOTIFICATION 131 + /* Place holder event for PM. The parameter is a pointer to the + * struct EventPMFeaturesInfoStruct + * This event is sleepable + */ + +#define EVENT_SLP 132 + /* Place holder event for SLP + * This event is sleepable + */ + +#define EVENT_COMMAND_LINE_ENTERED 133 + /* called when a console command line is entered. The parameter is a pointer to the + * struct EventCommandLineInfoStruct. + * This event is sleepable + */ + +#define EVENT_CONNECTION_HOOK 134 + /* called when a connection hook is modified. The parameter is a pointer to the + * struct EventConnectionHookInfoStruct. + * This event is sleepable + */ + +#define EVENT_IP_CONFIGURATION_CHANGE 135 + /* called when the IP configuration is modified. The parameter is a pointer to + * the struct EventIPConfigurationInfoStruct. + * This event is sleepable + */ + +#define EVENT_TIMEZONE_CHANGED 136 + /* This event is given when the time zone is changed by a call to + * ProcessSetTimeZone. This event is sleepable + */ + +#define EVENT_SCREEN_BEING_ACTIVATED 137 +#define EVENT_MODULE_BEING_LOADED 138 +#define EVENT_CONSOLE_RPC_NCP_ISSUED 139 /* defect #291644. RDoxey*/ + /* Called to signal that a Console RPC NCP (NCP 131 xx) request has + * been made. Parameter is a pointer to the struct EventNCP131InfoStruct. + * Warn Routine will be called at the beginning of the NCP request and + * Report Routine will be called after NCP reply, but before NCP is + * audited. This event is allowed to sleep. + */ + +#define EVENT_REAL_MODE_SUPPORT_CHANGE 140 + /* Called to signal a change in the level of support for real mode services. + * Parameter is the same as returned by GetRealModeSupportLevel. + * This event is allowed to sleep. + */ + +#define EVENT_BOOT_PARTITION_AVAILABLE 141 + /* parameter is undefined. This event is generated after Install creates a + * boot partition and copies files to it. Consumers of this event will want + * to transfer files from the "RAM drive" to the boot partition. + * This event is sleepable + */ + +#define EVENT_IP_ROUTE_CHANGE 142 + /* Event is signalled to indicate a change (addition or deletion) in the IP + * routing table. The parameter passed is a pointer to the following structure: + * struct EventIPRouteChange { + * int family; + * void *dest; + * int modification; + * LONG future[3]; }; + * This event is marked as a no-sleep event. This event may be generated on + * any processor. + */ + +#define EVENT_SCREEN_EVENT 143 + /* Event used pass screen update paramaters to a terminal monitor (e.g. SSH). + * This allows a monitor to know exactly what area has changed for optimization. + */ + +#define EVENT_ISCSI_INITIATOR_EVENT 144 + /* The parameter is a pointer to the EventInitiatorStructure. + * This event is allowed to sleep. + */ + +#define EVENT_ISCSI_TARGET_EVENT 145 + /* The parameter is a pointer to the EventTargetStructure. + * This event is allowed to sleep. + */ + +#define EVENT_IPSERVICES_CONFIG_CHANGE 146 + /* Called to signal a change to the configuration of IP services. No parameter is + * specified for this event. This event may be generated on any processor. + * This event is not allowed to sleep. + */ + +#define EVENT_UPDATE_SECURITY_EQUIVALENCE 147 + /* Called to signal that an UpdateSecurityEquivalence on a connection has + * taken place. The connection number will be passed as the only parameter. + * This event is allowed to sleep. + */ + +//#define available event 148 +//#define available event 149 +//#define available event 150 +//#define available event 151 +//#define available event 152 +//#define available event 153 +//#define available event 154 +//#define available event 155 +//#define available event 156 +//#define available event 157 +//#define available event 158 +//#define available event 159 +//#define available event 160 +//#define available event 161 +//#define available event 162 +//#define available event 163 +//#define available event 164 +//#define available event 165 +//#define available event 166 +//#define available event 167 +//#define available event 168 +//#define available event 169 +//#define available event 170 +//#define available event 171 +//#define available event 172 +//#define available event 173 +//#define available event 174 +//#define available event 175 +//#define available event 176 +//#define available event 177 +//#define available event 178 +//#define available event 179 +//#define available event 180 +//#define available event 181 +//#define available event 182 +//#define available event 183 +//#define available event 184 +//#define available event 185 +//#define available event 186 +//#define available event 187 +//#define available event 188 +//#define available event 189 +//#define available event 190 +//#define available event 191 + + +#define EVENT_TYPE_COUNT 192 + +/****************************************************************************/ +/****************************************************************************/ +/* --------------------------------------------------------------------------- + Event Structure Defintions +--------------------------------------------------------------------------- */ +/****************************************************************************/ +/****************************************************************************/ + +/* trustee changeFlags bits */ +#define EVENT_NEW_TRUSTEE 1 +#define EVENT_REMOVE_TRUSTEE 2 +#define EVENT_TRUSTEE_RIGHTS_MODIFIED 4 + +struct EventTrusteeChangeStruct +{ + LONG objectID; + + LONG entryID; + LONG volumeNumber; + LONG changeFlags; + LONG newRights; + struct DirectoryStructure *directoryEntry; + LONG evStation; +}; + +/* security changeFlags bits */ +#define EVENT_ADD_EQUIVALENCE 1 +#define EVENT_REMOVE_EQUIVALENCE 2 + +struct EventSecurityChangeStruct +{ + LONG objectID; + LONG equivalentID; + LONG changeFlags; +}; + +struct EventModifyDirEntryStruct +{ + LONG primaryDirectoryEntry; + LONG nameSpace; + LONG modifyBits; + struct ModifyStructure *modifyVector; + LONG volumeNumber; + struct DirectoryStructure *directoryEntry; + LONG oldModifyBits; /* Added for ds team - 1-30-98 Jim A. Nicolet */ + struct ModifyStructure *oldValuesVector; /* Added for ds team - 1-30-98 Jim A. Nicolet */ + LONG station; /* defect #291977 - RDoxey -Requested by Developer support for 3rd party use.*/ +}; + +struct EventSystemAlertStruct +{ + LONG targetStation; + LONG targetNotificationBits; + LONG errorLocus; + LONG errorClass; + LONG errorCode; + LONG errorSeverity; + BYTE *message; +}; + +struct EventINWSystemAlertStruct +{ + LONG alertId; + void *alertDataPtr; + LONG targetStation; + LONG targetNotificationBits; + LONG alertSeverity; + BYTE alertMessage[256]; +}; + +struct EventEndOfTaskStruct +{ + WORD station; + WORD unused; + LONG task; +}; + +struct EventProtocolBindStruct +{ + LONG boardNumber; + LONG protocolNumber; +}; + +extern struct ResourceTagStructure *OSEventResourceTag; + +struct EventDataMigrationInfo { + LONG FileSystemTypeID; + LONG Volume; + LONG DOSDirEntry; + LONG OwnerDirEntry; + LONG OwnerNameSpace; + BYTE OwnerFileName[256]; /* 255 + 1 len byte */ +}; + +struct EventQueueNote { + LONG QAction; /* 0=created, 1=deleted, 2 = activated, 3 = deactivated */ + LONG QID; + BYTE QName[50]; +}; + +struct EventNetwareAlertStruct +{ + LONG alertFlags; + LONG alertId; + LONG alertLocus; + LONG alertClass; + LONG alertSeverity; + LONG targetStationCount; + LONG targetStationList[32]; + LONG targetNotificationBits; + LONG alertParmCount; + void *alertDataPtr; + void *NetWorkManagementAttributePointer; + LONG alertUnused[2]; + LONG alertControlStringMessageNumber; + BYTE alertControlString[256]; + BYTE alertParameters[256+256]; + BYTE alertModuleName[36]; + LONG alertModuleMajorVersion; + LONG alertModuleMinorVersion; + LONG alertModuleRevision; +}; + +struct EventBinderyObject { + LONG EventObjectType; /* set to 'BIND' for bindery */ + LONG ObjectID; + LONG ObjectType; +}; + +#define EventBinderySignature 0x444e4942 /* 'DNIB' */ +#define EventDSSignature 0x43565344 /* 'CVSD' */ + +struct EventDSObject { + LONG EventObjectType; /* set to 'DSVC' for directory services */ + LONG EventType; /* add, delete, etc. */ + void *entry; /* DS defined entry structure */ +}; + +struct EventCloseFileInfo +{ + LONG fileHandle; + LONG station; + LONG task; + LONG fileHandleFlags; + LONG completionCode; +}; + +struct EventAlternateMountVolume +{ + LONG volumeFlags; /* 0x1 if mount all, 0x0 if mount volume name */ + LONG volumeNameLength; + BYTE volumeName[80]; + LONG volumeMountCCode; /* this is returned by alternate Mount */ + LONG alternateFileSystemID; + struct ScreenStruct *screenID; /* pass along the screenID */ + LONG displayErrorIfNoDisksFlag; /* pass along this flag */ + LONG requestedVolumeNumber; /* -1 if don't care else 1-255 for the suggested volume number (slot) */ + LONG unused[3]; +}; + +/* fileHandleFlags */ +#define ECNotReadableBit 0x00000001 +#define ECNotWriteableBit 0x00000002 +#define ECWrittenBit 0x00000004 +#define ECDetachedBit 0x00000008 +#define ECDirectFileSystemBit 0x00000020 +#define ECFileWriteThroughBit 0x00000040 + +struct EventConfigVersionCmdInfo +{ + struct ScreenStruct *screenID; + LONG linesUsed; /* can be change be the event handler */ + LONG linesPerScreen; +}; + +struct EventNLMLoadFailStruct +{ + LONG errorCode; + BYTE *name; /* Byte Length Preceeded */ +}; + + +/* EventUserRestrictionsStruct type indicators */ +#define EVENT_ADD_RESTRICTIONS 0 +#define EVENT_REMOVE_RESTRICTIONS 1 +#define EVENT_MODIFIED_RESTRICTIONS 2 + +struct EventUserRestrictionsStruct +{ + LONG type; + LONG Volume; + LONG Station; + LONG TrusteeID; + LONG newValue; /* valid only if type == 0, else = -1 */ +}; + +struct EventAddNameSpaceStruc +{ + LONG VolumeNumber; + LONG AddedNameSpaceNumber; +}; + +/* defect #291644. RDoxey*/ +struct EventNCP131InfoStruct +{ + LONG Station; + LONG SubFunction; + BYTE *Data; +}; + +struct EventSetParameter +{ + LONG setParameterType; + LONG setParameterCategoryNumber; + BYTE setParameterName[128]; /* ASCIIZ */ +}; + +struct EventSetParameterCategory +{ + LONG setParameterCategoryNumber; + BYTE setParameterCategoryName[128]; /* ASCIIZ */ +}; + +struct EventProtocolRegisteredStruct +{ + LONG protocolNumber; /* stack ID */ + BYTE protocolName[16]; /* ASCIIZ */ +}; + +struct EventVolNDSObjectID +{ + LONG VolumeNumber; + LONG oldNDSObjectID; + LONG newNDSObjectID; +}; + +#define EventByTTSThrottleControl 0x00000001 +#define EventByTTSThrottleDelayCheckFlag 0x00000002 +#define EventByBeginTransaction 0x00000004 +/* + Problem Code only when generated by EventByTTSThrottleControl + 5 trying to get a cache buffer + 6 trying to enlarge tables + 7 trying to get a disk block + x unrecoverable or unknown error code +*/ +struct EventTTSOutOfResourcesStruct +{ + LONG eventID; /* who is generating the event in tts */ + LONG problemCode; /* what type of resource problem */ +}; + +/* SPD #200605 Jim A. Nicolet 6-30-98 */ +struct EventVolumeLowSpaceStruct +{ + LONG VolumeNumber; + BYTE VolumeNameLen; + BYTE VolumeName[255]; +}; + +struct EventWorkingSet +{ + LONG SaveOrReloadFlag; /* 1 == Save or 0 == Reload */ + LONG ServerWorkingStatus; +}; + +#define SEARCH_PATH_LOCK_BIT 0x00000001 + +#define SEARCH_ADD_AT_END_ACTION 0x00000001 +#define SEARCH_INSERT_ACTION 0x00000002 +#define SEARCH_REMOVE_ACTION 0x00000003 +#define SEARCH_DOS_SWITCH_NW_ACTION 0x00000004 +#define SEARCH_REMOVE_DOS_PATHS_ACTION 0x00000005 +#define SEARCH_DOS_DEFAULT_CHANGED 0x00000006 + +struct EventSearchStruct +{ + int action; // action + int flags; // + int IsDosFlag; // 0 = NW Search Path, 1 = DOS Search Path, 0x81 = Default DOS Search Path + int insertionNumber; // only valid on SEARCH_INSERT_ACTION + int reserved; // 0 + char *pzSearchPath; // pointer to search path +}; + +struct EventCommandLineInfoStruct +{ + struct ScreenStruct *screenID; + char *pzCommandLine; + char *pzUpperCaseCommandLine; +}; + +struct EventPMFeaturesInfoStruct +{ + LONG returnActionCCode; + LONG returnFeaturesValue; +}; + +struct EventConnectionHookInfoStruct +{ + UINT32 action; + UINT32 hookIDNumber; + UINT32 station; + UINT32 spare; +}; + +#define EVENT_IP_NEW_ADDRESS 1 +#define EVENT_IP_CHANGE_ADDRESS 2 +#define EVENT_IP_DELETE_ADDRESS 3 + +#define EVENT_IP_PRIMARY_ADDRESS 1 +#define EVENT_IP_SECONDARY_ADDRESS 2 +#define EVENT_IP_GATEWAY_ADDRESS 3 + +struct EventIPConfigurationInfoStruct +{ + char IPAddress[16]; + char OldIPAddress[16]; + UINT32 boardNumber; + UINT32 action; /* EVENT_IP_NEW_ADDRESS, + EVENT_IP_CHANGE_ADDRESS, or + EVENT_IP_DELETE_ADDRESS */ + UINT32 addressType; /* EVENT_IP_PRIMARY_ADDRESS, + EVENT_IP_SECONDARY_ADDRESS, or + EVENT_IP_GATEWAY_ADDRESS */ +}; + +#endif /* __EVENT_H__ */ + +/****************************************************************************/ +/****************************************************************************/ diff --git a/include/nwnss/support/lnxmbINC/ins.h b/include/nwnss/support/lnxmbINC/ins.h new file mode 100644 index 0000000..29c3cff --- /dev/null +++ b/include/nwnss/support/lnxmbINC/ins.h @@ -0,0 +1,55 @@ +#ifndef __INS_H__ +#define __INS_H__ +/***************************************************************************** + * + * (C) Copyright 1989-1994 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 + * + * $RCSfile$ + * $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ + * $Revision: 465 $ + * + ****************************************************************************/ + +#define _INS_INCLUDED_ TRUE + + +#define NMLongIncr 1 +#define NMLongIncrHi 2 +#define NMLongPtrIncrHi 3 +#define NMLongDecr 4 +#define NMLongDecrHiLo 5 +#define NMLongPtrDecrHiLo 6 +#define NMWordIncr 7 +#define NMWordIncrHi 8 +#define NMWordDecr 9 +#define NMWordDecrHiLo 10 +#define NMByteIncr 11 +#define NMByteIncrHi 12 +#define NMByteDecr 13 +#define NMByteDecrHiLo 14 +#define NMQuadIncr 15 +#define NMQuadDecr 16 +#define NMSixByteIncr 17 +#define NMSixByteDecr 18 +#define NMAlertIncr 19 + +/****************************************************************************/ +/****************************************************************************/ + +#endif /* __INS_H__ */ diff --git a/include/nwnss/support/lnxmbINC/lfsproto.h b/include/nwnss/support/lnxmbINC/lfsproto.h new file mode 100644 index 0000000..c2d60d9 --- /dev/null +++ b/include/nwnss/support/lnxmbINC/lfsproto.h @@ -0,0 +1,308 @@ +/**************************************************************************** + | + | (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 + | + |***************************************************************************/ + +extern LONG NumberOfVolumes; + +LONG CloseFile( + LONG station, + LONG task, + LONG handle); + +LONG CommitFile( + LONG Station, + LONG OpenFileHandle); + +LONG ConvertPathString( + LONG stationNumber, + BYTE base, + BYTE *modifierString, + LONG *volumeNumber, + LONG *pathBase, + BYTE *pathString, + LONG *pathCount); + +LONG MapDirectoryNumberToPath( + LONG Volume, + LONG DirectoryNumber, + LONG NameSpace, + BYTE *String, + LONG StringLength, + LONG *ActualLength); + +LONG MapPathToDirectoryNumberOrPhantom( + LONG Station, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace, + LONG *DirectoryNumber, + LONG CanCreateFlag); + +LONG MapPathToDirectoryNumber( + LONG Station, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace, + LONG *DirectoryNumber, + LONG *FileFlag); + +LONG GetAccessRights( + LONG Station, + LONG Volume, + LONG DirectoryNumber, + LONG NameSpace, + WORD *AccessRights); + +LONG RenameEntry( + LONG Station, + LONG Task, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace, + LONG MatchBits, + BYTE SubdirectoryFlag, + LONG NewBase, + BYTE *NewString, + LONG NewCount, + LONG CompatabilityFlag, + BYTE AllowRenamesToMyselfFlag); + +LONG CreateFile( + LONG Station, + LONG Task, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace, + LONG CreatedAttributes, + LONG FlagBits, + BYTE DataStreamNumber, + LONG *Handle, + LONG *DirectoryNumber, + void **DirectoryEntry); + +LONG DeleteDirectory( + LONG Station, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace); + +LONG CreateDirectory( + LONG Station, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace, + LONG DirectoryAccessMask, + LONG *ReturnedDirectoryNumber, + void **ReturnedSubDir); + +struct ModifyStructure; +struct DirectoryStructure; +LONG ModifyDirectoryEntry( + LONG Station, + LONG Task, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace, + LONG MatchBits, + LONG TargetNameSpace, + struct ModifyStructure *ModifyVector, + LONG ModifyBits, + LONG AllowWildCardsFlag); + +LONG GetEntryFromPathStringBase( + LONG Station, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG SourceNameSpace, + LONG DesiredNameSpace, + struct DirectoryStructure **Dir, + LONG *DirectoryNumber); + +LONG DirectorySearch( + LONG Station, + LONG Volume, + LONG DirectoryNumber, + LONG NameSpace, + LONG StartEntryNumber, + BYTE *Pattern, + LONG MatchBits, + struct DirectoryStructure **DirectoryEntry, + LONG *ReturnedDirectoryNumber); + +LONG ScanTrusteeRights( + LONG Station, + LONG Volume, + LONG DirectoryNumber, + LONG NameSpace, + LONG StartingOffset, + LONG *TrusteeVector, + WORD *MaskVector, + LONG VectorSize, + LONG *ActualVectorSize); + +LONG GetAccessRights( /* moved to vswitch. 386 */ + LONG Station, + LONG Volume, + LONG DirectoryNumber, + LONG NameSpace, + WORD *AccessRights); + +LONG AddTrusteeRights( /* moved to vswitch.386 */ + LONG Station, + LONG Volume, + LONG DirectoryNumber, + LONG NameSpace, + LONG Trustee, + LONG NewRights); + +LONG DeleteTrusteeRights( /* moved to vswitch.386 */ + LONG Station, + LONG Volume, + LONG DirectoryNumber, + LONG NameSpace, + LONG DeletedTrustee, + BYTE CanDeleteOnPurgedFileFlag); + +LONG GetAccessRightsFromIDs( + LONG Volume, + LONG DirectoryNumber, /* assumes it is in the DOS name space. */ + LONG UserID, + LONG GroupID, + WORD *UserAccessRights, + WORD *GroupAccessRights); + +LONG FindNextTrusteeReference( + LONG Station, + LONG Volume, + LONG TrusteeID, + LONG StartEntryNumber, + LONG *EntryNumber, + WORD *TrusteeMask, + LONG *OwnerEntryNumber); + +LONG OpenFile( /* moved to vswitch.386 */ + LONG Station, + LONG Task, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace, + LONG MatchBits, + LONG RequestedRights, + BYTE DataStreamNumber, + LONG *Handle, + LONG *DirectoryNumber, + void **DirectoryEntry); + +LONG EraseFile( /* moved to vswitch.386 */ + LONG Station, + LONG Task, + LONG Volume, + LONG PathBase, + BYTE *PathString, + LONG PathCount, + LONG NameSpace, + LONG MatchBits); + +LONG CountOwnedFilesAndDirectories( + LONG Station, + LONG Volume, + LONG ID, + LONG *FileCount, + LONG *DirectoryCount); + + +LONG ScanDeletedFiles( + LONG Station, + LONG Volume, + LONG DirectoryNumber, + LONG NameSpace, + LONG StartEntryNumber, + LONG *ReturnedDirectoryNumber, + struct DirectoryStructure **EntryPointer); + +LONG PurgeDeletedFile( + LONG Station, + LONG Volume, + LONG DirectoryNumber, + LONG ToBePurgedDirectoryNumber, + LONG NameSpace); + +LONG VM_Return_Volume_Info( + LONG volumeid, + struct volinfodef *volumeinfo); + +LONG VM_Find_Next_Volume( + LONG *nextvolumeid, + LONG filesystemid); + +LONG VM_Unregister_Volume( + LONG volumemanagerhandle, + LONG filesystemhandle); + +LONG VM_Change_Volume_Status( + LONG volumemanagerhandle, + LONG filesystemhandle, + LONG newinstance, + BYTE *newname, + LONG newstatus, + LONG (**jumptable)(void)); + +void VM_Volume_Request_Complete( + struct volumerequestdef *request, + LONG completioncode); + +LONG GetVolumeNameTableEntry( + LONG volumeNumber, + BYTE *nameBuffer); + +LONG VM_Register_Volume( + LONG *volumemanagerhandle, + LONG filesystemhandle, + LONG volumeinstance, + BYTE *volumename, + LONG volumestatus, + LONG filesystemid, + BYTE *filesystemname, + LONG (*pollroutine)( + LONG handle, + struct volumerequestdef *request), + LONG (*abortroutine)( + LONG handle, + struct volumerequestdef *request), + LONG (**jumptable)(void)); diff --git a/include/nwnss/support/lnxmbINC/mmpublic.h b/include/nwnss/support/lnxmbINC/mmpublic.h new file mode 100644 index 0000000..5274d0c --- /dev/null +++ b/include/nwnss/support/lnxmbINC/mmpublic.h @@ -0,0 +1,1763 @@ +/**************************************************************************** + | + | (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 + | + |***************************************************************************/ +#ifndef _MMPUBLIC_H_ +#define _MMPUBLIC_H_ + +#include + +#ifndef MMBLD +typedef unsigned long HNDL; +typedef unsigned long OBID; +#endif + +/**************************************************************************** +** +** Miscellaneous Definitions +*/ + +/* Lock Types */ + +#define MM_READ_LOCK 0x01 +#define MM_WRITE_LOCK 0x02 + +#define MM_INTERNAL_OBJECT_MANAGER 0x01 +#define MM_EXTERNAL_OBJECT_MANAGER 0x02 + +#define MM_MAX_OBJECT_STRING_LEN 128 /* Including the NULL */ +#define MM_ID_LEN 16 /* 16 bytes, sizeof( GUID ) */ +#define MM_MAX_MIRROR_MEMBERS 8 + +#define FUNCTION_TABLE_SIZE 72 + +struct RemovableInfoDef +{ + LONG cartridgetype; + LONG mediatype; + LONG slotnumber; + BYTE label[64]; /* Labels are length preceeded, not */ + LONG identificationtype; /* nescessaraly NULL terminated strings.*/ + LONG identificationtimestamp; +}; + + +struct CreateRemovableInfoDef +{ + LONG cartridgetype; + LONG mediatype; + LONG slotnumber; + BYTE label[64]; /* Labels are length preceeded, not */ + LONG identificationtype; /* nescessaraly NULL terminated strings.*/ + LONG identificationtimestamp; +}; + + +/**************************************************************************** +** +** Class Definitions +*/ + +struct ClassGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + LONG status; + LONG numberofobjects; + LONG tablesize; + OBID application; +}; + +/* Class Types */ + +#define MM_IO_CLASS 0 +#define MM_APPLICATION_CLASS 1 +#define MM_FILTER_CLASS 2 +#define MM_IDENTIFIER_CLASS 3 +#define MM_NOTIFY_CLASS 4 +#define MM_OBJECT_MANAGER_CLASS 5 +#define MM_RESERVATION_CLASS 6 +#define MM_ATTRIBUTE_CLASS 7 +#define MM_MESSAGE_CLASS 8 +#define MM_IO_SUBSYSTEM_CLASS 9 +#define MM_MAX_INTERNAL_CLASSES 10 + +/* Class Status */ +#define MM_CLASS_AVAILABLE 0x00000000 +#define MM_CLASS_ACTIVATED 0x00000001 +#define MM_CLASS_SYSTEM 0x00000010 +#define MM_CLASS_PERMANENT 0x00000020 +#define MM_CLASS_PROPRIETARY 0x00000040 + +#define MM_APPLICATION_SIGNATURE 0x0050414D +#define MM_ATTRIBUTE_SIGNATURE 0x0054414D +#define MM_CACHE_SIGNATURE 0x0041434D +#define MM_CLASS_SIGNATURE 0x004C434D +#define MM_FILTER_SIGNATURE 0x0049464D +#define MM_IDENTIFIER_SIGNATURE 0x0044494D +#define MM_IO_SIGNATURE 0x004F494D +#define MM_IO_SUBSYSTEM_SIGNATURE 0x0053494D +#define MM_MESSAGE_SIGNATURE 0x00454D4D +#define MM_NOTIFY_SIGNATURE 0x004F4E4D +#define MM_OBJECT_MANAGER_SIGNATURE 0x004D4F4D +#define MM_RESERVATION_SIGNATURE 0x0045524D +#define MM_CPU_VECTOR_SIGNATURE 0x0056434D + +/**************************************************************************** +** +** Generic Object Definitions +*/ + +/* object status */ + +#define MM_OBJECT_ACTIVATED 0x00000001 +#define MM_OBJECT_REGISTERED 0x00000002 +#define MM_OBJECT_ACTIVATING 0x00000004 +#define MM_OBJECT_FUNCTIONAL 0x00000008 +#define MM_OBJECT_DEACTIVATING 0x00000010 +#define MM_OBJECT_LOADING 0x00000020 +#define MM_OBJECT_LOADING_BIT 5 + + +/**************************************************************************** +** +** Application Definitions +*/ + +struct ApplicationRegistrationDef +{ + LONG classobjectsignature; + BYTE *name; + LONG (*controlroutine)( LONG token, + LONG _function, + LONG _parm1, + LONG _parm2, + LONG _parm3, + LONG _bufferlength, + void *_buffer ); +#ifndef MMSDK + LONG privilegedapplicationkey; +#else + LONG reserved; /* Set to NULL */ +#endif + LONG type; + LONG token; + LONG identifier; +}; + +struct ApplicationGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + BYTE nlmfilename[MM_MAX_OBJECT_STRING_LEN]; + BYTE nlmdescription[MM_MAX_OBJECT_STRING_LEN]; + LONG status; + LONG type; + LONG identifier; + LONG numberofregisteredobjects; + LONG numberofreservedobjects; +}; + +/* Application Types */ + +#define MM_GENERAL_STORAGE_APPLICATION 0x00000001 +#define MM_FILE_SYSTEM_APPLICATION 0x00000002 +#define MM_BACKUP_RESTORE_APPLICATION 0x00000003 +#define MM_HUMAN_JUKEBOX_APPLICATION 0x00000004 +#define MM_IO_SUBSYSTEM_APPLICATION 0x00000005 + +/* Application Status */ + +#define MM_PRE_MOAB_APPLICATION 0x10000000 +#define MM_UNIPROCESSOR_APPLICATION 0x20000000 + +/**************************************************************************** +** +** Attribute Definitions +*/ + +struct AttributeRegistrationDef +{ + LONG classobjectsignature; + BYTE *name; + LONG type; + OBID objectid; + + LONG attributeid; + LONG valuetype; + LONG flags; + LONG (*getroutine)( OBID, + LONG attributeid, + LONG valuelength, + void *value, + void *token ); + + LONG (*setroutine)( OBID, + LONG attributeid, + LONG valuelength, + void *value, + void *token ); + void *token; +}; + +struct AttributeGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + LONG attributetype; + LONG status; + LONG attributeid; + LONG valuetype; + LONG valuesize; + OBID appliedobjectid; + OBID applicationid; +}; + +/* Attribute Types */ + +#define MM_GENERIC_ATTRIBUTE 0x00000001 +#define MM_OBJECT_TYPE_ATTRIBUTE 0x00000002 +#define MM_OBJECT_SPECIFIC_ATTRIBUTE 0x00000004 + +/* Attribute Status */ + +#define MM_ATTRIBUTE_SETTABLE 0x00000100 + +/* Attribute Data Types */ + +#define MM_STRING 0x00000001 +#define MM_BYTE 0x00000002 +#define MM_WORD 0x00000003 +#define MM_LONG 0x00000004 +#define MM_OTHER 0x00000005 + +/* Attribute IDs */ +#define MM_ADDED_VALUE_ID 0x4444410B +#define MM_BLOCK_SIZE_ID 0x4F4C420A +#define MM_CAPACITY_ID 0x50414308 +#define MM_CARD_ID 0x52414304 +#define MM_CARTRIDGE_TYPE_ID 0x5241430E +#define MM_CONTROLLER_ID 0x4E4F430A +#define MM_CYLINDERS_ID 0x4C594309 +#define MM_DATA_COMPRESSION_INFO_ID 0x54414415 +#define MM_DMA_ID 0x414D4403 +#define MM_DRIVER_ID 0x49524406 +#define MM_DRIVER_NAME_ID 0x4952440B +#define MM_HEADS_ID 0x41454805 +#define MM_HOTFIX_AVAILABLE_ID 0x544F4810 +#define MM_HOTFIX_BLOCKS_ID 0x544F480D +#define MM_HOTFIX_SIZE_ID 0x544F480B +#define MM_HOTFIX_SYSTEM_BLOCKS_ID 0x544F4814 +#define MM_INTERRUPT_ID 0x544E4909 +#define MM_LABEL_ID 0x42414C05 +#define MM_LUN_ID 0x4E554C03 +#define MM_MAXIMUM_BLOCK_SIZE_ID 0x58414D12 +#define MM_MAXIMUM_NUMBER_OF_PARTITIONS_ID 0x58414D1C +#define MM_MAXIMUM_PARTITION_SIZE_ID 0x58414D16 +#define MM_MEMORY_ID 0x4D454D06 +#define MM_MINIMUM_BLOCK_SIZE_ID 0x4E494D12 +#define MM_MIRROR_COUNT_ID 0x52494D0C +#define MM_MIRROR_GROUP_PRESENT_ID 0x52494D14 +#define MM_MIRROR_IN_SYNC_ID 0x52494D0E +#define MM_MIRROR_OPERATIONAL_ID 0x52494D12 +#define MM_MIRROR_ORPHAN_ID 0x52494D0D +#define MM_NAME_ID 0x4D414E04 +#define MM_PARTITION_OFFSET_ID 0x4F415010 +#define MM_PARTITION_TYPE_ID 0x5241500E +#define MM_PARTITIONER_TYPE_ID 0x52415010 +#define MM_PORT_ID 0x524F5004 +#define MM_PREFERRED_SIZE_ID 0x4552500E +#define MM_RAW_DEVICE_NAME_ID 0x5741520F +#define MM_READ_AFTER_WRITE_ID 0x41455210 +#define MM_READ_HANDICAP_ID 0x4145520D +#define MM_READ_ONLY_ID 0x41455209 +#define MM_REMIRROR_PERCENT_ID 0x4D455210 +#define MM_REMIRROR_STATUS_ID 0x4D45520F +#define MM_REMOVABLE_ID 0x4D455209 +#define MM_SECTORS_ID 0x43455307 +#define MM_SLOT_ID 0x4F4C5304 +#define MM_SLOT_NUMBER_ID 0x4F4C530B +#define MM_TAPE_MEDIA_TYPE_ID 0x5041540F +#define MM_TAPE_POSITION_SIZE_ID 0x50415412 +#define MM_TAPE_READ_FORMAT_ID 0x50415410 +#define MM_TAPE_WRITE_FORMAT_ID 0x50415411 +#define MM_TYPE_ID 0x50595404 +#define MM_UNIT_SIZE_ID 0x494E5509 +#define MM_USER_DEFINED_ID 0x4553550C + +/* Attribute Names */ + +#define MM_ADDED_VALUE "ADDED_VALUE" +#define MM_BLOCK_SIZE "BLOCK_SIZE" +#define MM_CAPACITY "CAPACITY" +#define MM_CARD "CARD" +#define MM_CARTRIDGE_TYPE "CARTRIDGE_TYPE" +#define MM_CONTROLLER "CONTROLLER" +#define MM_CYLINDERS "CYLINDERS" +#define MM_DATA_COMPRESSION_INFO "DATA_COMPRESSION_INFO" +#define MM_DATA_ENCRYPTION "DATA_ENCRYPTION" +#define MM_DATA_ENCRYPTION_KEY "DATA_ENCRYPTION_KEY" +#define MM_DMA "DMA" +#define MM_DRIVER "DRIVER"; +#define MM_DRIVER_NAME "DRIVER_NAME" +#define MM_HEADS "HEADS" +#define MM_HOTFIX_AVAILABLE "HOTFIX_AVAILABLE" +#define MM_HOTFIX_BLOCKS "HOTFIX_BLOCKS" +#define MM_HOTFIX_SIZE "HOTFIX_SIZE" +#define MM_HOTFIX_SYSTEM_BLOCKS "HOTFIX_SYSTEM_BLOCKS" +#define MM_INTERRUPT "INTERRUPT" +#define MM_LABEL "LABEL" +#define MM_LUN "LUN" +#define MM_MAXIMUM_BLOCK_SIZE "MAXIMUM_BLOCK_SIZE" +#define MM_MAXIMUM_PARTITION_SIZE "MAXIMUM_PARTITION_SIZE" +#define MM_MAXIMUM_PARTITIONS "MAXIMUM_NUMBER_OF_PARTITIONS" +#define MM_MEDIA_TYPE "MEDIA_TYPE" +#define MM_MEMORY "MEMORY" +#define MM_MINIMUM_BLOCK_SIZE "MINIMUM_BLOCK_SIZE" +#define MM_MIRROR_COUNT "MIRROR_COUNT" +#define MM_MIRROR_GROUP_PRESENT "MIRROR_GROUP_PRESENT" +#define MM_MIRROR_IN_SYNC "MIRROR_INSYNCH" +#define MM_MIRROR_IS_OPERATIONAL "MIRROR_OPERATIONAL" +#define MM_MIRROR_ORPHAN "MIRROR_ORPHAN" +#define MM_NAME "NAME" +#define MM_PARTITION_OFFSET "PARTITION_OFFSET" +#define MM_PARTITION_TYPE "PARTITION_TYPE" +#define MM_PARTITIONER_TYPE "PARTITIONER_TYPE" +#define MM_PORT "PORT" +#define MM_PREFERRED_SIZE "PREFERRED_SIZE" +#define MM_RAW_DEVICE_NAME "RAW_DEVICE_NAME" +#define MM_READ_AFTER_WRITE "READ_AFTER_WRITE" +#define MM_READ_HANDICAP "READ_HANDICAP" +#define MM_READ_ONLY "READ_ONLY" +#define MM_REMIRROR_PERCENT "REMIRROR_PERCENT" +#define MM_REMIRROR_STATUS "REMIRROR_STATUS" +#define MM_REMOVABLE "REMOVABLE" +#define MM_SECTORS "SECTORS" +#define MM_SLOT "SLOT" +#define MM_SLOT_NUMBER "SLOT_NUMBER" +#define MM_TAPE_MEDIA_TYPE "TAPE_MEDIA_TYPE" +#define MM_TAPE_POSITION_SIZE "TAPE_POSITION_SIZE" +#define MM_TAPE_READ_FORMAT "TAPE_READ_FORMAT" +#define MM_TAPE_WRITE_FORMAT "TAPE_WRITE_FORMAT" +#define MM_TYPE "TYPE" +#define MM_UNIT_SIZE "UNIT_SIZE" +#define MM_USER_DEFINED "USER_DEFINED" + + +/**************************************************************************** +** +** Filter Definitions +*/ + +struct FilterRegistrationDef +{ + LONG classobjectsignature; + BYTE *name; + OBID objectid; + LONG type; + LONG (*releaseroutine)(); + LONG (**functiontable)(); + void *token; +}; + +struct FilterGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + LONG type; + LONG status; + OBID applicationid; + OBID ioobjectid; +}; + +#define MM_BASE_FILTER 1 +#define MM_ENHANCED_BASE_FILTER 2 +#define MM_NON_BASE_FILTER 3 + +/**************************************************************************** +** +** Identifier Object Definitions +*/ + +struct IdentifierRegistrationDef +{ + LONG classobjectsignature; + BYTE *name; + LONG type; + LONG (*identifyroutine)( OBID ); + LONG (*labelroutine)( OBID, struct RemovableInfoDef *); + LONG (*unlabelroutine)( OBID ); + LONG registeredhandle; +}; + +struct IdentifierGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + LONG type; + LONG status; + LONG registeredhandle; + OBID applicationid; +}; + +#define MM_IDENTIFIER_CAN_LABEL 0x00000100 +#define MM_IDENTIFIER_CAN_UNLABEL 0x00000200 + +/**************************************************************************** +** +** IO Object Definitions +*/ + +struct IOObjectRegistrationDef +{ + LONG classobjectsignature; + BYTE *name; + LONG type; + LONG unitsize; + LONG blocksize; + LONG capacity; + LONG preferredunitsize; + LONG functionmask; + LONG controlmask; + LONG parentcount; + LONG childcount; + LONG specificinfosize; + + struct RemovableInfoDef removableinfo; + + LONG (**functiontable)(); + OBID mmobjectmanagerid; + LONG additionalspace; +}; + +struct IOObjectGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + LONG type; + LONG status; + LONG unitsize; + LONG blocksize; + LONG capacity; + LONG preferredunitsize; + LONG functionmask; + LONG controlmask; + LONG parentcount; + LONG siblingcount; + LONG childcount; + LONG specificinfosize; + struct RemovableInfoDef removableinfo; + LONG numberofcurrentreservations; + OBID applicationid; + OBID objectmanagerid; + BYTE guid[MM_ID_LEN]; +}; + +/* IO object status */ + +#define MM_IOOBJECT_BEING_IDENTIFIED 0x00000100 +#define MM_IOOBJECT_RESERVED 0x00000200 +#define MM_IOOBJECT_INFO_COMPLETE 0x00000400 +#define MM_IOOBJECT_FAILURE 0x00000800 + +#define MM_IOOBJECT_WRITABLE 0x00001000 +#define MM_IOOBJECT_WRITE_PROTECTED 0x00002000 +#define MM_IOOBJECT_REMOVABLE 0x00004000 +#define MM_IOOBJECT_ACCEPTS_MAGAZINES 0x00008000 + +#define MM_IOOBJECT_LOADED 0x00010000 +#define MM_IOOBJECT_LOCKED 0x00020000 +#define MM_IOOBJECT_IS_IN_A_MAGAZINE 0x00040000 +#define MM_IOOBJECT_IS_IN_A_CHANGER 0x00080000 + +#define MM_IOOBJECT_IS_OFFLINE 0x00100000 +#define MM_IOOBJECT_READ_HANDICAP 0x00200000 +#define MM_IOOBJECT_REMIRRORING 0x00400000 +#define MM_IOOBJECT_REMIRRORING_BIT 22 +#define MM_IOOBJECT_IS_DIVIDABLE 0x00800000 + +#define MM_IOOBJECT_AUTO_UNREGISTER 0x01000000 +#define MM_IOOBJECT_FROM_NWPA 0x02000000 +#define MM_IOOBJECT_BEING_INVENTORIED 0x04000000 +#define MM_IOOBJECT_BEING_INVENTORIED_BIT 26 +#define MM_IOOBJECT_RAID 0x08000000 + +#define MM_LOGICAL_PARTITION_OBJECT 0x10000000 +#define MM_IOOBJECT_SHARED 0x20000000 +#define MM_IOOBJECT_SHARE_INVALID 0x40000000 + +/* IO object types */ + +#define MM_ADAPTER_OBJECT 0x00000000 +#define MM_CHANGER_OBJECT 0x00000001 +#define MM_DEVICE_OBJECT 0x00000002 +#define MM_MEDIA_OBJECT 0x00000004 +#define MM_PARTITION_OBJECT 0x00000005 +#define MM_SLOT_OBJECT 0x00000006 +#define MM_HOTFIX_OBJECT 0x00000007 +#define MM_MIRROR_OBJECT 0x00000008 +#define MM_PARITY_OBJECT 0x00000009 +#define MM_SEGMENT_OBJECT 0x0000000A +#define MM_VOLUME_OBJECT 0x0000000B +#define MM_CLONE_OBJECT 0x0000000C +#define MM_MAGAZINE_OBJECT 0x0000000E +#define MM_VIRTUAL_DEVICE_OBJECT 0x0000000F +#define MM_PBA_OBJECT 0x00000010 +#define MM_GROUP_OBJECT 0x00000011 +#define MM_FAILOVER_OBJECT 0x00000012 +#define MM_SNAPSHOT_OBJECT 0x00000013 +#define MM_I2O_IOP_OBJECT 0x00001000 +#define MM_LOGICAL_PARTITION_OBJECT 0x10000000 + +/* +** IO Object Added Value Definitions +*/ + +#define MM_AV_UNIT_SPARING 0x00000001 /* Hotfixing */ +#define MM_AV_SPANNED 0x00000002 /* Linearly spanned */ +#define MM_AV_HARD_RAID_0 0x00000010 /* HW Striping */ +#define MM_AV_HARD_RAID_1 0x00000020 /* HW Mirroring */ +#define MM_AV_HARD_RAID_2 0x00000040 /* HW Duplexed Mirroring */ +#define MM_AV_HARD_RAID_3 0x00000080 /* HW Mirroring w/parity */ +#define MM_AV_HARD_RAID_5 0x00000100 /* HW Striping w/parity */ +#define MM_AV_SOFT_RAID_0 0x00000200 /* SW Striping */ +#define MM_AV_SOFT_RAID_1 0x00000400 /* SW Mirroring */ +#define MM_AV_SOFT_RAID_2 0x00000800 /* SW Duplexed Mirroring */ +#define MM_AV_SOFT_RAID_3 0x00001000 /* SW Mirroring w/parity */ +#define MM_AV_SOFT_RAID_5 0x00002000 /* SW Striping w/parity */ +#define MM_AV_FAILOVER 0x00004000 /* Has a standby */ +#define MM_AV_CLUSTER 0x00008000 /* A member of a cluster */ +#define MM_AV_REMOTE 0x00010000 /* Not physically attached */ +#define MM_AV_FILE_SYSTEM 0x00020000 /* Capacity comes from FS */ +#define MM_AV_SNAPSHOT 0x00040000 /* This is a snapshot pool */ + +/**************************************************************************** +** +** IO Subsystem Definitions +*/ +struct IOSubsystemRegistrationDef +{ + LONG classobjectsignature; + BYTE *name; + LONG type; + LONG specificinfosize; + LONG (*controlroutine)( LONG token, + LONG _function, + LONG _p1, + LONG _p2, + LONG _p3, + LONG _bufferlength, + void *_buffer ); + LONG token; +}; + +/* +** Defined Subsystem Types +*/ + +#define MM_SUBSYSTEM_NWPA 0x00000001 +#define MM_SUBSYSTEM_I20 0x00000002 +#define MM_SUBSYSTEM_CIOS 0x00000003 + + +struct IOSubsystemGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + LONG type; + LONG status; + LONG specificinfosize; + OBID applicationid; +}; + + +/**************************************************************************** +** +** Notify Definitions +*/ + +struct NotifyRegistrationDef +{ + LONG classobjectsignature; + BYTE *name; + LONG token; + LONG notifytype; + LONG objectclass; + LONG objecttype; + LONG event; + LONG (*routine)( HNDL _mmnotifyhandle, + LONG _token, + OBID _objectid, + LONG _objecttype, + LONG _objectclass, + LONG _event ); +}; + +struct NotifyGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + LONG type; + LONG status; + LONG reserved; + LONG objecttype; + LONG objectclass; + LONG event; + OBID applicationid; +}; + +/* notify events */ + +#define MM_NOTIFY_OBJECT_REGISTRATION 0x00000001 +#define MM_NOTIFY_OBJECT_UNREGISTRATION 0x00000002 +#define MM_NOTIFY_OBJECT_ACTIVATED 0x00000004 +#define MM_NOTIFY_OBJECT_DEACTIVATED 0x00000008 +#define MM_NOTIFY_OBJECT_RESERVATION 0x00000010 +#define MM_NOTIFY_OBJECT_UNRESERVATION 0x00000020 +#define MM_NOTIFY_OBJECT_SECONDARY_RESERVATION 0x00000040 +#define MM_NOTIFY_OBJECT_RERESERVATION 0x00000080 +#define MM_NOTIFY_OBJECT_ATTRIBUTE_CHANGE 0x00000100 +#define MM_NOTIFY_OBJECT_FUNCTIONAL 0x00000200 +#define MM_NOTIFY_OBJECT_NONFUNCTIONAL 0x00000400 +#define MM_NOTIFY_OBJECT_MIRROR_PARTITION_ADDED 0x00000800 +#define MM_NOTIFY_SCAN_DEVICES 0x00001000 +#define MM_NOTIFY_FAILOVER_OBJECT_ADDED 0x00002000 +#define MM_NOTIFY_OBJECT_UPDATED 0x00004000 + + +/**************************************************************************** +** +** Object Manager Definitions +*/ + +struct ObjectManagerRegistrationDef +{ + LONG classobjectsignature; + BYTE *name; + LONG reserved; + LONG objecttype; + LONG objectclass; + LONG (*controlroutine)( LONG token, + LONG _function, + LONG _parm1, + LONG _parm2, + LONG _parm3, + LONG _bufferlength, + void *_buffer ); + LONG token; + LONG identifier; +}; + +/* Object Manager identifiers. */ +#define NPA_DEVICE_IDENTIFIER 0x4E504100 /* NPA0 */ +#define RAID_DEVICE_IDENTIFIER 0x52414944 /* RAID */ +#define FAILOVER_DEVICE_IDENTIFIER 0x4641494C /* FAIL */ +#define MIRROR_IDENTIFIER 0x4D524944 /* MRID */ +#define RAID1_MIRROR_IDENTIFIER 0x5244314D /* RD1M */ +#define HOTFIX_IDENTIFIER 0x48464958 /* HFIX */ +#define HOTSPARE_IDENTIFIER 0x484F5453 /* HOTS */ +#define SNAP_IDENTIFIER 0x534E4850 /* SNAP */ + +struct ObjectManagerGenericInfoDef +{ + BYTE name[MM_MAX_OBJECT_STRING_LEN]; + LONG status; + LONG objecttype; + LONG objectclass; + OBID applicationid; + LONG identifier; +}; + +/**************************************************************************** +** +** /Reservation Definitions +*/ + +struct ReservationGenericInfoDef +{ + OBID objectid; + OBID applicationid; + LONG type; +}; + +struct SharedReserveRequestDef +{ + OBID applicationid; + OBID objectid; + LONG type; +}; + +/* Reservation status */ + +#define MM_PRIMARY_RESERVATION 0x00000100 +#define MM_SECONDARY_RESERVATION 0x00000200 + +/* Reservation Types */ + +#define MM_IO_MODE 0x00000001 +#define MM_CONTROL_MODE 0x00000002 + +/* Reservation Type Modifiers */ + +#define MM_SHARED_READ_RESERVE 0x00010000 +#define MM_SHARED_WRITE_RESERVE 0x00020000 +#define MM_SHARED_PRIMARY_RESERVE 0x00040000 +#define MM_RERESERVE 0x00080000 +#ifndef MMSDK +#define MM_PRIVILEGED_RESERVE 0x00100000 +#endif + + +/**************************************************************************** +** +** Miscellaneous Definitions +** +*/ + +/* Alert reasons */ + +#define MM_ALERT_HOTFIX_ERROR 0x00000000 +#define MM_ALERT_DRIVER_UNLOADED 0x00000001 +#define MM_ALERT_DEVICE_FAILURE 0x00000002 +#define MM_ALERT_PROGRAM_CONTROL 0x00000003 +#define MM_ALERT_MEDIA_DISMOUNT 0x00000004 +#define MM_ALERT_MEDIA_EJECT 0x00000005 +//#define MM_ALERT_SERVER_DOWN 0x00000006 +//#define MM_ALERT_SERVER_FAILURE 0x00000007 +#define MM_ALERT_MEDIA_LOAD 0x00000008 +#define MM_ALERT_MEDIA_MOUNT 0x00000009 +#define MM_ALERT_DRIVER_LOAD 0x0000000A +#define MM_ALERT_LOST_SOFTWARE_FAULT_TOLERANCE 0x0000000B +#define MM_ALERT_INTERNAL_OBJECT_DELETE 0x0000000C +#define MM_ALERT_MAGAZINE_LOAD 0x0000000D +#define MM_ALERT_MAGAZINE_UNLOAD 0x0000000E +//#define MM_ALERT_DEVICE_BEING_REMOVED 0x0000000F +//#define MM_ALERT_CHECK_DEVICE 0x00000010 +#define MM_ALERT_CONFIGURATION_CHANGE 0x00000011 +//#define MM_ALERT_APPLICATION_UNREGISTER 0x00000012 +//#define MM_ALERT_DAI_EMMULATION 0x00000013 +//#define MM_ALERT_LOST_HARDWARE_FAULT_TOLERANCE 0x00000014 +#define MM_ALERT_INTERNAL_OBJECT_CREATE 0x00000015 +#define MM_ALERT_OBJECT_MANAGER_REMOVED 0x00000016 +//#define MM_ALERT_DEVICE_GOING_TO_BE_DEACTIVATED 0x00000017 +#define MM_ALERT_DEVICE_END_OF_MEDIA 0x00000018 +#define MM_ALERT_MEDIA_INSERTED 0x00000019 +#define MM_ALERT_UNKNOWN_DEVICE_ALERT 0x0000001A +#define MM_ALERT_UNKNOWN_ADAPTER_ALERT 0x0000001B +#define MM_ALERT_BASE_FILTER_REMOVED 0x0000001C +#define MM_ALERT_MEDIA_CHANGED_DURING_IO 0x00000020 +#define MM_ALERT_APPLICATION_CLEANUP 0x00000021 +#define MM_ALERT_DRIVER_BEING_UNLOADED 0x00000022 +#define MM_ALERT_DRIVER_INSTANCE_UNLOADED 0x00000023 +#define MM_ALERT_DRIVER_INSTANCE_BEING_UNLOADED 0x00000024 +#define MM_CHECK_DRIVER_BEING_UNLOADED 0x00000025 // MM_CheckDevice() +#define MM_CHECK_DRIVER_INSTANCE_BEING_UNLOADED 0x00000026 // MM_CheckDevice() +#define MM_ALERT_BASE_FILTER_BEING_REMOVED 0x00000027 +#define MM_ASYNCHRONOUS_PARTITON_TABLE_UPDATE 0x00000028 +#define MM_ALERT_SHARED_STATUS_CHANGED 0x00000029 +#define MM_ALERT_DEVICE_CHANGED 0x0000002A +#define MM_ALERT_HANDICAP_STATUS_CHANGED 0x0000002B +#define MM_ALERT_PARTITION_DELETE 0x0000002C +#define MM_ALERT_POOL_STATE_CHANGE 0x0000002D + + +/* Alert types */ + +#define MM_ALERT_MESSAGE 0x00000001 +#define MM_ALERT_ACTIVATE 0x00000002 +#define MM_ALERT_DEACTIVATE 0x00000003 +#define MM_ALERT_UNREGISTER 0x00000004 +#define MM_ALERT_PARENT_MESSAGE 0x00000005 +#define MM_ALERT_PARENT_ACTIVATE 0x00000006 +#define MM_ALERT_PARENT_DEACTIVATE 0x00000007 +#define MM_ALERT_PARENT_UNREGISTER 0x00000008 +#define MM_ALERT_SHARED_RESERVE_REQUEST 0x00000009 +#define MM_ALERT_SHARED_RESERVE_LOST 0x0000000A +#define MM_ALERT_CHECK 0x0000000B +#define MM_ALERT_DELETE 0x0000000C +#define MM_ALERT_PARENT_DELETE 0x0000000D + +/* Console Definitions */ + +#define HJ_LOAD_MESSAGE 0x00000000 +#define HJ_UNLOAD_MESSAGE 0x00000001 +#define HJ_ACK_MESSAGE 0x00000002 +#define HJ_NACK_MESSAGE 0x00000003 +#define HJ_ERROR 0x00000004 +//application function definitions +#define HJ_LOAD_APPLICATION_FUNCTION 0x00000010 +#define HJ_UNLOAD_APPLICATION_FUNCTION 0x00000011 + +/* Media Identifacation Types */ + +#define MM_UNIDENTIFIED_MEDIA 0x00000001 +#define MM_HIGH_SIERRA_CDROM_MEDIA 0x00000002 +#define MM_ISO_CDROM_MEDIA 0x00000003 +#define MM_MAC_CDROM_MEDIA 0x00000004 +#define MM_NETWARE_FILE_SYSTEM_MEDIA 0x00000005 +#define MM_INTERNAL_IDENTIFY_TYPE 0x00000007 +#define MM_MEDIA_TYPE_SMS 0x00000008 +#define MM_MEDIA_TYPE_SIDF 0x00000009 +#define MM_MEDIA_TYPE_BLANK 0x0000000A +#define MM_MEDIA_TYPE_ERROR 0x0000000B +#define MM_IBM_PARTITIONED_MEDIA 0x0000000C + +/* Media Types (as defined by the SCSI spec.) */ + +#define MM_DIRECT_ACCESS_DEVICE 0x00000000 +#define MM_SEQUENTIAL_ACCESS_DEVICE 0x00000001 +#define MM_PRINTER_DEVICE 0x00000002 +#define MM_PROCESSOR_DEVICE 0x00000003 +#define MM_WORM_DEVICE 0x00000004 +#define MM_CD_ROM_DEVICE 0x00000005 +#define MM_SCANNER_DEVICE 0x00000006 +#define MM_MO_DEVICE 0x00000007 +#define MM_MEDIA_CHANGER_DEVICE 0x00000008 +#define MM_COMMUNICATION_DEVICE 0x00000009 +#define MM_FLOPPY_DEVICE 0x0000001E + + +/* +** Media Manager Completion Codes +*/ + +#define MM_OK 0x00000000 +#define MM_INVALID_OBJECT 0x00000001 +#define MM_MESSAGE_POSTPONED 0x00000002 // NWPA +#define MM_ABORTED_UNCLEAN 0x00000003 // NWPA +#define MM_MEMORY_ALLOCATION_ERROR 0x00000004 +#define MM_INVALID_MODE 0x00000005 +#define MM_RESERVATION_CONFLICT 0x00000006 +#define MM_OBJECT_NOT_FOUND 0x00000008 +#define MM_ATTRIBUTE_NOT_SETTABLE 0x00000009 +#define MM_ABORTED_CLEAN 0x0000000A // NWPA +#define MM_NOT_ABORTED 0x0000000B + +#define MM_CORRECTED_MEDIA_ERROR 0x00000010 // NWPA +#define MM_MEDIA_ERROR 0x00000011 // NWPA +#define MM_DEVICE_ERROR 0x00000012 // NWPA +#define MM_ADAPTER_ERROR 0x00000013 // NWPA +#define MM_FUNCTION_NOT_SUPPORTED_BY_DEVICE 0x00000014 // NWPA +#define MM_FUNCTION_NOT_SUPPORTED_BY_DRIVER 0x00000015 // NWPA +#define MM_PARAMETER_ERROR 0x00000016 // NWPA +#define MM_MEDIA_NOT_PRESENT 0x00000017 // NWPA +#define MM_MEDIA_CHANGED 0x00000018 // NWPA +#define MM_PREVIOUSLY_WRITTEN 0x00000019 // NWPA +#define MM_MEDIA_NOT_FORMATED 0x0000001A // NWPA +#define MM_BLANK_MEDIA 0x0000001B // NWPA +#define MM_END_OF_MEDIA 0x0000001C // NWPA +#define MM_FILE_MARK_DETECTED 0x0000001D // NWPA +#define MM_SET_MARK_DETECTED 0x0000001E // NWPA +#define MM_WRITE_PROTECTED 0x0000001F // NWPA +#define MM_OK_EARLY_WARNING 0x00000020 // NWPA +#define MM_BEGINNING_OF_MEDIA 0x00000021 // NWPA +#define MM_MEDIA_NOT_FOUND 0x00000022 // NWPA +#define MM_MEDIA_NOT_REMOVED 0x00000023 // NWPA +#define MM_UNKNOWN_COMPLETION 0x00000024 // NWPA +#define MM_FUNCTION_DATA_MISSING 0x00000025 // NWPA +#define MM_HOTFIX_ERROR 0x00000026 // NWPA +#define MM_HOTFIX_UPDATE_ERROR 0x00000027 // NWPA +#define MM_IO_ERROR 0x00000028 // NWPA +#define MM_CHANGER_SOURCE_EMPTY 0x00000029 // NWPA +#define MM_CHANGER_DEST_FULL 0x0000002A // NWPA +#define MM_CHANGER_JAMMED 0x0000002B // NWPA +#define MM_MAGAZINE_NOT_PRESENT 0x0000002D // NWPA +#define MM_MAGAZINE_SOURCE_EMPTY 0x0000002E // NWPA +#define MM_MAGAZINE_DEST_FULL 0x0000002F // NWPA +#define MM_MAGAZINE_JAMMED 0x00000030 // NWPA +#define MM_ABORT_CAUSED_BY_PRIOR_ERROR 0x00000031 // NWPA +#define MM_CHANGER_ERROR 0x00000032 // NWPA +#define MM_MAGAZINE_ERROR 0x00000033 // NWPA +#define MM_BLOCK_SIZE_ERROR 0x00000034 // NWPA +#define MM_DECOMPRESSION_ALOGRITHM_MISMATCH 0x00000035 // NWPA +#define MM_HJ_ERROR 0x00000036 + +/* +** The 0X01xx messages replace the original initial message +** completion codes of an earlier Media Manager +*/ + +#define MM_DATA_MISSING 0x00000101 +#define MM_INVALID_APPLICATION 0x00000102 +#define MM_INVALID_RESOURCETAG 0x00000103 +#define MM_OBJECT_NOT_ACTIVE 0x00000105 +#define MM_FUNCTION_NOT_SUPPORTED 0x00000107 +#define MM_DATABASE_FULL 0x0000010B +#define MM_TRADITIONAL_VOLUME 0x00000165 +#define MM_NSS_POOL 0x00000169 +#define MM_SBD_PARTITION 0x000001AD + +/* +** Additional Media Manager completion Codes +*/ + +#define MM_DATABASE_ERROR 0x00000200 +#define MM_INVALID_ATTRIBUTE 0x00000201 +#define MM_INVALID_RESERVATION_HANDLE 0x00000202 +#define MM_ATTRIBUTE_NAME_COLLISION 0x00000203 +#define MM_ATTRIBUTE_ID_COLLISION 0x00000204 +#define MM_MEDIA_NOT_LOADED 0x00000205 +#define MM_INVALID_OBJECT_MANAGER 0x00000206 +#define MM_INVALID_CLASS 0x00000207 +#define MM_CLASS_COLLISSION 0x00000208 +#define MM_FAILED_TO_UNREGISTER 0x00000209 +#define MM_INVALID_HANDLE 0x0000020A +#define MM_BUFFER_TOO_SMALL 0x0000020B +#define MM_INVALID_LOCK 0x0000020C +#define MM_INVALID_PARTITION 0x0000020D +#define MM_INVALID_PARTITION_TABLE 0x0000020E +#define MM_PARTITION_TABLE_FULL 0x0000020F +#define MM_NO_PARTITION_TABLE 0x00000210 +#define MM_INCONSISTANT_GEOMETRY 0x00000211 +#define MM_MEDIA_NOT_IDENTIFIED 0x00000212 +#define MM_INSYNC_CLONE_OBJECT 0x00000213 +#define MM_INVALID_ATTRIBUTE_TYPE 0x00000214 +#define MM_SHARED_RESERVE_DENIED 0x00000215 +#define MM_QUESTIONABLE_UNLOAD 0x00000216 +#define MM_INCOMPLETE_DATA_PATH 0x00000217 +#ifndef MMSDK +#define MM_INVALID_APPLICATION_KEY 0x00000218 +#endif +#define MM_SHARED_RESERVE_GRANTED 0x00000219 +#define MM_HOTFIX_TABLE_FULL 0x0000021A +#define MM_NOT_OWNER 0x0000021B +#define MM_MAX_RAID_ELEMENTS_EXCEEDED 0x0000021C +#define MM_RAID_RESTRIPING 0x0000021D +#define MM_INVALID_GUID 0x0000021E +#define MM_MIRROR_CAPACITY_MISMATCH 0x0000021F +#define MM_MIRROR_NOT_IN_SYNC 0x00000220 +#define MM_MIRROR_ALREADY_CHECKING 0x00000221 +#define MM_MIRROR_NOT_CHECKING 0x00000222 +#define MM_DEVICE_IS_FULL 0x00000223 +#define MM_BLOCK_NOT_MAPPED_IN 0x00000224 +#define MM_BLOCK_NOT_MAPPED_NOT_SET 0x00000225 +#define MM_BLOCK_TRANSFER_NOT_SET 0x00000226 +#define MM_BLOCK_TRANSFER_SET 0x00000227 +#define MM_NO_BLOCKS_AVAILABLE 0x00000228 +#define MM_NEW_BLOCK 0x00000229 +#define MM_UNSUPPORTED_VERSION 0x0000022A +#define MM_INCORRECT_OBJECT_TYPE 0x0000022B +#define MM_POOL_NOT_ACTIVE 0x0000022C +#define MM_SHARED_OBJECT_ERROR 0x0000022D +#define MM_RAID_ELEMENT_MISSING 0x0000022E +#define MM_NOT_REMIRROR_OWNER 0x0000022F +#define MM_SBD_PARTITION_NOT_SHARED 0x00000230 +#define MM_POLLED_INTERRUPT_TIMEOUT 0x00000231 +#define MM_TRY_NEXT_OBJECT 0x00000232 +#define MM_OVERLAPPING_PARTITIONS 0x00000233 +#define MM_RAID_NEEDS_RESTRIPE 0x00000234 +#define MM_RAID_TOO_BIG 0x00000235 +#define MM_FAILURE 0xFFFFFFFF + +/* +** The following completion codes are not concidered errors +*/ + +#define MM_ALREADY_RESERVED 0x00010000 + + +/* Media Manager IO Message Functions */ + +#define MM_FORMAT_MEDIA 0x00000000 +#define MM_TAPE_CONTROL 0x00000001 +#define MM_MEDIA_DETECT 0x00000002 +#define MM_ACTIVATE_FUNCTIONS 0x00000003 +#define MM_MOUNT_FUNCTIONS 0x00000004 +#define MM_SELECT_FUNCTIONS 0x00000005 +//#define MM_INSERT_FUNCTIONS 0x00000006 //formerly MM_LOAD_FUNCTIONS NO LONGER SUPPORTED +#define MM_LOCK_FUNCTIONS 0x00000007 +#define MM_MOVE_FUNCTIONS 0x00000008 +#define MM_LABEL_FUNCTIONS 0x00000009 +#define MM_SCAN_FUNCTIONS 0x0000000A +#define MM_LOAD_FUNCTIONS 0x0000000D +#define MM_INVENTORY_FUNCTIONS 0x0000000E +#define MM_READ_GUID 0x0000000F +#define MM_CHANGE_PATH 0x00000010 + +#define MM_RANDOM_READ 0x00000020 +#define MM_RANDOM_WRITE 0x00000021 +#define MM_RANDOM_WRITE_ONCE 0x00000022 +#define MM_SEQUENTIAL_READ 0x00000023 +#define MM_SEQUENTIAL_WRITE 0x00000024 +#define MM_RESET_END_OF_TAPE 0x00000025 +#define MM_SINGLE_FILE_MARKS 0x00000026 +#define MM_MULTIPLE_FILE_MARKS 0x00000027 +#define MM_SINGLE_SET_MARKS 0x00000028 +#define MM_MULTIPLE_SET_MARKS 0x00000029 +#define MM_SPACE_DATA_BLOCKS 0x0000002A +#define MM_LOCATE_DATA_BLOCKS 0x0000002B +#define MM_PARTITION_SUPPORT 0x0000002C +#define MM_SEQUENTIAL_SUPPORT 0x0000002D + +/* +** IO Request Priorities +** +** Normal priority is default. +*/ + +#define MM_LOW_PRIORITY 0x00010000 /* Elevator */ +#define MM_HIGH_PRIORITY 0x00020000 /* Elevator */ +#define MM_TOP_PRIORITY 0x00030000 /* Elevator */ +#define MM_NO_BLOCKING_IO 0x00040000 /* Coredumps */ +#define MM_RAW_PARTITION_IO 0x00080000 +#define MM_ACCELERATED 0x00100000 /* B4 elevator */ +#define MM_RETURN_RAW_COMPLETION 0x00200000 /* No Hotfix */ +#define MM_USING_PERFERRED_UNIT_SIZE 0x00400000 /* No sector xlation */ +#define MM_SCATTER_GATHER_REQUEST 0x00800000 /* NWPA */ +#define MM_HARDWARE_READ_AFTER_WRITE 0x01000000 /* NWPA */ +#define MM_SNAPSHOT_WRITE_THRU 0x02000000 /* SNAPSHOT write thru */ +#define MM_P0_MESSAGE 0x10000000 /* Processor 0 callback */ +#define MM_BLOCKING_CALLBACK 0x20000000 /* Callback can block */ +#define MM_AS_IS 0x40000000 /* NWPA */ +#define MM_WRITE_BACK 0x80000000 /* NWPA */ +#define SNAPSHOT_WRITE_MASK (0xFFFF \ + | MM_RAW_PARTITION_IO \ + | MM_SNAPSHOT_WRITE_THRU) + +struct MemoryConfiguration +{ + LONG MemoryAddress; + WORD MemoryRangeParagraphs; +}; + +struct IO_ConfigurationStructure +{ + LONG reserved1; + WORD CSharingFlags; + WORD CSlot; + WORD CIOPortsAndRanges[4]; + struct MemoryConfiguration CMemoryDecodeAndLength[2]; + BYTE CIntLine[2]; + BYTE CDMALine[2]; + + LONG reserved2[7]; + BYTE reserved[2]; + LONG CLinearMemory[2]; + WORD CChannelNumber; + LONG CBusTag; + WORD CIOConfigVersion; +}; + +struct AdapterSpecificInfoDef +{ + LONG status; + OBID subsystemid; + LONG assigneddriverid; + LONG adapternumber; + struct IO_ConfigurationStructure configinfo; + BYTE drivername[MM_MAX_OBJECT_STRING_LEN]; + BYTE systemname[MM_MAX_OBJECT_STRING_LEN]; +}; + +struct DeviceSpecificInfoDef +{ + LONG status; + OBID subsystemid; + BYTE targetnumber; + BYTE unitnumber; + BYTE cardnumber; + BYTE accessflags; + LONG devicetype; + + LONG blocksize; + LONG unitsize; + BYTE heads; + BYTE sectors; + WORD cylinders; + LONG capacity; + + OBID mmadapterid; + OBID mmmediaid; + BYTE rawname[MM_MAX_OBJECT_STRING_LEN]; +}; + +struct RaidDeviceSpecificInfoDef +{ + struct DeviceSpecificInfoDef deviceInfo; + LONG raidType; + LONG stripeSize; + LONG elementSize; + LONG elementCount; + LONG restripeFlag; +}; + +struct ChangerSpecificInfoDef +{ + LONG status; + LONG numberofdevices; + LONG numberofslots; + LONG numberofmailslots; + LONG reserved[8]; + LONG slotmappingtable[1]; +}; + + +struct PartitionSpecificInfoDef +{ + LONG status; + LONG partitionertype; + LONG partitiontype; + LONG partitionoffset; + LONG partitionsize; + BYTE bootflag; + BYTE partitionindex; + BYTE reservedbyte[2]; + LONG reserved; + BYTE label[MM_MAX_OBJECT_STRING_LEN]; +}; + +/* +** Partition Status +*/ + +#define MM_PARTITION_LABELED 0x01 +/* +** Partitioner Types +*/ + +#define MM_INTERNAL_PARTITIONER 0x01 +#define MM_EXTERNAL_PARTITIONER 0x02 + +/* +** Partition Types +*/ + +#define NETWARE_FREE_PARTITION ( 0 | (MM_INTERNAL_PARTITIONER << 8)) +#define NETWARE_HOTFIX_PARTITION (0x062 | (MM_INTERNAL_PARTITIONER << 8)) +#define NETWARE_286_PARTITION (0x064 | (MM_INTERNAL_PARTITIONER << 8)) +#define NETWARE_386_PARTITION (0x065 | (MM_INTERNAL_PARTITIONER << 8)) +#define NETWARE_SMS_PARTITION (0x066 | (MM_INTERNAL_PARTITIONER << 8)) +#define NETWARE_NSS_PARTITION (0x069 | (MM_INTERNAL_PARTITIONER << 8)) +#define NETWARE_VDEVICE_PARTITION (0x0CF | (MM_INTERNAL_PARTITIONER << 8)) +#define ORION_SBD_PARTITION (0x0AD | (MM_INTERNAL_PARTITIONER << 8)) +#define REMOTE_STORAGE_PARTITION (0x0AE | (MM_INTERNAL_PARTITIONER << 8)) +#define NOVELL_ISCSI_PARTITION (0x07F | (MM_INTERNAL_PARTITIONER << 8)) + +/* +** Partition Upgrade flags +*/ + +#define PARTITION_UPGRADE_CHECK 0x00 +#define PARTITION_UPGRADE_COMPLETE 0x01 +#define PARTITION_UPGRADE_NONSHARED 0x02 + +/* +** Partition Event Data Structures +*/ + +#define PARTITION_CREATE_ENTER_EVENT "MM.CreatePartition.Enter" +#define PARTITION_CREATE_EXIT_EVENT "MM.CreatePartition.Exit" +#define PARTITION_DELETE_ENTER_EVENT "MM.DeletePartition.Enter" +#define PARTITION_DELETE_EXIT_EVENT "MM.DeletePartition.Exit" +#define PARTITION_EXPAND_ENTER_EVENT "MM.ExpandPartition.Enter" +#define PARTITION_EXPAND_EXIT_EVENT "MM.ExpandPartition.Exit" +#define PARTITION_INIT_ENTER_EVENT "MM.InitializeDisk.Enter" +#define PARTITION_INIT_EXIT_EVENT "MM.InitializeDisk.Exit" + +/* NOTE: PARTITION_EXPAND_ENTER_EVENT uses the PartitionDeleteEnterDef. + PARTITION_EXPAND_EXIT_EVENT uses the PartitionCreateExitDef */ + +struct PartitionCreateEnterDef +{ + LONG enterExitID; + OBID deviceID; + LONG sizeInSectors; + LONG partitiontype; + LONG shared; /* shared status of the device. */ +}; + +struct PartitionCreateExitDef +{ + LONG enterExitID; + LONG enterRetStatus; + LONG opRetCode; + LONG partitionID; + LONG shared; /* shared status of the partition. */ +}; + +struct PartitionDeleteEnterDef +{ + LONG enterExitID; + LONG partitionID; + LONG shared; /* shared status of the partition. */ +}; + +struct PartitionDeleteExitDef +{ + LONG enterExitID; + LONG enterRetStatus; + LONG opRetCode; + LONG shared; /* shared status of the partition. */ +}; + +struct InitializeDiskEnterDef +{ + LONG enterExitID; + LONG deviceID; + LONG shared; /* shared status of the partition. */ +}; + +struct InitializeDiskExitDef +{ + LONG enterExitID; + LONG enterRetStatus; + LONG opRetCode; + LONG shared; /* shared status of the partition. */ +}; + + +struct HotfixSpecificInfoDef +{ + LONG hotfixoffset; + LONG hotfixidentifier; + LONG numberoftotalblocks; + LONG numberofusedblocks; + + LONG numberofavailableblocks; + LONG numberofsystemblocks; + LONG status; +}; + +struct MirrorSpecificInfoDef +{ + LONG status; + LONG mirrorcount; + LONG remirrorpercentage; + LONG mirroridentifier; + OBID mirrormembers[MM_MAX_MIRROR_MEMBERS]; + BYTE memberpercentremirrored[MM_MAX_MIRROR_MEMBERS]; +}; + +/* +** Mirror Object Status +*/ + +#define MM_MIRROR_GROUP_IN_SYNC 0x0001 +#define MM_MIRROR_ALL_PRESENT 0x0002 +#define MM_MIRROR_OPERATIONAL 0x0004 +#define MM_MIRROR_PARTIAL_SYNC 0x0010 +#define MM_MIRROR_VERIFYING 0x0020 +#define MM_MIRROR_REMIRRORING 0x0040 +#define MM_MIRROR_OBJECT_ORHANED 0x0080 +#define MM_MIRROR_WAITING 0x0100 +#define MM_MIRROR_OWNER 0x0200 + +/* This structure attaches the mirror guid, +** and is available only in RAID1 mirroring. */ +struct Raid1SpecificInfoDef +{ + struct MirrorSpecificInfoDef mirrorinfo; + LONG guid[4]; +}; + +struct MagazineSpecificInfoDef +{ + LONG status; + BYTE name[MM_MAX_OBJECT_STRING_LEN]; //??? + LONG numberofslots; + OBID slotmappingtable[1]; +}; + +struct GroupSpecificInfoDef +{ + QUAD capacity; + LONG elementcount; + LONG status; + LONG type; +}; + +struct SnapshotSpecificInfoDef +{ + BYTE name[64]; + OBID poolid; + OBID snappoolid; + LONG timestamp; + LONG attributes; + QUAD poolsize; /* in bytes */ + QUAD allocatedsize; /* in bytes */ +}; + +/* Snapshot attributes */ +#define SNAPSHOT_ACTIVATED 0x00000001 + +//#error Do these elements need to be type OBID? + +struct InsertRequestDef +{ + LONG deviceid; + LONG mailslot; + LONG mediaid; + LONG mediacount; +}; + +struct MediaRequestDef +{ + OBID devicenumber; + OBID mailslot; + OBID medianumber; + LONG mediacount; +}; + +struct MMIOStats +{ + LONG readbytecount[32]; + LONG readrequestcount[32]; + LONG writebytecount[32]; + LONG writerequestcount[32]; + LONG laststatstime; +}; + +struct MMStatsDefv0 +{ + LONG deltatime; + LONG readbytecount; + LONG readrequestcount; + LONG writebytecount; + LONG writerequestcount; + LONG percpurequests[32]; /* MAXIMUM_NUMBER_OF_PROCESSORS */ + LONG percpusurrogaterequests[32]; +}; + +struct SectorMappingElementDef +{ + OBID deviceID; + LONG startingsector; + LONG numberOfSectors; +}; + +struct SectorMappingDef +{ + LONG elementsAllocated; + LONG elementsReturned; + QUAD mapSector; + LONG sectorCount; + struct SectorMappingElementDef element[1]; +}; + + +/**************************************************************************** +** +** Public APIs +*/ + +/*extern LONG HJ_MediaRequest( + struct InsertRequestDef *_minfo, + LONG _requestcode, + OBID *_uniqueid ); +*/ +extern LONG MM_HJRequestAck(struct InsertRequestDef *_insertrequestinfo, + LONG *_ackcode, + void *_uniqueID); + +/*extern LONG HJ_MediaRequestAck( + struct InsertRequestDef *_minfo, + LONG _ackcode, + OBID _uniqueid ); +*/ +extern LONG MM_AbortRequest( HNDL _messagehandle ); + +#ifndef MMSDK +extern LONG MM_AllocatePerCPUVector( + void **_vector, + struct ResourceTagStructure *_resourcetag ); +#endif + +extern LONG MM_FreePerCPUVector( void *_vector ); + +extern LONG MM_CheckForPendingAborts( void ); + +extern LONG MM_CreateRemovableObject( +// HNDL *_mmmediahandle, + OBID *_mmmediaid, +// OBID _objectid, + OBID _parentobjectid, + struct CreateRemovableInfoDef *_removableinfo, +// OBID _mediaobjectmanagerid, + LONG _mmioobjecttype, + HNDL _mmapplicationhandle, +#ifdef MMSDK + LONG _resourcetag ); +#else + struct ResourceTagStructure *_resourcetag ); +#endif + +extern LONG MM_DeleteRemovableObject( OBID _mmobjectid ); + +extern LONG MM_FindObjectType( + LONG _class, + LONG _type, + OBID *_objectid ); + +extern LONG MM_GetObjectAttribute( + OBID _objectid, + LONG _attributeid, + LONG _infolength, + void *_info ); + +extern LONG MM_ObjectBlockingIO( + LONG *_returnparameter, + HNDL _mmreservationhandle, + LONG _function, + LONG _parameter0, + LONG _parameter1, + LONG _parameter2, + LONG _bufferlength, + void *_buffer ); + +extern LONG MM_ObjectIO( + HNDL *_messagehandle, + HNDL _mmreservationhandle, + LONG _function, + LONG _parameter0, + LONG _parameter1, + LONG _parameter2, + LONG _bufferlength, + void *_buffer, + LONG _requesttoken, + void (*_callbackroutine)() ); + +extern LONG MM_ObjectNonBlockingIO( + LONG *_returnparameter, + OBID _objectid, + LONG _function, + LONG _parm1, + LONG _parm2, + LONG _parm3, + LONG _bufferlength, + void *_buffer); + +extern LONG MM_ObjectControl( + OBID _objectid, + LONG _function, + LONG _parm1, + LONG _parm2, + LONG _parm3, + LONG _bufferlength, + void *_buffer ); + +extern LONG MM_RegisterObject( + HNDL *_mmobjecthandle, + LONG _class, + void *_objectinfo, + HNDL _mmapplicationhandle, +#ifdef MMSDK + LONG _resourcetag ); +#else + struct ResourceTagStructure *_resourcetag ); +#endif + +extern LONG MM_ReleaseIOObject( HNDL _mmreservehandle ); + +extern LONG MM_ReleaseUnloadSemaphore( LONG _currentinstance ); + +extern LONG MM_RenameObject( + OBID _objectid, + BYTE *_name ); + +extern LONG MM_ReserveIOObject( + HNDL *_mmreservationhandle, + OBID _objectid, + LONG _iomode, + LONG _alerttoken, + LONG (*_alertroutine)( HNDL reservationhandle, + LONG token, + LONG alerttype, + LONG alertreason ), + HNDL _applicationhandle ); + +extern LONG MM_ReturnIOStatistics( + OBID applicationHandle, + struct MMStatsDefv0 *_info, + LONG version ); + +extern LONG MM_ReturnMediaManagerStatistics( + struct MMStatsDefv0 *_info, + LONG version ); + +extern LONG MM_ReturnNextObjectAttribute( + OBID _objectid, + OBID *_nextattributeobjectid, + LONG *_attributeid ); + +extern LONG MM_ReturnObjectGenericInfo( + OBID _objectid, + LONG _infolength, + void *_info ); + +extern LONG MM_ReturnObjectHandle( + HNDL *_handle, + OBID _objectid, + HNDL _applicationhandle ); + +extern LONG MM_ReturnObjectMappingInfo( + OBID _objectid, + LONG _class, + LONG _infolength, + void *_info ); + +extern LONG MM_ReturnObjectOBID( + OBID *_objectobid, + HNDL _objecthandle ); + +extern LONG MM_ReturnObjectProgenitor( + OBID _progeny, + LONG _progenitortype, + OBID *_progenitor ); + +extern LONG MM_ReturnObjectSpecificInfo( + OBID _objectid, + LONG _infolength, + void *_info ); + +extern LONG MM_ReturnPhysicalSectorMapping( + OBID _objectid, + struct SectorMappingDef *_sectorMap); + +extern void MM_ScanForNewDevices( void ); + +extern LONG MM_ScanForNewPartitions( OBID _deviceID ); + +extern LONG MM_SetObjectAttribute( + OBID _objectid, + LONG _attributeid, + LONG _infolength, + void *_info ); + +extern LONG MM_SetUnloadSemaphore( LONG *_currentinstance ); + +extern LONG MM_SpecialObjectBlockingIO( + LONG *_returnparameter, + OBID _objectid, + LONG _function, + LONG _parameter0, + LONG _parameter1, + LONG _parameter2, + LONG _bufferlength, + void *_buffer); + +extern LONG MM_UnregisterObject( HNDL _mmobjecthandle, LONG _reason ); + +extern LONG MM_ValidateHandle( HNDL _handle ); + +extern LONG MM_ValidateID( OBID _id ); + +extern LONG MM_CreateRaid( + LONG type, + OBID partitionID, + LONG stripeSize, + BYTE *name, + HNDL *newRaidHNDL); + +extern LONG MM_CreateRaidWithNewPartition( + LONG partitionType, + LONG raidType, + OBID *freePartitionID, + LONG segmentSize, + LONG stripeSize, + BYTE *name, + HNDL *newRaidHNDL); + +extern LONG MM_DeleteRaid(OBID raidID); + +extern LONG MM_ExpandRaid( + OBID raidID, + OBID partitionID); + +extern LONG MM_ExpandRaidWithNewPartition( + OBID raidID, + OBID *freePartitionID); + +extern LONG MM_ExpandGroup( + OBID groupid, + OBID elementid, + BYTE *name, + BYTE *guid, + OBID *newgroupid); + +extern LONG MM_DeleteGroup( OBID groupid); + +extern LONG MM_ReturnGroupElementInfo( + OBID groupid, + OBID elementid, + QUAD *offset, + QUAD *size); + +extern LONG MM_CreateSnapshot( + BYTE *pool, + BYTE *snappool, + BYTE *snapname, + HNDL *snapID); + +extern LONG MM_DeleteSnapshot( BYTE *snapname ); +extern LONG MM_ActivateSnapshot( BYTE *snapname ); +extern LONG MM_DeactivateSnapshot( BYTE *snapname ); +extern LONG MM_RenameSnapshot( + BYTE *snapname, + BYTE *newname ); + + +extern LONG MM_UpgradePartitions(LONG flag); + + +/***************************************************************** +** Defines for the Volume Functions ** +*****************************************************************/ + +//#define MM_VOLUME_INIT_FILE_SYSTEM 0x00 //obsolete +#define MM_VOLUME_RETURN_CONFIG_DIALOG 0x01 +#define MM_VOLUME_CREATE 0x02 +#define MM_VOLUME_DELETE 0x03 +#define MM_VOLUME_MOUNT 0x04 +#define MM_VOLUME_DISMOUNT 0x05 +#define MM_VOLUME_EXPAND 0x06 +#define MM_VOLUME_NAMES 0x07 +#define MM_VOLUME_RETURN_TOKEN 0x08 +#define MM_VOLUME_SCAN 0x09 +#define MM_VOLUME_GET_INFO 0x0A +#define MM_VOLUME_CHANGE_INFO 0x0B +#define MM_VOLUME_MOUNT_CHECK 0x0C +#define MM_VOLUME_RETURN_LIMITS 0x0D +#define MM_VOLUME_RETURN_MAPPING 0x0E +#define MM_VOLUME_RETURN_PARTITION_MAPPING 0x0F +//do not use 0x10 - same as HJ_LOAD_APPLICATION_FUNCTION +//do not use 0x11 - same as HJ_UNLOAD_APPLICATION_FUNCTION +#define MM_VOLUME_TO_POOL_MAPPING 0x12 +#define MM_VOLUME_VALIDATE_NAME 0x13 +#define MM_POOL_LOAD 0x20 +#define MM_POOL_CREATE 0x22 +#define MM_POOL_DELETE 0x23 +#define MM_POOL_ACTIVATE 0x24 +#define MM_POOL_DEACTIVATE 0x25 +#define MM_POOL_EXPAND 0x26 +#define MM_POOL_NAMES 0x27 +#define MM_POOL_GET_INFO 0x2A +#define MM_POOL_CHANGE_INFO 0x2B +#define MM_POOL_ACTIVE_CHECK 0x2C +#define MM_POOL_RETURN_MAPPING 0x2E +#define MM_POOL_RETURN_PARTITION_MAPPING 0x2F +#define MM_POOL_MAINTENANCE 0x30 +#define MM_POOL_VALIDATE_NAME 0x33 +#define MM_POOL_NEW_SNAPSHOT 0x18 +/* The following snap defines are for internal use only. */ +#define MM_SNAP_CREATE_FILE 0x19 +#define MM_SNAP_ALLOCATE_BLOCKS 0x1A +#define MM_SNAP_DELETE_FILE 0x1B +#define MM_SNAP_GET_FREE_TREE 0x1C +#define MM_SNAP_FREEZE 0x1D +#define MM_SNAP_THAW 0x1E + +#define MM_CLASSIC_FILESYSTEM_ID 0x464E4333 /*FNC3*/ +#define MM_NSS_FILESYSTEM_ID 0x464E5353 /*FNSS*/ +#define MM_DOS_FILESYSTEM_ID 0x46444F53 /*FDOS*/ + +/* Pool status defines */ +#define MM_POOL_STATE_UNKNOWN 0 /* Pool is new and not available */ +#define MM_POOL_STATE_DEACTIVE 2 /* Pool is not currently activated */ +#define MM_POOL_STATE_MAINTENANCE 3 /* Pool is in a maintenance mode */ +#define MM_POOL_STATE_ACTIVE 6 /* Pool is active and available */ + +#define MM_BOOLEAN -1 +#define MM_UINT8 -2 +#define MM_UINT16 -3 +#define MM_UINT32 -4 +#define MM_QUAD -5 +#define MM_MENU -6 + +/* +** MM_VOLUME_CONFIG_REVISION: +** The MSW is the version of the VolumeConfigElementList structure. +** The LSW is the version of the VolumeConfigElementDef structute. +*/ +#define MM_VOLUME_CONFIG_REVISION 0x00000000 + +#define MM_MODIFIABLE_ELEMENT 0x00000001 +#define MM_UNICODE_TEXT 0x00000002 + +struct ElementMenuList +{ + LONG numberOfChoices; + BYTE **choice; +}; + +struct VolumeConfigElementDef +{ + BYTE *name; + BYTE *description; + struct ElementMenuList *menu; + void *data; + LONG size; + LONG attributes; +}; + +struct VolumeConfigElementList +{ + LONG revision; + LONG numberOfElements; + void *token; + struct VolumeConfigElementDef *elements; +}; + +struct VolumeMappingElementDef +{ + OBID logicalPartition; + LONG startingUnit; + LONG numberOfUnits; +}; + +struct VolumeMappingInfo +{ + BYTE *volumeName; + LONG numberOfElements; + struct VolumeMappingElementDef element[1]; +}; + +struct LogicalPartitionMappingElementDef +{ + BYTE *volumeName; + LONG startingUnit; + LONG numberOfUnits; +}; + +struct LogicalPartitionMappingInfo +{ + LONG numberOfElements; + struct LogicalPartitionMappingElementDef element[1]; +}; + +struct VolumeLimitDef +{ + LONG maxVolumeNameSize; + QUAD maxVolumeSize; + LONG maxBlockSize; + LONG maxSegmentSize; + LONG maxSegmentsPerVolume; + LONG maxVolumes; + LONG attributes; +}; + +struct VolumeNamesDef +{ + LONG attributes; + void *token; + BYTE *names; +}; + +struct VolumeInfoDef +{ + BYTE *volumeName; + QUAD numberOfBlocks; + LONG blockSize; + LONG unitSize; + struct VolumeConfigElementList *info; +}; + +#endif // _MMPUBLIC_H_ diff --git a/include/nwnss/support/lnxmbINC/mpktypes.h b/include/nwnss/support/lnxmbINC/mpktypes.h new file mode 100644 index 0000000..5a46487 --- /dev/null +++ b/include/nwnss/support/lnxmbINC/mpktypes.h @@ -0,0 +1,96 @@ +/***************************************************************************** + * + * (C) Copyright 1988-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 + * + * $Author: taysom $ + * $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ + * $RCSfile$ + * $Revision: 465 $ + ****************************************************************************/ + + + + +#ifndef _MPKTYPES_H_ +#define _MPKTYPES_H_ +#if 0 // GLP - should not need as we use "linuxmpk.h" +#include "portable.h" + + +/* + * Various data typedefs + */ +typedef void * THREAD; +typedef void * APPL; +typedef void * SPINLOCK; +typedef void * MUTEX; +typedef void * SEMAPHORE; +typedef void * RWLOCK; +typedef void * RWMUTEX; +typedef void * BARRIER; +typedef void * QUE; +typedef void * QUE_LIGHT; +typedef void * INTTAG; +typedef void * HANDLE; + +typedef void * SCREEN; + +typedef unsigned long FLAGS; +typedef unsigned long ERROR; +typedef unsigned long PROCESSOR; + +typedef void * CONDITION; + +// +// WARNING!!!: +// The following are for Novell Internal use only. +// Until an alternate place is found, they will +// be retained here. +// + +typedef void * SPINRWLOCK; +typedef void * KCONDITION; +typedef void * RESOURCETAG; +typedef void * MODULEHANDLE; + +/********** + Macros +**********/ + +#define CpuBitSet( x ) while( ( x & CpuBit ) == 0 ) { x |= CpuBit; } +#define CpuBitClear( x ) while( ( x & CpuBit ) != 0 ) { x &= ~CpuBit; } + +// +// Clear the Nth bit (0 based) in a bit map. +// + +#define ClearBit(BitMap, BitNum) (BitMap &= ~((UINT) 1 << (BitNum))) + +// +// Set the Nth bit (0 based) in a bit map. +// + +#define SetBit(BitMap, BitNum) (BitMap |= (1 << (BitNum))) + +// +// Module internal data/routines should be "visible" only during debugging. +// + +#endif // #if 0 +#endif diff --git a/include/nwnss/support/lnxmbINC/nmevents.h b/include/nwnss/support/lnxmbINC/nmevents.h new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/include/nwnss/support/lnxmbINC/nmevents.h @@ -0,0 +1 @@ + diff --git a/include/nwnss/support/lnxmbINC/subjects.h b/include/nwnss/support/lnxmbINC/subjects.h new file mode 100644 index 0000000..ec88449 --- /dev/null +++ b/include/nwnss/support/lnxmbINC/subjects.h @@ -0,0 +1,58 @@ +#ifndef __SUBJECTS_H__ +#define __SUBJECTS_H__ +/***************************************************************************** + * + * (C) Copyright 1989-1994 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 + * + * $RCSfile$ + * $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $ + * $Revision: 465 $ + * + ****************************************************************************/ + +/* + ID is built as Subject.Instance + Known Subjects +*/ + +#define ServerSubjects 0x00010000 +#define MemorySubjects 0x00020000 +#define NCPSubjects 0x00030000 +#define OSSubjects 0x00040000 +#define CommunicationSubjects 0x00050000 +#define FileSystemSubjects 0x00060000 +#define AdaptorSubjects 0x00070000 +#define QueueSubjects 0x00080000 +#define ConnectionSubjects 0x00090000 +#define VolumeMgrSubjects 0x000A0000 +#define MediaManagerSubjects 0x000B0000 +#define SetCmdSubjects 0x000C0000 +#define NLMSubjects 0x000D0000 +#define TTSSubjects 0x000E0000 +#define LocksSubjects 0x000F0000 +#define CompressionSubjects 0x00100000 +#define SFTIIISubjects 0x00110000 +#define VirtualMemorySubjects 0x00120000 +#define MPKSubjects 0x00130000 + +/****************************************************************************/ +/****************************************************************************/ + + +#endif /* __SUBJECTS_H__ */ diff --git a/src/nwnss/nwnssSourceCompat.h b/src/nwnss/nwnssSourceCompat.h index a974781..4854940 100644 --- a/src/nwnss/nwnssSourceCompat.h +++ b/src/nwnss/nwnssSourceCompat.h @@ -9,6 +9,38 @@ */ #include #include +#include + +#ifdef wPause +#undef wPause +#define wPause(_file, _mode) LB_wPause((WFile_s *)(void *)(_file), (_mode)) +#endif + +#ifndef UINT32 +typedef LONG UINT32; +#endif + +#ifndef aprintf +#define aprintf LB_aprintf +#endif + +#ifndef KERN_INFO +#define KERN_INFO "" +#endif +#ifndef KERN_WARNING +#define KERN_WARNING "" +#endif +#ifndef KERN_ERR +#define KERN_ERR "" +#endif +#ifndef printk +#define printk(...) fprintf(stderr, __VA_ARGS__) +#endif + +#ifndef ZOS_ProduceEvent +#define ZOS_ProduceEvent(_status, _event) \ + do { (_status) = ProduceEvent((_event)); } while (0) +#endif #ifndef EXPORT_SYMBOL #define EXPORT_SYMBOL(_sym)