aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-09-23 21:55:40 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-09-23 21:55:40 +0000
commit9def18eab5cff234aafca15bf71aa562c8e04797 (patch)
tree1682b328e46f34a2ff8c68ff1758ac5b58bc2713
parent60387260e74f161ab71f5e12ffe654ac8314d9b0 (diff)
we did not have a proper WERR error table for the windows errors insterad we justkept adding the errors to the DOS error table (this merging does work ok since there is so very little overlap between he values in both ranges)
Add a new WERR error table to packet-windows-common so that PIDL generated dissectors can use this table instead of the DOS table. To make this table as complete and accurate as possible and to avoid having to type all the values in by hand the table is generated from the samba doserr.h file and two small commandlines. The commends in pakcet-windows-common.h explains how to regenerate the table from doserr.h git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19306 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-windows-common.c103
-rw-r--r--epan/dissectors/packet-windows-common.h104
2 files changed, 207 insertions, 0 deletions
diff --git a/epan/dissectors/packet-windows-common.c b/epan/dissectors/packet-windows-common.c
index 41eda822ab..36fa321941 100644
--- a/epan/dissectors/packet-windows-common.c
+++ b/epan/dissectors/packet-windows-common.c
@@ -81,6 +81,109 @@ static gint ett_nt_ace_flags = -1;
static gint ett_nt_ace_object = -1;
static gint ett_nt_ace_object_flags = -1;
+/* WERR error codes
+ * This list is based on the samba doserr.h file and was generated by running
+cat doserr.h | grep "^#define WERR" | grep -v "FOOBAR"| sed -e "s/^#define[ \t]//" | while read WERR junk;do echo " {"${WERR}, \"${WERR}\""}," ; done
+ */
+const value_string WERR_errors[] = {
+ {WERR_OK, "WERR_OK"},
+ {WERR_BADFUNC, "WERR_BADFUNC"},
+ {WERR_BADFILE, "WERR_BADFILE"},
+ {WERR_ACCESS_DENIED, "WERR_ACCESS_DENIED"},
+ {WERR_BADFID, "WERR_BADFID"},
+ {WERR_NOMEM, "WERR_NOMEM"},
+ {WERR_GENERAL_FAILURE, "WERR_GENERAL_FAILURE"},
+ {WERR_NOT_SUPPORTED, "WERR_NOT_SUPPORTED"},
+ {WERR_BAD_NETPATH, "WERR_BAD_NETPATH"},
+ {WERR_UNEXP_NET_ERR, "WERR_UNEXP_NET_ERR"},
+ {WERR_PRINTQ_FULL, "WERR_PRINTQ_FULL"},
+ {WERR_NO_SPOOL_SPACE, "WERR_NO_SPOOL_SPACE"},
+ {WERR_NO_SUCH_SHARE, "WERR_NO_SUCH_SHARE"},
+ {WERR_FILE_EXISTS, "WERR_FILE_EXISTS"},
+ {WERR_BAD_PASSWORD, "WERR_BAD_PASSWORD"},
+ {WERR_INVALID_PARAM, "WERR_INVALID_PARAM"},
+ {WERR_INSUFFICIENT_BUFFER, "WERR_INSUFFICIENT_BUFFER"},
+ {WERR_INVALID_NAME, "WERR_INVALID_NAME"},
+ {WERR_UNKNOWN_LEVEL, "WERR_UNKNOWN_LEVEL"},
+ {WERR_OBJECT_PATH_INVALID, "WERR_OBJECT_PATH_INVALID"},
+ {WERR_ALREADY_EXISTS, "WERR_ALREADY_EXISTS"},
+ {WERR_NO_MORE_ITEMS, "WERR_NO_MORE_ITEMS"},
+ {WERR_MORE_DATA, "WERR_MORE_DATA"},
+ {WERR_CAN_NOT_COMPLETE, "WERR_CAN_NOT_COMPLETE"},
+ {WERR_NOT_FOUND, "WERR_NOT_FOUND"},
+ {WERR_INVALID_COMPUTERNAME, "WERR_INVALID_COMPUTERNAME"},
+ {WERR_INVALID_DOMAINNAME, "WERR_INVALID_DOMAINNAME"},
+ {WERR_UNKNOWN_REVISION, "WERR_UNKNOWN_REVISION"},
+ {WERR_REVISION_MISMATCH, "WERR_REVISION_MISMATCH"},
+ {WERR_INVALID_OWNER, "WERR_INVALID_OWNER"},
+ {WERR_NO_SUCH_PRIVILEGE, "WERR_NO_SUCH_PRIVILEGE"},
+ {WERR_PRIVILEGE_NOT_HELD, "WERR_PRIVILEGE_NOT_HELD"},
+ {WERR_NO_SUCH_USER, "WERR_NO_SUCH_USER"},
+ {WERR_INVALID_SECURITY_DESCRIPTOR, "WERR_INVALID_SECURITY_DESCRIPTOR"},
+ {WERR_NO_SUCH_DOMAIN, "WERR_NO_SUCH_DOMAIN"},
+ {WERR_NO_SYSTEM_RESOURCES, "WERR_NO_SYSTEM_RESOURCES"},
+ {WERR_SERVER_UNAVAILABLE, "WERR_SERVER_UNAVAILABLE"},
+ {WERR_INVALID_FORM_NAME, "WERR_INVALID_FORM_NAME"},
+ {WERR_INVALID_FORM_SIZE, "WERR_INVALID_FORM_SIZE"},
+ {WERR_ALREADY_SHARED, "WERR_ALREADY_SHARED"},
+ {WERR_BUF_TOO_SMALL, "WERR_BUF_TOO_SMALL"},
+ {WERR_JOB_NOT_FOUND, "WERR_JOB_NOT_FOUND"},
+ {WERR_DEST_NOT_FOUND, "WERR_DEST_NOT_FOUND"},
+ {WERR_NOT_LOCAL_DOMAIN, "WERR_NOT_LOCAL_DOMAIN"},
+ {WERR_DEVICE_NOT_AVAILABLE, "WERR_DEVICE_NOT_AVAILABLE"},
+ {WERR_STATUS_MORE_ENTRIES, "WERR_STATUS_MORE_ENTRIES"},
+ {WERR_PRINTER_DRIVER_ALREADY_INSTALLED, "WERR_PRINTER_DRIVER_ALREADY_INSTALLED"},
+ {WERR_UNKNOWN_PORT, "WERR_UNKNOWN_PORT"},
+ {WERR_UNKNOWN_PRINTER_DRIVER, "WERR_UNKNOWN_PRINTER_DRIVER"},
+ {WERR_UNKNOWN_PRINTPROCESSOR, "WERR_UNKNOWN_PRINTPROCESSOR"},
+ {WERR_INVALID_SEPARATOR_FILE, "WERR_INVALID_SEPARATOR_FILE"},
+ {WERR_INVALID_PRIORITY, "WERR_INVALID_PRIORITY"},
+ {WERR_INVALID_PRINTER_NAME, "WERR_INVALID_PRINTER_NAME"},
+ {WERR_PRINTER_ALREADY_EXISTS, "WERR_PRINTER_ALREADY_EXISTS"},
+ {WERR_INVALID_PRINTER_COMMAND, "WERR_INVALID_PRINTER_COMMAND"},
+ {WERR_INVALID_DATATYPE, "WERR_INVALID_DATATYPE"},
+ {WERR_INVALID_ENVIRONMENT, "WERR_INVALID_ENVIRONMENT"},
+ {WERR_UNKNOWN_PRINT_MONITOR, "WERR_UNKNOWN_PRINT_MONITOR"},
+ {WERR_PRINTER_DRIVER_IN_USE, "WERR_PRINTER_DRIVER_IN_USE"},
+ {WERR_SPOOL_FILE_NOT_FOUND, "WERR_SPOOL_FILE_NOT_FOUND"},
+ {WERR_SPL_NO_STARTDOC, "WERR_SPL_NO_STARTDOC"},
+ {WERR_SPL_NO_ADDJOB, "WERR_SPL_NO_ADDJOB"},
+ {WERR_PRINT_PROCESSOR_ALREADY_INSTALLED, "WERR_PRINT_PROCESSOR_ALREADY_INSTALLED"},
+ {WERR_PRINT_MONITOR_ALREADY_INSTALLED, "WERR_PRINT_MONITOR_ALREADY_INSTALLED"},
+ {WERR_INVALID_PRINT_MONITOR, "WERR_INVALID_PRINT_MONITOR"},
+ {WERR_PRINT_MONITOR_IN_USE, "WERR_PRINT_MONITOR_IN_USE"},
+ {WERR_PRINTER_HAS_JOBS_QUEUED, "WERR_PRINTER_HAS_JOBS_QUEUED"},
+ {WERR_CLASS_NOT_REGISTERED, "WERR_CLASS_NOT_REGISTERED"},
+ {WERR_NO_SHUTDOWN_IN_PROGRESS, "WERR_NO_SHUTDOWN_IN_PROGRESS"},
+ {WERR_SHUTDOWN_ALREADY_IN_PROGRESS, "WERR_SHUTDOWN_ALREADY_IN_PROGRESS"},
+ {WERR_NET_NAME_NOT_FOUND, "WERR_NET_NAME_NOT_FOUND"},
+ {WERR_DEVICE_NOT_SHARED, "WERR_DEVICE_NOT_SHARED"},
+ {WERR_DFS_NO_SUCH_VOL, "WERR_DFS_NO_SUCH_VOL"},
+ {WERR_DFS_NO_SUCH_SHARE, "WERR_DFS_NO_SUCH_SHARE"},
+ {WERR_DFS_NO_SUCH_SERVER, "WERR_DFS_NO_SUCH_SERVER"},
+ {WERR_DFS_INTERNAL_ERROR, "WERR_DFS_INTERNAL_ERROR"},
+ {WERR_DFS_CANT_CREATE_JUNCT, "WERR_DFS_CANT_CREATE_JUNCT"},
+ {WERR_DS_SERVICE_BUSY, "WERR_DS_SERVICE_BUSY"},
+ {WERR_DS_SERVICE_UNAVAILABLE, "WERR_DS_SERVICE_UNAVAILABLE"},
+ {WERR_DS_NO_SUCH_OBJECT, "WERR_DS_NO_SUCH_OBJECT"},
+ {WERR_DS_OBJ_NOT_FOUND, "WERR_DS_OBJ_NOT_FOUND"},
+ {WERR_DS_DRA_INVALID_PARAMETER, "WERR_DS_DRA_INVALID_PARAMETER"},
+ {WERR_DS_DRA_BAD_DN, "WERR_DS_DRA_BAD_DN"},
+ {WERR_DS_DRA_BAD_NC, "WERR_DS_DRA_BAD_NC"},
+ {WERR_DS_DRA_INTERNAL_ERROR, "WERR_DS_DRA_INTERNAL_ERROR"},
+ {WERR_DS_DRA_OUT_OF_MEM, "WERR_DS_DRA_OUT_OF_MEM"},
+ {WERR_DS_SINGLE_VALUE_CONSTRAINT, "WERR_DS_SINGLE_VALUE_CONSTRAINT"},
+ {WERR_DS_DRA_DB_ERROR, "WERR_DS_DRA_DB_ERROR"},
+ {WERR_DS_DRA_NO_REPLICA, "WERR_DS_DRA_NO_REPLICA"},
+ {WERR_DS_DRA_ACCESS_DENIED, "WERR_DS_DRA_ACCESS_DENIED"},
+ {WERR_DS_DNS_LOOKUP_FAILURE, "WERR_DS_DNS_LOOKUP_FAILURE"},
+ {WERR_DS_WRONG_LINKED_ATTRIBUTE_SYNTAX, "WERR_DS_WRONG_LINKED_ATTRIBUTE_SYNTAX"},
+ {WERR_SEC_E_ALGORITHM_MISMATCH, "WERR_SEC_E_ALGORITHM_MISMATCH"},
+ {0, NULL}
+};
+
+
+
/*
* DOS error codes.
*/
diff --git a/epan/dissectors/packet-windows-common.h b/epan/dissectors/packet-windows-common.h
index 6ae9a748c3..b3dcd96e68 100644
--- a/epan/dissectors/packet-windows-common.h
+++ b/epan/dissectors/packet-windows-common.h
@@ -25,6 +25,110 @@
#ifndef __PACKET_WINDOWS_COMMON_H__
#define __PACKET_WINDOWS_COMMON_H__
+/* Win32 errors.
+ * These defines specify the WERR error codes often encountered in ms DCE/RPC
+ * interfaces (those that do not return NT status that is)
+ *
+ * The list is generated from the samba doserr.h file by running :
+(echo "#include \"doserr.h\"";echo "#define W_ERROR(x) x";cat doserr.h | grep "^#define WERR" | grep -v "FOOBAR" | sed -e "s/^#define[ \t]//" | while read WERR junk;do echo int foo${WERR}=${WERR}";" ; done ) | cpp | grep "^int foo" | sed -e "s/^int foo/#define /" -e "s/=/ /" -e "s/;$//"
+ */
+#define WERR_OK 0
+#define WERR_BADFUNC 1
+#define WERR_BADFILE 2
+#define WERR_ACCESS_DENIED 5
+#define WERR_BADFID 6
+#define WERR_NOMEM 8
+#define WERR_GENERAL_FAILURE 31
+#define WERR_NOT_SUPPORTED 50
+#define WERR_BAD_NETPATH 53
+#define WERR_UNEXP_NET_ERR 59
+#define WERR_PRINTQ_FULL 61
+#define WERR_NO_SPOOL_SPACE 62
+#define WERR_NO_SUCH_SHARE 67
+#define WERR_FILE_EXISTS 80
+#define WERR_BAD_PASSWORD 86
+#define WERR_INVALID_PARAM 87
+#define WERR_INSUFFICIENT_BUFFER 122
+#define WERR_INVALID_NAME 123
+#define WERR_UNKNOWN_LEVEL 124
+#define WERR_OBJECT_PATH_INVALID 161
+#define WERR_ALREADY_EXISTS 183
+#define WERR_NO_MORE_ITEMS 259
+#define WERR_MORE_DATA 234
+#define WERR_CAN_NOT_COMPLETE 1003
+#define WERR_NOT_FOUND 1168
+#define WERR_INVALID_COMPUTERNAME 1210
+#define WERR_INVALID_DOMAINNAME 1212
+#define WERR_UNKNOWN_REVISION 1305
+#define WERR_REVISION_MISMATCH 1306
+#define WERR_INVALID_OWNER 1307
+#define WERR_NO_SUCH_PRIVILEGE 1313
+#define WERR_PRIVILEGE_NOT_HELD 1314
+#define WERR_NO_SUCH_USER 1317
+#define WERR_INVALID_SECURITY_DESCRIPTOR 1338
+#define WERR_NO_SUCH_DOMAIN 1355
+#define WERR_NO_SYSTEM_RESOURCES 1450
+#define WERR_SERVER_UNAVAILABLE 1722
+#define WERR_INVALID_FORM_NAME 1902
+#define WERR_INVALID_FORM_SIZE 1903
+#define WERR_ALREADY_SHARED 2118
+#define WERR_BUF_TOO_SMALL 2123
+#define WERR_JOB_NOT_FOUND 2151
+#define WERR_DEST_NOT_FOUND 2152
+#define WERR_NOT_LOCAL_DOMAIN 2320
+#define WERR_DEVICE_NOT_AVAILABLE 4319
+#define WERR_STATUS_MORE_ENTRIES 0x0105
+#define WERR_PRINTER_DRIVER_ALREADY_INSTALLED 1795
+#define WERR_UNKNOWN_PORT 1796
+#define WERR_UNKNOWN_PRINTER_DRIVER 1797
+#define WERR_UNKNOWN_PRINTPROCESSOR 1798
+#define WERR_INVALID_SEPARATOR_FILE 1799
+#define WERR_INVALID_PRIORITY 1800
+#define WERR_INVALID_PRINTER_NAME 1801
+#define WERR_PRINTER_ALREADY_EXISTS 1802
+#define WERR_INVALID_PRINTER_COMMAND 1803
+#define WERR_INVALID_DATATYPE 1804
+#define WERR_INVALID_ENVIRONMENT 1805
+#define WERR_UNKNOWN_PRINT_MONITOR 3000
+#define WERR_PRINTER_DRIVER_IN_USE 3001
+#define WERR_SPOOL_FILE_NOT_FOUND 3002
+#define WERR_SPL_NO_STARTDOC 3003
+#define WERR_SPL_NO_ADDJOB 3004
+#define WERR_PRINT_PROCESSOR_ALREADY_INSTALLED 3005
+#define WERR_PRINT_MONITOR_ALREADY_INSTALLED 3006
+#define WERR_INVALID_PRINT_MONITOR 3007
+#define WERR_PRINT_MONITOR_IN_USE 3008
+#define WERR_PRINTER_HAS_JOBS_QUEUED 3009
+#define WERR_CLASS_NOT_REGISTERED 0x40154
+#define WERR_NO_SHUTDOWN_IN_PROGRESS 0x45c
+#define WERR_SHUTDOWN_ALREADY_IN_PROGRESS 0x45b
+#define WERR_NET_NAME_NOT_FOUND (2100)+210
+#define WERR_DEVICE_NOT_SHARED (2100)+211
+#define WERR_DFS_NO_SUCH_VOL (2100)+562
+#define WERR_DFS_NO_SUCH_SHARE (2100)+565
+#define WERR_DFS_NO_SUCH_SERVER (2100)+573
+#define WERR_DFS_INTERNAL_ERROR (2100)+590
+#define WERR_DFS_CANT_CREATE_JUNCT (2100)+569
+#define WERR_DS_SERVICE_BUSY 0x0000200e
+#define WERR_DS_SERVICE_UNAVAILABLE 0x0000200f
+#define WERR_DS_NO_SUCH_OBJECT 0x00002030
+#define WERR_DS_OBJ_NOT_FOUND 0x0000208d
+#define WERR_DS_DRA_INVALID_PARAMETER 0x000020f5
+#define WERR_DS_DRA_BAD_DN 0x000020f7
+#define WERR_DS_DRA_BAD_NC 0x000020f8
+#define WERR_DS_DRA_INTERNAL_ERROR 0x000020fa
+#define WERR_DS_DRA_OUT_OF_MEM 0x000020fe
+#define WERR_DS_SINGLE_VALUE_CONSTRAINT 0x00002081
+#define WERR_DS_DRA_DB_ERROR 0x00002103
+#define WERR_DS_DRA_NO_REPLICA 0x00002104
+#define WERR_DS_DRA_ACCESS_DENIED 0x00002105
+#define WERR_DS_DNS_LOOKUP_FAILURE 0x0000214c
+#define WERR_DS_WRONG_LINKED_ATTRIBUTE_SYNTAX 0x00002150
+#define WERR_SEC_E_ALGORITHM_MISMATCH 0x80090331
+
+extern const value_string WERR_errors[];
+
+
/*
* DOS error codes used by other dissectors.
* At least some of these are from the SMB X/Open spec, as errors for