Home
NetRockey4ND User`s Guide
Contents
1. 2202220nssssnnsnnnsnnnonnnnnnnnnonnnnnnnnnnnnnnnnnnnnnnnonsnnnnnnnnnnnsnnsnsnnnnnansnsnnnnnnannnnnsnnnnnnenn 10 24 Client AA dd ARE een OE OE OE EE OE er 13 Chapter 3 EL lere af DAE EE anne na aaa nen age ae ag reee re denseene ren 18 3 1 Function Prototype and Definition 200s222044s00nnnnnnnnnnonsnnonnnnonnnnnnnnnnnnnnnonsnnnnnnnnnsnsnnnnnnnnnsensnsnnnnnann 18 AE EE EE EE EE N EE EE 20 Chapter 4 NetROCKEVAND Error COGES ccccscocssesssecscesscensssvscsescessconssesssscecocecousssssssescscgcessuscesceetevessveress 28 AA Normal error CodeS AE AE EE EE ET EE ER AE aan 28 4 2 Extended Error Codes for UDP TCP and IPX cccccccscsccsssccsssccssseccsssccsssceesseescesssescsssccasaceesssecsueeesseeesseesaes 29 4 3 Extended Error Codes for NetBios cccsccceseeceseeeeeceeeeaeeeeaeeceaeeceaneeeaeeseaeeseaeeceaeeseaaeseeaeeseaeeenanesseeeeeeaeeea 31 Chapter S ole do OR EE EE EE EE EE EE ENE 33 FEITIAN NetRockey4ND User s Guide Chapter 1 Introduction NetROCKEYAND 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 NetROCKEYAND was engineered to support stand alone or redundant server environments on both the Windows and Linux platforms T
2. WSABASEERR 47 WSABASEERR 48 WSABASEERR 49 WSABASEERR 50 WSABASEERR 51 WSABASEERR 52 WSABASEERR 53 WSABASEERR 54 WSABASEERR 55 WSABASEERR 56 WSABASEERR 57 WSABASEERR 58 WSABASEERR 59 WSABASEERR 60 WSABASEERR 61 WSABASEERR 62 WSABASEERR 63 WSABASEERR 64 WSABASEERR 65 WSABASEERR 66 WSABASEERR 67 FEITIAN NetRockey4ND User s Guide 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 4 3 Extended Error Codes for NetBios 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 Ox0a session closed Ox0b command cancelled Ox0d duplicate name Ox0e name table full OxOf 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
3. This parameter can be set in the configuration file The client program automatically sends a blank message to the service program every 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 the user forgets to close the handle or the network connection is lost to prevent logon by 2 or more users 1 1 10 Limitation on Opened 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 1 2 NetROCKEY4ND Developer s Kit The developing tools for NetROCKEY in directory Net lt Client gt DLLs and configuration files for the NetROCKEY4ND client program lt Server gt Executable and configuration file for the NetROCKEYAND service program lt Tools gt Developing tools for NetROCKEY4ND FEITIAN NetRockey4ND User s Guide lt Samples gt Sample program files 1 3 Configuration Files and Tool The configuration files and tool is located under Net Tools NrConfig directory They are NrConfig exe Configuration files editor Use to edit configuration files for service program and client program SvrCfg ini Configuration file for the NetROCKEY4ND service program NrClient dll API library for the NetROCKEY4ND client program You should not change th
4. 3 Service operation ple Figure 2 8 The server names appear on the left portion of the window The NetROCKEY4ND hardware ID HID will appear if users are logged into the server Server information including server platforms and opened protocols appears in the right portion of the screen If the Monitor program is installed on the same computer as the service program the word Local will appear next to the computer name and you may control the service via monitor including starting and stopping the Service functions or killing a client You may invoke these operations from operation menu or tool bar In Figure 2 9 the user has selected the HID of a server FEITIAN NetRockey4ND User s Guide Nr4ND Monitor 2 Refresh Bk UDP TCP BPX amp amp NetBios X Clear O Set mM 02 22 14 05 57 Figure 2 9 Client information including computer name platform opened protocol log in module log in time and handle appears in the right portion of the screen If a user logs into the local server you can delete the connection by clicking on the client and then pressing the Clear key or clicking the Kill button on the toolbar Pressing F5 key or choosing the Refresh button on toolbar can refresh the current screen Auto refresh mode may be activated from the toolbar or pull down menu Please see the auto refresh screen pictured below Automatic update interval Figure 1
5. It uses a group name The group name is a character string that may be a maximum of 16 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 FEITIAN NetRockey4ND User s Guide and the group name for the clients in the CliCfg ini file All clients and servers that need to communicate in a NetBIOS network need to have the same group name Note It is not recommended to start network dongle services of different kinds on the same machine If you must do that change the port numbers for the services to make them different But for the same network dongle service the server and the client should share the same port number 1 1 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 14 letters 1 1 5 Search Mode The NetROCKEYAND 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 serv
6. 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 ROCKEY may be used to update these functions in the NetROCKEY product So these NetROCKEY functions only require basic passwords Ip1 and Ip2 are long integer parameter pointers 32 bits Please refer to APIs section for details 3 1 2 2 SetIniPathName IniName is the string name of file such as c CliCfg ini 3 1 2 3 NrGetLastError Get the last error code from NetROCKEYAND This function will also return the error code description 3 1 2 4 NrGetVersion Get the version number of NrClient dll The high WORD of return value is major version number and the low WORD is the minor version number FEITIAN NetRockey4ND User s Guide 3 2 APIs The NetROCKEY4ND API function parameters are defined in details below The passwords 3 and 4 should be set to 0 in the final products you offer to your end users xn The functions marked with require advanced passwords 3 2 1 Find a N
7. any LAN attached PC it does not require a ROCKEY4 driver and DII It was designed to monitor the activities of all NetROCKEY4ND devices on the network if it is installed on the PC running the Service program it can also be used to start and stop the Service functions or kill a client If SvrCfg ini or CliCfg ini is under the executing directory of NrMon exe NrMon exe will automatically take the port information of these files to connect the network The Monitor program will first search for all network attached service programs and clients as shown in Figure 2 7 You can specify the protocol for the search operation Select the search protocol from the Setting pull down menu or from the tool bar Click the button to invoke the application FEITIAN NetRockey4ND User s Guide Nr4ND Monitor Gp NetBIOS X Cear Q Set About Time Status ip Service does not start 14 04 36 Find config file svrcfg ini loaded 14 04 36 Search UDP TCP port 3152 overtime is 2 second 14 04 38 UDP TCP search failed error code 7de 14 04 38 NetBios search is disabled Figure 2 7 Return code will appear if there is anything wrong with any protocol and you may refer to section Return Codes to find out the reason The search results will be displayed below amp Nr4ND Monitor Gp NetBios X Clear Q set About Platform Started protocol Win XP Udp Tcp 1 Click tree view for det 2 Press F5 for refresh
8. 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 FEITIAN NetRockey4ND User s Guide set with the Ip2 parameter in the open operation See the ROCKEY4 API section for an explanation of the open operation The low byte of the Ip2 parameter sets the NetROCKEY4ND module number that will store the maximum number of simultaneous users see item 8 below and the high byte sets the open mode 1 1 7 Timeout 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 1 1 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 0 up to 5 users can log into module 0 simultaneously The writing operation can be completed using Rockey4ND Editor 1 1 9 Client Time to Live TTL
9. service program is started on the computer to which the NetROCKEY4ND dongle is attached After the service program is run for the first time it will automatically register itself as the service program it will run automatically every time you start your computer unless you uninstall it After it is started the service program will look in the current directory for the service configuration file SvrCfg ini and take the configuration information if it can not find the configuration file it will use the default configuration The status of the Service program will be recorded in a log file specified in the SvrCfg ini file See Figure 2 4 above When the service program is started an icon will appear in the system tray See Figure 2 5 The service program icon is the one furthest to the left of the tray FEITIAN NetRockey4ND User s Guide Figure 2 5 Double click or right click the Service program icon to open the screen pictured in Figure 2 6 dj Nr4ND Service A Figure 2 6 The Service program screen may be used to stop start or uninstall the Service program Right click the Service program icon to open a menu to start stop uninstall or exit the program Note The Service program does require a driver and a NetROCKEY4ND however the client program does not require any driver and NetROCKEY4ND 2 3 NetROCKEY4ND Monitor The monitor program NrMon exe is under the directory Net Tools Monitor The monitor will function on
10. the User Data Zone UDZ Input parameters function RY_WRITE handle NetROCKEY4ND s handle n1 offset of UDZ p2 length unit is byte buffer pointer to the buffer Return value A return value 0 indicates that the function worked correctly Any other return value indicates an error 3 2 7 Generate a Random Number RY_RANDOM Objective To get a random number Input parameters function RY_RANDOM handle NetROCKEY4ND s handle FEITIAN NetRockey4ND User s Guide Return value A return value O 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 3 2 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 Ip2 Seed Code 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 n2 Return Code 2 p3 Return Code 3 p4 Return Code 4 3 2 9 Write the User ID RY_WRITE_USERID This function is not supported by NetROCKEY4ND This function may be achieved in the Editor of standalone NetROCKEYAND before the product is released 3 2 10 Read
11. was not either an original part of the Product or a Feitian provided enhancement or upgrade to the Product Warranty Feitian warrants that the hardware and Software storage media are substantially free from significant defects of workmanship or materials for a time period of twelve 12 months from the date of delivery of the Product to you Breach of Warranty In the event of breach of this warranty Feitian s sole obligation is to replace or repair at the discretion of Feitian any Product free of charge Any replaced Product becomes the property of Feitian Warranty claims must be made in writing to Feitian during the warranty period and within fourteen 14 days after the observation of the defect All warranty claims must be accompanied by evidence of the defect that is deemed satisfactory by Feitian Any Products that you return to Feitian or a Feitian authorized distributor must be sent with freight and insurance prepaid EXCEPT AS STATED ABOVE THERE IS NO OTHER WARRANTY OR REPRESENTATION OF THE PRODUCT EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE Limitation of Feitian s Liability Feitian s entire liability to you or any other party for any cause whatsoever whether in contract or in tort including negligence shall not exceed the price you paid for the unit of the Product that caused the damages or are the subject of or in
12. 06 14 57 28 Searching 14 57 29 Found 1 NetROCKEY s 14 57 31 Opened handle 0 Figure 2 16 Here the returned handle is 0 and click the Test tab to operate on handle 0 See Figure 2 17 FEITIAN NetRockey4ND User s Guide Nr4ND Test Operation Edit View Help ia Ek NetROCKEY 8 FEITIAN E6c9806 dep 592c968d Password Login Test m User Data Zone DataZonel DataZone2 Read Write 0000 00 00 00 00 00 00 00 00 t 0008 00 00 00 00 00 00 00 00 n Read Module Attribute A OSN A OSN A 10N A 11N A 12N A 0010 00 00 00 00 00 00 00 00 Operation Status RZE 14 57 28 Searching Type Parameter Module fo 13N A 14 57 29 Found 1 NetROCKEY s First 14N A 14 57 31 Opened handle 0 wer A jo Teer 15N A 14 59 07 Read succeeded Third pete IE je m Result 7 r Address c D af BE Seed Result EE oo Generate Ee Jo seed txt Browse User ID Zone 88888888 Figure 2 17 You may test the functions such as read from and write to UDZ read user ID and the status of the module calculate generate seed random number All input must be in hexadecimal except the seed generation number and the character string After the test please return to the log in screen to close the handle If you do not close t
13. 10 Simply click the Auto Refresh option enter a time interval seconds and then click OK Press Refresh button or Auto Refresh only refreshed the current screen Click root server or NetROCKEY in the left part of the screen to display and refresh the corresponding information Y Nr4ND Monitor 2 Refresh 8p UDP TCP BR IPX BF NetBIOS X Cear O Set i Username Platform Current Logon Logon date Handle mo yl We N 02 22 14 10 36 FEITIAN NetRockey4ND User s Guide Figure 2 11 You can stop or start specific protocols from the Operation pull down menu Protocols can only be stopped or started from the Monitor program if it is running on the same machine as the Service program Choose the clients logged onto local computer move the mouse pointer to Clear button the button will get highlighted Clicking the Clear button on the toolbar or pressing the Del key will remove these clients by force See Figure 2 11 2 4 Client Test Utility The client test utility NrTest exe is under the directory Net Tools NrTest it was designed to test the functions of NetROCKEY4ND NrTest exe may take the client configuration file in current directory to test NetROCKEY4ND system It requires both NrClient dll and CliCfg ini in the current directory To use the utility the NetROCKEY4ND passwords are required See Figure 2 12 below Nr4ND Test Operation Edit View Help Al tee J NetROCK
14. 7 ERR_TCPBINDFAILED 2008 ERR_TCPLISTENFAILED 2009 ERR_NOSUCHSEARCH 2010 ERR_UDPSEND 2012 ERR_UDPTIMEOUT 2013 ERR_UDPRECV 2014 ERR_TCPCONNECT 2015 ERR_TCPSENDTIMEOUT 2016 ERR_TCPSEND 2017 ERR_TCPRECVTIMEOUT 2018 ERR_TCPRECV 2019 ERR_IPXSOCKCREATE 2020 ERR_IPXSETBROADCAST 2021 ERR_IPXSEND 2022 ERR_IPXRECV 2023 ERR_IPXBIND 2024 ERR_NBSRESET 2025 ERR_NBSADDNAME 2026 ERR_NBSSEND 2027 ERR_NBSRECV 2028 Too many users are logged on Invalid handle this handle might have been closed Defective hardware Client dll modified service refused request Nrsvr exe modified service is invalid Error when initializing No such protocol UDP error when creating socket UDP error when setting broadcast UDP error when binding Server call back null TCP error when creating socket TCP error when binding TCP error when listening No such search mode UDP error when sending UDP timeout error when waiting TCP error when connecting to server TCP time out error when sending TCP error when sending TCP time out error when receiving TCP error when receiving IPX error when creating socket IPX error when setting broadcast IPX error when sending data IPX error when receiving data IPX error when binding NetBIOS error when initializing NetBIOS error when adding name NetBIOS error when sending data NetBIOS error when receiving data 4 2 Extended Error Codes for UDP TCP and
15. EY Test Utility Password Login D Input Password Input Password Basic PW1 Basic PW2 m V Auto save password me Figure 2 12 The Basic passwords alone allow full functionality of the Test program keeping security in mind NetROCKEYAND server does not accept Write operation with advanced passwords If you need to change the content of NetROCKEYAND you must edit the content of it with the Editor of ROCKEY Standalone The Auto save password option will save the entered passwords in encrypted form in the system registry This feature is handy if you do FEITIAN NetRockey4ND User s Guide not want to reenter the passwords each time you work with the Test utility If you are working with a Demo NetROCKEY4ND dongle click the DEMO button No password entry is required The next step is to search for NetROCKEY4ND network clients This action requires the NrClient dll and CliCfg ini files The Test utility will show error information if NrClient dll is not found See Figure 2 13 Z NrAND Test Operation Edit View Help A 428 gy NetROCKEY Password Login ic Not Found r Open Close Module Module gt Share Open Close Hande HID Module Sever Operation Status 14 08 51 Searching 14 08 51 NrClient dll Not Found 14 08 51 Not Found Figure 2 13 If this problem occurs copy the NrClient dll and CliCfg ini files to current directory Test utility will automatically take t
16. FEITIAN NetRockey4ND User s Guide Feitian Technologies Co Ltd Website www FTsafe com FEITIAN Revision History NetRockey4ND User s Guide Date Revision Description FEITIAN NetRockey4ND User s Guide Software Developer s Agreement All Products of Feitian Technologies Co Ltd Feitian including but not limited to evaluation copies diskettes CD ROMs hardware and documentation and all future orders are subject to the terms of this Agreement If you do not agree with the terms herein please return the evaluation package to us postage and insurance prepaid within seven days of their receipt and we will reimburse you the cost of the Product less freight and reasonable handling charges Allowable Use You may merge and link the Software with other programs for the sole purpose of protecting those programs in accordance with the usage described in the Developer s Guide You may make archival copies of the Software Prohibited Use The Software or hardware or any other part of the Product may not be copied reengineered disassembled decompiled revised enhanced or otherwise modified except as specifically allowed in item 1 You may not reverse engineer the Software or any part of the product or attempt to discover the Software s source code You may not use the magnetic or optical media included with the Product for the purposes of transferring or storing data that
17. IPX 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 FEITIAN NetRockey4ND User s Guide define WSABASEERR define WSAEINTR define WSAEBADF define WSAEACCES define WSAEFAULT define WSAEINVAL define WSAEMFILE define WSAEWOULDBLOCK define WSAEINPROGRESS define WSAEALREADY define WSAENOTSOCK define WSAEDESTADDRREQ define WSAEMSGSIZE define WSAEPROTOTYPE define WSAENOPROTOOPT define WSAEPROTONOSUPPORT define WSAESOCKTNOSUPPORT define WSAEOPNOTSUPP define WSAEPFNOSUPPORT define WSAEAFNOSUPPORT define WSAEADDRINUSE define WSAEADDRNOTAVAIL define WSAENETDOWN define WSAENETUNREACH define WSAENETRESET define WSAECONNABORTED define WSAECONNRESET define WSAENOBUFS define WSAEISCONN define WSAENOTCONN define WSAESHUTDOWN define WSAETOOMANYREFS define WSAETIMEDOUT define WSAECONNREFUSED define WSAELOOP define WSAENAMETOOLONG define WSAEHOSTDOWN define WSAEHOSTUNREACH define WSAENOTEMPTY define WSAEPROCLIM 10000 WSABASEERR 4 WSABASEERR 9 WSABASEERR 13 WSABASEERR 14 WSABASEERR 22 WSABASEERR 24 WSABASEERR 35 WSABASEERR 36 WSABASEERR 37 WSABASEERR 38 WSABASEERR 39 WSABASEERR 40 WSABASEERR 41 WSABASEERR 42 WSABASEERR 43 WSABASEERR 44 WSABASEERR 45 WSABASEERR 46
18. PXPort 3152 IPX port must be consistent with the port used by the server SearchList 00 A0 0C 13 0E D2 00 00 B4 B2 ED 7B Search sequence for manual search it includes the IP addresses of server network cards which are separated by the network card addresses can be obtained using Windows tool nbtstat a machine name NetBios bUsed 0 Whether to use NetBios protocol or not 1 for yes O for no RegGrpName FTNetServer The name of the server group must be consistent with the settings of the server SearchList FTNetServer001 FTNetServer002 FTNetServer003 Search sequence for manual search it includes service names separated by The service names are the registered names in the server configuration file Below is the template of the server configuration file Header Sign RockeySvrHeader Indicates the server configuration file do not change it common Timeout 2 Timeout setting for waiting for response under all protocols in seconds IdleTime 3 If client idle time exceeds this upper limit the server will close this customer automatically This is used in the event the client forgets to execute Close command Note Do not specify a value lower than 2 in min LogFile svrlog txt Name of log file recording server output it may include path information TCPUDP bUsed 1 FEITIAN NetRockey4ND User s Guide Whether to start the TCP UDP service or not 1 for yes O for no TCPPort 3152 TCP
19. 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 FEITIAN NetRockey4ND User s Guide A return value O indicates that the function worked correctly Any other return value indicates an error If the operation is successful p1 is the user ID 3 2 11 Set a NetROCKEY4ND Module RY_SET_MODULE This function is not supported by NetROCKEY4ND This function may be achieved in the Editor of standalone NetROCKEYAND before the product is released 3 2 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 If the operation is successful p2 1 means the module is valid and p3 1 means the module can be decremented 3 2 13 Write Algorithm RY_WRITE_ARITHMETIC This function is not supported by NetROCKEY4ND This function may be achieved in the Editor of standalone NetROCKEYAND before the product is released 3 2 14 Calculate 1 RY_CALCULATE1 Objective To return the results of calculation 1 performed in NetROCKEY4ND Input parameters function RY_CALCULATE1 h
20. and to install the NetRockey4ND component on the client side do not install the driver on the client side Attach the NetROCKEY4ND dongle into server Check if both the driver and the dongle work properly using the Editor program If there is no problem with then write the maximum number of simultaneous users to a NetROCKEY4ND module For example write 2 to module O to allow a maximum of two users to access the software at one time Start the NetROCKEY4ND service by running the nrsvr exe program The service program will use the default configuration file SvrCfg ini After you change the configuration file you have to exit and restart the service program Use the NrMon to view the status of the service program Run the nrtest exe program from a client computer Attempt to log into the module where you wrote the maximum number of users In the example given above you should only be able to log into module number 0 two times Use the NrMon to view the status of the service and client programs By default automatic search is done under the UDP protocol Thus it is not necessary to specify the address of server in the client configuration file
21. andle NetROCKEY4ND s handle Ip1 Start point of calculation Ip2 Module number FEITIAN NetRockey4ND User s Guide p1 Input value 1 n2 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 3 2 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 Ip1 Start point of calculation from the UAZ lp2 Seed Code 32 bit 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 FEITIAN NetRockey4ND User s Guide p2 Return value 2 p3 Return value 3 p4 Return value 4 3 2 16 Calculate 3 RY_CALCULATE3 Objective To return results of calculation 3 performed in NetROCKEY4ND Input parameters function RY_CALCULATE3 handle NetROCKEY4ND s hand
22. directly related to the cause of action In no event shall Feitian be liable for any damages caused by your failure to meet your obligations nor for any loss of data profit or savings or any other consequential and incidental damages even if Feitian has been advised of the possibility FEITIAN NetRockey4ND User s Guide of damages or for any claim by you based on any third party claim Termination This Agreement shall terminate if you fail to comply with the terms herein Items 2 3 4 and 5 shall survive any termination of this Agreement FEITIAN NetRockey4ND User s Guide Contents Chapter INtrOMUCtON 6 5 ccscscscscresasascsasasesacedasadasasasasasadadasacasadadasadadadasasacaasecessscsssecscesecesecscscedesedescesees 1 1 1 BASIC Seile del SA AE RE Ban en EE RE EE EE EO 1 1 2 NetROCKEY4ND Developer s Kit sees es ese ee ee ee Re AA ee ee AA AA ee ee RA AA ee ee eg 3 1 3 Config rationkilesand TOOLS ees Eb ede ee NEER ER ea es eier eier 4 Chapter 2 NetRockeyAND Tools scsi cccccccisssisecieccssscisssseecicaessueusssseeeicnsecueusssesssicnsaseevsrcsacecuoesssseeccececcsosssieesce 7 2 1 Configuration File Edit r eesccesscccsseeceeceeseaceceaeeceacecesneceaeeeeaeessaeecsacecesaecseaeeseaeeseaeecsacecesaeeseaeeseateseaeeseeees 7 2 2 NetROCKEY4ND Service Program cccccesscceeeeseceesesseceeseseceeeeeneceeseseaeeeesaasesessaaeeseseaeeeseseaeeseeseaeeseneaseseenes 9 2 3 NetROCKEYAND Monitor
23. e name of this file CliCfg ini Configuration file for the NetROCKEYAND client program There is a configuration file for the Service program SvrCfg ini and one for the Client program CliCfg ini The configuration files will configure the settings of the network All the characters in the configuration files are case sensitive Below is the template of Client Program Configuration File CliCfg ini Header Sign RockeyClientHeader Indicates the header of the server configuration file Common Timeout 2 Timeout setting for waiting for response under all protocols in seconds SearchFlag 0 Search flag O for auto 1 for manual 2 for semi auto for manual search the list of searched servers is required see SearhList below ProtoFlag 0 Whether to choose the speediest protocol or not 1 for yes O for no it will take some time to detect initially TCPUDP bUsedTCP 1 bUsedUDP 1 Whether to use TCP UDP protocol or not 1 for yes 0 for no TCPPort 3152 TCP port which can be changed but it must be consistent with the port used by the server UDPPort 3152 UDP port which can be changed but it must be consistent with the port used by the server SearchList 127 0 0 1 Search sequence for manual search it includes the IP addresses of servers which are separated by machine names can also be used IPX FEITIAN NetRockey4ND User s Guide bUsed 0 Whether to use IPX protocol or not 1 for yes 0 for no I
24. etROCKEY4ND dongle RY_FIND Objective Find Net ROCKEY4 client and service programs according to parameters set in the configuration file Input parameters function RY_FIND pl Password 1 p2 Password 2 Return value A return value O indicates that the function worked correctly Any other return value indicates an error A successful operation will write the NetROCKEY4ND Hardware ID HID to Ip1 and the server name to the buffer 3 2 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 Ip1 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 Ip1 and the server name to the buffer 3 2 3 Open the NetROCKEY4ND dongle RY_OPEN FEITIAN NetRockey4ND User s Guide 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 Ip1 Hardware ID Ip2 High word is open mode 0 private mode 1 shared mode low word is module number that is logged in 0to 63 For example lp2 1 means to log into module 1 in private mode p2 0x11 means to log i
25. he handle the service program will kill this client several minutes later refer to Time To Live The Test and Monitor programs together can be used to verify and trouble shoot the status of the entire NetROCKEY4ND system FEITIAN NetRockey4ND User s Guide Chapter 3 NetROCKEY4ND APIs 3 1 Function Prototype and Definition 3 1 1 Function Prototype NrClient dll supports NetROCKEY4ND function call There are the followings 4 functions DWORD WINAPI NetRockey WORD function WORD handle DWORD lp1 DWORD lp2 WORD p1 WORD p2 WORD p3 WORD p4 BYTE buffer DWORD WINAPI NrGetLastError DWORD WINAPI NrGetVersion DWORD WINAPI SetIniPathName LPCTSTR iniName Note NetRockey is the main function for NetROCKEY4ND 3 1 2 Parameters NetRockey provides Net ROCKEY4 function call A return code of 0 indicates the operation succeeded all other return codes indicate an error refer to Chapter 4 3 1 2 1 function function is a 16 bit number it indicates the specific function of NetRockey and it is defined below define RY FIND 1 Find NetROCKEYAND define RY FIND NEXT 2 Find next NetROCKEY4ND define RY OPEN 3 Open NetROCKEY4ND FEITIAN NetRockey4ND User s Guide 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
26. he network configuration information in file CliCfg ini such as protocol and ports And then search with the function in NrClient dll if CliCfg ini is not found the system will use the default configuration The searching screen is pictured below FEITIAN NetRockey4ND User s Guide r Nr4ND Test Operation Edit View Help aa 23 NetROCKEY Q Searching Operation Status 14 09 51 Searching Figure 2 14 The results of a successful search will look like Figure 2 15 all servers and NetROCKEY4ND dongles are displayed here i Nr4ND Test Operation Edit View Help Alee E Ea NetROCKEY Password Login B 3 FEITIAN E6c9806 de 592c968d Di Module Modi jo 0 Private Open Share Open Henge o asses Operation Status 15 02 20 Searching 15 02 21 Found 1 NetROCKEY s la v ism Figure 2 15 FEITIAN NetRockey4ND User s Guide Select a NetROCKEY4ND dongle and the log in screen will appear choose the module you would like to open and then click on either the Private Open or Share Open to open it and you will get a return handle for future operations See Figure 2 16 Operation Edit View Help B B 13g NetROCKEY Password Login Test 3 FEITIAN E6CIS06 de 59209684 r Open Close Module Module oo Share Open Close Hande HID Module Server o Operation Status 592C968D 0 FEITIAN E6C98
27. he system includes powerful and intuitive network monitoring and testing tools that ease the implementation effort NetRockey4ND can be used to limit the number of software instances running over a network 1 1 Basic Concepts 1 1 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 1 1 2 Log Files The NetROCKEYAND 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 1 1 3 Ports and Group 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 NetROCKEYAND 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 NetROCKEYAND to an available port the port number can be changed in the SvrCfg ini file The NetBIOS protocol does not use a port number
28. i and CliCfg ini files in the current directory the screen is pictured below nrConfig Server Client MV Stat UDP V Start TCP TCP pot 3152 7 Start Netbios UDP port 3152 Server FiNetServer Server IP list Server name list 27001 u Book swordhui Bi Server MAC list oo A0 0C 13 0E D2 00 00 JE Figure 2 2 FEITIAN NetRockey4ND User s Guide nrConfig Figure 2 3 Hold the mouse pointer on a particular field for a couple of seconds for a helpful tip An Editor screen with a tip caption is shown in Figure 2 4 FEITIAN NetRockey4ND User s Guide nrConfig Server Client General Commnucation z 2 time out Time out the communication protocol responding time and also the TCP UDP searching time unit sec IV Start TCP UDP TCP port 3152 UDP port 3152 IPX Start IPX IPX port Log file in the same path by default Log file svrlog bt Figure 2 4 Note If only SvrCfg ini or CliCfg ini is in the current directory the Configuration file Editor will allow you to edit the file that it finds You can also extract the other ini files by clicking on the icon in the upper left portion of the screen A pop up menu will then appear that will allow you extract the file you need 2 2 NetROCKEY4ND Service Program The service program nrSvr exe is under directory Net Server The NetROCKEY4ND dongle is detected by the client program only after the
29. ice 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 1 1 6 Opening 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
30. le Ip1 Start point of calculation from UAZ Ip2 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 n3 Return value 3 p4 Return value 4 3 2 17 Decrease Module Unit RY_DECREASE Objective To decrease the value in a specified NetROCKEYAND module by 1 Input parameters FEITIAN NetRockey4ND User s Guide 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 FEITIAN NetRockey4ND User s Guide Chapter 4 NetROCKEY4ND Error Codes There are two kinds of error codes Normal and Extended Normal error codes are the error values of the NetROCKEY4ND API Extended error codes are values returned from the NrGetLastError function Extended error codes are related to network issues 4 1 Normal error codes Success ERR_SUCCESS ERR_NO_PARALLEL_PORT No parallel port on the computer ERR_NO_DRIVER No driver installed ERR_NO_ROCKEY No NETROCKEY4ND dongle ERR_INVALID_PASSWORD NETROCKEYAND dongle found b
31. nto module 1 in shared mode You can also use the VC MAKELPARAM macro such as Ip2 MAKELPARAM 1 1 Return value A return value O indicates that the function worked correctly Any other return value indicates an error A successful operation will return the correct NetROCKEY4ND handle Note You must use the same p1 p2 values with the RY_FIND and RY_FIND_NEXT functions When the operation is successful handle is the handle of the dongle and the buffer contains the seed return value if a seed has been specified 3 2 4 Close the NetROCKEY4ND dongle RY_CLOSE Objective To close a NetROCKEYAND service and logout 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 3 2 5 Read from a NetROCKEY4ND dongle RY_READ FEITIAN NetRockey4ND User s Guide 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 pointer to the buffer Return value A return value O 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 3 2 6 Write to a NetROCKEY4ND dongle RY_WRITE Objective To write data to
32. 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 FEITIAN 0x24 0x26 0x30 0x34 0x35 0x36 0x37 0x38 0x39 OX3B 0x3C Ox3f 0x40 Oxff command completed while cancel occurring command not valid to cancel name defined by anther local process environment undefined RESET required required OS resources exhausted max number of applications exceeded no saps available for netbios requested resources are not available invalid ncb address or length gt segment invalid NCB DDID lock of user area failed NETBIOS not loaded system error synchronous command is not yet finished NetRockey4ND User s Guide FEITIAN NetRockey4ND User s Guide Chapter 5 Quick Test Determine the network protocols that you will need IPX TCP UDP and or NetBIOS Verify that you have all the contents of the developer s kit a NetROCKEY4ND dongle a CD ROM and a user manual You can choose a protocol from TCP UDP IPX and NetBios The following description is based on the TCP UDP protocol Test physical network connectivity by running a ping test between the client and server machines Install Feitian dongle software on both server side and client side Run Setup exe from the CD ROM to install all components on the server side including the driver
33. port a different port can be attempted if it has been used must be consistent with the setting of the client UDPPort 3152 UDP port a different port can be attempted if it has been used must be consistent with the setting of the client IPX bUsed 0 Whether to start the IPX service 1 for yes 0 for no IPXPort 3152 IPX port a different port can be attempted if it has been used must be consistent with the setting of the client NetBios bUsed 0 whether to start the NetBios service 1 for yes O for no RegName FTNetServer Whether to register a server name or not the first default value is RegName001 Or you can specify a name yourself if the name is not unique postfix it with 002 003 RegGrpName FTNetServer Name of server group it can be replaced with the name of your company but you must make sure that this entry is the same for all server and client configuration files FEITIAN NetRockey4ND User s Guide Chapter 2 NetRockey4ND Tools 2 1 Configuration File Editor The Configuration File Editor is a graphical program that may be used to edit SvrCfg ini and CliCfg ini The screen pictured in Figure 2 1 will appear if neither SvrCfg ini nor CliCfg ini is found in the current directory Click on either or both of the check boxes to create the configuration file s in the current directory with default settings Config File Type I Server Client Figure 2 1 The editor may edit SvrCfg in
34. ut base password is incorrect ERR_INVALID_PASSWORD_OR_ID UI Wrong password or NETROCKEY4ND HID ERR_SETID Set NETROCKEY4ND HID wrong ERR_INVALID_ADDR_OR_SIZE Read Write address is wrong ERR_UNKNOWN_COMMAND No such command ERR_NOTBELEVEL3 Inside error ERR_READ 0 Read error ERR_WRITE 1 Write error ERR_RANDOM Random error ERR_SEED 13 Seed Code error ERR_CALCULATE Calculate error ERR_NO_OPEN r UI Ry Open must precede this operation ERR OPEN OVERFLOW r a Too many open dongles gt 16 ERR_NOMORE No more dongle ERR_NEED_FIND No Find before FindNext oo ERR_DECREASE r Co Decrease error ERR AR BADCOMMAND N oO N r r m e e e o n gt w Inw r N gt N Arithmetic instruction error ERR_AR_UNKNOWN_OPCODE 21 Arithmetic operator error N N ERR_AR_WRONGBEGIN A constant cannot be in the first instruction ERR_AR_WRONG_END A constant cannot be in the last instruction N w ERR_AR_VALUEOVERFLOW Const number gt 63 A ERR_NET_LOGINAGAIN 1001 A module can only be opened once by the same process ERR_NET_NETERROR 1002 Network error FEITIAN NetRockey4ND User s Guide ERR_NET_LOGIN 1003 ERR_NET_INVALIDHANDLE 1004 ERR_NET_BADHARDWARE 1005 ERR_NET_REFUSE 1006 ERR_NET_BADSERVER 1007 ERR_INIT_SOCK 2001 ERR_NOSUCHPROTO 2002 ERR_UDPSOCKCREATE 2003 ERR_UDPSETBROADCAST 2004 ERR_UDPBINDFAILED 2005 ERR_SVRCALLBACKNULL 2006 ERR_TCPSOCKCREATE 200
Download Pdf Manuals
Related Search
Related Contents
Conair GS15RN Canon YJ12x6.5B User's Manual LG LW2412ER Energy Guide Sterling Plumbing Harrier 48 User's Manual MANUALE D`USO - Flowserve Corporation Baja Designs Automobile KLX 250 300 User's Manual Inicio de Network ScanGear RMB-19E Service - Follett Corporation Copyright © All rights reserved.
Failed to retrieve file