Copyright ã1993 by Novell, Inc. and NeXT Computer, Inc.  All Rights Reserved.

Appendix B:  NetWare Errors

NWErrno

When an API returns an "unsuccessful" completion code (-1 for most calls, 0 for NWBoolean calls), a corresponding error code is placed in NWErrno (provided as part of nwapi.h).  NWErrno is a 4-byte value that tells you which API section the failure code came from, where the failure originated (from the client or from the file server), whether the error code is specific to one section of APIs or global among many sections, and what the actual error code is.  This appendix describes the NWErrno value according to each byte and the NetWare errors that are represented by the error code. 

Note:	You should declare NWErrno (in the nwapi.h include file) and include NWERRORS.H in your code if you want to receive NetWare errors.  The syntax would be as follows:

	#include "nwerrors.h"
	extern uint32 NWErrno;

Each byte in the 4-byte NWErrno represents one part of the total error code which helps you debug your programs calling the NetWare C Interface for UNIX APIs.  The bytes are labelled according to the following diagram.

TABLE 12.	Bytes in NWErrno

High	---------------------	---------------------	Low

1	2	3	4

The 1st byte in NWErrno is reserved for future use.

The 2nd byte in NWErrno identifies the area of APIs from which the error originated (Accounting, Bindery, Connection, etc.).  The following values correspond to the API sections:

	0x01	Accounting
	0x07	Bindery
	0x09	Connection
	0x11	Files
	0x1B	Path
	0x21	Queue
	0x23	Server Platform
	0x27	Synchronization
	0x29	Transaction Tracking
	0x15	Miscellaneous

The 3rd byte in NWErrno will identify what generated the error: the file server or an API.  This byte will contain one of the following values:

	0x00	File server
	0x10	API
	0x20	API

If a file server value is returned, the call failed after a valid request was made to the file server.  If an API value is returned, the called failed before a request was made to the file server.  

The 4th Byte in NWErrno will contain a value which represents one of the following NetWare Errors (as defined in NWERRORS.H):

Errors returned in the 4th Byte of NWErrno:

NWERR_PATH_TOO_LONG	0x01
NWERR_BAD_SRCH_DRIVE_VECTOR	0x01
NWERR_VERSION_TOO_LOW	0x01
NWERR_INVALID_PARAMETER_LENGTH	0x01
NWERR_SETTING_UP_TRANSPORT	0x01
NWERR_INVALID_PATH_LENGTH	0x02
NWERR_SFT_LEVEL_TOO_LOW	0x02
NWERR_TRANSPORT_OPEN	0x02
NWERR_TRANSPORT_CLOSE	0x03
NWERR_NOT_CONNECTED_TO_SERVER	0x04
NWERR_CONNECT_LIST_OVERFLOW	0x04
NWERR_TTS_LEVEL_TOO_LOW	0x04
NWERR_AFP_LEVEL_TOO_LOW	0x08
NWERR_INVALID_DRIVE_NUM	0x20
NWERR_NO_MORE_RESTRICTIONS	0x24
NWERR_NO_DRIVES_AVAILABLE	0x25
NWERR_WS_DOES_NOT_SUPPORT	0x30
NWERR_INVALID_CONNECTION_ID	0x30
NWERRR_INVALID_NCP_PACKET_LENGTH	0x31
NWERR_SETTING_UP_TIMEOUT	0x32
NWERR_TRANSPORT_SEND	0x33
NWERR_IN_SETTING_SIGNALS	0x34
NWERR_SERVER_CONNECTION_LOST	0x35
NWERR_FILE_IN_USE	0x80
NWERR_NO_MORE_FILE_HANDLES	0x81
NWERR_NO_OPEN_PRIVILEGES	0x82
NWERR_IO_ERROR_NETWORK_DISK	0x83
NWERR_NO_CREATE_PRIVILEGES	0x84
NWERR_NO_CREATE_DELETE_PRIVILEGES	0x85
NWERR_CREATE_FILE_EXISTS_READ_ONLY	0x86
NWERR_CREATE_ERROR	0x87
NWERR_WILDCARDS_IN_CREATE_FILE_NAME	0x87
NWERR_INVALID_FILE_HANDLE	0x88
NWERR_NO_SEARCH_PRIVILEGES	0x89
NWERR_NO_DELETE_PRIVILEGES	0x8A
NWERR_NO_RENAME_PRIVILEGES	0x8B
NWERR_NO_MODIFY_PRIVILEGES	0x8C
NWERR_SOME_FILES_AFFECTED_IN_USE	0x8D
NWERR_ENTRY_IN_USE	0x8D
NWERR_NO_FILES_AFFECTED_IN_USE	0x8E
NWERR_SOME_FILES_AFECTED_READ_ONLY	0x8F
NWERR_NO_FILES_AFFECTED_READ_ONLY	0x90
NWERR_ALL_FILE_READ_ONLY	0x90
NWERR_SOME_FILES_RENAMED_NAME_EXISTS	0x91
NWERR_NO_FILES_RENAMED_NAME_EXISTS	0x92
NWERR_NO_READ_PRIVILEGES	0x93
NWERR_INVALID_OPEN_ACCESS_RIGHTS	0x94
NWERR_NO_WRITE_PRIVILEGES_OR_READ_ONLY	0x94
NWERR_FILE_DETACHED	0x95
NWERR_SERVER_OUT_OF_MEMORY	0x96
NWERR_NO_DISK_SPACE_FOR_SPOOL_FILE	0x97
NWERR_VOLUME_DOES_NOT_EXIST	0x98
NWERR_BAD_VOL_NUM	0x98
NWERR_DIRECTORY_FULL	0x99
NWERR_INVALID_NAME	0x99
NWERR_RENAMING_ACROSS_VOLUMES	0x9A
NWERR_BAD_DIRECTORY_HANDLE	0x9B
NWERR_INVALID_PATH	0x9C
NWERR_NO_MORE_TRUSTEES	0x9C
NWERR_NO_MORE_DIRECTORY_HANDLES	0x9D
NWERR_INVALID_FILENAME	0x9E
NWERR_DIRECTORY_ACTIVE	0x9F
NWERR_DIRECTORY_NOT_EMPTY	0xA0
NWERR_DIRECTORY_IO_ERROR	0xA1
NWERR_READ_FILE_WITH_RECORD_LOCKED	0xA2
NWERR_NO_ACCOUNT_PRIVILEGES	0xC0
NWERR_LOGIN_DENIED_NO_ACCOUNT_BALANC	0xC1
NWERR_CREDIT_LIMIT_EXCEEDED	0xC2
NWERR_LOGIN_DENIED_NO_CREDIT	0xC2
NWERR_INTRUDER_DETECTION_LOCK	0xC5
NWERR_LOGIN_LOCKOUT	0xC5
NWERR_NO_CONSOLE_OPERATOR_RIGHTS	0xC6
NWERR_Q_ERROR	0xD0
NWERR_NO_QUEUE	0xD1
NWERR_NO_QUEUE_SERVER	0xD2
NWERR_NO_QUEUE_RIGHTS	0xD3
NWERR_Q_FULL	0xD4
NWERR_NO_JOB	0xD5
NWERR_NO_JOB_RIGHTS	0xD6
NWERR_PASSWORD_NOT_UNIQUE	0xD7
NWERR_Q_SERVICING	0xD7
NWERR_PASSWORD_TOO_SHORT	0xD8
NWERR_Q_NOT_ACTIVE	0xD8
NWERR_LOGIN_DENIED_NO_CONNECTION	0xD9
NWERR_Q_PASSWORD_TOO_SHORT	0xD9
NWERR_UNAUTHORIZED_LOGIN_TIME	0xDA
NWERR_Q_HALTED	0xDA
NWERR_UNAUTHORIZED_LOGIN_STATION	0xDB
NWERR_MAX_QUEUE_SERVERS	0xDB
NWERR_ACCOUNT_DISABLED	0xDC
NWERR_BAD_PASSWORD	0xDE
NWERR_PASSWORD_HAS_EXPIRED_NO_GRACE	0xDE
NWERR_PASSWORD_HAS_EXPIRED	0xDF
NWERR_UNENCRYPTED_PASSWORD	0xD6
NWERR_ACCOUNT_BAD	0xD7
NWERR_NO_DISK_TRACK	0xD7
NWERR_MAX_LOGINS_EXCEEDED	0xD9
NWERR_NOT_ITEM_PROPERTY	0xE8
NWERR_WRITE_PROPERTY_TO_GROUP	0xE8
NWERR_MEMBER_ALREADY_EXISTS	0xE9
NWERR_NO_SUCH_MEMBER	0xEA
NWERR_NOT_SET_PROPERTY	0xEB
NWERR_NO_SUCH_SEGMENT	0xEC
NWERR_NO_SUCH_SET	0xEC
NWERR_PROPERTY_ALREADY_EXISTS	0xED
NWERR_OBJECT_ALREADY_EXISTS	0xEE
NWERR_INVALID_NAME	0xEF
NWERR_WILD_CARD_NOT_ALLOWED	0xF0
NWERR_ILLEGAL_WILDCARD	0xF0
NWERR_INVALID_BINDERY_SECURITY	0xF1
NWERR_NO_OBJECT_READ_PRIVILEGE	0xF2
NWERR_NO_OBJECT_RENAME_PRIVILEGE	0xF3
NWERR_NO_OBJECT_DELETE_PRIVILEGE	0xF4
NWERR_NO_OBJECT_CREATE_PRIVILEGE	0xF5
NWERR_NO_PROPERTY_DELETE_PRIVILEGE	0xF6
NWERR_NOT_SAME_LOCAL_DRIVE	0xF6
NWERR_NO_PROPERTY_CREATE_PRIVILEGE	0xF7
NWERR_TARGET_DRIVE_NOT_LOCAL	0xF7
NWERR_ALREADY_ATTACHED_TO_SERVER	0xF8
NWERR_NO_PROPERTY_WRITE_PRIVILEGE	0xF8
NWERR_NOT_ATTACHED_TO_SERVER	0xF8
NWERR_NO_FREE_CONNECTION_SLOTS	0xF9
NWERR_NO_MORE_PROP_VALS	0xF9
NWERR_NO_PROPERTY_READ_PRIVILEGE	0xF9
NWERR_NO_MORE_SERVER_SLOTS	0xFA
NWERR_TEMP_REMAP_ERROR	0xFA
NWERR_INVALID_PARAMETERS	0xFB
NWERR_NO_MORE_PROPERTIES	0xFB
NWERR_NO_SUCH_PROPERTY	0xFB
NWERR_NOT_386_FILE_SYSTEM	0xFB 
NWERR_INTERNET_PACKET_REQT_CANCELED	0xFB
NWERR_SEMAPHORE_INVALID_PARAMETERS	0xFB
NWERR_SYNC_INVALID_PARAMETERS	0xFB
NWERR_UNKNOWN_FILE_SERVER	0xFC 
NWERR_MESSAGE_QUEUE_FULL	0xFC 
NWERR_NO_SUCH_OBJECT	0xFC 
NWERR_NO_MORE_OBJECTS	0xFC
NWERR_BAD_STATION_NUMBER	0xFD
NWERR_INVALID_PACKET_LENGTH	0xFD
NWERR_TTS_DISABLED	0xFD
NWERR_UNKNOWN_REQUEST	0xFD
NWERR_BINDERY_LOCKED	0xFE
NWERR_DIRECTORY_LOCKED	0xFE 
NWERR_INVALID_NAME_LENGTH	0xFE
NWERR_INVALID_SEMAPHORE_NAME_LENGTH	0xFE
NWERR_IMLPICIT_TRANS_ACTIVE	0xFE
NWERR_NO_SUCH_RESTRICTION	0xFE 
NWERR_PACKET_NOT_DELIVERABLE	0xFE
NWERR_RECORDS_STILL_LOCKED	0xFE 
NWERR_SERVER_BINDERY_LOCKED	0xFE 
NWERR_SOCKET_TABLE_FULL	0xFE 
NWERR_SPOOL_DIRECTORY_ERROR	0xFE
NWERR_SUPERVISOR_HAS_DISABLED_LOGIN	0xFE
NWERR_TIMEOUT_FAILURE	0xFE
NWERR_BAD_PRINTER_ERROR	0xFF
NWERR_BAD_RECORD_OFFSET	0xFF
NWERR_CLOSE_FCB_ERROR	0xFF
NWERR_ENTRY_EXISTS	0xFF
NWERR_ENTRY_NOT_FOUND	0xFF
NWERR_EXPLICIT_TRANS_ACTIVE	0xFF
NWERR_FILE_ALREADY_EXISTS	0xFF
NWERR_FILE_EXTENSION_ERROR	0xFF
NWERR_FILE_NAME_ERROR	0xFF
NWERR_HARDWARE_FAILURE	0xFF
NWERR_INVALID_DRIVE_NUMBER	0xFF
NWERR_INVALID_INITIAL_SEMAPHORE_VALUE	0xFF
NWERR_INVALID_SEMAPHORE_HANDLE	0xFF
NWERR_IO_BOUND_ERROR	0xFF
NWERR_NO_EXPLICIT_TRANS_ACTIVE	0xFF
NWERR_NO_FILES_FOUND_ERROR	0xFF
NWERR_NO_MORE_FILES_FOUND	0xFF
NWERR_NO_RESPONSE_FROM_SERVER	0xFF
NWERR_NO_SUCH_OBJECT_OR_BAD_PASSWORD	0xFF
NWERR_OPEN_FILES	0xFF
NWERR_PATH_NOT_LOCATABLE	0xFF
NWERR_QUEUE_FULL_ERROR	0xFF
NWERR_REQUEST_NOT_OUTSTANDING	0xFF
NWERR_SEMAPHORE_INVALID_VALUE	0xFF
NWERR_SEMAPHORE_INVALID_HANDLE	0xFF
NWERR_SOCKET_ALREADY_OPEN	0xFF
NWERR_SYNC_LOCK_FAILURE	0xFF
NWERR_SYNC_ENTRY_NOT_FOUND	0xFF
NWERR_SYNC_RECORD_NOT_FOUND	0xFF
NWERR_TRANS_NOT_WRITTEN	0xFF
NWERR_TTS_NOT_AVAILABLE	0xFF