6 swid server interface, Swid as a server, Starting swid as a server – HP Integrity NonStop H-Series User Manual
Page 45: Swid server interface, Section 6, swid server interface, Section 6, swid, Server interface, Section 6
Software Identification (SWID) User’s Guide— 527243-004
6 -1
6
SWID Server Interface
Any application can use SWID as a Pathway server, or as a private dedicated server
process, by using the -BS (Be My Server) switch. This section describes how to use
SWID as a server.
SWID as a Server
Instead of providing SWID as a procedure or a function that an application can use, HP
recommends that applications initially request SWID as their server. This action
eliminates sharing the SWID code with other applications. At the same time, it is
easier for applications to simply call the WRITEREAD procedure to extract file
fingerprints.
Starting SWID as a Server
1. Use NEWPROCESS to make the SWID object file a named process.
2. Start the SWID process to send the startup message.
3. Perform a WRITEREAD operation with the startup message as shown:
InFileName
is the name of an existing file (for example, $0, $SYSTEM.#GOLD, $TERM1,
$ATP3.#T12, and $S.#TEMP). SWID opens this file for READ access and closes
the file. The IN file should not be $RECEIVE. When you use the -BS switch,
SWID automatically opens $RECEIVE to receive your input. (However, SWID
accepts $RECEIVE as the IN file to support previous usage.)
OutFileName
is the name of an existing file (for example, $0, $SYSTEM.#GOLD, $TERM1,
$ATP3.#T12, and $S.#TEMP). The name must not be $RECEIVE. SWID opens
this file but does not output anything to it. This limitation arises for any program
that is written in HP C for NonStop systems because the C library’s startup code
automatically opens the OUT file.
Switches
is a space-separated list of switches. One of the switches selected must be -BS
(Be my Server). When the -BS switch is used, the -FO switch and -DS switch have
no effect.
4. Create a WRITEREAD parameter message if required. The SWAPVOL parameter
is supported by SWID.
IN file : InFileName
OUT file : OutFileName
Run Params : Switches