This list of winerrors was generated by analyzing a network sniff with all the errors codes in Network Monitor. Here are the exact steps to recreate the list:

1. Install Network Monitor 3.3 with version 3.4.1809 of 'Microsoft Network Monitor Parsers'.
2. Apply the following patch to srvsvc. It will cause the enumerate shares function to return a new error code each time.
Index: include/srvsvc/srvsvcbinding.h
===================================================================
--- include/srvsvc/srvsvcbinding.h	(revision 35158)
+++ include/srvsvc/srvsvcbinding.h	(working copy)
@@ -51,8 +51,8 @@
 #include <srvsvc/types.h>
 #include <lwio/lwio.h>

-#define SRVSVC_DEFAULT_PROT_SEQ   "ncacn_np"
-#define SRVSVC_DEFAULT_ENDPOINT   "\\pipe\\srvsvc"
+#define SRVSVC_DEFAULT_PROT_SEQ   "ncacn_ip_tcp"
+#define SRVSVC_DEFAULT_ENDPOINT   ""


 RPCSTATUS
Index: server/srvsvc_netshareenum.c
===================================================================
--- server/srvsvc_netshareenum.c	(revision 35158)
+++ server/srvsvc_netshareenum.c	(working copy)
@@ -95,8 +95,12 @@
     srvsvc_NetShareCtr2 *ctr2 = NULL;
     srvsvc_NetShareCtr501 *ctr501 = NULL;
     srvsvc_NetShareCtr502 *ctr502 = NULL;
+    static int nextStatus = 1;

     EnumParamsIn.dwInfoLevel = *level;
+    dwError = nextStatus++;
+    SRVSVC_LOG_ERROR("Returning code %d for sniffing", dwError);
+    BAIL_ON_ERROR(dwError);

     ntStatus = LwShareInfoMarshalEnumParameters(
                         &EnumParamsIn,

3. Setup tcpdump to capture all network traffic on the machine running srvsvc.

4. Run this command on a separate computer until a sufficiently high winerror has been collected:
while true; do /opt/likewise/bin/testsrvsvc -h <destination machine> -r <connect principal> -c <prefilled credentials cache> SRVSVC-NET-SHARE-ENUM; done

5. Open the tcpdump in Network Monitor
6. Click View, 'Choose Columns'
7. Enable only 'SRVS Summary'
8. Copy all of the frame summary information to the clipboard. Paste it into a text file.
9. Run this command on the text file:
$ grep Status= summary.txt  | nl | sed 's/ *\([0-9]\+\).*Status=\(.*\)$/#defi
ne \2 \1/' | grep -v Unknown >winerror.h
