# Chapter Nine -- NetRockey4ND Developer's Guide
NetRockey4ND is a network aware software protection system designed to limit the number of simultaneous users who can access a software application. It combines all the functionality of the standard Rockey4ND system, with the ability to work seamlessly in LAN/WAN environments that support the UDP/TCP, IPX or NetBIOS protocols. NetRockey4ND was engineered to support stand alone or redundant server environments on both the Windows and Linux platforms. The system includes powerful and intuitive network monitoring and testing tools that ease the implementation effort. 1. NetRockey4ND Developer’s Kit The developing tools for NetRockey4ND under the directory “net”: <Client> DLLs and configuration files for the NetRockey4ND client and test program. <Server> DLLs and configuration file for the NetRockey4ND service program. <Monitor>Executable file for the NetRockey4ND monitor program. 2.The use of theNetRockey4ND tools. 2.1)Installing the NetRockey4ND SDK Step 1. Open the terminal of the system: Step 2. Run the script name for inst under the directory "ROCKEY4ND/net" to install the SDK: 2.2)Uninstalling the NetRockey4ND SDK Run the script name for uninst under the directory "ROCKEY4ND/net" to uninstall the SDK: 2.3)Testing the NetRockey4ND Step 1. Compile test application in the directory “ROCKEY4ND/net/client/test": Step 2. Run test application: Step 3. If you press Enter, it will continue: Step 4. If you press q, it will end test: 2.4)Logging file Step 1. Find the file named syslog(/etc/rc.d/init.d/syslog start OR /etc/init.d/syslog start): Step 2. Check log file: 2.5)Client Configure file Step 1. Open the file for configuring Client under the directory " /etc/rynet": Step 2. If it cann't be writed, you should change the attribute: Step 3. After changing the attribute,You enter the file for configuring client again. Now you can write the parameters of client configuration: Finally save and quit! 2.6)Server Configure file You can configure server in accordance to the above examples: Finally save and quit! After configuration is successful, you can first run "/etc/init.d/ryserv stop" to stop server, and then run "/etc/init.d/ryserv start" to start server. 2.7)Monitor the NetRockey4ND Run rockey4nd-monitor under the directory "ROCKEY4ND/net/monitor" : 3. NetRockey4ND Basic Concepts 3.1)Configuration Files There is a configuration file for the Service program (SvrCfg.ini), and one for the Client program (CliCfg.ini). The service and client programs take their network settings from the configuration files. The developer may use a text editor or tools provided by Feitian to edit such configuration file parameters as: protocol type, time-to-live, server address and other information required for the dongle to attach to the network. 3.2)Log Files The NetRockey4ND log file (svrlog.txt) records the running status of the service program. It can be helpful if you encounter a problem with the service program. The path and name of the log file may be configured in the SvrCfg.ini file. 3.3)Port and Group Information The UDP/TCP and IPX protocols require the specification of a port number. Port numbers range from 0 to 65535. The default port number for NetRockey4ND is 3152. 3152 is registered with IASA and should be available on most networks. If it is occupied though, the NetRockey4ND service program will report a “bind” error. If a bind error occurs you may want to move NetRockey4ND to an available port; the port number can be changed in the SvrCfg.ini and CliCfg.ini file. The NetBIOS protocol does not use a port number. It uses a group name. The group name is a character string that may be a maximum of 14 characters in length. Each server in a NetBIOS network has both a computer name and a group name. The group name for the service program may be altered in the SvrCfg.ini file and the CliCfg.ini file. All clients and servers that need to communicate in a NetBIOS network need to have the same group name. 3.4) Network Address Each computer in network has a unique address. A UDP/TCP network (IPv4) uses IP addresses that may look like: 192.168.0.1. An IPX network uses a MAC address that may look like: 00-35-4f-20-00-32. A NetBIOS network uses both a computer name and a group name. 3.5)Search Mode The NetRockey4ND client program will search for the address of the service program at start-up. The client program will look to the CliCfg.ini file for the search “mode”. There are three search modes that may be set in the client configuration file: Automatic, Custom and Semi-automatic. Automatic mode means that the client will broadcast to locate the service program. Custom mode requires that you enter a search list of the service addresses in the CliCfg.ini file. The client program will not issue a broadcast message but will use the search list to find the service programs. Automatic mode has the advantage of being easy to configure, but the drawbacks of slow response and added network overhead. Custom mode is faster than automatic but requires that you know the addresses of the service programs. Semi-automatic mode attempts to overcome the drawbacks of both the custom and automatic modes. In semi-automatic mode, the client will first go to its search list. If it finds one or more service programs it will quit searching. If it does not find a service program, it will broadcast to find the service program. 3.6)Open Mode The NetRockey4ND client programs issue an “open” command to the service program. This open command is equivalent to a network login and it is the means by which the service program limits the number of users that can attach to the application. There are two operating modes for the open command: private and share. The default setting is private mode. In private mode operation the service program adds “1” each time a user attaches to the application. If the calculated quantity reaches the maximum set by the developer, the open command will fail, the service program will issue an error message and the user will not be allowed to access the application. In share mode, all programs in the same computer share one user number. No matter how many times the computer accesses the service program, it is considered to be one user. Share mode is appropriate if the number of computers, rather than the number of users that attach to an application, need to be limited. The open mode is set with the lp2 parameter in the open operation (See Chapter Five -- Rockey4ND API for an explanation of the open operation.) The low byte of the lp2 parameter sets the NetRockey4ND module number that will store the maximum number of simultaneous users (see item 3.8 below), and the high byte sets the open mode, and the low byte sets the login module. 3.7)Time Out Each time the client sends data to the server it will wait a time period defined by the “time out” parameter. If the client does not receive a response after the time out period, it will quit and return an error code. The unit of time for the time out parameter is seconds and the default is two. In automatic search mode, the time out is also the period that the client program will wait for a response to its broadcast message. The time out parameter can be changed in the CliCfg.ini file. 3.8)Maximum Number of Simultaneous Users The maximum number of simultaneous users that will be allowed to access an application will be set by a value stored in a NetRockey4ND module. For example, if you write “5” to module number 0, module 0 can be used to set a limit of five users who can simultaneously use your application. A NetRockey4ND dongle has 64 modules, so as many as 64 user groups can have individualized application access limits. The NetRockey4ND Editor program can be used to write a value to a module, but it is impossible to read the value. 3.9)Client Time to Live (TTL) This parameter is set in the service program (SvrCfg.ini). The time unit is minutes and the default is 3.The client program automatically sends an “idle” message to the service program once each 1.5 minutes. If the service program does not receive an idle message from a client during the TTL period, it will delete the client handle, terminating the connection. This parameter is useful in the event the client is shutdown abnormally or the network connection is lost. 3.10)Open Module A module can only be opened once in a single process with security in mind. You may set the handle as a global variable to use it in every thread. 4. NetRockey4ND API 4.1)NetRockey4ND function NetRockey4ND supports function call, the 4 functions are below: DWORD WINAPI NetRockey ( WORD function, WORD *handle, DWORD *lp1, DWORD *lp2, WORD *p1, WORD *p2, WORD *p3, WORD *p4, BYTE *buffer ); DWORD WINAPI SetIniPathName(LPCTSTR iniName); DWORD WINAPI NrGetLastError(); DWORD WINAPI NrGetVersion(); NetRockey is the main function for NetRockey4ND. 4.2)Parameters 4.2.1)NetRockey4ND provides Net Rockey4ND function call. A return code of “0” indicates the operation succeeded, all other return codes indicate an error, refer to section 6 Return Code. Function is a 16-bit number, it indicates the specific function of NetRockey4ND, and it is defined below:
#define RY_FIND | 1 | Find NetRockey4ND
#define RY_FIND_NEXT | 2 | Find next NetRockey4ND
#define RY_OPEN | 3 | Open NetRockey4ND
#define RY_CLOSE | 4 | Close NetRockey4ND
#define RY_READ | 5 | Read NetRockey4ND
#define RY_WRITE | 6 | Write NetRockey4ND
#define RY_RANDOM | 7 | Generate Random Number
#define RY_SEED | 8 | Generate Seed Code
[*]#define RY_WRITE_USERID | 9 | Write User ID
#define RY_READ_USERID | 10 | Read User ID
[*] #define RY_SET_MOUDLE | 11 | Set Module
#define RY_CHECK_MOUDLE | 12 | Check Module
#define RY_WRITE ARITHMETIC | 13 | Write algorithm
#define RY_CALCULATE1 | 14 | Calculate 1
#define RY_CALCULATE2 | 15 | Calculate 2
#define RY_CALCULATE3 | 16 | Calculate 3
#define RY_DECREASE | 17 | Decrease Module Unit
Note: [*]:Function Parameters 9, 11 and 13 are not valid for NetRockey4ND because they require the Advanced passwords. The Service program will not recognize these parameters. The Editor for the standard (stand alone)Rockey4ND may be used to update these functions in the NetRockey4ND product. So these NetRockey4ND functions only require basic passwords. lp1,lp2 long parameter (32 bit) Please refer to the API section for more detail. 4.2.2)SetIniPathName Set the pathname of a client configuration file. A return code of “0” indicates the operation succeeded, all other return codes indicate an error. IniName is the name of file. 4.2.3)NrGetLastError Get the last error code from NetRockey4ND. This function will also return the error code description. Please refer to section 6 Return Code to see a list of error codes. 4.2.4)NrGetVersion Get the version number of D11. The high WORD of return value is main version number, and the low WORD is secondary version number. 5. API The NetRockey4ND API function parameters are defined in detail below. The password 3 and password 4 should be set 0 in the final products you offer to your end users. The functions marked with [*] require advanced password 3 and password 4. 5.1) Find a NetRockey4ND dongle (RY_FIND) Objective: Find NetRockey4ND according to parameters set in the Client configuration file. Input parameters: function = RY_FIND *p1 = Password 1 *p2 = Password 2 Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will write the NetRockey4ND Hardware ID (HID) to *lp1 and the server name to the buffer. 5.2)Find the Next NetRockey4ND dongle (RY_FIND_NEXT) Objective: To check if another NetRockey4ND dongle is attached to the network. Input parameters: function = RY_FIND_NEXT *p1 = Password 1 *p2 = Password 2 *lp1 =Hardware ID of last found dongle Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will write the NetRockey4ND Hardware ID (HID) to *lp1 and the server name to the buffer. 5.3) Open the NetRockey4ND dongle (RY_OPEN) Objective: To log into a specified NetRockey4ND module and get a handle number to enable other operations. Input parameters: function = RY_OPEN *p1 = Password 1 *p2 = Password 2 *lp1 = Hardware ID *lp2 = High word is open mode (0 = private mode, 1 = share mode). Low word is module number (0 to 63). For example, *lp2=1 means log in module 1 in private mode. *lp2 = 0x11 means log in module 1 in share mode. Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. Note: You must use the same *p1, *p2 values with the RY_FIND and RY_FIND_NEXT functions. A successful operation will return the correct NetRockey4ND handle. “buffer” will return the NetRockey4ND seed result. (if it is designed. ) 5.4) Close the NetRockey4ND dongle (RY_CLOSE) Objective: To close a NetRockey4ND service. Input parameters: function = RY_CLOSE *handle = The NetRockey4ND’s handle. Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. 5.5) Read from a NetRockey4ND dongle (RY_READ) Objective: To read the contents of the User Data Zone (UDZ). Input parameters: function = RY_READ *handle = NetRockey4ND’s handle *p1 = offset of UDZ *p2 = length (unit is byte) buffer = address of buffer Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will result in the contents of the UDZ written to the memory buffer. 5.6) Write to a NetRockey4ND dongle (RY_WRITE) Objective: To write data to the User Data Zone. (UDZ) Input parameters: function = RY_WRITE *handle = NetRockey4ND’s handle *p1 = offset of UDZ *p2 = length (unit is byte) buf = address of buffer Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. 5.7) Generate a Random Number (RY_RANDOM) Objective: To get a random number. Input parameters: function = RY_RANDOM *handle = NetRockey4ND’s handle Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will result in the *p1 address populated with the random number. 5.8) Generate Seed Code Return Values (RY_SEED) Objective: To get return codes from the input of a seed code. Input parameters: function = RY_SEED *handle = NetRockey4ND’s handle *lp2 = Seed Code (32-bit) Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will result in the following addresses populated with seed code return values: *p1 = Return Code 1 *p2 = Return Code 2 *p3 = Return Code 3 *p4 = Return Code 4 5.9) Write the User ID (RY_WRITE_USERID) Note: This function is not supported by NetRockey4ND. This function may be achieved in the Editor of stand alone Rockey4ND before the NetRockey4ND is released. 5.10) Read User ID (RY_READ_USERID) Objective: To read the user defined “User ID” from the User ID Zone. (UIZ) Input parameters: Function = RY_READ_USERID *handle = NetRockey4ND’s handle Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will result in the *lp1 address populated with the data stored in the UIZ. 5.11) Set a NetRockey4ND Module (RY_SET_MODULE) Note: This function is not supported by NetRockey4ND. This function may be achieved in the Editor of stand alone Rockey4ND before the NetRockey4ND is released. 5.12) Check a NetRockey4ND Module (RY_CHECK_MODULE) Objective: To read the attributes of a specific NetRockey4ND module. Input parameters: function = RY_CHECK_MODULE *handle = NetRockey4ND’s handle *p1 = Module Number Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will result in “*p2” populated in the value from the Zero Value attribute (1 = module is not zero), and “*p3” populated with the value from the Decrement attribute (1 = module can be decreased). 5.13) Write Arithmetic (RY_WRITE_ARITHMETIC) Note: This function is not supported by NetRockey4ND. This function may be achieved in the Editor of stand alone Rockey4ND before the NetRockey4ND is released. 5.14) Calculate 1 (RY_CALCULATE1) Objective: To return the results of calculation 1 performed in NetRockey4ND. Input parameters: function = RY_CALCULATE1 *handle = NetRockey4ND’s handle *lp1 = Start point of calculation from the UAZ *lp2 = Module number *p1 = Input value 1 *p2 = Input value 2 *p3 = Input value 3 *p4 = Input value 4 Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will result in the following addresses populated with the results of the instruction: *p1 = Return value 1 *p2 = Return value 2 *p3 = Return value 3 *p4 = Return value 4 5.15) Calculate 2 (RY_CALCULATE2) Objective: To return the results of calculation 2 performed in NetRockey4ND. Input parameters: function = RY_CALCULATE2 *handle = NetRockey4ND’s handle *lp1 = Start point of calculation from the UAZ *lp2 = Seed Code *p1 = Input value 1 *p2 = Input value 2 *p3 = Input value 3 *p4 = Input value 4 Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will result in the addresses p1, p2, p3 and p4 populated with the results of the instruction. *p1 = Return value 1 *p2 = Return value 2 *p3 = Return value 3 *p4 = Return value 4 5.16) Calculate 3 (RY_CALCULATE3) Objective: To return results of calculation 3 performed in NetRockey4ND. Input parameters: function = RY_CALCULATE3 *handle = NetRockey4ND’s handle *lp1 = Start point of calculation from UAZ *lp2 = Module number *p1 = Input value 1 *p2 = Input value 2 *p3 = Input value 3 *p4 = Input value 4 Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will result in the addresses p1, p2, p3 and p4 populated with the results of the instruction. *p1 = Return value 1 *p2 = Return value 2 *p3 = Return value 3 *p4 = Return value 4 5.17) Decrease Module Unit (RY_DECREASE) Objective: To decrease the value in a specified NetRockey4ND module by “1”. Input parameters: function = RY_DECREASE *handle = NetRockey4ND’s handle *p1 = Module Number Return value: A return value = “0” indicates that the function worked correctly. Any other return value indicates an error. A successful operation will reduce the value stored in module *p1 by “1”. 6. Return Codes 6.1)NetRockey4ND Return Codes There are two kinds of return codes: Normal and Extended. Normal return codes are the return values of the NetRockey4ND API. Extended error codes are values returned from the NrGetLastError function. Extended error codes are related to network issues. Normal return codes:
Normal Return Codes | Return Code | Description
ERR_SUCCESS | 0 | Success
ERR_NO_PARALLEL_PORT | 1 | No parallel port on the computer
ERR_NO_DRIVER | 2 | No driver installed
ERR_NO_ROCKEY | 3 | No NetRockey4ND dongle
ERR_INVALID_PASSWORD | 4 | found, but base password is incorrect
ERR_INVALID_PASSWORD_OR_ID | 5 | Wrong password or NetRockey4ND HID
ERR_SETID | 6 | Set NetRockey4ND HID wrong
ERR_INVALID_ADDR_OR_SIZE | 7 | Read/Write address is wrong
ERR_UNKNOWN_COMMAND | 8 | No such command
ERR_NOTBELEVEL3 | 9 | Inside error
ERR_READ | 10 | Read error
ERR_WRITE | 11 | Write error
ERR_RANDOM | 12 | Random error
ERR_SEED | 13 | Seed Code error
ERR_CALCULATE | 14 | Calculate error
ERR_NO_OPEN | 15 | Ry_Open must precede this operation
ERR_OPEN_OVERFLOW | 16 | Too many open dongles (>16)
ERR_NOMORE | 17 | No more dongle
ERR_NEED_FIND | 18 | No Find before FindNext
ERR_DECREASE | 19 | Decrease error
ERR_AR_BADCOMMAND | 20 | Arithmetic instruction error
ERR_AR_UNKNOWN_OPCODE | 21 | Arithmetic operator error
ERR_AR_WRONGBEGIN | 22 | A constant. cannot be in the first instruction
ERR_AR_WRONG_END | 23 | A constant. cannot be in the last instruction
ERR_AR_VALUEOVERFLOW | 24 | Const number > 63
ERR_NET_LOGINAGAIN | 1001 | A module can only be opened once by the same process.
ERR_NET_NETERROR | 1002 | Network error.
ERR_NET_LOGIN | 1003 | Too many users are logged on.
ERR_NET_INVALIDHANDLE | 1004 | Invalid handle, this handle might have been closed.
ERR_NET_BADHARDWARE | 1005 | Defective hardware
ERR_NET_REFUSE | 1006 | Client dll modified, service refused request.
ERR_NET_BADSERVER | 1007 | Service Program modified, service is invalid.
Below are network error codes, NrGetLastError function can return extended error codes.
ERR_INIT_SOCK | 2001 | Error when initializing.
ERR_NOSUCHPROTO | 2002 | No such protocol.
ERR_UDPSOCKCREATE | 2003 | UDP error when creating socket.
ERR_UDPSETBROADCAST | 2004 | UDP error when setting broadcast.
ERR_UDPBINDFAILED | 2005 | UDP error when binding.
| ERR_SVRCALLBACKNULL | 2006 | Server call back null.
ERR_TCPSOCKCREATE | 2007 | TCP error when creating socket.
ERR_TCPBINDFAILED | 2008 | TCP error when binding.
ERR_TCPLISTENFAILED | 2009 | TCP error when listening.
ERR_NOSUCHSEARCH | 2010 | No such search mode.
ERR_UDPSEND | 2012 | UDP error when sending.
ERR_UDPTIMEOUT | 2013 | UDP timeout error when waiting.
ERR_UDPRECV | 2014 | UDP fail when receiving.
ERR_TCPCONNECT | 2015 | TCP error when connecting to server.
ERR_TCPSENDTIMEOUT | 2016 | TCP time out error when sending.
ERR_TCPSEND | 2017 | TCP error when sending.
ERR_TCPRECVTIMEOUT | 2018 | TCP time out error when receiving.
ERR_TCPRECV | 2019 | TCP error when receiving.
ERR_IPXSOCKCREATE | 2020 | IPX error when creating socket.
ERR_IPXSETBROADCAST | 2021 | IPX error when setting broadcast.
ERR_IPXSEND | 2022 | IPX error when sending data.
ERR_IPXRECV | 2023 | IPX error when receiving data.
ERR_IPXBIND | 2024 | IPX error when binding.
ERR_NBSRESET | 2025 | NetBIOS error when initializing.
ERR_NBSADDNAME | 2026 | NetBIOS error when adding name.
ERR_NBSSEND | 2027 | NetBIOS error when sending data.
ERR_NBSRECV | 2028 | NetBIOS error when receiving data.

6.2)NetRockey4ND Extended Return Codes

Run the NrGetLastError function after receiving any network related return code. The result will be an error code constant that you can use to look up more detailed error information in the TCP/UDP or IPX specifications.

DefinitionStatement | Regular Berkeley Error Constants
#define WSABASEERR | 10000
#define WSAEINTR | (WSABASEERR+4)
#define WSAEBADF | (WSABASEERR+9)
#define WSAEACCES | (WSABASEERR+13)
#define WSAEFAULT | (WSABASEERR+14)
#define WSAEINVAL | (WSABASEERR+22)
#define WSAEMFILE | (WSABASEERR+24)
#define WSAEWOULDBLOCK | (WSABASEERR+35)
#define WSAEINPROGRESS | (WSABASEERR+36)
#define WSAEALREADY | (WSABASEERR+37)
#define WSAENOTSOCK | (WSABASEERR+38)
#define WSAEDESTADDRREQ | (WSABASEERR+39)
#define WSAEMSGSIZE | (WSABASEERR+40)
#define WSAEPROTOTYPE | (WSABASEERR+41)
#define WSAENOPROTOOPT | (WSABASEERR+42)
#define WSAEPROTONOSUPPORT | (WSABASEERR+43)
#define WSAESOCKTNOSUPPORT | (WSABASEERR+44)
#define WSAEOPNOTSUPP | (WSABASEERR+45)
#define WSAEPFNOSUPPORT | (WSABASEERR+46)
#define WSAEAFNOSUPPORT | (WSABASEERR+47)
#define WSAEADDRINUSE | (WSABASEERR+48)
#define WSAEADDRNOTAVAIL | (WSABASEERR+49)
#define WSAENETDOWN | (WSABASEERR+50)
#define WSAENETUNREACH | (WSABASEERR+51)
#define WSAENETRESET | (WSABASEERR+52)
#define WSAECONNABORTED | (WSABASEERR+53)
#define WSAECONNRESET | (WSABASEERR+54)
#define WSAENOBUFS | (WSABASEERR+55)
#define WSAEISCONN | (WSABASEERR+56)
#define WSAENOTCONN | (WSABASEERR+57)
#define WSAESHUTDOWN | (WSABASEERR+58)
#define WSAETOOMANYREFS | (WSABASEERR+59)
#define WSAETIMEDOUT | (WSABASEERR+60)
#define WSAECONNREFUSED | (WSABASEERR+61)
#define WSAELOOP | (WSABASEERR+62)
#define WSAENAMETOOLONG | (WSABASEERR+63)
#define WSAEHOSTDOWN | (WSABASEERR+64)
#define WSAEHOSTUNREACH | (WSABASEERR+65)
#define WSAENOTEMPTY | (WSABASEERR+66)
#define WSAEPROCLIM | (WSABASEERR+67)
#define WSAEUSERS | (WSABASEERR+68)
#define WSAEDQUOT | (WSABASEERR+69)
#define WSAESTALE | (WSABASEERR+70)
#define WSAEREMOTE | (WSABASEERR+71)
#define WSASYSNOTREADY | (WSABASEERR+91)
#define WSAVERNOTSUPPORTED | (WSABASEERR+92)
#define WSANOTINITIALISED | (WSABASEERR+93)
#define WSAEDISCON | (WSABASEERR+101)
#define WSAHOST_NOT_FOUND | (WSABASEERR+1001)
#define WSATRY_AGAIN | (WSABASEERR+1002)
#define WSANO_RECOVERY | (WSABASEERR+1003)
#define WSANO_DATA | (WSABASEERR+1004)

6.3)NetBios Extended Return Codes

Extended return codes for NetBIOS networks:

Return Code | Return Code Definition
0x00 | good return, also returned when ASYNCH request accepted
0x01 | illegal buffer length
0x03 | illegal command
0x05 | command time out
0x06 | message incomplete, issue another command
0x07 | illegal buffer address
0x08 | session number out of range
0x09 | no resource available
0x0a | session closed
0x0b | command cancelled
0x0d | duplicate name
0x0e | name table full
0x0f | no deletions, name has active sessions
0x11 | local session table full
0x12 | remote session table full
0x13 | illegal name number
0x14 | no callname
0x15 | cannot put * in NCB_NAME
0x16 | name in use on remote adapter
0x17 | name deleted
0x18 | session ended abnormally
0x19 | name conflict detected
0x21 | interface busy, IRET before retrying
0x22 | too many commands outstanding, retry later
0x23 | ncb_lana_num field invalid
0x24 | command completed while cancel occurring
0x26 | command not valid to cancel
0x30 | name defined by anther local process
0x34 | environment undefined. RESET required
0x35 | required OS resources exhausted
0x36 | max number of applications exceeded
0x37 | no saps available for netbios
0x38 | requested resources are not available
0x39 | invalid ncb address or length > segment
0x3B | invalid NCB DDID
0x3C | lock of user area failed
0x3f | NETBIOS not loaded
0x40 | system error
0xff | synchronous command is not yet finished

Copyright (C) 2007-2009 Feitian Technologies Co.,Ltd. All rights reserved.
Last Updated: Agu 5, 2009