You are on page 1of 43

01intro1.

book Page 25 Friday, November 3, 2000 2:04 PM

This document was extracted from the larger NetHASP Developer's Guide.
This document contains information on how to setup the
NetHASP Hardware Lock on your network.

Basic NetHASP Concepts

What is NetHASP?
NetHASP is a HASP designed for networks. It lets you effectively
license your application in network environments by controlling the
number of software copies that can run at the same time. By
connecting a single NetHASP to any computer in the network, you
can secure your application against unauthorized use, and monitor
the number of stations using your application simultaneously.
01intro1.book Page 26 Friday, November 3, 2000 2:04 PM

Figure 4-1: The NetHASP System

NetHASP License Manager


The NetHASP License Manager is an application that communicates
with the protected application and the NetHASP, functioning as a
link between the two. To set up a NetHASP system, select any station
in the network, connect a NetHASP key to that station, and load the
NetHASP License Manager.
NetHASP License Managers are available for the following
environments: dedicated Novell servers, DOS, Windows 95, Windows
98, Windows ME, Windows NT, and Windows 2000.
The NetHASP License Manager is independent of the NetHASP and
of the protected application. Regardless of the environment in which
you run the protected application (DOS, Windows, or Win32), you
may activate any NetHASP License Manager to communicate with
the application and the NetHASP.
The NetHASP License Manager can communicate with up to 250
protected applications running on the network and with multiple
NetHASP keys connected to the computer.
01intro1.book Page 27 Friday, November 3, 2000 2:04 PM

NetHASP Login and Logout


When you activate a protected application, it performs a NetHASP
login to access the NetHASP License Manager with a request to run.
The protected application informs the NetHASP License Manager
that it has terminated by performing a NetHASP logout.

Do not confuse the NetHASP login and logout with the standard
Note network login and logout.

NetHASP Log Table


The NetHASP License Manager maintains a log table which lists all
the protected applications that have performed a NetHASP login. The
list identifies each protected application, and the station that
activated the application. An application and its station remain listed
in the log table until the application performs a NetHASP logout.
The NetHASP License Manager uses the log table to keep track of the
number of stations running a protected application at the same time.
The NetHASP License Manager ensures that the number of stations
does not exceed the maximum number licensed by the software
developer.

The NetHASP log table is an internal mechanism documented here


Note only to help you better understand the operation of the NetHASP
system.

NetHASP Models
NetHASP keys come in several models. Each NetHASP model can
protect up to 112 applications. The NetHASP model number
determines the maximum number of licenses available to each
application (i.e. the maximum number of stations that can access the
application at the same time). For example, HASP4 Net5 can allow
from zero to five licenses. Other models allow up to 10, 20, 50, or 100
licenses. With HASP4 NetU, your application can have an unlimited
number of licenses.
01intro1.book Page 28 Friday, November 3, 2000 2:04 PM

How Does NetHASP Work?


When a protected application is activated from a network station, it
accesses the NetHASP License Manager and requests permission to
run by performing a NetHASP login. The NetHASP License Manager
then checks that the correct NetHASP is connected and accesses the
NetHASP memory to verify that:
• The protected application is licensed to run.
• The number of stations allowed to run the protected application at
the same time has not been exceeded.
If all results produced by the checks are positive, the NetHASP
License Manager grants the protected application permission to run,
and updates the NetHASP log table. Otherwise, the NetHASP
License Manager returns an error code.
The figures on the following pages illustrate the NetHASP protection
mechanism. The network shown in these figures consists of four
stations. On one of the stations, a NetHASP is connected and the
NetHASP License Manager is active.
Protected application number 1 is licensed to run simultaneously on
five stations. The figures illustrate the process by which station 3
attempts to activate protected application number 1.

Before a NetHASP login...

Stations 1 and 2 are running protected application 1, and are both


listed in the log table. Of the five stations that are licensed to run the
protected application at the same time, two are already listed in the
log table.
01intro1.book Page 29 Friday, November 3, 2000 2:04 PM

A NetHASP login is performed...

Station 3 loads protected application 1, which accesses the NetHASP


License Manager with a NetHASP login. The NetHASP License
Manager determines whether or not station 3 is licensed to activate
the application.

After a NetHASP login...

The checks performed by the NetHASP License Manager are positive,


and application 1 is granted a license to run on station 3. The log table
is updated and now includes station 3.
01intro1.book Page 30 Friday, November 3, 2000 2:04 PM

Frequently Asked Questions

Question Do I need to install NetHASP on the network file server?

Answer No. You can install the NetHASP key and the NetHASP License
Manager on any station in the network. The designated station must
be active and the NetHASP License Manager loaded for as long as any
NetHASP-protected application is running.

Question Can I see which stations access a NetHASP?

Answer Yes. The Monitor utility shows you all the stations activating an
application that has performed a NetHASP login to the NetHASP
License Manager. See Chapter 18 for details.

Question If I connect two HASP4 Net5 keys of the same developer code to a
single station, will I receive 10 licenses?

Answer No. When two NetHASP keys with the same developer code are
daisy-chained on the same computer, only one NetHASP responds. To
enable ten licenses with two HASP4 Net5 keys, connect each key to a
separate station and run the correct NetHASP License Manager.
Alternatively, use a HASP4 Net10.

Question My customer already has a NetHASP from another software vendor


connected to a station on the network and a NetHASP License
Manager loaded. What must be done to install my NetHASP?

Answer All your customer needs to do is connect your NetHASP to the one
already installed. The already loaded NetHASP License Manager
serves both NetHASPs.
01intro1.book Page 31 Friday, November 3, 2000 2:04 PM

Question Will NetHASP work over the Internet?

Answer Yes. NetHASP works over the Internet with TCP.


u

Question When using NetHASP, on which station do I need to install the HASP
Device Driver?

Answer Only on the station with the NetHASP key.


The HASP Device Driver serves as a link between the HASP and the
protected application. Since the NetHASP-protected application
communicates with the NetHASP License Manager, which in turn
accesses the NetHASP key, install the NetHASP Device Driver on the
station which runs the NetHASP License Manager.
01intro1.book Page 215 Friday, November 3, 2000 2:04 PM

Installing NetHASP on a
Network

This chapter explains the steps required to install NetHASP and


adapt the stations in the network to the NetHASP system. You can
first consult the quick reference guide to installing NetHASP. Then,
proceed to the full description of:
• The networks and protocols that NetHASP supports.
• The NetHASP License Manager - its functions and how to activate
it on various stations.
• The automatic and custom search methods used by the NetHASP
client to search for the NetHASP License Manager.

NetHASP Installation - Quick Reference


The fastest way to install NetHASP on your system is to:
1 Connect the key.

2 Load the NetHASP License Manager with LMSETUP.EXE.


3 Activate the protected application.
However, if you want to customize the NetHASP system, you can
refer to the following three tables which guide you through the
NetHASP custom installation process.
01intro1.book Page 216 Friday, November 3, 2000 2:04 PM

Each of the three following tables refers to a specific network protocol.


For each application type, the relevant nethasp.ini keyword settings
are specified. The comments describe the way in which the NetHASP
client searches for the NetHASP License Manager.

IPX
Table 17.1: Customizing NetHASP under IPX

Application nh_use_broadcast nh_use_bindery Comments

DOS and Win16 enabled disabled NetHASP client uses SAP Broadcast
(default method).

DOS and Win16 enabled enabled NetHASP client uses Novell Bindery.
If fails, uses SAP Broadcast.

DOS and Win16 disabled enabled NetHASP client uses Novell Bindery.
If fails, uses address file.

DOS and Win16 disabled disabled NetHASP client uses address file.

Win32 enabled irrelevant NetHASP client uses SAP Broadcast


(default method).

Win32 disabled irrelevant NetHASP client uses address file.


01intro1.book Page 217 Friday, November 3, 2000 2:04 PM

TCP/IP
Table 17.2: Customizing NetHASP under TCP/IP

Application nh_tcpip_method nh_server_addr nh_use_broadcast Comments

Win16 UDP irrelevant enabled NetHASP client uses UDP


and Broadcast (default method).
Win32 No subnet crossing.

Win16 UDP address or host disabled NetHASP client searches for


and name the NetHASP License
Win32 Manager with specified IP
address.
Can cross subnets.

Win16 TCP address or host irrelevant NetHASP client searches for


and name the NetHASP License
Win32 Manager with specified
address.
Can cross subnets and
firewalls. Triggers Internet
dial-up.

NetBIOS
Table 17.3: Customizing NetHASP under NetBIOS

Application nh_uselananum Comments

all applications lana number NetHASP client searches for the


NetHASP License Manager on the
specified lana number.
01intro1.book Page 219 Friday, November 3, 2000 2:04 PM

Networks and Protocols Supported by


NetHASP
NetHASP supports the IPX, TCP/IP, and NetBIOS network
communication protocols and LANs that are based on these protocols.

IPX Support
NetHASP under IPX supports the following mechanisms:
• Novell SAP (Bindery)
Novell mechanism that enables registration of applications that
need network advertising.
• Broadcast
While stations broadcast to the network, the NetHASP License
Manager constantly listens in.
• NetHASP Address File
Advertising the NetHASP License Manager through a file
mechanism (address file).

TCP/IP Support
In environments that support TCP/IP, NetHASP operates in two
modes:
• TCP, UDP
The address of the NetHASP License Manager is specified.
• UDP Broadcast
While stations broadcast to the network, the NetHASP License
Manager constantly listens in.

NetBIOS Support
NetHASP supports various types of NetBIOS including Microsoft
NetBEUI.
01intro1.book Page 220 Friday, November 3, 2000 2:04 PM

The NetHASP License Manager


The NetHASP License Manager is an independent application that
serves as a link between the NetHASP and the protected application.
Regardless of the environment in which you run the protected
application - DOS, Windows, Win32, or OS/2 - you can activate any
one of the NetHASP License Managers to communicate with it and
the NetHASP. One NetHASP License Manager can support an
unlimited number of NetHASP clients.
You can connect the NetHASP to any computer on the network. This
computer does not necessarily have to be the network file server.
When several applications are protected with different NetHASP
keys, we recommend you daisy-chain all keys to a single computer (if
you are using a parallel port). Alternatively, you can connect the keys
to different computers. If you do so, you must then activate the
NetHASP License Manager on each of these computers.
The NetHASP License Manager must remain active as long as any
Note network station is running a protected application.

The NetHASP License Manager you use should comply with the
operating system of the computer on which it is loaded. NetHASP
License Managers can load only on their respective operating
systems, and only once per session.
The following table shows the protocol support for NetHASP License
Managers under various operating systems.

Table 17.4: NetHASP License Manager Protocol Support

NetHASP License
Operating System IPX TCP/IP NetBIOS
Manager
DOS haspserv.exe ✓ ✓✝

Windows 95 and Windows NT nhsrvw32.exe ✓ ✓ ✓

Netware 386 and 486 file servers haspserv.nlm ✓

By default, the NetHASP License Manager for Win32 listens to all


Note three protocols simultaneously.
The following sections describe the activation procedure for the
NetHASP License Manager on various stations and file servers in the
network.
01intro1.book Page 221 Friday, November 3, 2000 2:04 PM

NetHASP on a DOS Station


The NetHASP License Manager for DOS is haspserv.exe.

To load the NetHASP License Manager:


1 Connect the NetHASP to a DOS station.
2 Run haspserv.exe. A message appears informing you that the
NetHASP License Manager is loaded. The message also shows which
protocol is being used.

Tip To load the NetHASP License Manager automatically, add its


filename to the autoexec.bat file.

To remove the NetHASP License Manager:


• Run haspserv.exe -r.
• Alternatively, delete the call line from the autoexec.bat file and
reboot the station.
You should always install the Win32 or Netware License Manager if
your application uses the encode or decode functions.
Note

NetHASP on a Novell Netware File Server


The NetHASP License Manager for Novell Netware file servers is
haspserv.nlm.
To load the NetHASP License Manager:
1 Connect the NetHASP to a Novell server.
2 Copy haspserv.nlm to the system directory of the file server.
3 Load the NetHASP License Manager, by entering:
load haspserv
The NetHASP License Manager screen appears showing operation
details.

Tip To load the NetHASP License Manager automatically, add the line
load haspserv to the autoexec.ncf file in the sys:system directory.

To remove NetHASP License Manager:


• Enter unload haspserv.
This License Manager will only function on installations where IPX is
installed. Netware IP installations require one of the other license
Note
managers to be installed.
01intro1.book Page 222 Friday, November 3, 2000 2:04 PM

NetHASP on a Windows 95/98/ME Station


1 Connect the NetHASP to a Windows 95/98 station.
2 Install the License Manager by running LMSETUP.EXE
and following the instructions of the installation wizard.
The installation will also ask you to install the HASP device driver.

NetHASP on a Windows NT4/2000/XP Station


1 Connect the NetHASP to a Windows NT4/2000/XP station.
2 Install the License Manager by running LMSETUP.EXE
and following the instructions of the installation wizard.
The installation will also ask you to install the HASP device driver.

It is recommended that you install the License Manager as an NT


Note service, so there is no need to log in to the station to provide the LM
functionality.

NetHASP Automatic Search


The most critical stage in NetHASP system installation is ensuring
that the NetHASP client (the station activating the protected
application) finds the NetHASP License Manager. A communication
session can begin only after the NetHASP License Manager is found.
The NetHASP automatic search lets you connect the NetHASP, load
the NetHASP License Manager, and activate the protected
application, without any changes to the NetHASP system or the
environment in which it is installed. Nevertheless, the search
mechanism allows fine-tuning of the NetHASP system with simple
client-server adjustments. This is implemented by the NetHASP
custom search.
01intro1.book Page 223 Friday, November 3, 2000 2:04 PM

Both the automatic and custom mechanisms are described below.


An automatic search takes place when the NetHASP client does not
find a NetHASP configuration file (such as nethasp.ini). The
NetHASP-protected application then uses the following algorithm to
search for the NetHASP License Manager:

Begin

Detect the active communication protocols;

Loop up to three times on the procedure below

(1) perform a NetHASP login using the IPX protocol, allow n seconds for suc-
cess;
if login succeeds, continue using IPX;
else

(2) perform a NetHASP login using the TCP/IP protocol, allow n seconds for
success; if login succeeds, continue using TCP/IP;
else

(3) perform a NetHASP login using the NetBIOS protocol


if login success, continue using NetBIOS;
else

(4) return to beginning of loop and double the value of n;

If all fails after the third loop, return a NetHASP error

End

Initially, when beginning the NetHASP search loop, n=2 seconds.


Before following the automatic search algorithm, the NetHASP
system first checks which protocols are installed, and performs only
the relevant steps. For example, if only the TCP/IP protocol is
detected, only step 2 in the above algorithm is performed. It is
performed up to 3 times (if needed), doubling the value of n each time.
01intro1.book Page 224 Friday, November 3, 2000 2:04 PM

Automatic Search under IPX


Under IPX the NetHASP system uses a SAP broadcast mechanism to
automate the search for the NetHASP License Manager. That is, the
NetHASP client broadcasts, while all IPX active NetHASP License
Managers listen in. The first one to answer the client, enabling a
NetHASP login, provides the NetHASP services. With the automatic
search under IPX, clients and NetHASP License Managers on
separate segments can communicate.

Automatic Search under TCP/IP


Under TCP/IP the NetHASP system uses a UDP broadcast
mechanism to automate the search for the NetHASP License
Manager. That is, the NetHASP client broadcasts, while all TCP/IP
active NetHASP License Managers listen in. The first one to answer
the client - enabling a NetHASP login - provides the NetHASP
services.

With the automatic search under TCP/IP, NetHASP clients cannot


Note access NetHASP License Managers which are located in other
subnets or on the Internet. To cross subnets/Internet you need to
customize the search mechanism. For more information, see
“NetHASP Custom Search” on page 225.

Automatic Search under NetBIOS


Under NetBIOS the NetHASP system:
• Does not limit the search to n seconds. The search time remains 4 to
6 seconds during each segment of the loop.
• Determines which lana numbers (communication channels) are in
operation and uses them for communication.
• Uses the default NetHASP NetBIOS name ("AladdinHaspV012.0").
Under NetBIOS, the automatic search mechanism operates according
to the application type running on the NetHASP client:

DOS and Win16 Applications


Win16 applications search on all detected lana numbers
(communication channels) for a NetHASP License Manager. This is
performed in each iteration session ( (3) in the above search
algorithm). When a NetHASP License Manager is found, regardless of
its connected NetHASP key, the search ends.
The Windows NetHASP License Manager listens on the first lana
number it detects.
01intro1.book Page 225 Friday, November 3, 2000 2:04 PM

Win32 Applications
Win32 applications search on all detected lana numbers for a
NetHASP key. That is, the search does not end when a NetHASP
License Manager answers, but rather when a NetHASP License
Manager with the right NetHASP key answers.
The Win32 NetHASP License Manager listens on all detected lana
numbers.
Because communication on all detected lana numbers takes time, an
attempt is made to communicate on a single lana number per
iteration session. If communication fails, the next iteration session
uses the next detected lana number.

If more than three lana numbers are detected and the algorithm loop
Note terminates its three iterations, step (3) in the algorithm is performed
again using the remaining unchecked lana numbers.

NetHASP Custom Search


Under various environments you might want or need to customize the
NetHASP search mechanism. This is done by setting keywords in the
NetHASP configuration file (i.e. the nethasp.ini file). The nethasp.ini
file is read by the NetHASP client (the protected application) to
customize the search mechanism. If the NetHASP client finds a
nethasp.ini file, it reads it and uses the information. If not, an
automatic search takes place.
The NetHASP client searches for the nethasp.ini file in the following
locations:

Application Type Search Order

DOS Current directory → Netware search map

Windows Current directory → Windows directory →


Windows system directory → Executable file
directory → Path → Netware search map

Win32 Executable file directory → Current directory →


Windows system directory → Windows directory
→ Path
01intro1.book Page 226 Friday, November 3, 2000 2:04 PM

The following sections describe the nethasp.ini keywords used for


basic customization of the NetHASP search mechanism. Not all
nethasp.ini keywords are described in these sections. A nethasp.ini
file template, which you can use for additional fine tuning of the
NetHASP system, can be found in Appendix A, including a description
of all its keywords.

General Custom Search Information


You can change the initial value of n, the first search period in the
NetHASP algorithm loop, from its default value of 2 seconds.

To change the initial value of n:


• In the [NH_COMMON] section, set NH_SESSION = <seconds>
where <seconds> is the desired initial search period.
Setting the NH_SESSION keyword in the NH_COMMON section,
applies to all protocols. To set the session value for each protocol
independently, set the value of NH_SESSION in each protocol section
separately.

Custom Search under IPX


A custom search under IPX is application dependent. The following
sections describe four custom options for Win16 applications, and two
custom options for Win32 applications.

Broadcast (DOS and Win16 Applications)


1 Load the NetHASP License Manager with the -ipx switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_IPX = Enabled
• In the [NH_IPX] section, set NH_USE_BROADCAST = Enabled
• In the [NH_IPX] section, set NH_USE_BINDERY = Disabled
3 Copy the edited nethasp.ini file to a location accessible by the
application.
This option is the default. It is also used by the automatic search (step
(1) in the search algorithm). It instructs the NetHASP system to use
the SAP broadcast mechanism to search for the NetHASP License
Manager.
01intro1.book Page 227 Friday, November 3, 2000 2:04 PM

Bindery / Broadcast (DOS and Win16 Applications)


1 Load the NetHASP License Manager with the -ipx switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_IPX = Enabled
• In the [NH_IPX] section, set NH_USE_BROADCAST = Enabled
• In the [NH_IPX] section, set NH_USE_BINDERY = Enabled
3 Copy the edited nethasp.ini file to a location accessible by the
application.
This option instructs the NetHASP system to search for the NetHASP
License Manager in the Novell bindery. If the bindery is not
supported, or the NetHASP License Manager not found, the
NetHASP system uses the broadcast mechanism to complete the
search.

Bindery / Address File (DOS and Win16 Applications)


1 Load the NetHASP License Manager with the -ipx switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_IPX = Enabled
• In the [NH_IPX] section, set NH_USE_BROADCAST = Disabled
• In the [NH_IPX] section, set NH_USE_BINDERY = Enabled
3 Copy the edited nethasp.ini file to a location accessible by the
application.
This option instructs the NetHASP system to search for the NetHASP
License Manager in the Novell bindery. If the bindery is not
supported, or if the NetHASP License Manager is not found, the
NetHASP system will use the address file mechanism to complete the
search, i.e. looks for the NetHASP License Manager address in the
newhaddr.dat file.

Address File (DOS and Win16 Applications)


1 Load the NetHASP License Manager with the -ipxnosap switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_IPX = Enabled
• In the [NH_IPX] section, set NH_USE_BROADCAST = Disabled
• In the [NH_IPX] section, set NH_USE_BINDERY = Disabled
01intro1.book Page 228 Friday, November 3, 2000 2:04 PM

3 Copy the edited nethasp.ini file to a location accessible by the


application.
This option instructs the NetHASP system to search for the NetHASP
License Manager using the address file mechanism (looks for the
NetHASP License Manager address in the newhaddr.dat file).

Broadcast (Win32 Applications)


1 Load the NetHASP License Manager with the -ipx switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_IPX = Enabled
• In the [NH_IPX] section, set NH_USE_BROADCAST = Enabled
3 Copy the edited nethasp.ini file to a location accessible by the
application.
This option is the default. It is also used by the automatic search (step
(1) in the algorithm loop). It instructs the NetHASP system to use the
SAP broadcast mechanism to search for the NetHASP License
Manager.

Address File (Win32 Applications)


1 Load the NetHASP License Manager with the -ipxnosap switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_IPX = Enabled
• In the [NH_IPX] section, set NH_USE_BROADCAST = Disabled
3 Copy the edited nethasp.ini file to a location accessible by the
application.
This option instructs the NetHASP system to search for the NetHASP
License Manager using the address file mechanism (looks for the
NetHASP License Manager address in the newhaddr.dat file).

General Notes for IPX


NH_USE_BINDERY is equivalent to the previous NH_USE_SAP
keyword.
Win32 applications cannot use the Novell bindery. Therefore, the
keyword NH_USE_BINDERY is irrelevant for these applications.
01intro1.book Page 229 Friday, November 3, 2000 2:04 PM

By default, a NetHASP address file (newhaddr.dat) is created in the


directory of the NetHASP License Manager. When using
haspserv.nlm, the address file is created in the server root directory.
The NetHASP client searches for the address file in the following
locations:

Application Type Search Order

DOS Current directory → Netware search map

Windows Current directory → Windows directory → Windows


system directory → Executable file directory → Path →
Netware search map

Win32 Executable file directory → Current directory →


Windows system directory → Windows directory → Path

Adding the following keyword to the nethasp.ini in the Win16 and


Win32 Address File options described above, you can specify the
location path for the address file:
NH_DATFILE_PATH = <path>

Custom Search under TCP/IP


The following sections describe three custom options for TCP/IP.

UDP Broadcast
1 Load the NetHASP License Manager with the -tcpip switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_TCPIP = Enabled
• In the [NH_TCPIP] section, set NH_TCPIP_METHOD = UDP
• In the [NH_TCPIP] section, set NH_USE_BROADCAST = Enabled
3 Copy the edited nethasp.ini file to a location accessible by the
application.
This option is the default. It is also used by the automatic search (step
(2) in the search algorithm). It instructs the NetHASP system to use
the broadcast mechanism to search for the NetHASP License
Manager.
Note that with this setting, NetHASP clients cannot access NetHASP
License Managers which are located in other subnets or on the
Internet.
01intro1.book Page 230 Friday, November 3, 2000 2:04 PM

UDP to Host
1 Load the NetHASP License Manager with the -tcpip switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_TCPIP = Enabled
• In the [NH_TCPIP] section, set NH_TCPIP_METHOD = UDP
• In the [NH_TCPIP] section, set NH_SERVER_ADDR = <IP address of
the NetHASP LM, or the NetHASP LM host name>
• In the [NH_TCPIP] section, set NH_USE_BROADCAST = Disabled
3 Copy the edited nethasp.ini file to a location accessible by the
application.
This option instructs the NetHASP client to search for a NetHASP
License Manager with the specified IP address or host name. This
option lets the NetHASP cross subnets when a router is operational.

TCP/IP
1 Load the NetHASP License Manager with the -tcpip switch.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_TCPIP = Enabled
• In the [NH_TCPIP] section, set NH_TCPIP_METHOD = TCP
• In the [NH_TCPIP] section, set NH_SERVER_ADDR = <IP address of
the NetHASP LM, or NetHASP LM Host name>
3 Copy the edited nethasp.ini file to a location accessible by the
application.
This option instructs the NetHASP client to search for a NetHASP
License Manager with the specified IP address or host name. This
option lets NetHASP cross subnets when a router is operational.
This option triggers automatic dialing on computers configured for
Note dial-up networking. This is a known side effect of initiating a TCP
session on such a computer. If your only use of TCP/IP is for dial-up
networking, you should use one of the two options above, or a
different protocol.
01intro1.book Page 231 Friday, November 3, 2000 2:04 PM

General Notes for TCP/IP


NetHASP will not cross most firewalls or packet filters. To support
UDP most firewalls use packet filtering, TCP connections can be
supported with either proxies or packet filtering. NetHASP uses port
475 for both TCP and UDP. To configure your firewall to allow
NetHASP to work, please consult your network administrator.
The NetHASP License Manager defaults to port number 475. If you
want it to listen to another port:

To specify a different port number:


1 Load the NetHASP License Manager with both the -tcpip and -
portnum=<number> switches.
2 Make the following additional change to the nethasp.ini file:
• In the [NH_TCPIP] section, set NH_PORT_NUMBER = <number>

Custom Search under NetBIOS


Win16 applications search on all lana numbers (communication
channels) for a NetHASP License Manager. When a NetHASP
License Manager is found the search ends. If the required NetHASP
key is not connected, the NetHASP License Manager returns a “HASP
not Found” message.
In this case you can customize the search by instructing the NetHASP
system to communicate on another lana number, in order to search for
a NetHASP License Manager with the appropriate NetHASP. This is
done by editing the nethasp.ini.

To communicate on another lana number:


• In the [NH_COMMON] section, set NH_NETBIOS = Enabled
• In the [NH_NETBIOS] section, set NH_USE_LANANUM = <lana
number>
Step (3) of the search algorithm is then always executed using the
specified lana number.

General Note for NetBIOS


The NetBEUI protocol does not cross segments. If you are activating
the protected application in a NetBEUI environment, where the
NetHASP License Manager and the NetHASP clients are on separate
segments, the NetHASP clients cannot find the NetHASP License
Manager. In this case, you need to load the IPX/SPX compatible
transport with NetBIOS and set it as the default protocol to enable
the communication to cross segments.
01intro1.book Page 241 Friday, November 3, 2000 2:04 PM

NetHASP Configuration Files

NetHASP supports the option of using a configuration file containing


parameters and other settings for fine-tuning the protected
application. There are two NetHASP configuration files:
• NetHASP client configuration file
• NetHASP License Manager configuration file
If the client or the NetHASP License Manager finds its respective
configuration file, it reads the file and uses the information. If not,
default values are used.

NetHASP Client Configuration File


In the NetHASP client configuration file you can fine-tune how the
NetHASP client searches for the License Manager.
The filename of the NetHASP configuration file is nethasp.ini. A copy
of nethasp.ini is included with the HASP utilities and also with each
HASP API.
01intro1.book Page 242 Friday, November 3, 2000 2:04 PM

The protected application searches for the NetHASP client


configuration file when the first NetHASP service is accessed. It
searches for the NetHASP client configuration file in the following
locations:
Table A.1: Search Order for the nethasp.ini File

Application Type Search Order

DOS Current directory → Netware search map

Windows Current directory → Windows directory → Windows


system directory → Executable file directory → Path →
Netware search map

Win32 Executable file directory → Current directory → Windows


system directory → Windows directory → Path

The NetHASP client configuration file consists of four sections, each


of which is optional:
• [NH_COMMON]
• [NH_IPX]
• [NH_NETBIOS]
• [NH_TCPIP]
The [NH_COMMON] section contains global settings for all
configuration file sections. Each of the other sections contains settings
which fine-tune operations for the specific protocol.
In each section, you can specify either general or section-specific
keywords. If you set a general keyword in one of the three protocol
sections, you override the setting in the [NH_COMMON] section (for
that protocol only).
Use the section-specific keywords to adjust additional settings for a
particular protocol.
API and Envelope settings override configuration file settings.
Every line of the NetHASP configuration file you receive with the
HASP software is preceded by a semicolon (;). To use a line, remove
the semicolon. If you want to add comments, precede them with a
semicolon.

Names of NetHASP configuration files and their keywords are not


Note case sensitive.
01intro1.book Page 243 Friday, November 3, 2000 2:04 PM

The following section describes each section in the NetHASP client


configuration file. For each keyword, the possible values and a short
description are included. When a default value exists, it is listed.

[NH_COMMON]
Section-Specific Keywords

Keyword: NH_IPX

Possible values: enabled, disabled


Description Use the IPX protocol.

Keyword: NH_NETBIOS

Possible values: enabled, disabled


Description: Use the NetBIOS protocol

Keyword: NH_TCPIP

Possible values: enabled, disabled


Description: Use the TCP/IP protocol

Keyword: NH_MACHINE

Possible values: IBM, NEC


Description: Set the type of computer from which the protected
application is activated.

Default: IBM

General Keywords

Keyword: NH_SESSION

Possible values: <number>


Description: Set the maximum length of time during which the protected
application tries to establish communication with the
NetHASP License Manager.

Default: 2 seconds

Keyword: NH_SEND_RCV

Possible values: <number>


Description: Set the maximum length of time for the NetHASP License
Manager to send or receive a packet.

Default: 1 second
01intro1.book Page 244 Friday, November 3, 2000 2:04 PM

[NH_IPX]

Section-Specific Keywords

Keyword: NH_USE_BINDERY

Possible values: enabled, disabled


Description: Use IPX with bindery. Ignored under Win32 API. This
switch replaces the older switch named NH_USE_SAP.

Default: disabled

Keyword: NH_USE_BROADCAST

Possible values: enabled, disabled


Description: Use the IPX Broadcast mechanism.

Default: enabled

Keyword: NH_BC_SOCKET_NUM

Possible values: <number>


Description: Set the socket number for the broadcast mechanism. The
number is hexadecimal.

Default: 7483H

Keyword: NH_USE_INT

Possible values: 2F_NEW, 7A_OLD


Description: 2F_NEW means that the IPX protocol will use interrupt 2Fh
ONLY.
7F_OLD means that the IPX protocol will use interrupt 7Ah
ONLY. disabled

Default: 2F_NEW

Keyword: NH_SERVER_NAME

Possible values: <name1>, <name2>,...


Description: Communicate with the NetHASP Server with the specified
name.
Maximum: 6 names, up to 7 case insensitive characters
each.
01intro1.book Page 245 Friday, November 3, 2000 2:04 PM

Keyword: NH_SEARCH_METHOD

Possible values: localnet, internet


Description: Determine whether the protected application
communicates with only NetHASP License Managers on
the local network, or with any NetHASP License Manager
on the internetwork.

Default internet

Keyword: NH_DATFILE_PATH

Possible values: <path>


Description: Specify the location of the NetHASP License Manager’s
address file.

General Keywords

Keyword: NH_SESSION

Possible values: <number>


Description: Set the maximum length of time during which the protected
application tries to establish communication with the
NetHASP License Manager.
Default 2 seconds

Keyword: NH_SEND_RCV

Possible values: <number>


Description: Set the maximum length of time for the NetHASP License
Manager to send or receive a packet.

Default: 1 second
01intro1.book Page 246 Friday, November 3, 2000 2:04 PM

[NH_NETBIOS]

Section-Specific Keywords

Keyword: NH_NBNAME

Possible values: <name>


Description: Assign a name to the NetHASP License Manager.
Maximum: 1 name, up to 8 case insensitive characters.
Keyword: NH_USELANANUM

Possible values: <number>


Description: Assign a lana number to be used as a communication
channel.

General Keywords

Keyword: NH_SESSION

Possible values: <number>


Description: Set the maximum length of time during which the protected
application tries to establish communication with the
NetHASP License Manager.

Default: 2 seconds

Keyword: NH_SEND_RCV

Possible values: <number>


Description: Set the maximum length of time for the NetHASP License
Manager to send or receive a packet.

Default: 1 second
01intro1.book Page 247 Friday, November 3, 2000 2:04 PM

[NH_TCPIP]

Section-Specific Keywords

Keyword: NH_SERVER_ADDR

Possible values: <address1>, <address2>


Description: Set IP addresses of all the NetHASP License Managers you
want to search. Unlimited addresses and multiple lines are
possible.
Possible address format examples include:
IP address: 192.114.176.65
Local hostname: ftp.aladdin.co.il

Keyword: NH_SERVER_NAME

Possible values: <name1>, <name2>,...


Description: Communicate with the NetHASP Server with the specified
name(s).
Maximum: 6 names, up to 7 case insensitive characters
each.

Keyword: NH_PORT_NUMBER

Possible values: <number>


Description: Set the TCP/IP port number (optional).
Default: 475

Keyword: NH_TCPIP_METHOD

Possible values: TCP, UDP


Description: Send a TCP packet or a UDP packet.
Default: UDP

Keyword: NH_USE_BROADCAST

Possible values: enabled, disabled


Description: Use the UDP Broadcast mechanism.
Default: enabled
01intro1.book Page 248 Friday, November 3, 2000 2:04 PM

General Keywords

Keyword: NH_SESSION

Possible values: <number>


Description: Set the maximum length of time during which the protected
application tries to establish communication with the
NetHASP License Manager.
Default: 2 seconds

Keyword: NH_SEND_RCV

Possible values: <number>


Description: Set the maximum length of time for the NetHASP License
Manager to send or receive a packet.

Default: 1 second
01intro1.book Page 249 Friday, November 3, 2000 2:04 PM

NetHASP License Manager Configuration


File
In the NetHASP License Manager configuration file you can fine-tune
settings for the NetHASP License Manager.
The filename of the NetHASP License Manager configuration file is
nhsrv.ini. A copy of nhsrv.ini is included with the HASP utilities.
You can place nhsrv.ini and the executable of the NetHASP License
Manager in the same directory or in any other location in accordance
with the nhsrv.ini search order listed in the table below:

Table A.2: Search Order for the nhsrv.ini File

Application Type Search Order


Windows Current directory → Windows directory →
Windows system directory → Executable file
directory → Path → Netware search map

Win32 Executable file directory → Current directory →


Windows system directory → Windows directory
→ Path

The following is a description of the NetHASP keywords for the


License Manager configuration file (applicable for TCP/IP only).
This section describes the NetHASP License Manager configuration
file keywords.

[NHS_SERVER]

Keyword: NHS_IP_LIMIT

Possible values: <IpAddr>,<IpAddr>,...


Description: Specify the range of stations the NetHASP License
Manager serves. Applicable for the Win16 and Win32
License Managers.
For example: 10.1.1.1,10.1.1.*

Keyword: NHS_ADAPTER_IP

Possible values: <IpAddr-SubMask>,<IpAddr-SubMask>,...


Description: Specify the IP address of one or more network cards to
which the NetHASP License Manager listens. Applicable
only to the Win32 License Manager.
For example: 10.1.1.111-255.255.0.0
01intro1.book Page 251 Friday, November 3, 2000 2:04 PM

NetHASP License Manager


Switches

The NetHASP License Manager can be activated with various


switches that instruct the NetHASP system which protocols to use
and how to serve the NetHASP clients.
Table B.1 lists all the switches available for the different NetHASP
License Managers. Table B.2 explains how to use each switch.
01intro1.book Page 252 Friday, November 3, 2000 2:04 PM

Table B.1: NetHASP License Managers and their Switches

Switch haspserv.exe haspserv.nlm nhsrvw32.exe

-? ◆ ◆

-addrappend ◆ ◆ ◆

-addrpath ◆ ◆ ◆

-help ◆ ◆

-highpriority ◆

-ibm ◆ ◆ ◆

-ibm36 ◆ ◆ ◆

-ipx ◆ ◆

-ipxnosap ◆ ◆ ◆

-ipxsocketnum ◆ ◆ ◆

-localnet ◆ ◆ ◆

-maxlananum ◆

-nbname ◆ ◆

-nec ◆

-net ◆

-netbios ◆ ◆

-nethaspnbname ◆ ◆

-openmin ◆

-portnum ◆

-r ◆

-saptofile ◆

-srvname ◆ ◆ ◆

-tcp/ip ◆

-uselananum ◆ ◆

-userlist ◆ ◆
01intro1.book Page 253 Friday, November 3, 2000 2:04 PM

Table B.2: Description of NetHASP License Manager Switches


Switch* Explanation
-? Display a list of available switches.
-addrappend Do not overwrite the nethaddr.dat file. Add the NetHASP License
Manager address to the already existing addresses in previously created
address files.
-addrpath=<path> Specify a location for saving newhaddr.dat. By default, the NetHASP
License Manager places newhaddr.dat in the directory where it is
loaded.
-help Display a list of available switches.
-highpriority Assign high priority to the NetHASP License Manager.
-ibm Default. Use this switch with IBM PCs to search for standard NetHASP
keys only.
-ibm36 Use this switch with IBM PCs to search first for a NetHASP36 and then
for a standard NetHASP.
-ipx Instruct the NetHASP system to use the IPX protocol with SAP.
-ipxnosap Instruct the NetHASP system to use only the IPX protocol (without SAP).
With the NetHASP License Manager for Win32, you can still load other
protocols by using either the -tcpip or -netbios switch or both.

When you use this switch, the NetHASP License Manager creates a file
called newhaddr.dat. This file contains the node address of the station
running the NetHASP License Manager. When you load the NetHASP
License Manager with this switch, only protected applications with
access to newhaddr.dat can communicate with the NetHASP License
Manager.
-ipxsocketnum=<number> Use this switch if you want to change the IPX socket the License
Manager is using for communication. The default is 7483 (hex).
-localnet Use this switch if you want the NetHASP License Manager to serve only
requests from stations in the local network.

If requests come from stations that are not part of the local network, the
NetHASP License Manager returns error 140.
-maxlananum=<number> Use this switch to configure the number of LANA numbers the License
Manager will support. The default is 6 (i.e. LANA 0 through 5).
-nbname=<name> Assign a NetBIOS name to the NetHASP License Manager. This switch
is identical to the -nethaspnbname switch.
-nec Use this switch with NEC computers to search for NetHASP36 keys only.
-net Advertise the NetHASP License Manager address with a specific local
network number.
01intro1.book Page 254 Friday, November 3, 2000 2:04 PM

Switch* Explanation
-netbios Force the NetHASP system to listen only to the NetBIOS protocol. With
the NetHASP License Manager for Win32, you can still load other
protocols by using either the -tcpip or -ipxnosap switch or both.
-nethaspnbname= Assign a NetBIOS name to the NetHASP License Manager. This switch
<name> is identical to the -nbname switch.
-openmin Load the NetHASP License Manager program with its window
minimized. By default the window is maximized.
-portnum=<number> If you are using the TCP/IP protocol, you can use this switch to instruct
the NetHASP License Manager to listen to the port you specify. The
default Port Number is 475.
-r Remove the NetHASP License Manager from memory.
-saptofile When you use this switch, the NetHASP License Manager creates the
newhaddr.dat file. This file contains the node address of the station
running the NetHASP License Manager.
- Assign one or more IPX, TCP/IP or NetBIOS names to the NetHASP
srvname=<name>[,name] License Manager. You can assign up to six names for IPX and TCP/IP
or one name for NetBIOS.
-tcpip Force the NetHASP system to listen only to the TCP/IP protocol. With
the NetHASP License Manager for Win32, you can still load other
protocols by using either the -ipxnosap or -netbios switch or both.
-uselananum=<x>[,<x>] Instruct the NetHASP License Manager to listen to specific lana
numbers.
-userlist Limit the maximum number of protected applications.

* When Netware NLM is used, all switches which require a value to be passed must be used
without the “=” sign, e.g. -ipxsocketnum 7483.
01intro1.book Page 255 Friday, November 3, 2000 2:04 PM

Adapting NetHASP to the


Network

Defining the Range of Stations under IPX


This section describes additional NetHASP License Manager switches
and nethasp.ini keywords you can use to further adjust the NetHASP
system to your network environment.
With IPX, you can allow specific stations on a different segment to
access the NetHASP License Manager.

To allow access from a different segment:


1 Load the NetHASP License Manager with the -ipxnosap switch.
This ensures that the address of the NetHASP License Manager is not
advertised using the SAP mechanism, and is advertised in the
NetHASP address file newhaddr.dat.
2 Edit the nethasp.ini file as follows:
• In the [NH_COMMON] section, set NH_IPX = Enabled
• In the [NH_IPX] section, set NH_USE_BROADCAST = Disabled
• In the [NH_IPX] section, set NH_USE_BINDERY = Disabled
These settings instruct the protected application running on stations
in the range to search for the address file and read the address of the
NetHASP License Manager.
01intro1.book Page 256 Friday, November 3, 2000 2:04 PM

3 Copy the protected application and the nethasp.ini file to the same
directory. Make sure that each station in the range, and only stations
in the range, load the application from this directory.

Defining the Range of Stations under


TCP/IP
There are two methods to define the range of stations under TCP/IP.
You can either specify the range of stations that the NetHASP
License Manager serves, or you can specify that the range of stations
search for a particular NetHASP License Manager.

Specifying the Range Using nhsrv.ini


The NetHASP License Managers for Windows and Win32 can read a
configuration file - nhsrv.ini. You can edit this file to specify the range
of stations the NetHASP License Manager serves under TCP/IP.

To specify the range of stations, edit the nhsrv.ini file as


follows:
• In the [NHS_SERVER] section, NHS_IP_LIMIT = <ipaddr> [,<ipaddr....]

Sample Formats for <ipaddr>


When you specify the range of stations using nhsrv.ini, you can use
any of the following formats:
• 10.1.2.3
The NetHASP License Manager serves only the station with the
specified IP address.
• 10.1.2.*
The NetHASP License Manager serves only stations that match the
specified IP address mask, i.e. 10.1.2.0 through 10.1.2.255.
• 10.1.*.*
The NetHASP License Manager serves only stations that match the
specified IP address mask, i.e. 10.1.0.0 through 10.1.255.255.
• 10.1.2.3-5
The NetHASP License Manager serves only stations with IP
address 10.1.1.3, 10.1.1.4, 10.1.1.5.
Note that you can also exclude certain addresses by using the !
notation. For example, you can write !10.1.2.7.
01intro1.book Page 257 Friday, November 3, 2000 2:04 PM

To allow only some of the stations to access the NetHASP in a


TCP/IP-based network:
1 Edit nhsrv.ini and set the range of stations.
2 Copy nhsrv.ini to a location accessible by the NetHASP License
Manager.

Specifying the Range Using nethasp.ini


You can edit the NetHASP configuration file to specify the NetHASP
License Manager (according to address) for which a range of stations
searches.

To specify the NetHASP License Manager for which a range of


stations searches:
1 Edit the nethasp.ini file:
• In the [NH_TCPIP] section, set NH_SERVER_ADDRESS= <address of
NetHASP License Manager>
2 Copy the nethasp.ini to a location accessible only to the desired range
of stations.

Defining the Range of Stations under


NetBIOS
To allow only some of the stations to access the key in a
NetBIOS-based network:
1 Load the NetHASP License Manager with the -nbname switch set to
a name of your choice (up to 8 characters, not case-sensitive). This
defines the NetBIOS name of the NetHASP License Manager.
For example, to load haspserv.exe and define the NetBIOS name of
the station as firstsrv, enter:
haspserv -nbname = firstsrv
2 Edit the nethasp.ini file:
• In the [NH_COMMON] section, set NH_NETBIOS = Enabled
• In the [NH_NETBIOS] section, set NH_NBNAME = firstsrv
This links the stations to the NetBIOS name.
01intro1.book Page 258 Friday, November 3, 2000 2:04 PM

3 Copy the protected application and the nethasp.ini file to the same
directory. Make sure that each station in the range, and only stations
in the range, load the application from this directory.

You cannot have two stations with the same NetBIOS name. If you
Note want to load the NetHASP License Manager on more than one station,
you must define a different NetBIOS name for each NetHASP License
Manager.

Adapting the Timeout Length


The NetHASP License Manager cannot serve more than one request
at a time. The timeout length determines how long a protected
application repeatedly tries to access the NetHASP License Manager
before giving up.
In almost all networks, the default timeout values are sufficient, so
you only need to change the default values in networks that have a
NetHASP connected to a slow or busy station.

To define the timeout length:


• In the appropriate section of the nethasp.ini file, set:
NH_SESSION = <m>
NH_SEND_RCV = <n>
where m and n are measured in seconds. By default, m is 2 seconds
and n is 1 second.

Defining the Number of Protected


Applications Served
With the NetHASP License Manager, you can change the default
number of protected applications served. By default the NetHASP
License Manager can serve a maximum of 250 protected applications.
01intro1.book Page 259 Friday, November 3, 2000 2:04 PM

NetHASP License Manager for DOS


The NetHASP License Manager for DOS allocates memory space for a
maximum of 250 protected applications (about 4KB). If necessary, you
can save memory space by changing this default value.

To change the default memory space allocation:


• Load the NetHASP License Manager as follows:
haspserv -userlist = n
where n is the maximum number of protected applications.

NetHASP License Manager for Win32


The NetHASP License Manager for Win32 can serve more than the
default 250 protected applications.

To change the default memory space allocation:


• Load the NetHASP License Manager with the switch:
nhsrvw32 -userlist = n
where n is the number of protected applications it serves.

Local Networks and Internetworks


This section describes networks that consist of several interconnected
networks using the IPX protocol.
With the NetHASP system, local network is a flexible term. The
NetHASP License Manager and NetHASP client (the protected
application) refer to the local network differently. The NetHASP
License Manager refers to the local network as all the segments
directly connected to the NetHASP License Manager. The NetHASP
client refers to the local network as the current segment.
An internetwork is a group of two or more local networks linked
together.
The example below shows how you can set the NetHASP client and
NetHASP License Manager to work on either a local or internetwork.
01intro1.book Page 260 Friday, November 3, 2000 2:04 PM

Adapting the NetHASP License Manager


The internetwork in our example has two file servers: File Server 1
and File Server 2. File Server 1 has two segments with network
numbers 111 and 222. File Server 2 has two segments with network
numbers 333 and 444.

Figure C-1: Internetworks and Local Networks


By default, the NetHASP License Manager loaded on either File
Server 1 or File Server 2 serves the entire internetwork. That means
that if you load the NetHASP License Manager with no switches, it
serves network segments 111, 222, 333, and 444.
If you want the NetHASP License Manager to serve only stations in
the File Server 1 local network (stations on segments 111 and 222):
On File Server 1, load haspserv.nlm with the -localnet switch as
follows:
load haspserv -localnet
The NetHASP License Manager now does not serve stations on
segments 333 and 444.
If you want the NetHASP License Manager to serve only stations in
segment 222:
On File Server 1, load the NetHASP License Manager with the
additional switch, -net, as follows:
load haspserv -localnet -net 222
The NetHASP License Manager now serves stations on segment 222,
but not those on segments 111, 333, or 444.
01intro1.book Page 261 Friday, November 3, 2000 2:04 PM

Adapting the NetHASP Client


By default, a protected application searches for the NetHASP License
Manager throughout the internetwork.
If you want the protected application to search only its local network
for a NetHASP License Manager:
• Edit the nethasp.ini file as follows:
•In the [NH_COMMON] section, set NH_IPX = Enabled
•In the [NH_IPX] section, set NH_SEARCH_METHOD = Localnet
If the protected application is running on a station in segment 222,
the application finds the NetHASP License Manager on segment 222
only. The application does not search for a NetHASP License
Manager that may be active in other local networks.

You might also like