Vous êtes sur la page 1sur 62

Administration & System Management

Administration & System Management


ProView User Exits

User Manual

Date: 27 April 2015


Software version: 4.2/40
Document version: 1.00
Trademark Rights
Almost all hardware and software names contained in this document are also registered trademarks of
their respective product owners and should be treated as such. Wincor Nixdorf has, in the main,
followed the manufacturers' spelling for product names.

Confidentiality Undertaking
Copyright Wincor Nixdorf International GmbH 2015 - The contents of this document may not be
reproduced, exploited or published, whether in whole or in part, without the prior written permission of
Wincor Nixdorf International GmbH. This also includes translation into other languages.
The copyright applies to all forms of storage and reproduction in which this information is incorporated
including, but not limited to, magnetic memory, computer printouts and visual displays.
Offenders will be liable for damages.
All rights, including rights created by patent grant or registration of a utility model or design, are
reserved.
Right of technical modifications reserved.

Names and Other Data


The names, e-mail addresses, telephone numbers and other data used in this manual are purely
fictional. Any resemblance to actual persons, living or dead, is coincidental.
Administration & System Management
About this Document

Target Group
This manual is intended for use by ProView systems administrators and
programmers.
Using the ProView User Extensions requires knowledge of ProView and
programming skills, for example the skill of developing applications in C/C++.
This manual explains the possible user exits in ProView and describes the
functions, parameters and data structures.

Status of this Document


Release version.

Document Administration
Date of last update: 27. April 2015.

Document version: 1.00 ProView User Exits User Manual 3


Administration & System Management

Notational conventions
Notation Application Example
Italics External cross references "...further information is available in
the manual XYZ for the product
ABC..."
Names of interactive elements "...in the field Bank Sort Code..."
Emphasized italics Internal cross references "...see page 23..."
provide page numbers
B o ld For emphasis "...the module ABC is..."
Buttons, name enclosed in [S ave ]
square brackets
Accessible screen elements "...click on the appropriate ID to...."
Menu items "Select
File > S ave to"
Non-proportional Source texts <head>
<title>XYZ</title>
</head>

Folder and file names The customer clicks on this link and
the file xyz.htm is opened.

Note
Notes providing additional explanation and tips on how to use the product
more effectively are shown in this format.

Caution
Information critical to operation of the product and the avoidance of faults,
misoperation, and so on is shown in this format.

4 ProView User Exits User Manual Document version: 1.00


Contents

Administration & System Management


Chapter 1 Introduction 1
Overview 2

Software Development Kit 3

Chapter 2 User Exits 1


Mail Extension 2
Overview 2
Requirements for the Mail Extension 3
Problem Data 3
Configuring the Mail Extension 4
Header File for the Function Interface 4
Data Compression 5
Overview 5
General Requirements for the User Exit 5
Header File 11
Installation 11
Lotus Notes Extension for the Problem Manager 12
Overview 12
Installation 13
Problem Manager API 15
Overview 15
General Requirements for an Extension DLL 15
Header File 20
Installation 20
Problem Reporting 21
Overview 21
Header File 36
Installation 36
Security Provider 37
Overview 37
General Requirements for a Security Provider 37
Header File 47
Installation 47
LDAP Extension 48
Overview 48
General Requirements for a LDAP Extension DLL 48
Head File 49
Installation 50

Document release: 1.00 ProView User Exits User Manual 1


Administration & System Management

Chapter 3 Appendix 51
List of ProView Manuals 52

2 ProView User Exits User Manual Document version: 1.00


Administration & System Management
1
1 Introduction

This chapter describes the basic concept of the ProView User Exits.
It contains the sections
Overview on page 2
Software Development Kit on page 3

Document version: 1.00 ProView User Exits User Manual 1


Administration & System Management Introduction

1.1 Overview
With the available standard modules and their flexible configuration ProView
can be adapted to a wide range of different requirements.
For environments in which these configuration options are not sufficient,
ProView offers programming interfaces to develop individual user exits.
Normally this means expenditure in programming and quality assurance.
User exits are implemented as dynamic linkable library functions (DLLs) that
provide a C programming interface.
By default ProView will be used "as is", which means without user specific
extensions. Installing the ProView components creates a consistent plug &
play environment.
Following is a list of user exits and their purposes:

User exit Description ProView default


Mail system It is possible to implement individual Depending upon selection
routines for the formatting and sending of during installation.
events.
Data compression It is possible to implement individual PKWARE Data Compression
routines for the compression and Library.
decompression of message data.
Normally this user exit will be used to
implement an individual compression
algorithm.
Problem Manager The Lotus Notes Extension is ProView supports all mail
Lotus Notes Extension implementing the Problem Manager's systems providing CMC-Mapi.
"Mail System Extension API". The
extension's purpose is to forward events
to a Lotus Notes mail system.
Manager System API It is possible to forward events to a No forwarding of events to a
Manager system by sending SNMP Manager system.
traps.
Problem Reporting This interface offers the possibility to ProView Console
manage events at an external
workstation with an individual program
(no ProView Console).
Security provider It is possible to provide protocol security Depending upon selection
by either encryption and/or during installation.
authentification of data.
LDAP Extension It is possible to authenticate and This extension is disabled by
authorize user via LDAP server. And default.
authorized users can access Proview
system as same as normal Proview
users.

2 ProView User Exits User Manual Document version: 1.00


Software Development Kit

Administration & System Management


1.2 Software Development Kit
On your ProView CD you will find the folder "SDK". This folder supports you
when implementing the APIs of a user exit.
The SDK folder with the following structure:
Include
This folder contains necessary header files ("*.h", "*.hpp") for C/C++
implementation of the APIs.
Lib
This folder contains necessary libraries ("*.lib") to be linked with your
application.
Samples
This folder contains sample code which should help you implementing your
application.Some samples have a sub-folder named Runtime environment
that is an optional folder and it contains a runtime environment with an
installation package.
These files in addition with this manual represent the Software Development
Kit for ProView User Exits.

Document version: 1.00 ProView User Exits User Manual 3


Administration & System Management Introduction

4 ProView User Exits User Manual Document version: 1.00


Administration & System Management
2
2 User Exits

This chapter describes the available ProView User Exits.


It contains the sections
Mail Extension on page 2
Data Compression on page 5
Lotus Notes Extension for the Problem Manager on page 12
Problem Manager API on page 15
Problem Reporting on page 21
Security Provider on page 37
LDAP Extension on page 48

Document version: 1.00 ProView User Exits User Manual 1


Administration & System Management User Exits

2.1 Mail Extension

2.1.1 Overview
The ProView Problem Manager supports user-specific extensions to the
automatic mailing facility in the following points:
Formatting of the problem text
The problem text can be prepared and extended as required.
User-specific sending mechanisms
The Problem Manager supports a link to the user's specific mail systems
(for example proprietary fax or modem interfaces) and the sending of
custom attachments.

If required, these extensions have to be provided in a DLL which is loaded by


the Problem Manager and is called when problems occur. The standard
functions are disabled if user-specific functions are used.
The procedure is as follows:
An event arrives at the Problem Manager, which decides that it needs to be
forwarded.
The problem data is prepared in machine-readable format.
If user-specific formatting has been registered for the problem, the
formatting function is called and returns a message in the user-specific
format.
If a user-specific send function has been registered for the problem, the
send function is called and the message can be sent in accordance with the
user's requirements.
When a message has been sent, the function to release the send buffer is
called if the message was formatted with a user-specific function.

2 ProView User Exits User Manual Document version: 1.00


Mail Extension

Administration & System Management


2.1.2 Requirements for the Mail Extension
The extension must provide the following functions:
Init/Exit: PmExtStartEnd()
The implementation of this function is not mandatory.
If it is implemented it is called with the parameter TRUE in case of loading
the DLL and with the parameter FALSE in case of unloading the DLL.
Format: PmExtFormatMessage()
This function formats a problem message. The input parameters are the
problem data in the form of a C data structure. The output parameters are
an extension-specific message type, reformatted text of the message, and
transparent, extension-specific data. The function allocates the memory for
the output data and returns a handle to its output data that is used to
release the buffer later (see PmFreeMessage).
Release buffer for formatted messages: PmFreeMessage()
This function releases the buffer for the message data allocated by
PmExtFormatMessage(). It is called by the Problem Manager after
sending the message. The formatting function is only used if both functions
can be loaded.
Send message: PmExtSendMessage()
This function is used to send the problem message and is called with the
following input data: subject of the message, recipient type, extension-
specific message type, reformatted text of the message, and transparent,
extension-specific data. The last three parameters are assigned in the
formatting function.

2.1.3 Problem Data


Each message contains the following data:
Rule identifier
Device identifier
Organization
Site of installation
Street
ZIP code
City
Device time-stamp
ProView Server time-stamp
Unique event number
Event text
Original error number
Original error text

Document version: 1.00 ProView User Exits User Manual 3


Administration & System Management User Exits

2.1.4 Configuring the Mail Extension


See configuration of Problem Manager in [Operation Manual].

2.1.5 Header File for the Function Interface


You have to include the header file "pmgrext.h" into your user exit source
file.
You find the necessary file on your ProView CD in the "SDK" folder.

4 ProView User Exits User Manual Document version: 1.00


Data Compression

Administration & System Management


2.2 Data Compression

2.2.1 Overview
ProView uses the SSOP protocol for internal communication. This protocol
supports data transfer in ASCII format and in any compressed format. A
configuration parameter in the Registry of the ProView Server defines whether
compression is used for data transfer. Of course the Agent must be able to
compress and decompress the data as required if you choose this option. For
example, the ProView Agent can handle compressed messages.
The ProView standard is based on PKWARE's compression method which has
become a de facto standard. If a project requires a custom compression
algorithm, however, it is possible to integrate a custom user exit in ProView in
order to compress/decompress the messages that are transferred. This user
exit has to be made available as a DLL and has to be installed both on the
ProView Server and on the Agent systems.
The following sections describe the user exit requirements and the application
programming interface that is affected.

2.2.2 General Requirements for the User Exit


The name of the DLL can be freely selected. It has to be configured in the
registry later.
In the compiler options you have to specify that a 1-byte alignment is being
used. This is generally not the default value for 32 bit compilers.
The DLL has to export the following functions:
InitCompression()
CompressData()
UncompressData()
FreeCompressionBuffer()
ExitCompression()

These functions are describes in the next sections.

Document version: 1.00 ProView User Exits User Manual 5


Administration & System Management User Exits

2.2.2.1 InitCompression()
Syntax RC_COMPRESS InitCompression(VOID)

Description The InitCompression() function is called once when the system is started
up. It is possible to perform custom initialization operations.
The existence of this function is optional, which means if it does not exist, it is
not called at system startup.

Parameters None.

Return codes
COMPRESS_SUCCESS The function executed successfully.
COMPRESS_INTERNAL_ERROR An internal error has occurred, e.g. an unexpected null
pointer, null handle, etc.
COMPRESS_NO_MEMORY The required memory space could not be allocated.

6 ProView User Exits User Manual Document version: 1.00


Data Compression

Administration & System Management


2.2.2.2 CompressData()
Syntax RC_COMPRESS CompressData(VOID* pvUncompressedData,
ULONG ulLengthUncompressedData,
VOID** ppvCompressedData,
ULONG* pulLengthCompressedData)

Description The CompressData() function is called to compress messages. The custom


data compression algorithm has to be implemented here.
The algorithm creates its own destination buffer for the compressed data.
Compression must never overlap the source buffer (pvUncompressedData).
Memory space is deallocated in the calling function (see
FreeCompressionBuffer()). If work space is needed in memory in
addition, this also has to be allocated by the function itself and then be
deallocated.
If a serious error occurs in the function, it is advisable to generate an entry in
the Windows Event Log for analysis purposes. It is also possible to keep a
custom log. Output to screen should not be programmed in any circumstances.
Subsequently the appropriate return value has to be set.

Parameters
pvUncompressedData Input This pointer indicates the start of the data to be
compressed. It can be any data including binary data.

Note: This is pure input data that is not allowed to be


modified.
ulLengthUncompressedData Input This specifies the length of the data to be
compressed; pvUncompressedData addresses the
first position of this data
ppvCompressedData Output The function has to assign the start address of the
compressed data to this pointer variable when
compression has been completed.

The CompressData function itself has to allocate


enough memory space to this destination buffer.

However, this memory space is de-allocated by


ProView (see the FreeCompressionBuffer() function).
pulLengthCompressedData Output This is the address of a length field. Its contents
specifies the length of the compressed data whose
start is addressed by ppvCompressedData.

Return codes
COMPRESS_SUCCESS The function executed successfully.
COMPRESS_INTERNAL_ERROR An internal error has occurred, for example an unexpected
null pointer, null handle, and so on.
COMPRESS_NO_MEMORY The required memory space could not be allocated.
COMPRESS_INVALID_PARAMETER One of the call parameters was invalid (for example a null
pointer for an input parameter).

Document version: 1.00 ProView User Exits User Manual 7


Administration & System Management User Exits

2.2.2.3 UncompressData()
Syntax RC_COMPRESS UncompressData(VOID* pvCompressedData,
ULONG ulLengthCompressedData,
VOID** ppvUncompressedData,
ULONG* pulLengthUncompressedData)

Description The UncompressData() function is called to decompress messages. The


custom data decompression algorithm has to be implemented here. This is the
counterpart to the CompressData() function.
The algorithm creates its own destination buffer for the decompressed data.
Decompression must never overlap the source buffer (pvCompressedData).
Memory space is deallocated in the calling function (see
FreeCompressionBuffer()). If work space is needed in memory in
addition, this also has to be allocated by the function itself and then be
deallocated.
If a serious error occurs in the function, it is advisable to generate an entry in
the Windows Event Log for analysis purposes. It is also possible to keep a
custom log. Output to screen should not be programmed in any circumstances.
Subsequently the appropriate return value has to be set.

Parameters
pvCompressedData Input This pointer indicates the start of the data to be
decompressed. This data was generated before by
CompressData().

Note: This is pure input data that is not allowed to be


modified.

ulLengthCompressedData Input This specifies the length of the data to be


decompressed; pvCompressedData addresses the
first position of this data.
ppvUncompressedData Output The function has to assign the start address of the
decompressed data to this pointer variable when
decompression has been completed.

The UncompressData function itself has to allocate


enough memory space to this destination buffer.

However, this memory space is deallocated by


ProView (see the FreeCompressionBuffer() function).
pulLengthUncompressedData Output This is the address of a length field. Its contents
specifies the length of the decompressed data whose
start is addressed by ppvUncompressedData.

Return codes
COMPRESS_SUCCESS The function executed successfully.
COMPRESS_INTERNAL_ERROR An internal error has occurred, for example an unexpected
null pointer, null handle, and so on.
COMPRESS_NO_MEMORY The required memory space could not be allocated.
COMPRESS_INVALID_PARAMETER One of the call parameters was invalid (for example a null
pointer for an input parameter).

8 ProView User Exits User Manual Document version: 1.00


Data Compression

Administration & System Management


2.2.2.4 FreeCompressionBuffer()
Syntax RC_COMPRESS FreeCompressionBuffer(VOID* pvCompressionBuffer)

Description ProView calls the FreeCompressionBuffer() function after every


compression (CompressData()) and decompression (UncompressData())
as soon as the destination buffer that is generated by these functions is no
longer needed.
In order to give the user exit the freedom to allocate memory space as
required, memory space has to be deallocated with the suitable method in this
function. The function parameter contains the start address of the memory
space that is to be deallocated. This is the address that was returned either by
CompressData() (ppvCompressedData) or by UncompressData()
(ppvUncompressedData).

Parameters
pvCompressionBuffer Input This pointer indicates the start of the memory space to
be deallocated.

Return codes
COMPRESS_SUCCESS The function executed successfully.
COMPRESS_INTERNAL_ERROR An internal error has occurred, for example an unexpected
null pointer, null handle, and so on.
COMPRESS_INVALID_PARAMETER One of the call parameters was invalid (for example a null
pointer for an input parameter).

Document version: 1.00 ProView User Exits User Manual 9


Administration & System Management User Exits

2.2.2.5 ExitCompression()
Syntax RC_COMPRESS ExitCompression(VOID)

Description The ExitCompression() function is called once when the system is shut
down. It is possible to perform custom cleaning up operations. It is the
counterpart to the InitCompression function.
The existence of this function is optional, which means if it does not exist it is
not called at system shutdown, but the DLL will work nevertheless.

Parameters None.

Return codes
COMPRESS_SUCCESS The function executed successfully.
COMPRESS_INTERNAL_ERROR An internal error has occurred, for example an unexpected
null pointer, null handle, and so on.
COMPRESS_NO_MEMORY The required memory space could not be allocated.

10 ProView User Exits User Manual Document version: 1.00


Data Compression

Administration & System Management


2.2.3 Header File
You have to include the header file "compress.h" into your user exit source
file. You find the necessary file on your ProView CD in the "SDK" folder.

2.2.4 Installation
1 Before the user exit is deployed in the ProView environment it should be
tested thoroughly. It is a good idea to use test programs which simulate a
call by ProView. It is particularly important to make sure no memory
overlaps occur. The memory space that is allocated should be enough to
cope with extreme situations.
2 The DLL has to be installed on the ProView Server by copying it to any
folder there. It is best to choose a folder which has already been entered in
the PATH system variable.
3 If this is not the case, the chosen folder has to be added to the PATH
system variable.
4 The name of the DLL has to be configured in the Server's registry with
"RegEdit.exe".
Key: [HKLM\SOFTWARE\Wincor Nixdorf\ProView\
CurrentVersion\Common]
Value name: "CompressionDLLName"
Value: "MyUserExitDLLName"
Just type in the name of your DLL under "Value", which means without
any path details.
5 Now activate compression on the ProView Server by setting the following
value in the Registry of the ProView Server:
Key: [HKLM\SOFTWARE\Wincor Nixdorf\CurrentVersion\
Common\AGMGR01\SSOP]
Value name: "Compress"
Value: "Y"
6 Terminate the ProView Service on the ProView Server and restart it
immediately. This activates the changes you have made.

Comparable steps have to be carried out on the Agent system. Refer to the
documentation for your type of Agent for this as keys and names of registry
parameters may vary between different types.
Finally test the compression behavior with a selected Agent system, and
perform various activities from a Console, for example file transfers,
commands and so on.

Document version: 1.00 ProView User Exits User Manual 11


Administration & System Management User Exits

2.3 Lotus Notes Extension for the Problem Manager

2.3.1 Overview
Forwarding events in an e-mail requires CMC-Mapi.
Unfortunately, earlier Lotus Notes versions do not support this interface.
Therefore the Lotus Notes extension is implementing the Problem Manager's
Mail System Extension API. The extension's purpose is to forward events to a
Lotus Notes mail system. Events are not reformatted. The installation requires
know-how about the specific Lotus Notes installation.
The Problem Manager's Lotus Notes Mail Extension contains the following
DLLs:
notesmail.dll
ProView Problem Manager Lotus Notes Mail Extension DLL
lncppn201.dl
Lotus Notes C++ API - needed to execute, part of the Lotus Notes C++ API
Toolkit
pvlnpwd.dll
ProView DLL for the use of Lotus Notes users with password protection

You find these DLLs on your ProView CD in the folder "\SDK\Mail


Extensions\Lotus Notes Extensions".

Restrictions
The Lotus Notes extensions have been released only for Lotus Notes
version 6.55. Other version of Lotus Notes are not guaranteed to work
properly with the extension.

12 ProView User Exits User Manual Document version: 1.00


Lotus Notes Extension for the Problem Manager

Administration & System Management


2.3.2 Installation
1 Install the Lotus Notes Client on the ProView Server. You can configure this
client with a proper ID file and password as any normal client, or leave it in
a non-configured state.
2 Add the above DLLs to the Notes Program folder (default is
"C:\Lotus\Notes").
3 Add this Lotus Notes Program folder to your system path.
4 Have a Lotus Notes administrator create a new Lotus Notes client ID
without any password. The mail extension requires a password-free ID file
to operate properly. This ID should be in the same Lotus Notes domain as
the Lotus Notes server, or else you will need to cross-certify the ID before
using the mail extension.
5 Create a mail file on the Lotus Notes server, and give this ID at least
'Author' access to this mail file. Be sure that this ID has at least
'Depositor' access to the server's outgoing "MAIL.BOX". Otherwise,
take care to restrict access from this ID file to all other servers and
databases, since the ID has no password.
6 Edit Notes.ini.
Close the Lotus Notes client before editing the file "notes.ini". The
"notes.ini" should be configured to use TCP/IP to connect to the Lotus
Notes server. If your network is different, or if your Lotus Notes server is not
listed by name in your local DNS, you will need to reconfigure the port
settings. You may also need a "names.nsf" database file in this folder,
with a location document, in order to connect to the server. See the
"notes.ini" file normally used by this client PC for guidelines, or consult
a certified Lotus Notes administrator for help.
If you are using a Lotus Notes user with password protection, add the
following line to "notes.ini":
EXTMGR_ADDINS=PVLNPWD
Be sure to leave an extra blank line at the end of "notes.ini" so that all
lines will be read properly from the file system.

Password
If Lotus Notes requires a password, PVLNPWD will read the password from
the Windows registry key [HKLM\Software\Wincor Nixdorf\
ProView\CurrentVersion\Common\PBMGR01\Extensions\Mail].

Be sure that the correct password is stored before using PVLNPWD. To store
the password correctly use ProView Server Setup. Select the function
M a i n t e n a n c e / M o d i f y / C h a n g e L o t u s No t e s p a s s w o r d .

Document version: 1.00 ProView User Exits User Manual 13


Administration & System Management User Exits

7 Edit the Windows registry. You should have a key structure like this (if your
Problem Manager is PBMGR01):
[HKEY_LOCAL_MACHINE\SOFTWARE\Wincor Nixdorf\ProView\
CurrentVersion\Common\PBMGR01\Extensions\Mail]
Description="Lotus Notes Mail Extension"
DLLName="C:\\Lotus\\Notes\\notesmail.dll"
Format="N"
PagerDuplicateMessage="N"
Send="Y"
User=<Lotus Notes user>
Password=<Password for Lotus Notes user>
8 Restart the Problem Manager after making these changes. The new mail
extention DLL will be loaded automatically.

Remark In order to have a separate notes.ini file do the following steps:


1 Copy the new no-password Notes ID file, the file notes.ini and the mail
Extention DLL notesmail.dll into the newly created Mail Extension
folder (example: C:\NotesExt).
2 Create a system environment variable, PV_NOTESINI, to specify the
notes.ini file name. The file- and path name should be in the format
C:\\NotesExt\\notes.ini (note the doubled backslash characters).
Change the Problem Manager's mail extention registry DLLName to the
notesmail.dll location.
3 Edit this notes.ini.
Change 'Directory' to the mail extension folder. Change
'KeyFilename' to specify the new password-free ID. Change
'MailServer' and 'MailFile' to the appropriate names.

14 ProView User Exits User Manual Document version: 1.00


Problem Manager API

Administration & System Management


2.4 Problem Manager API

2.4.1 Overview
ProView uses the Problem Manager to trigger actions based on rules. One
action type is to forward events to a Problem Manager System.
With the Problem Manager a default extension DLL ("pvsnmpea.dll") is
delivered which sends SNMPv1 traps to configurable Problem Management
Systems.
During startup the problem manager extension DLL will be loaded dynamically
by the Problem Manager. If the default problem manager extension DLL is not
sufficient, a customer may decide to implement his own problem manager
extension DLL.

2.4.2 General Requirements for an Extension DLL


The name of the DLL can be freely selected. It has to be configured in the
registry later.
In the compiler options you have to specify that a 1-byte alignment is being
used. This is generally not the default value for 32 bit compilers.
The DLL has to export the following function:
SendTrap()

The DLL can additionally export the following functions (not mandatory):
Init()
Exit()
LastError()

These functions are describes in the next sections.

Document version: 1.00 ProView User Exits User Manual 15


Administration & System Management User Exits

2.4.2.1 Init()
Syntax BOOL Init(const CHAR* pszSubkey)

Description If provided this function is called once when the problem manager extension
DLL is loaded.
The existence of this function is optional, which means if it does not exist, it is
not called at system startup.

Parameters
pszSubkey Input Pointer to the registry subkey of the DLL

Return codes
TRUE The DLL has been initialized successfully.
FALSE An error has occurred, the DLL cannot be used.

16 ProView User Exits User Manual Document version: 1.00


Problem Manager API

Administration & System Management


2.4.2.2 Exit()
Syntax VOID Exit(VOID)

Description When provided this function is called once when the Problem Manager
Extension DLL is unloaded.
The existence of this function is optional, which means if it does not exist, it is
not called at system shutdown.

Parameters None.

Return codes None.

Document version: 1.00 ProView User Exits User Manual 17


Administration & System Management User Exits

2.4.2.3 SendTrap()
Syntax BOOL SendTrap(const PV_LPEVENT lpEvent,
const PV_LPEVENTTEXT lpEventtext)

Description The SendTrap() function is called to send events. The forwarding of an event
to a problem management system has to be implemented here.

Parameters
lpEvent Input Pointer to the ProView event structure.
lpEventText Input Pointer to the ProView event text structure.

Return codes
TRUE The function executed successfully.
FALSE An error has occurred.

18 ProView User Exits User Manual Document version: 1.00


Problem Manager API

Administration & System Management


2.4.2.4 LastError()
Syntax const CHAR* LastError(VOID)

Description If provided the LastError() function is invoked when the call of the function
Init() or SendTrap() has failed. The LastError() function has to return
a pointer to a statically C string variable containing a null terminated error
message.

Parameters None.

Return codes
Null terminated C string Error message

Document version: 1.00 ProView User Exits User Manual 19


Administration & System Management User Exits

2.4.3 Header File


You have to include the header files "ssop_data.h" and "manager.h" into
your user exit source file, in the given sequence. You find the necessary files
on your ProView CD in the "SDK" folder.

2.4.4 Installation
Before the user exit is deployed in the ProView environment it should be tested
thoroughly. It is a good idea to use test programs which simulate ProView.
1 The DLL has to be installed on the ProView Server by copying it to any
folder there. It is best to choose a folder which has already been included in
the PATH system variable.
If this is not the case, the chosen folder has to be added to the PATH
system variable.
2 The name of the extension DLL has to be configured in the Server registry
using "regedit.exe". In the key [HKLM\SOFTWARE\Wincor
Nixdorf\ProView\CurrentVersion\Common\PBMGR01\Extension
\Manager], add a sub-key with the same name as the DLL (for example:
if the DLL name is "MngrSys.dll" you have to name the sub-key
"MngrSys"). If the DLL has configuration parameters they can be
specified in this sub-key. A reference to the sub-key is passed by the
Init() function.
3 To enable the changes please restart the ProView Service.

Please note that it is possible to configure an arbitrary number of problem


manager extension DLLs following the steps mentioned above.

20 ProView User Exits User Manual Document version: 1.00


Problem Reporting

Administration & System Management


2.5 Problem Reporting

2.5.1 Overview
ProView includes functions for problem reporting.
The main idea is that a ProView user manages problems at a ProView
Console. He recognizes problems by changing colors, changing icons or via
alert view.
It is also taken into consideration that problems are received by a first level
support and forwarded to the Console user.
The Console menu includes functions for viewing and dealing with problem
reports.
In addition to the Console functions there is a programming interface (API) for
problem reporting. This API offers the possibility to open, manage and close a
problem from an external program. This is interesting in combination with mail
extension. If the receiver of a forwarded problem should have the possibility to
manage this problem at his external workstation (no ProView Console) he has
to build an application using the API below.

Document version: 1.00 ProView User Exits User Manual 21


Administration & System Management User Exits

2.5.1.1 PrInitialize()
Syntax PR_APIRET PrInitialize(CHAR* pszServerName)

Description The PrInitialize() function is called to initialize the Problem Report API.
This function must be called before any other function of the API.

Parameters
pszServerName Input Server name for the SSOP communication.

Default: "<computer name>P")

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.

22 ProView User Exits User Manual Document version: 1.00


Problem Reporting

Administration & System Management


2.5.1.2 PrExit()
Syntax PR_APIRET PrExit(VOID)

Description The PrExit() function is called to shutdown the Problem Report API. This
function cleans up all resources and must be called after an application
decided to stop calling the API.

Parameters None.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).

Document version: 1.00 ProView User Exits User Manual 23


Administration & System Management User Exits

2.5.1.3 PrOpen()
Syntax PR_APIRET PrOpen(CHAR* pszRemoteService,
PR_HANDLE* phReportService)

Description The PrOpen() function is called to connect to a remote service for problem
report handling. If the function succeeds, a handle to the report service will be
delivered. This handle must be used for all functions performing problem report
activities.

Parameters
pszRemoteService Input Remote service name (typically FEMGR01RC).
phReportService Output Resulting report service handle.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (communication error or
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.

24 ProView User Exits User Manual Document version: 1.00


Problem Reporting

Administration & System Management


2.5.1.4 PrClose()
Syntax PR_APIRET PrClose(PR_HANDLE hReportService)

Description The PrClose() function is called to disconnect from a remote service. After
calling this function, the report service handle will become invalid.

Parameters
hReportService Input Report service handle.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (communication error).
PR_INVALID_PARAMETER An invalid parameter was specified.

Document version: 1.00 ProView User Exits User Manual 25


Administration & System Management User Exits

2.5.1.5 PrCreateReport()
Syntax PR_APIRET PrCreateReport(PR_HANDLE hReportService,
CHAR* pszComponent,
PR_COMPONENTTYPE eComponentType,
LONG lEventCount,
CHAR* pszTopic,
PR_REPORT_SEVERITY severity,
CHAR* pszReference,
CHAR* pszDescription,
LONG* plReportId)

Description The PrCreateReport() function is called to create a new problem report. If


the function succeeds, a report identifier will be delivered. This report identifier
must be used for all actions on the created report. The creator of the problem
report becomes the report's owner.

Parameters
hReportService Input Report service handle.
pszComponent Input Component name.
eComponentType Input Component type.

0 = Device,
1 = Group
lEventCount Input Event counter, if the report is created as a reaction to
an event. Zero, if no event is associated.
pszTopic Input Problem report topic.
severity Input Problem severity.

Possible values are:


PR_SEVERITY_VERY_HIGH,
PR_SEVERITY_HIGH,
PR_SEVERITY_UPPER_MEDIUM,
PR_SEVERITY_LOWER_MEDIUM,
PR_SEVERITY_LOW,
PR_SEVERITY_VERY_LOW
pszReference Input External reference (for example the error number of
an external error management) or NULL.
pszDescription Input Problem description.
plReportId Output Resulting report identifier.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.

26 ProView User Exits User Manual Document version: 1.00


Problem Reporting

Administration & System Management


2.5.1.6 PrAddDescription()
Syntax PR_APIRET PrAddDescription(PR_HANDLE hReportService,
LONG lReportId,
CHAR* pszDescription)

Description The PrAddDescription() function is called to add new descriptions (for


example error diagnostics or actions to solve the problem) to an existing
problem report. Only the owner of a problem report may change its severity.

Parameters
hReportService Input Report service handle.
lReportId Input Report identifier.
pszDescription Input New description to be added to the problem.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.
PR_INVALID_REPORTID An invalid report identifier was specified.
PR_PERMISSION_ERROR No permission (not owner of problem report).
PR_REPORT_LOCKED The report is locked.

Document version: 1.00 ProView User Exits User Manual 27


Administration & System Management User Exits

2.5.1.7 PrCloseReport()
Syntax PR_APIRET PrCloseReport(PR_HANDLE hReportService,
LONG lReportId,
CHAR* pszDescription)

Description The PrCloseReport() function is called to close an existing problem report.


Only the owner of a problem report may close it.

Parameters
hReportService Input Report service handle.
lReportId Input Report identifier.
pszDescription Input Reason for closing the problem report.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.
PR_INVALID_REPORTID An invalid report identifier was specified.
PR_PERMISSION_ERROR No permission (not owner of problem report).
PR_REPORT_LOCKED The report is locked.

28 ProView User Exits User Manual Document version: 1.00


Problem Reporting

Administration & System Management


2.5.1.8 PrGetOwnership()
Syntax PR_APIRET PrGetOwnership(PR_HANDLE hReportService,
LONG lReportId,
CHAR* pszDescription)

Description The PrGetOwnership() function is called to become the new owner of an


existing problem report. Only the owner of a problem report may modify that
report.

Parameters
hReportService Input Report service handle.
lReportId Input Report identifier.
pszDescription Input Reason for changing the owner.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.
PR_INVALID_REPORTID An invalid report identifier was specified.
PR_REPORT_LOCKED The report is locked.

Document version: 1.00 ProView User Exits User Manual 29


Administration & System Management User Exits

2.5.1.9 PrSetSeverity()
Syntax PR_APIRET PrSetSeverity(PR_HANDLE hReportService,
LONG lReportId,
PR_REPORT_SEVERITY severity,
CHAR* pszDescription)

Description The PrSetSeverity() function is called to change the severity of an existing


problem report. Only the owner of a problem report may change its severity.

Parameters
hReportService Input Report service handle.
lReportId Input Report identifier.
severity Input New problem severity.

Possible values are:


PR_SEVERITY_VERY_HIGH,
PR_SEVERITY_HIGH,
PR_SEVERITY_UPPER_MEDIUM,
PR_SEVERITY_LOWER_MEDIUM,
PR_SEVERITY_LOW,
PR_SEVERITY_VERY_LOW
pszDescription Input Reason for changing the owner.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.
PR_INVALID_REPORTID An invalid report identifier was specified.
PR_PERMISSION_ERROR No permission (not owner of problem report).
PR_REPORT_LOCKED The report is locked.

30 ProView User Exits User Manual Document version: 1.00


Problem Reporting

Administration & System Management


2.5.1.10 PrSetReference()
Syntax PR_APIRET PrSetReference(PR_HANDLE hReportService,
LONG lReportId,
CHAR* pszReference,
CHAR* pszDescription)

Description The PrSetReference() function is called to change the external reference


of an existing problem report. An external reference may be any string used to
identify a problem report by an external system. Only the owner of a problem
report may change its external reference.

Parameters
hReportService Input Report service handle.
lReportId Input Report identifier.
pszReference Input New external reference identifier.
pszDescription Input Reason for changing the reference.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.
PR_INVALID_REPORTID An invalid report identifier was specified.
PR_PERMISSION_ERROR No permission (not owner of problem report).
PR_REPORT_LOCKED The report is locked.

Document version: 1.00 ProView User Exits User Manual 31


Administration & System Management User Exits

2.5.1.11 PrSetTopic()
Syntax PR_APIRET PrSetTopic(PR_HANDLE hReportService,
LONG lReportId,
CHAR* pszTopic,
CHAR* pszDescription)

Description The PrSetTopic() function is called to change the topic of an existing


problem report. Only the owner of a problem report may change its topic.

Parameters
hReportService Input Report service handle.
lReportId Input Report identifier.
pszTopic Input New problem report topic.
pszDescription Input Reason for changing the topic.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.
PR_INVALID_REPORTID An invalid report identifier was specified.
PR_PERMISSION_ERROR No permission (not owner of problem report).
PR_REPORT_LOCKED The report is locked.

32 ProView User Exits User Manual Document version: 1.00


Problem Reporting

Administration & System Management


2.5.1.12 PrQueryReport()
Syntax PR_APIRET PrQueryReport(PR_HANDLE hReportService,
LONG lReportId,
PR_REPORT** ppReport)

Description The PrQueryReport() function is called to retrieve information about an


existing problem report. The caller passes the address of a problem report
pointer to the function and will get back a valid pointer. The memory of the
problem report data will be allocated by this function and must be released with
the function PrFreeReport().

Parameters
hReportService Input Report service handle.
lReportId Input Report identifier.
ppReport Output Pointer to the found problem report address.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.
PR_INVALID_REPORTID An invalid report identifier was specified.
PR_REPORT_LOCKED The report is locked.

The resulting structure PR_REPORT** ppReport contains the following data:


typedef struct {
LONG lReportId; // report identifier
CHAR szComponent[PR_COMPONENT_LEN]; // component name
PR_COMPONENTTYPE eComponentType; // type of the component
CHAR szDevice[PR_DEVNAME_LEN]; // device name
LONG lEventCount; // event count (optional)
CHAR szTopic[PR_TOPIC_LEN]; // topic of report
PR_REPORT_SEVERITY severity; // severity of problem
CHAR szReference[PR_REFERENCE_LEN]; // external reference
PR_REPORT_STATUS status; // report status
PR_DATETIME creationDate; // date/time of report creation
PR_DATETIME closingDate; // date/time of report closing
PR_USER author; // author of problem report
PR_USER owner; // current owner of report
LONG lNoDescriptions; // number of descriptions
PR_DESCRIPTION* pDescriptions; // list of descriptions
} PR_REPORT;

Document version: 1.00 ProView User Exits User Manual 33


Administration & System Management User Exits

The field pDescriptions contains a history of all descriptions added to the


problem report during its lifetime.
PR_DESCRIPTION contains the following data:
typedef struct {
PR_USER author; // author of description
PR_DATETIME creationDate; // date/time of report creation
CHAR* pszDescription; // problem description
} PR_DESCRIPTION;

34 ProView User Exits User Manual Document version: 1.00


Problem Reporting

Administration & System Management


2.5.1.13 PrFreeReport()
Syntax PR_APIRET PrFreeReport(PR_HANDLE hReportService,
PR_REPORT* pReport)

Description The PrFreeReport() function is called to free the problem report memory
allocated in the function PrQueryReport().

Parameters
hReportService Input Report service handle.
pReport Input Problem report address.

Return codes
PR_SUCCESS The function executed successfully.
PR_SERVICE_ERROR Problem report service error (in most cases because of a
wrong SSOP configuration).
PR_INVALID_PARAMETER An invalid parameter was specified.
PR_INVALID_HANDLE An invalid report service handle was specified.
PR_INVALID_REPORTID An invalid report identifier was specified.
PR_PERMISSION_ERROR No permission (not owner of problem report).
PR_REPORT_LOCKED The report is locked.

Document version: 1.00 ProView User Exits User Manual 35


Administration & System Management User Exits

2.5.2 Header File


You have to include the header files "Portable.h" and "pReport.h" into
your user exit source file, in the given sequence. Furthermore you must link the
file "pReport.lib" to your executable. You find the necessary files on your
ProView CD in the "SDK" folder.

2.5.3 Installation
You need a typical ProView runtime environment for the developed application.
To install this environment use the installation procedure on your ProView CD
in the "SDK" folder. Call "SETUP.EXE" and follow the instructions of this
program. SETUP does not require a deeper understanding of ProView. It just
prompts for a destination path and the computer name of your ProView Server.
This runtime environment consists of a set of DLLs and a configuration which
guarantees the connection to the ProView Server. The configuration equals a
Console configuration. It contains a server for problem report itself
("<computer name>P") and another one for the Frontend Manager
("FEMGR01") of the ProView Server.

36 ProView User Exits User Manual Document version: 1.00


Security Provider

Administration & System Management


2.6 Security Provider

2.6.1 Overview
ProView uses the SSOP protocol for internal communication. This protocol
supports message authentification and encryption of the variable data
proceeding the protocol header. Within the product, a default security provider
DLL will be delivered.
The security provider accomplishes the following services:
Data encryption and decryption
Signing and authentification of data

During startup, the security provider DLL will be loaded dynamically by the
ProView Server and the Agent. You may decide to implement your own
security provider DLL.

2.6.2 General Requirements for a Security Provider


The name of the DLL can be freely selected. It has to be configured in the
registry later.
In the compiler options you have to specify that a 1-byte alignment is being
used. This is generally not the default value for 32 bit compilers.
The DLL has to export the following functions:
SecStartup()
SecEncode()
SecDecode()
SecSign()
SecVerify()
SecFreeData()
SecShutdown()
Sec3DESDecode()
Sec3DESEncode()

Document version: 1.00 ProView User Exits User Manual 37


Administration & System Management User Exits

2.6.2.1 SecStartup()
Syntax SEC_SSP_REF SecStartup(VOID)

Description The SecStartup() function is called once when the security provider is
started up. It may be used to perform provider specific initializations.
SecStartup() must return a reference to a security context, which is defined
to be of type VOID*. This means that it is up to the provider to define which
context data is needed.

Parameters None.

Return codes
<VOID*> Pointer to a provider specific security context.
NULL The security provider startup failed.

38 ProView User Exits User Manual Document version: 1.00


Security Provider

Administration & System Management


2.6.2.2 SecEncode()
Syntax SEC_SSP_API SecEncode(SEC_SSP_REF hRef,
CHAR* pszReceiverName,
UCHAR* puchPlainMsg,
LONG lPlainMsgLen,
UCHAR** ppuchEncodedMsg,
LONG* plEncodedLen)

Description The SecEncode() function is called to encode data. The custom encryption
algorithm has to be implemented here.
The function has to create an output buffer holding the encoded data. The
provider must be prepared to free this buffer, when it is called with
SecFreeData().

Parameters
hRef Input Security context created during SecStartup.
pszReceiverName Input Name of the receiver of the message, for example
US_NYC_BWY_ATM01. May be used to determine
the encryption key.
puchPlainMsg Input Data to be encoded.
lPlainMsgLen Input Length of data in puchPlainMsg.
ppuchEncodedMsg Output Encoded data after the function has successfully
completed.

The SecEncode() function itself has to allocate


enough memory space to this destination buffer.
However, this memory space is de-allocated by
ProView (see the SecFreeData() function).
plEncodedLen Output Length of data in ppuchEncodedMsg.

Return codes
SEC_SSP_SUCCESS The function executed successfully.
SEC_SSP_NOMEM Not enough memory for allocation of output buffer.
SEC_SSP_KEYNOTFOUND Encryption key was not found.
SEC_SSP_ALGO_ERROR Error during encryption algorithm computation.

Document version: 1.00 ProView User Exits User Manual 39


Administration & System Management User Exits

2.6.2.3 SecDecode()
Syntax SEC_SSP_API SecDecode(SEC_SSP_REF hRef,
UCHAR* puchEncodedMsg,
LONG lEncodedLen,
UCHAR** ppuchPlainMsg,
LONG* plPlainMsgLen)

Description The SecDecode() function is called to decode data. The custom encryption
algorithm has to be implemented here.
The function has to create an output buffer holding the decoded data. The
provider must be prepared to free this buffer, when it is called with
SecFreeData().

Parameters
hRef Input Security context created during SecStartup.
puchEncodedMsg Input Data to be decoded.
lEncodedLen Input Length of data in puchEncodedMsg.
ppuchPlainMsg Output Decoded data after the function has successfully
completed.

The SecDecode() function itself has to allocate


enough memory space to this destination buffer.
However, this memory space is de-allocated by
ProView (see the SecFreeData() function).
plPlainMsgLen Output Length of data in ppuchPlainMsg.

Return codes
SEC_SSP_SUCCESS The function executed successfully.
SEC_SSP_NOMEM Not enough memory for allocation of output buffer.
SEC_SSP_KEYNOTFOUND Encryption key was not found.
SEC_SSP_ALGO_ERROR Error during encryption algorithm computation.

40 ProView User Exits User Manual Document version: 1.00


Security Provider

Administration & System Management


2.6.2.4 Sec3DESEncode()
Syntax SEC_SSP_API Sec3DESEncode(SEC_SSP_REF hRef,
CHAR* pszReceiverName,
UCHAR* puchPlainMsg,
LONG lPlainMsgLen,
UCHAR** ppuchEncodedMsg,
LONG* plEncodedLen)

Description The Sec3DESEncode() function is called to encode data. The custom


encryption algorithm has to be implemented here.
The function has to create an output buffer holding the encoded data. The
provider must be prepared to free this buffer, when it is called with
SecFreeData().

Parameters
hRef Input Security context created during SecStartup.
pszReceiverName Input Name of the receiver of the message, for example
US_NYC_BWY_ATM01. May be used to determine
the encryption key.
puchPlainMsg Input Data to be encoded.
lPlainMsgLen Input Length of data in puchPlainMsg.
ppuchEncodedMsg Output Encoded data after the function has successfully
completed.

The SecEncode() function itself has to allocate


enough memory space to this destination buffer.
However, this memory space is de-allocated by
ProView (see the SecFreeData() function).
plEncodedLen Output Length of data in ppuchEncodedMsg.

Return codes
SEC_SSP_SUCCESS The function executed successfully.
SEC_SSP_NOMEM Not enough memory for allocation of output buffer.
SEC_SSP_KEYNOTFOUND Encryption key was not found.
SEC_SSP_ALGO_ERROR Error during encryption algorithm computation.

Document version: 1.00 ProView User Exits User Manual 41


Administration & System Management User Exits

2.6.2.5 Sec3DESDecode()
Syntax SEC_SSP_API Sec3DESDecode(SEC_SSP_REF hRef,
UCHAR* puchEncodedMsg,
LONG lEncodedLen,
UCHAR** ppuchPlainMsg,
LONG* plPlainMsgLen)

Description The Sec3DESDecode() function is called to decode data. The custom


encryption algorithm has to be implemented here.
The function has to create an output buffer holding the decoded data. The
provider must be prepared to free this buffer, when it is called with
SecFreeData().

Parameters
hRef Input Security context created during SecStartup.
puchEncodedMsg Input Data to be decoded.
lEncodedLen Input Length of data in puchEncodedMsg.
ppuchPlainMsg Output Decoded data after the function has successfully
completed.

The SecDecode() function itself has to allocate


enough memory space to this destination buffer.
However, this memory space is de-allocated by
ProView (see the SecFreeData() function).
plPlainMsgLen Output Length of data in ppuchPlainMsg.

Return codes
SEC_SSP_SUCCESS The function executed successfully.
SEC_SSP_NOMEM Not enough memory for allocation of output buffer.
SEC_SSP_KEYNOTFOUND Encryption key was not found.
SEC_SSP_ALGO_ERROR Error during encryption algorithm computation.

42 ProView User Exits User Manual Document version: 1.00


Security Provider

Administration & System Management


2.6.2.6 SecSign()
Syntax SEC_SSP_API SecSign(SEC_SSP_REF hRef,
CHAR* pszSignerName,
UCHAR* puchMsg,
LONG lMsgLen,
UCHAR** ppuchSignature,
LONG* plSignatureLen)

Description The SecSign() function is called to sign a message. The parameter


pszSignerName holds the name of the signer. The custom signing algorithm
has to be implemented here.
The function has to create an output buffer holding the message signature.
The provider must be prepared to free this buffer, when it is called with
SecFreeData().

Parameters
hRef Input Security context created during SecStartup.
pszSignerName Input Name of the signer, for example
US_NYC_BWY_ATM01. May be used to determine
the correct key for the signing algorithm.
puchMsg Input Data to be signed.
lMsgLen Input Length of data in puchMsg.
ppuchSignature Output Message signature, after function has successfully
completed.

The SecSign() function itself has to allocate enough


memory space to this destination buffer.
However, this memory space is de-allocated by
ProView (see the SecFreeData() function).
plSignatureLen Output Length of data in ppuchSignature.

Return codes
SEC_SSP_SUCCESS The function executed successfully.
SEC_SSP_NOMEM Not enough memory for allocation of output buffer.
SEC_SSP_KEYNOTFOUND Encryption key was not found.
SEC_SSP_ALGO_ERROR Error during encryption algorithm computation.

Document version: 1.00 ProView User Exits User Manual 43


Administration & System Management User Exits

2.6.2.7 SecVerify()
Syntax SEC_SSP_API SecVerify(SEC_SSP_REF hRef,
UCHAR* puchMsg,
LONG lMsgLen,
UCHAR* puchSignature,
LONG lSignatureLen)

Description The SecVerify() function is called to verify the signature of a message. The
custom verification algorithm has to be implemented here. The function must
check if the signature delivered in puchSignature is correct for the message
delivered in puchMsg.

Parameters
hRef Input Security context created during SecStartup.
puchMsg Input Data that has been signed.
lMsgLen Input Length of data in puchMsg.
puchSignature Output Signature received for data in puchMsg.
lSignatureLen Output Length of data in puchSignature.

Return codes
SEC_SSP_SUCCESS The function executed successfully.
SEC_SSP_NOMEM Not enough memory for allocation of output buffer.
SEC_SSP_KEYNOTFOUND Encryption key was not found.
SEC_SSP_ALGO_ERROR Error during encryption algorithm computation.
SEC_SSP_INVALID_SIGNATURE The signature delivered in puchSignature is wrong.

44 ProView User Exits User Manual Document version: 1.00


Security Provider

Administration & System Management


2.6.2.8 SecFreeData()
Syntax BOOL SecFreeData(SEC_SSP_REF hRef,
UCHAR* puchMsg)

Description The SecFreeData() function is called to free the output data allocated during
SecEncode(), SecDecode() or SegSign().

Parameters
hRef Input Security context created during SecStartup.
puchMsg Input Buffer allocated during SecEncode, SecDecode or
SegSign.

Return codes
TRUE The function executed successfully.
FALSE The memory could not be freed.

Document version: 1.00 ProView User Exits User Manual 45


Administration & System Management User Exits

2.6.2.9 SecShutdown()
Syntax BOOL SecShutdown(SEC_SSP_REF hRef)

Description The SecShutdown() function is called during shutdown of the security data. It
may be used to clean up all resources created during SecStartup().

Parameters
hRef Input Security context created during SecStartup.

Return codes
TRUE The function executed successfully.
FALSE The security provider could not be shut down correctly.

46 ProView User Exits User Manual Document version: 1.00


Security Provider

Administration & System Management


2.6.3 Header File
You have to include the header file "sec_ssp.h" into your user exit source
file. You find the necessary file on your ProView CD in the "SDK" folder.

2.6.4 Installation
Before the user exit is deployed in the ProView environment it should be tested
thoroughly. It is a good idea to use test programs which simulate a call by
ProView. It is particularly important to make sure no memory overlaps occur.
The memory space that is allocated should be enough to cope with extreme
situations.
The DLL has to be installed on the ProView Server by copying it to any folder
there. It is best to choose a folder which has already been entered in the PATH
system variable.
If this is not the case, the chosen folder has to be added to the PATH system
variable.
The name of the DLL has to be configured in the Server registry with
"Regedit.exe".
Key: [HKLM\SOFTWARE\Wincor
Nixdorf\ProView\CurrentVersion\Common]
Value name: "SecurityDLLName"
Value: "MyUserExitDLLName"
Just type in the name of your DLL under "Value", which means without any
path details.
Please make sure that encryption has been properly installed and activated
during setup of the server.
Terminate the ProView Service on the ProView Server and restart it. This
enables the changes you have made.
Comparable steps have to be carried out on the Agent system. Refer to the
documentation for your type of Agent, since this as keys and names of registry
parameters may vary between different types.
Finally test the encryption behavior with a selected Agent system, and perform
various activities from a Console, for examples file transfers or remote control
commands.

Document version: 1.00 ProView User Exits User Manual 47


Administration & System Management User Exits

2.7 LDAP Extension

2.7.1 Overview
The Lightweight Directory Access Protocol (LDAP) is an application protocol
for accessing and maintaining distributed directory information services over
an Internet Protocol (IP) network. Proview supports to use LDAP to authorize
user: If a valid user exists and is maintained in LDAP server, Proview can get
the user information thus the user doesnt need to input password again when
login to Proview server.
The default LDAP Extension is implemented with no encryption(for tcp
session) and DIGEST-MD5(SASL) authentication method. Enduser can
customize LDAP Extension if the default one is not quite satisfied with the
requirements. The name of the DLL of LDAP Extension must be
pvldap.dll.

2.7.2 General Requirements for a LDAP Extension DLL


The DLL has to export the following function:
GetAttributeValue()
The DLL can additionally export the following function (not mandatory):
GetDefaultSearchFilter()

2.7.2.1 GetAttributeValue()
Syntax PVLADP_ERROR GetAttributeValue (LPPVLDAP_INFO lpPvLdapInfo,
CHAR* strSearchFilter,
CHAR* strAttributeKey,
CHAR* strAttributeValue,
ULONG* ulAttributeValueLength)

Description Authenticate specified user with specified LDAP server, and then, get the value
of specified attribute of the user from LDAP server, which is used to match the
account name in Proview System.

Parameters
lpPvLdapInfo Input Pointer to a PVLDAP_INFO structure containing
information about LDAP server. The description of
PVLDAP_INFO can be found in Head File section.
strSearchFilter Input Pointer to a null-terminated string that specifies the
search filter.
strAttributeKey Input Pointer to a null-terminated string that specifies the
attribute key.
strAttributeValue Output Pointer to a null-terminated string that specifies the
attribute value.
ulAttributeValueLength Input Specifies the buffer length of strAttributeValue.

48 ProView User Exits User Manual Document version: 1.00


LDAP Extension

Administration & System Management


Return codes
PVLADP_OK User is authenticated and the attribute value is fetched
successfully.
PVLADP_ERROR_CANNOT_LOGON Failed to login to LDAP server.
PVLADP_ERROR_CANNOT_FIND Failed to fetch the value of specified attribute.

2.7.2.2 GetDefaultSearchFilter()
Syntax CHAR* GetDefaultSearchFilter()

Description Return the default search filter string if it is configured in Proview Database.

Parameters None

Return value
CHAR* Return a pointer to a null-terminated string that specifies
the search filter.

2.7.3 Head File


The head file "pvldap.h" has to be included in the sources of customized
LDAP Extension. It can be found on the Proview CD in the "SDK" folder.
The PVLDAP_INFO structure specifies the parameters that are used for
connecting to LDAP server.
Members of
PVLDAP_INFO structure strHostName String containing a domain name, or a space-separated
list of host names or dotted strings that represent the IP
address of hosts running an LDAP server to which to
connect. Each host name in the list can include an optional
port number which is separated from the host itself with a
colon (:).
ulPortNumber Contains the TCP port number to which to connect. Set to
LDAP_PORT to obtain the default port, 389. This
parameter is ignored if a host name includes a port
number.
strDomain String containing the domain or workgroup name.
strUserName String containing the user name.
strLdapUserName String containing the user name for login LDAP server.
strLdapPassword String containing the user's password in the domain or
workgroup name for login LDAP server.
strDn String containing the distinguished name of the entry used
to bind. This can be a DN, a UPN, a Windows NT style
user name, or other name that the directory server will
accept as an identifier.

Document version: 1.00 ProView User Exits User Manual 49


Administration & System Management User Exits

2.7.4 Installation
1 Before the user exit is deployed in the Proview environment it should be
tested thoroughly. It is a good idea to use test programs which simulate a
call by ProView. It is particularly important to make sure no memory
overlaps occur. The memory space that is allocated should be enough to
cope with extreme situations.
2 Replace the "pvldap.dll" with the customized one in Proview installed
folder.
3 Configure Proview to enable LDAP authorization. Please refer to proview
operation manual for detail.
4 Configure the parameters related to LDAP authorization. Please refer to
proview operation manual for detail.
5 Restart Proivew Service.

50 ProView User Exits User Manual Document version: 1.00


Administration & System Management
A
A Appendix

This chapter contains the section


List of ProView Manuals on page 52

Document version: 1.00 ProView User Exits User Manual 51


Administration & System Management Appendix

A.1 List of ProView Manuals


Reference ID Document Name Description
[Data Model] ProView Data Model Design This HTML manual describes the
- Reference Guide data model of the ProView database.
It shows all tables, data fields, keys
and cross-references of the
database design.
This manual is targeted at
administrators of ProView.
[GLossary] Administration & System This manual explains the technical
Management - ProView terms used in the other manual.
Glossary Reference Manual
[Reference Manual Administration & System This manual gives a detailed
Reporting API] Management - ProView description of the ProView Reporting
Reporting Application API. It enables the user to create
Programming Interface individual reports with
Reference Manual BusinessObjects Crytal Report.
[System Manual Administration & System This manual gives a detailed
ProAgent] Management - ProAgent description of the functionality,
System Manual installation, configuration of the
ProAgent.
This manual is targeted at
administrators o the f ProAgent.
[Operation Manual] Administration & System This manual gives a detailed
Management - ProView description of the installation,
Operation Manual configuration and usage of the
ProView Server and the Console.
This manual is targeted at
administrators of ProView.
[User Exits] Administration & System This manual gives a detailed
Management - ProView User description of the available ProView
Exits Reference Guide user exits. These user exits extend
the functionality of ProView in the
areas "mail extensions", "data
compression", "problem reporting"
and others.
This manual is targeted at
administrators of ProView and
programmers in customer projects.
[User Manual Administration & System This manual gives a detailed
Console] Management - ProView description of the usage of the
Console User Manual ProView Console.
This manual is targeted at users and
administrators of ProView.

52 ProView User Exits User Manual Document version: 1.00

Vous aimerez peut-être aussi