Vous êtes sur la page 1sur 154

____________________

Inter.Pel 6.6
____________________
C Programming Manual
____________________
0102-660-02-CPRG6600
The information contained in this document is subject to revision without prior notice and shall
not be regarded as binding on SOPRA. The rights relative to the use of the software described
in this document are granted as part of the licensing contract and the software shall be used
only in accordance with the terms of that contract. Any reproduction or transmission in any
form or by any process whatever (electronic or mechanical, photocopy and recording included)
and for any purposes other than the personal use of the purchaser without the written
authorization of SOPRA is strictly prohibited.
Copyright 2003 SOPRA.
All rights reserved. All trademarks registered.
November 2003.
CONTENTS
1. ABOUT THIS MANUAL 1
1.1. Abstract 1
1.2. Content 1
1.3. Reading guidelines 1
2. DOCUMENTATION 2
3. INTERFACE PRESENTATION 3
4. C- API PRIMITIVES 4
4.1. Presentation 4
4.2. List of API primitives 5
4.3. How to use the data structure for primitive calls 6
4.4. Sequential processing of a set of selected transfers 9
4.5. Primitive calls layout 10
4.6. Error reporting on API primitives 10
4.7. Description of API primitives 11
4.7.1. ItpSessionOpen, ItpSessionOpenExt 11
4.7.2. ItpInit 13
4.7.3. ItpXferPut 14
4.7.4. ItpXferGet 17
4.7.5. ItpXferUpdate 20
4.7.6. ItpXferDelete 23
4.7.7. ItpXferUnlock 25
4.7.8. ItpXferOpenSet 27
4.7.9. ItpXferGetNext 28
4.7.10. ItpXferCloseSet 32
4.7.11. ItpXferCancel 33
4.7.12. ItpXferSuspend 35
4.7.13. ItpXferResume 38
4.7.14. ItpEnd and ItpSessionClose 39
4.7.15. ItpErrMsg 40
CONTENTS C Programming Manual Page iii
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5. EXIT FUNCTIONS 41
5.1. Presentation 41
5.2. List of exits functions 42
5.2.1. Network connection exits 42
5.2.2. Transfer checking 42
5.2.3. Post-transfer processing 43
5.2.4. Inter.Pel logging activity 43
5.2.5. Inter.Pel statistics activity 43
5.2.6. PeSIT protocol exit function 43
5.2.7. ETEBAC3 exit functions 44
5.2.8. ODETTE exit function 44
5.2.9. FTP exit function 44
5.2.10. Identification check for network client connection request 44
5.2.11. User Access Control Exits 45
5.2.12. User Login Parameters Exits 45
5.2.13. Generic protocol connection Exit 45
5.2.14. ETEBAC5 exit functions 46
5.3. Transfer exit scheduling order 47
5.4. Using guidelines 47
5.5. Description of exits functions 48
5.5.1. ExitBeginConnexion 48
5.5.2. ExitBeginSend1 49
5.5.3. ExitBeginReceive1 50
5.5.4. ExitBeginSend2 51
5.5.5. ExitBeginReceive2 52
5.5.6. ExitEndSend 53
5.5.7. ExitEndReceive 54
5.5.8. ExitCSLogin 55
5.5.9. ExitLogArchived 56
5.5.10. ExitLogMessage 57
5.5.11. ExitStatArchived 58
5.5.12. ExitStatMessage 59
5.5.13. ExitPesitPreConnection 60
5.5.14. ExitPesitMsg 61
5.5.15. Et3EncodeParameters 62
5.5.16. Et3DecodeParameters 63
5.5.17. ExitOdtGetAppli 64
5.5.18. ExitFtpGetAppli 66
5.5.19. ExitCheckUserLogin 68
5.5.20. ExitCheckUserAccess 69
5.5.21. ExitCheckFileAccess 71
5.5.22. ExitCheckUserLogout 72
5.5.23. ExitCheckXferRequest 73
5.5.24. ExitLoginParam 74
5.5.25. ExitNetConnReq 75
5.5.26. ExitNetConnResp 76
5.5.27. ExitProtocolConnection 77
5.5.28. Et5ExitConnectInd 79
5.5.29. Et5ExitCreateInd 80
CONTENTS C Programming Manual Page iv
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.30. Et5ExitSelectInd 81
5.5.31. Et5ExitOpenInd 82
5.5.32. Et5ExitDtfEndInd 83
5.5.33. Et5ExitTransEndInd 84
5.5.34. Et5ExitTransEndInd 85
6. API APPENDIX 86
6.1. Description of API data structures 86
6.2. Parameters used to submit or update a file transfer 105
6.2.1. ItpPelPut_t 105
6.2.2. ItpPelLotPut_t 106
6.2.3. ItpPesitPut_t 107
6.2.4. ItpEt3Put_t 109
6.2.5. ItpOdtPut_t 110
6.2.6. ItpEtb5Put_t 111
6.2.7. ItpFtpPut_t 113
6.2.8. ItpListPut_t 114
6.2.9. ItpMsgPut_t 115
6.3. Parameters used to retrieve a transfer attributes 116
6.3.1. ItpPelRecord_t 116
6.3.2. ItpPelLotRecord_t 118
6.3.3. ItpPesitRecord_t 119
6.3.4. ItpEt3Record_t 121
6.3.5. ItpOdtRecord_t 123
6.3.6. ItpEtb5Record_t 125
6.3.7. ItpFtpRecord_t 127
6.3.8. ItpListRecord_t 129
6.3.9. ItpMsgRecord_t 131
6.6. Parameters used to select file transfers 133
7. EXIT APPENDIX 134
7.1. Description of exits functions data structures 134
7.1.1. exituser.h 134
7.1.2. exitconn.h 135
7.1.3. exitxfer.h 138
7.1.4. exitlog.h 143
7.1.5. exitstat.h 144
7.1.6. exitclnt.h 144
7.1.7. exitsecu.h 144
7.1.8. Itpndsp.h 145
CONTENTS C Programming Manual Page v
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
1. ABOUT THIS MANUAL C Programming Manual Page 1
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
1. ABOUT THIS MANUAL
1.1. Abstract
This manual describes the C user programming interface supplied by Inter.Pel. It
includes application programming interface (A.P.I.) and exits functions
description.
This manual is intended for application programmers familiar with C
programming language. It does not discuss the C language, the C run-time library
and the C execution environment (compiler and system dependencies). Refer to
public reference manuals on C language, and to your platform documentation, for
detailed information on this programming language.
1.2. Content
Section 1 Document abstract
Section 2 Presentation of Inter.Pel documentation
Section 3 Presentation of Inter.Pel programming interface
Section 4 Description of API programming interface
Section 5 Description of exits functions programming interface
Section 6 Additional information on API
Section 7 Additional information on exits functions
1.3. Reading guidelines
To gain basic understanding of Inter.Pel, read Inter.Pel 6.6 Overview manual.
User's Guide provides information on how to use the product for file transfer.
Protocols Guide explains how to use file transfer protocols with Inter.Pel.
Once your programs are written, you must refer to your platforms Inter.Pel
specific document for details on how to compile and link with the monitor's
libraries.
2. DOCUMENTATION C Programming Manual Page 2
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
2. DOCUMENTATION
The Inter.Pel documentation contains two categories of technical publications:
- Generic manuals: they are designed for all platforms running Inter.Pel.
- Specific manuals containing platform dependent features. Each platform
is provided with its own set of specific manuals.
Title Type Function
Product Overview Overview Presentation
User's Guide Services How To Use
On-line commands Manual Utilities Operations & Mgmt
Protocols Guide How it works Understanding & Using transfer protocols
Messages & Codes Description Interpreting Information and errors messages
C programming Manual
COBOL programming Manual
Programming Integration of user applications
Installation & Configuration Guide(1) Install & Config Install & Config
Platform Specific Document (1) Specific supplement OS specific features
Getting Started (1) Running a transfer Quick User's Guide
PELISF Manual (2) Utilities Script mode operator's interface
I.H.M. Manual (2) Utilities Graphical operator's interface
PELOP Manual (2) Utilities Character mode operator's interface
(1): Specific manual: one document for each platform.
(2): Document provided when the related interface is supplied for the platform.
3. INTERFACE PRESENTATION C Programming Manual Page 3
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
3. INTERFACE PRESENTATION
Two types of C programming interfaces are supplied by Inter.Pel:
- Application programming interface (A.P.I.)
- Exits functions
The A.P.I. routines (primitives) allow user programs to use Inter.Pels file transfer
services.
The user program containing A.P.I. calls must be compiled and linked with
Inter.Pel libraries. It must be used with an active Inter.Pel.
The API primitives use request/response mode to communicate with Inter.Pel.
The response is supplied on the return of primitive calls. On some platforms, a
time-out is fixed for API calls, in order to avoid the indefinite locking of a user
program on an API call. This parameter sets the maximum delay for a user
program to wait for the return of an API call. Above this delay, Inter.Pel forces a
negative return code (-1) to the primitive call, meaning that the call has failed
(Refer to Platform Specific Document for more information).
A.P.I. primitives using and description are supplied in section "4. C- API
PRIMITIVES".
Exits functions are routines that allow to graft user customized processing at pre-
defined steps of a file transfer. A different function is defined for each step. Exits
functions are automatically scheduled by Inter.Pel. You can use them for checking
purpose if they are called before the transfer completion, or for post-transfer
processing if they are called at the transfer completion.
Exits functions provide means to automate your file transfer operation.
You must recompile the files containing updated exits functions, and link them
with Inter.Pel libraries. The monitor must be restarted to take into account your
new program.
Exits functions are described in section "5. EXIT FUNCTIONS".
4. C- API PRIMITIVES C Programming Manual Page 4
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4. C- API PRIMITIVES
4.1. Presentation
C API primitives are called from C user programs.
They provide following Inter.Pel services:
- Submitting a transfer or a message request
- Displaying a transfer or a message requests parameters
- Deleting transfers or messages from the mailbox
- Listing transfers using multi-criteria on transfers parameters
- Canceling a transfer
- Suspending a transfer
- Restarting a transfer previously suspended
This API has the following characteristics:
- It can only be used when Inter.Pel is active
- Its primitives are called from programs written in C
- Its primitives communicate with Inter.Pel in request-response mode
- Data structures are used to exchange transfer parameters between the
primitives and Inter.Pel
- The parameter structures used as arguments for the primitives calls are
allocated in the user program space
- The primitives use Inter.Pel internal objects (sites, applications). These
objects must have been created prior to the primitive call, using Inter.Pel
on-line commands or graphical user interfaces. No primitive is supplied for
site or application management
- They are available for all protocols currently supported (PEL, PeSIT Hors
SIT D and E, ETEBAC3, ETEBAC5 client, ODETTE, FTP)
This guide describes the primitives, their parameters and how they operate.
4. C- API PRIMITIVES C Programming Manual Page 5
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.2. List of API primitives
The primitives listed below are prototyped, and their arguments described, in the
header file "itpapi.h" (this is the naming for UNIX platforms; for other platforms,
refer to the specific document for file naming and location).
Primitive name Function supplied
ItpInit
ItpSessionOpen
ItpSessionOpenExt
Used to open a session (communication pipe) with Inter.Pel
ItpEnd
ItpSessionClose
Close the session previously opened with Inter.Pel
ItpXferPut Creates a transfer or a message request, and returns a local
transfer identifier (numeric)
ItpXferGet Reads a transfer or a message request parameters saved in a
mailbox record, using transfer local identifier.
This reading can lock or not the corresponding mailbox
record
ItpXferUnlock Unlocks a mailbox record after a read with lock
ItpXferUpdate Updates a transfer request
ItpXferDelete Deletes a transfer or a message request from the mailbox
ItpXferOpenSet Selects a set of transfer requests using multi-criteria on
transfer parameters
ItpXferGetNext Reads parameters of transfer requests previously selected with
ItpXferOpenSet
ItpXferCloseSet Deselects the previously selected set of transfers
ItpXferCancel Cancels a transfer request. The transfer is switched into
"canceled" state
ItpXferSuspend Freezes a transfer processing
ItpXferResume Restarts a previously suspended transfer
ItpErrMsg Utility function used to retrieve the meaning of the last error
encountered by Inter.Pel
To use these primitives, you must include the header file itpapi.h in your source
files:
#include <itpapi.h>
All the primitives return an integer:
- Negative integer (-1) if an error condition is encountered
- 0 or positive integer if the primitive call is successful
The error code is reported in a global integer variable named ErrCod, the value of
ErrCod is meaningless if the return integer is not equal to (-1). The corresponding
error message is obtained by calling the primitive ItpErrMsg()with ErrCod as
argument.
4. C- API PRIMITIVES C Programming Manual Page 6
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Five different data structures are used by the API primitives:
ItpXferPut_t : used to transmit transfer request parameters
ItpXferIdent_t : used to transmit transfer local identifier
ItpXferRecord_t : used to retrieve transfer attributes read in the mailbox
ItpMsgRecord_t : used to put or retrieve message requests into or from the
mailbox
ItpXferSelect_t : used to transmit selection criteria
Before using any primitive, a user program must open a session with the monitor
using the ItpSessionOpen() function (or an equivalent function). Close the
session at the end of the program using ItpSessionClose().
4.3. How to use the data structure for primitive calls
Two data structures are supplied in C union structures: ItpXferPut_ __ _t and
ItpXferRecord_ __ _t . Their content depends on the protocol used. This paragraph
describes guidelines for their using.
The two illustration examples described in this paragraph deal with the using of
ItpXferPut_t and ItpXferRecord_t respectively with ItpXferPut and
ItpXferGet primitives. They are used in the same manner for the other primitives.
ItpXferPut() primitive uses ItpXferPut_t structure to transmit the transfer
request parameters. ItpXferPut_t structure is declared as follow:
typedef struct
{
short protocol;
short type;
union
{
ItpPelPut_t pel;
ItpEtb3Put_t etb3;
ItpPelLotPut_t lot;
ItpPesitPut_t pesit;
ItpOdtPut_t odt;
ItpEtb5Put_t etb5;
ItpFtpPut_t ftp;
ItpListPut_t list;
ItpMsgPut_t msg;
} param;
unsigned char user_state;
char filler[100];
} ItpXferPut_t;
4. C- API PRIMITIVES C Programming Manual Page 7
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
The following diagram presents how to fill the structure according to the transfer
protocol used.
Protocol Type Substructure used Comments
PEL TYPE_TRANS ItpPelPut_t
PEL TYPE_LOTS ItpPelLotPut_t TYPE_LOTS defined for PEL only
PEL TYPE_POLL ItpPelLotPut_t TYPE_POLL defined for PEL only
PESIT TYPE_TRANS ItpPesitPut_t
ETEBAC3 TYPE_TRANS ItpEtb3Put_t
ODETTE TYPE_TRANS
TYPE_EERP
ItpOdtPut_t TYPE_EERP defined for ODETTE only
ETEBAC5 TYPE_TRANS ItpEtb5Put_t
FTP TYPE_TRANS ItpFtpPut_t
LIST TYPE_LIST ItpListPut_t To submit a Broadcasting request
PESIT TYPE_MSG ItpMsgPut_t Message request. PeSIT HS E protocols
only
PESIT,
ODETTE
TYPE_EERP ItpMsgPut_t EERP request. PeSIT HS E and Odette
protocols only
ItpXferGet primitive uses ItpXferRecord_t union structure to retrieve transfer
request parameters. This structure is declared as follow:
typedef struct
{
short protocol;
short type;
union
{
ItpPelRecord_t pel;
ItpEtb3Record_t etb3;
ItpPelLotRecord_t lot;
ItpPesitRecord_t pesit;
ItpOdtRecord_t odt;
ItpEtb5Record_t etb5;
ItpFtpRecord_t ftp;
ItpListRecord_t list;
ItpMsgRecord_t msg;
} record;
unsigned char user_state;
char filler[100];
} ItpXferRecord_t;
4. C- API PRIMITIVES C Programming Manual Page 8
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
The following diagram presents in which substructure you will find the transfer
parameters.
Protocol Type Substructure to use Comments
PEL TYPE_TRANS ItpPelRecord_t
PEL TYPE_LOTS ItpPelLotRecord_t TYPE_LOTS defined for PEL only
PEL TYPE_POLL ItpPelLotRecord_t TYPE_POLL defined for PEL only
PESIT TYPE_TRANS ItpPesitRecord_t
ETEBAC3 TYPE_TRANS ItpEtb3Record_t
ODETTE TYPE_TRANS
TYPE_EERP
ItpOdtRecord_t TYPE_EERP defined for ODETTE only
ETEBAC5 TYPE_TRANS ItpEtb5Record_t
FTP TYPE_TRANS ItpFtpRecord_t
LIST TYPE_LIST ItpListRecord_t
PESIT TYPE_MSG ItpMsgRecord_t Message request. PeSIT HS E protocols
only
PESIT,
ODETTE
TYPE_EERP ItpMsgRecord_t EERP request
PeSIT HS E and Odette protocols only
Message requests are a special type of transfer request in the sense that they
involve in-line (usually short) message transfer in stead of file transfer. There are
two categories of message requests : application messages and end-to-end
response message (also known as EERP message). In the current implementation,
application message is supported only by PeSIT HS E protocol, and EERP
message is supported by both PeSIT HS E and Odette protocols.
4. C- API PRIMITIVES C Programming Manual Page 9
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.4. Sequential processing of a set of selected transfers
You can select a set of transfer requests, and read or delete them sequentially.
This requires three steps:
1 - Selection of a set of transfer requests
#include <itpapi.h>
ItpXferSelect_ __ _t sel;
ret_cod =ItpXferOpenSet(&sel);
You must first set the selection criteria in the selection structure
ItpXferSelect_ __ _t .
2 - Reading selected transfer requests
int option;
ItpXferRecord_ __ _t xfer;
ret_cod =ItpXferGetNext(option, &xfer);
Use the option parameter (XFER_LOCK or 0) to indicate whether
you want a read with or without lock.
ItpXferGetNext() reads sequentially the selected transfer requests,
and copies their attributes in the structure ItpXferRecord_ __ _t.
Only one transfer is retrieved per ItpXferGetNext() call. The function
returns E_ __ _FEOF after all selected transfers are read.
3 - Releasing the interface resources associated with the set
ret_cod = ItpXferCloseSet();
After reading with lock a selected transfer (step 2), you can either:
- Call application specific function
- Update the transfer request (by calling ItpXferUpdate() primitive)
- Delete the last transfer read (by calling ItpXferDelete() primitive)
4. C- API PRIMITIVES C Programming Manual Page 10
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.5. Primitive calls layout
User programs always start the communication with Inter.Pel by calling
ItpSessionOpen() primitive, and ends the communication by calling
ItpSessionClose() primitive. In between the two calls, the program can require
Inter.Pel services listed in subsection "4.1. Presentation".
The following layouts provide guidelines for the programming of these services.
Action C routines layout In Out comments
submitting a
transfer
ItpSessionOpen(char *user, char *pass)
ItpXferPut(ItpXferPut_t *ptr)
ItpSessionClose()
I
- ItpXferPut_t declared and initialized
Displaying
transfer
parameters
ItpSessionOpen(char *user, char *pass)
ItpXferGet(int option,
ItpXferIdent_t *id,
ItpXferRecord_t *xfer)
ItpSessionClose()
I
I
O
- Option = XFER_LOCK|0
- ItpXferIdent_t and ItpXferRecord_t
declared and initialized
Deleting
transfers from
mailbox
ItpSessionOpen(char *user, char *pass)
ItpXferOpenSet(ItpXferSelect_t *s)
ItpXferGetNext ( int option,
ItpXferRecord_t *xfer)
ItpXferDelete()
ItpXferCloseSet ()
ItpSessionClose()
I
I
O
- ItpXferSelect_t declared and initialized
- Option=XFER_LOCK
- ItpGetNext retrieve the next record selected,
starting from the first one
- One can sequentially retrieve selected
records with ItpGetNext until reaching a
given one
- ItpXferDelete purges the last selected
record
- The user can loop on get next/delete until
EOF (the error condition on get next is
E_FEOF)
Suspending a
transfer
ItpSessionOpen(char *user, char *pass)
ItpXferSuspend( ItpXferIdent_t *id)
ItpSessionClose()
I
- The transfer request must be in one of the
following states:
XFER_TO_BEGIN
XFER_PROGRESSING
XFER_SERVICING
XFER_DELAYED
Restarting a
suspended or
frozen transfer
ItpSessionOpen(char *user, char *pass)
ItpXferResume( ItpXferIdent_t *id)
ItpSessionClose()
I
- The transfer request must be in the state:
XFER_SUSPENDED
XFER_FROZEN
Canceling a
transfer
ItpSessionOpen(char *user, char *pass)
ItpXferPut( ItpXferIdent_t *id)
ItpSessionClose()
I
- The transfer request must be in one of the
following states:
XFER_TO_BEGIN
XFER_FROZEN
XFER_SUSPENDED
XFER_DELAYED
4.6. Error reporting on API primitives
Inter.Pel uses a global variable (integer named ErrCod) to report error conditions
to user programs.
The user program uses ItpErrMsg() routine to obtain the explanation of the last
API error reported by Inter.Pel.
4. C- API PRIMITIVES C Programming Manual Page 11
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7. Description of API primitives
4.7.1. ItpSessionOpen, ItpSessionOpenExt
Syntax
int ItpSessionOpen(char *user, char *password)
int ItpSessionOpenExt(char *profile_name, char *user, char *password)
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
(ErrCod). ItpErrMsg() function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
ItpSessionOpen function is used to open a session with the monitor before
using any other API primitive. It provides access security features, namely
for the using of API interface in client/server mode. You can check user
name and password with a specific exit function: ExitCSLogin(). Close the
session at the end of the program using ItpEnd() or ItpSessionClose().
ItpSessionOpenExt is used in the same way, with following additional
feature: you can choose which monitor to use between among. It uses
"profile_name" parameter to identify the section in the client
CSCONFIG.INI file that describes the session with the target Inter.Pel.
Example: Inter.Pel monitor "Monitor_1" is described by the following
section of the CSCONFIG.INI file on the Inter.Pel client station:
[Monitor_1]
HostName=193.56.234.29
Port =23000
If the client station wants to open a session with this Inter.Pel, the
profile_name must be Monitor_1.
Both ItpSessionOpen() and ItpSessionOpenExt() primitives open a session:
you must use only one of them.
Open session and close session functions must be called only once in each
session.
Both ItpSessionOpen and ItpSessionOpenExt() are usually used for
client/server mode of communication.
4. C- API PRIMITIVES C Programming Manual Page 12
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Note
ItpSessionOpen() uses a default section description referenced by Inter.Pel
environment variable P_CS_SERVER, to define the profile of the session user.
This variable is defined in the running environment of Inter.Pel. Refer to your
platform specific document for the description of this parameter.
On the other hand, ItpSessionOpenExt function transmits the user profile in its
arguments. If profile_name is not supplied (NULL pointer), Inter.Pel uses the
default user profile defined by the environment variable P_CS_SERVER.
ItpSessionOpenExt() then operates like ItpSessionOpen().
Example
#include <itpapi.h>
#include <itperr.h>
char profile_name[15], user_name[10], password[10];
int main(int argc, char *argv[])
{
int retcod;
...
/* set the values of arguments */
...
retcod = ItpSessionOpenExt(profile_name, user_name, password);
if (retcod == -1)
printf("error text = %s\n", ItpErrMsg());
...
}
4. C- API PRIMITIVES C Programming Manual Page 13
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.2. ItpInit
Syntax
int ItpInit(void)
Superseded by ItpSessionOpen and ItpSessionOpenExt.
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This primitive is used to open a session with the monitor before using any
other primitive. Close the session at the end of the program using
ItpSessionClose().
The open session and close session functions must be called only once in
each session.
No argument is supplied for this function.
Note
In version 6.3 and later releases, it is advisable to use only ItpSessionOpen
(see previous section) since ItpInit has been retained only for compatibility
with previous versions.
Example
#include <itpapi.h>
#include <itperr.h>
...
int main(int argc, char *argv[])
{
int retcod;
...
retcod = ItpInit();
if (retcod ==-1)
printf("error text = %s\n", ItpErrMsg());
...
}
4. C- API PRIMITIVES C Programming Manual Page 14
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.3. ItpXferPut
Syntax
long ItpXferPut(ItpXferPut_t *param)
See "API appendix" section for the full description of ItpXferPut_t.
Return value
>0 : If the call is successful. This number is the local identifier of the
transfer created
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This function is used to create a transfer request .
The attributes describing the transfer request must be supplied in the
arguments of the primitive. Among them are:
- File attributes (file structure, record description, ...)
- Transfer direction (sending or receiving)
- Origin and destination sites for the transfer
- Protocol parameters
- Transfer monitoring parameters (date to begin, retry count, ...)
In return, you receive an integer representing the local identifier of the
request. This identifier is used for subsequent operations on the request.
Before calling the function, the user program must declare and initialize
ItpXferPut_t structure (see itpapi.h header file) that contains all the
parameters of a transfer request (see note).
Parameters not supplied must be initialized to 0 for numeric areas, and an
empty string (length=0) for string characters.
Before creating the transfer request, Inter.Pel completes the parameters
missing in the request. If an application name has been supplied in the
request, Inter.Pel set the missing parameters with the value of corresponding
attributes contained in that application object. If some parameters are still
unresolved, default values, either supplied by the API or fixed internally in
the monitor, are used. (see "API appendix" section).
The API interface checks the validity of the parameters before creating the
transfer request.
If an invalid parameter is found, the creation is rejected and an error
returned.
4. C- API PRIMITIVES C Programming Manual Page 15
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Note
1. The parameters supplied for a transfer request depend on the protocol and
type of request:
- For the PeSIT protocol (type D and E), the required parameters are
defined in substructure ItpPesitPut_t
- For the PEL protocol (including type PEL1), they are defined in
substructure ItpPelPut_t
- For the LOTS command of the PEL protocol (protocol=PEL and
type=TYPE_LOTS or type=TYPE_POLL ), they are defined in
substructure ItpPelLotPut_t
- For the ETEBAC3 protocol, they are defined in substructure
ItpEtb3Put_t
- For the ODETTE protocol, they are defined in substructure
ItpOdtPut_t
- For the ETEBAC5 protocol, they are defined in substructure
ItpEtb5Put_t
- For the FTP protocol, they are defined in substructure ItpFtpPut_t
- For a broadcasting request, they are defined in substructure
ItpListPut_t
- For a message request, they are defined in substructure ItpMsgPut_t
You must choose the structure to fill up according to the protocol and
type of request.
2. The syntax and semantic of each transfer parameter are explained in "API
appendix" section.
4. C- API PRIMITIVES C Programming Manual Page 16
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Example
/* submitting a transfer request to send a file using PEL protocol:
- origin alias site name: ORIG_SIT
- destination alias site name: DEST_SIT
- application used: APPLI_X
- name of the file to send including access path:
FILE_X (= /<dir>/<dir>/.../name) is the full file name string.
*/
...
#include <itpapi.h>
#include <itperr.h>
...
int main(int argc, char *argv[])
{
ItpXferPut_t xput;
long ident;
char user_name[10], password[10];
...
/* set the values of arguments */
memset( &xput, 0, sizeof(ItpXferPut_t));
xput.protocol = ITP_PROTO_PEL;
xput.type = ITP_TYPE_TRANS;
strcpy(xput.param.pel.org_alias, "ORIG_SIT");
strcpy(xput.param.pel.dest_alias, "DEST_SIT");
strcpy(xput.param.pel.appli, "APPLI_X");
strcpy(xput.param.pel.pathname, FILE_X);
...
/* opening the session */
if (ItpSessionOpen(user_name, password)() == -1) {
printf("Open session failed. Error msg= %s\n", ItpErrMsg());
exit(1);
}
/* submitting the transfer */
if ( (ident = ItpXferPut(&xput)) == -1)
printf("Transfer request failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Transfer request successful. Local ident=%ld\n", ident);
/* closing the session */
ItpSessionClose();
...
}
4. C- API PRIMITIVES C Programming Manual Page 17
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.4. ItpXferGet
Syntax
int ItpXferGet(int option, ItpXferIdent_t *ident, ItpXferRecord_t *xfer)
See "API appendix" section for the full description of the structures used.
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error.
ErrCod variable is declared and automatically set by Inter.Pel
Description
This function reads a transfer request defined by its local identifier, and
copies the transfer parameters in the structure ItpXferRecord_t. The local
identifier is supplied in the structure ItpXferIdent_t.
You must declare and enter the arguments ident (transfer request identifier)
and option (read option) before calling the function. You must also declare
and initialize an ItpXferRecord_t structure to receive the record that has
been read.
Refer to API appendix section for the description of ItpXferRecord_t
structure, and the meaning of its parameters.
The option parameter (XFER_LOCK or 0) indicates whether the read is
with or without lock. If the transfer request reading is followed by an update
or delete operation, the lock option is mandatory.
Only one lock can be enabled at a time: a lock automatically cancels an
earlier lock.
If an update or delete operation is successful, the record is automatically
unlocked afterwards.
4. C- API PRIMITIVES C Programming Manual Page 18
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Note
The ItpXferRecord_t structure is made of a combination of seven
substructures, depending on the protocol and type of transfer request. To
read the data, you therefore need to test the protocol and type of request
before selecting the substructure to use:
- For protocol=PESIT and type=TYPE_TRANS, use ItpPesitRecord_t
substructure
- For protocol=PEL and type=TYPE_TRANS, use ItpPelRecord_t
substructure
- For protocol=PEL and type=TYPE_LOTS or TYPE_POLL , use
ItpPelLotRecord_t substructure
- For protocol=ETEBAC3 and type=TYPE_TRANS, use
ItpEtb3Record_t substructure
- For protocol=ODETTE and type=TYPE_TRANS, use
ItpOdtRecord_t substructure
- For protocol=ODETTE and type=TYPE_EERP, use ItpOdtRecord_t
substructure
- For protocol=ETEBAC5 and type=TYPE_TRANS, use
ItpEtb5Record_t substructure
- For protocol=FTP and type=TYPE_TRANS, use ItpFtpRecord_t
substructure
- For type=TYPE_LIST , use ItpListRecord_t substructure
- For type=TYPE_MSG or type=TYPE_EERP, use ItpMsgRecord_t
substructure
4. C- API PRIMITIVES C Programming Manual Page 19
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Example
/* This example reads a transfer request corresponding to local identifier N */
...
#include <itpapi.h>
#include <itperr.h>
...
int main(int argc, char *argv[])
{
ItpXferRecord_t xget;
ItpXferIdent_t ident;
char user_name[10], password[10];
int option;
...
/* initialize the arguments */
memset( &xget, 0, sizeof(ItpXferRecord_t));
memset( &ident, 0, sizeof(ItpXferIdent_t));
option = 0
ident.local_ident = N;
...
/* opening the session */
if (ItpSessionOpen(user_name, password)() == -1) {
printf("Open session failed. Error msg= %s\n", ItpErrMsg());
exit(1);
}
/* Retrieving transfer parameters*/
if ( ItpXferGet(option, &ident, &xget)) == -1)
printf("Get failed. Error Msg=%s\n", ItpErrMsg());
else {
printf("Get successful\n");
printf("protocol=%hd\n", xget.protocol);
printf("type=%hd\n", xget.type);
...
}
...
switch(xget.protocol) {
case ITP_PROTO_PEL:
...
case ITP_PROTO_PHSD:
...
}
..
/* closing the session */
ItpSessionClose();
...
}
4. C- API PRIMITIVES C Programming Manual Page 20
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.5. ItpXferUpdate
Syntax
int ItpXferUpdate(ItpXferPut_t *param)
See "API appendix" section for the full description of the structure used.
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This function is used to modify a transfer request.
The operation must be preceded by a successful call to a read function
(using ItpXferGet or ItpGetNext) with lock option. For a read with lock, set
the option parameter to XFER_ __ _LOCK .
Automatic locking mechanism is used:
- any concurrent read with lock for the same record initiated by an
other user is then prevented by the error condition: E_ __ _FRLOCKED
- the lock is automatically disabled by a subsequent access to the
mailbox that is initiated by the same user program
The transfer request can be modified according to the following rules:
Allowed transfer state to update
a request
New allowed parameters
ITP_XFER_ACKED
ITP_XFER_ENDED
option_file
user_state
ITP_XFER_CANCELED option_file
user_state
ITP_XFER_FROZEN
ITP_XFER_DELAYED
ITP_XFER_TO_BEGIN
All the parameters
ITP_XFER_TO_SIGN All the parameters
The lock on the transfer request record is automatically disabled after a
successful update.
After reading the transfer request, the user program filled the ItpXferPut_t
structure's parameters, and calls ItpXferUpdate.
4. C- API PRIMITIVES C Programming Manual Page 21
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
The parameter values that have been changed transmit their new value to the
corresponding attributes in the transfer request.
During the update, unmodified parameters keep their former value.
Caution: A parameter assigned with the value 0 (if integer), or empty string
(if character string) are updated in the transfer request.
There is no one-to-one relationship between the read parameters
(ItpXferRecord_t) and the write/modify parameters (ItpXferPut_t). Some
transfer parameters can be entered or modified by the monitor only. Users
have read-only access on these parameters.
In addition, the structure used for modification is the same as for creating a
record (ItpXferPut_t) but the protocol and type cannot be modified.
Note
1. The parameters required for a transfer request depend on the protocol and
type of request:
- For the PeSIT protocol (type D and E), the required parameters are
defined in substructure ItpPesitPut_t
- For the PEL protocol (type PEL1 included), they are defined in
substructure ItpPelPut_t
- For the LOT request type which is defined only for PEL protocol
(protocol=PEL and type=TYPE_LOTS or type=TYPE_POLL ), they
are defined in substructure ItpPelLotPut_t
- For the ETEBAC3 protocol, they are defined in substructure
ItpEtb3Put_t
- For the ODETTE protocol, they are defined in substructure
ItpOdtPut_t
- For the ETEBAC5 protocol, they are defined in substructure
ItpEtb5Put_t
You must therefore choose the structure according to the protocol and
type of request.
2. The syntax and semantics of each transfer parameter are explained in
"API appendix" section.
3. The record locking can also be disabled by a call to ItpXferUnlock()
primitive.
4. C- API PRIMITIVES C Programming Manual Page 22
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Example
/* This example reads a transfer request corresponding to local
identifier N and updates it */
...
#include <itpapi.h>
#include <itperr.h>
...
int main(int argc, char *argv[])
{
ItpXferRecord_t xget;
ItpXferIdent_t ident;
ItpXferPut_t xput;
char user_name[10], password[10];
int option;
...
/* initialize the arguments */
memset( &xget, 0, sizeof(ItpXferRecord_t));
memset( &ident, 0, sizeof(ItpXferIdent_t));
option = XFER_LOCK
ident.local_ident = N;
...
/* opening the session */
if (ItpSessionOpen(user_name, password)() == -1) {
printf("Open session failed. Error msg= %s\n", ItpErrMsg());
exit(1);
}
/* Retrieving transfer parameters*/
if ( ItpXferGet(option, &ident, &xget)) == -1)
printf("Get with lock failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Get with lock successful\n");
...
/* Update the parameters in ItpXferPut_t structure */
memset(&xput, 0, sizeof(ItpXferPut_t));
...
<parameter> = <new_value> or <old_value>
...
/* Send the updated structure */
if ( ItpXferUpdate(&xput) == -1)
printf("Update request failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Update request successful\n");
...
/* closing the session */
ItpSessionClose();
...
}
4. C- API PRIMITIVES C Programming Manual Page 23
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.6. ItpXferDelete
Syntax
int ItpXferDelete(void)
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This function deletes a transfer request.
The operation must be preceded by a successful call to a read function
(using ItpXferGet or ItpXferGetNext) with lock option. For a read with lock,
set the option parameter to XFER_LOCK.
Any concurrent read with lock for the same record is then prevented by the
error condition: E_FRLOCKED.
If a transfer request is deleted during the file transfer, the transfer will be
aborted and the request deleted.
Note
If you delete a transfer request record after reading it by ItpXferGetNext(),
you must have previously select that record using ItpOpenSet() primitive.
In this case, the primitives are called according to the following sequence:
...
ItpOpenSet(...)
ItpXferGetNext(option=XFER_LOCK, ...)
ItpXferDelete()
....
4. C- API PRIMITIVES C Programming Manual Page 24
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Example
/* This example reads a transfer request corresponding to local identifier N and
deletes it */
...
#include <itpapi.h>
#include <itperr.h>
...
int main(int argc, char *argv[])
{
ItpXferRecord_t xget;
ItpXferIdent_t ident;
char user_name[10], password[10];
int option;
...
/* initialize the arguments */
memset( &xget, 0, sizeof(ItpXferRecord_t));
memset( &ident, 0, sizeof(ItpXferIdent_t));
option = XFER_LOCK
ident.local_ident = N;
...
/* opening the session */
if (ItpSessionOpen(user_name, password)() == -1)
printf("Open session failed. Error msg= %s\n", ItpErrMsg());
/* Retrieving transfer parameters*/
if ( ItpXferGet(option, &ident, &xget)) == -1)
printf("Get with lock failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Get with lock successful\n");
...
/* Delete */
if ( ItpXferDelete() == -1)
printf("Delete request failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Delete request successful\n");
...
/* closing the session */
ItpSessionClose();
...
}
4. C- API PRIMITIVES C Programming Manual Page 25
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.7. ItpXferUnlock
Syntax
int ItpXferUnlock(void)
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error.
ErrCod variable is declared and automatically set by Inter.Pel
Description
This function unlocks a transfer request that has been previously read with
the lock option.
Note
None.
4. C- API PRIMITIVES C Programming Manual Page 26
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Example
/* This example reads a transfer request corresponding to local identifier N with
lock option, and unlocks it */
...
#include <itpapi.h>
#include <itperr.h>
...
int main(int argc, char *argv[])
{
ItpXferRecord_t xget;
ItpXferIdent_t ident;
char user_name[10], password[10];
int option;
...
/* initialize the arguments */
memset( &xget, 0, sizeof(ItpXferRecord_t));
memset( &ident, 0, sizeof(ItpXferIdent_t));
option = XFER_LOCK
ident.local_ident = N;
...
/* opening the session */
if (ItpSessionOpen(user_name, password)() == -1)
printf("Open session failed. Error msg= %s\n", ItpErrMsg());
/* Retrieving transfer parameters*/
if ( ItpXferGet(option, &ident, &xget)) == -1)
printf("Get with lock failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Get with lock successful\n");
...
/* Unlock */
if ( ItpXferUnlock() == -1)
printf("Unlock request failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Unlock request successful\n");
...
/* closing the session */
ItpSessionClose();
...
}
4. C- API PRIMITIVES C Programming Manual Page 27
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.8. ItpXferOpenSet
Syntax
int ItpXferOpenSet(ItpXferSelect_t *select)
See "API appendix" section for the full description of the structure used.
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg() function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This function is used to select a set of transfer requests according to the
criteria specified in the ItpXferSelect_t structure.
To select all the transfer, the ItpXferSelect_t structure must be initialized to 0.
You must declare and initialize the ItpXferSelect_t structure.
Note
After a successful selection, transfer requests selected are read sequentially
by iterative calls of ItpXferGetNext() primitive.
After a successful ItpGetNext() call, you can process the following
operations:
- Calling once more ItpGetNext() to obtain the next record of the
selection
- Delete the read transfer request using ItpXferDelete()
- Update the read transfer request using ItpXferUpdate()
Example
See example of paragraph "4.7.9. ItpXferGetNext".
4. C- API PRIMITIVES C Programming Manual Page 28
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.9. ItpXferGetNext
Syntax
int ItpXferGetNext(int option, ItpXferRecord_t *xfer)
See "API appendix" section for the full description of the structure used.
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg() function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel. The ErrCod
value E_FEOF means that no more transfer records are available
Description
This function is used to read the transfer requests previously selected by
the ItpXferOpenSet function.
You must declare and specify the option variable (read option) before
calling the function. You must also declare and initialize an
ItpXferRecord_t structure to receive the record that has been read.
ItpXferGetNext() function reads the transfer request and filled the
ItpXferRecord_t structure detailed in "API appendix" section.
The option parameter (XFER_LOCK or 0) indicates whether the read is
with or without lock. If the transfer request reading is followed by an update
or delete operation, the lock option is mandatory.
Only one lock can be enabled at a time: a lock automatically cancels an
earlier lock.
The lock is automatically disabled on the subsequent access to the mailbox.
4. C- API PRIMITIVES C Programming Manual Page 29
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Note
The ItpXferRecord_t structure consists of a union of seven substructures of
different protocols and types. To read the data, you therefore need to test the
protocol and type before selecting the substructure to be entered:
- For type=TYPE_LIST, use the ItpListRecord_t substructure
- For protocol=PESIT and type=TYPE_TRANS (the only possible
value in PeSIT), use the ItpPesitRecord_t structure
- For protocol=PEL and type=TYPE_TRANS, use the ItpPelRecord_t
substructure
- For protocol=PEL and type=TYPE_LOTS or TYPE_POLL , use the
ItpPelLotRecord_t substructure
- For protocol=ETEBAC3 and type=TYPE_TRANS, use the
ItpEtb3Record_t substructure
- For protocol=ETEBAC5 and type=TYPE_TRANS, use the
ItpEtb5Record_t substructure
- For protocol=ODETTE and type=TYPE_TRANS, use the
ItpOdtRecord_t substructure
- For protocol=FTP and type=TYPE_TRANS, use the ItpFtpRecord_t
substructure
4. C- API PRIMITIVES C Programming Manual Page 30
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Example
/* Description:
- select all transfers with PEL protocol that are terminated (status "ended" or
"canceled"),
- delete among them all transfers in sending mode (direction "out")
*/
...
#include <itpapi.h>
#include <itperr.h>
...
int main(int argc, char *argv[])
{
ItpXferRecord_t xget;
ItpXferSelect_t sel;
char user_name[15], password[10];
int option;
...
/* opening the session */
if (ItpSessionOpen(user_name, password)() == -1)
printf("Open session failed. Error msg= %s\n", ItpErrMsg());
/* Selection */
memset( &sel, 0, sizeof(ItpXferSelect_t));
sel.state_list_len = 2;
sel.state_list_val[0] = ITP_XFER_ENDED;
sel.state_list_val[1] = ITP_XFER_CANCELED;
sel.protocol = ITP_PROTO_PEL;
if ( ItpXferOpenSet(&sel)) == -1)
printf("Selection failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Selection successful\n");
option = XFER_LOCK;
while (1) {
memset( &xget, 0, sizeof(ItpXferRecord_t));
if (ItpXferGetNext(option, &xget)) == -1)
else if (ErrCod == E_FEOF) {
printf("End of selection list reached ! \n");
break;
}
else
printf("GetNext Error. Error Msg=%s\n", ItpErrMsg());
4. C- API PRIMITIVES C Programming Manual Page 31
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
if (xget.record.pel.direction == ITP_DIRECTION_OUT) {
if ( ItpXferDelete() == -1)
ItpXferUnlock();
printf("Delete request failed. Error Msg=%s\n",
ItpErrMsg());
else {
printf("Delete request successful: ident = %ld\n",
xget.record.pel.ident.local_ident);
break;
}
}
}
...
/* close the selection */
ItpXferCloseSet();
...
/* closing the session */
ItpSessionClose();
...
}
4. C- API PRIMITIVES C Programming Manual Page 32
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.10. ItpXferCloseSet
Syntax
int ItpXferCloseSet(void)
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This function is used to close the set of transfer requests previously selected
using the ItpXferOpenSet() function.
Example
See example of paragraph "4.7.9. ItpXferGetNext".
4. C- API PRIMITIVES C Programming Manual Page 33
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.11. ItpXferCancel
Syntax
int ItpXferCancel(ItpXferIdent_t *ident)
See "API appendix" section for the description of the structure used.
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This function cancels a transfer request identified by its local identifier.
The corresponding transfer record is not deleted from the mailbox.
The monitor is processing the transfer request:
If the value of transfer state is ITP_XFER_PROGRESSING or
ITP_XFER_SERVICING, the transfer is canceled otherwise the
transfer is suspended.
The monitor is not processing the transfer request.
The transfer request will be canceled if it is in one of the following states:
ITP_XFER_FROZEN
ITP_XFER_DELAYED
ITP_XFER_SUSPENDED
ITP_XFER_TO_BEGIN
ITP_XFER_TO_RESTART
ITP_XFER_CREATED
ITP_XFER_INTERRUPTED
ITP_XFER_PROGRESSING
ITP_XFER_SERVICING
ITP_XFER_TO_SIGN.
After a successful call, the corresponding transfer state is switched into
ITP_XFER_CANCELED.
The transfer request does not need to be locked to perform this operation.
4. C- API PRIMITIVES C Programming Manual Page 34
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Note
A call to ItpXferCancelled() with a transfer in any other state returns the
error condition: ErrCod = E_XWRONGSTATE (Invalid transfer state).
Example
See example of paragraph "4.7.12. ItpXferSuspend".
4. C- API PRIMITIVES C Programming Manual Page 35
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.12. ItpXferSuspend
Syntax
int ItpXferSuspend(ItpXferIdent_t *ident)
See "API appendix" section for the description of the structure used.
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This function stops the processing of the transfer identified by its local
identifier. The transfer request is switched according to the following rules:
initial state final state
ITP_XFER_TO_BEGIN ITP_XFER_FROZEN
ITP_XFER_DELAYED ITP_XFER_FROZEN
ITP_XFER_PROGRESSING ITP_XFER_SUSPENDED
ITP_XFER_SERVICING ITP_XFER_INTERRUPTED
The transfer request does not need to be locked to perform this operation.
Note
A suspension operation applied on a delayed transfer request switches its
state into ITP_XFER_FROZEN.
4. C- API PRIMITIVES C Programming Manual Page 36
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Example
/* Description:
- suspend a transfer request corresponding to local identifier N
- resume that transfer
- suspend it once more
- cancel it
*/
#include <itpapi.h>
#include <itperr.h>
...
int main(int argc, char *argv[])
{
ItpXferIdent_t ident;
char user_name[15], password[10];
...
/* initialize the arguments */
memset( &ident, 0, sizeof(ItpXferIdent_t));
ident.local_ident = N;
...
/* opening the session */
if (ItpSessionOpen(user_name, password)() == -1) {
printf("Open session failed. Error msg= %s\n", ItpErrMsg());
exit(1);
}
...
/* Suspend the transfer */
if ( ItpXferSuspend(&ident) == -1)
printf("Suspension failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Transfer suspended: id=%ld\n", ident.local_ident);
/* Resume the transfer N */
if ( ItpXferResume(&ident) == -1)
printf("Restart failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Transfer restarted: id=%ld\n", ident.local_ident);
...
/* Suspend the transfer N*/
if ( ItpXferSuspend(&ident) == -1)
printf("Suspension failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Transfer suspended: id=%ld\n", ident.local_ident);
/* Cancel the transfer */
if ( ItpXferCancel(&ident) == -1)
4. C- API PRIMITIVES C Programming Manual Page 37
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
printf("Cancel failed. Error Msg=%s\n", ItpErrMsg());
else
printf("Transfer canceled: id=%ld\n", ident.local_ident);
...
/* closing the session */
ItpSessionClose();
...
}
4. C- API PRIMITIVES C Programming Manual Page 38
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.13. ItpXferResume
Syntax
int ItpXferResume(ItpXferIdent_t *ident)
See "API appendix" section for the description of the structure used.
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg() function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
This function is used to reactivate a suspended transfer or to do again a
previous transfer. The transfer is identified by its local identifier.
The transfer request must be in the following states:
- reactivate a suspended transfer:
ITP_XFER_SUSPENDED
ITP_XFER_FROZEN
- do again the same transfer:
ITP_XFER_CANCELED
ITP_XFER_ENDED
ITP_XFER_ACKED
The request does not need to be locked to perform this operation.
Note
None.
Example
See example of paragraph "4.7.12. ItpXferSuspend".
4. C- API PRIMITIVES C Programming Manual Page 39
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.14. ItpEnd and ItpSessionClose
Syntax
int ItpEnd(void)
int ItpSessionClose(void) supersede of ItpEnd()
Return value
0 : If the call is successful
-1 : If an error is detected. The error type is indicated in global variable
ErrCod. ItpErrMsg function returns the text of the error. ErrCod
variable is declared and automatically set by Inter.Pel
Description
These functions are used to close a session with the monitor and release the
resources. They both have exactly the same function.
The Last transfer request locked is automatically unlocked.
Note
No API primitive will be available after either of these operations.
Example
See examples supplied in the description of the other primitives.
4. C- API PRIMITIVES C Programming Manual Page 40
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
4.7.15. ItpErrMsg
Syntax
char *ItpErrMsg()
Return value
The return value is a pointer to an Inter.Pel internal buffer containing the
text explaining the error.
Description
This function returns the error message associated to the value of ErrCod.
If an error condition is encountered, API primitives return -1 and set an error
code in the global variable ErrCod.
Note
It is recommended to copy the content is buffer into your program space.
A subsequent call to ItpErrMsg() overrides the content of the buffer.
Example
See examples supplied in the description of the other primitives.
5. EXIT FUNCTIONS C Programming Manual Page 41
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5. EXIT FUNCTIONS
5.1. Presentation
Inter.Pel provides a set of user exits functions. These functions are automatically
called at some pre-defined steps during the transfer processing. The user can
customize the exits functions according to his own needs. This feature allows to
implement automation processing based on transfer events occurrences.
Most of exits functions are scheduled for all protocols (common exits). Inter.Pel
also provides some few exits functions dedicated to a given protocol. Protocol
dedicated exits functions are scheduled only for their related protocols.
The common exits functions are written in following files:
- exituser.c : Containing transfer exits
- exitndsp.c : Network connection exit functions
- exitlog.c : Containing functions related to log features
- exitstat.c : Containing functions related to statistics features
They can be used for checking purpose, or for post-transfer processing.
Checking exits functions are scheduled at the following transfer phases:
- Before or after the network connection
- Before or after the protocol identification phase
- Before the transfer request record is written in the mailbox
- Before the data sending or receiving phase
- Before each print of a log message in log file
- After a log file has been archived
- Before formatting a statistics record
- After a state file has been archived
Post-transfer exits functions (also called end of transfer exits) are scheduled after
the termination of a file transfer, whether the transfer has been successful or
canceled.
The exits functions have following characteristics:
- They are automatically scheduled by the monitor
- They execute the program added by the user if any, and return
- Data structures are used to transmit transfer parameters to the functions
The exit scheduling order depends on two things (see paragraph "5.3. Transfer exit
scheduling order"):
- The transfer partner side where the functions are executed: requester side
(connection initiator) or server side (connection responder)
- The transfer direction: sender or responder
Inter.Pel waits for the return of an exit function before continuing its processing.
5. EXIT FUNCTIONS C Programming Manual Page 42
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Note:
A particular batch exit mechanism named "XPR exit" is also implemented. It is an
optional feature that allows Inter.Pel to automatically start a user script (or
program) when a transfer is terminated. This xpr exit is just started, and the
monitor does not wait for its return to continue its processing. Furthermore, XPR
runs in a separate process, independent of Inter.Pel. "xpr exit" is explained in
Inter.Pel 6.6 User's Guide. It will not be described in this manual.
5.2. List of exits functions
Exits functions listed below are grouped according to the nature of their use.
For each function, the transfer side where it is called is indicated in italic.
5.2.1. Network connection exits
- ExitNetConnReq (in requester side)
This exit is called before an outgoing connection call. It allows to select the
appropriate network process for the exchange.
- ExitNetConnRsp (in server side)
This exit is called after the reception of an incoming connection call. It
allows to select the appropriate transfer protocol for the exchange.
5.2.2. Transfer checking
- ExitBeginConnexion (in both requester and server sides)
In requester mode (connection initiator side), called before the protocol
identification phase.
In server mode (connection responder side), called after the protocol
identification phase.
- ExitBeginSend1 (in requester side)
Called before the submitted transfer request is written in the MAILBOX.
- ExitBeginReceive1 (in server side)
Called before the received transfer request is written in the MAILBOX.
- ExitBeginSend2 (in requester side)
Called before the file data sending phase.
- ExitBeginReceive2 (in server side)
Called before the file data receiving phase.
5. EXIT FUNCTIONS C Programming Manual Page 43
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.2.3. Post-transfer processing
- ExitEndSend (in requester side)
Called after a file has been successfully sent.
- ExitEndReceive (in server side)
Called after a file has been successfully received.
5.2.4. Inter.Pel logging activity
- ExitLogArchived
Called after the processing of log file archiving if asynchronous batch
processing program for log archiving is not used.
- ExitLogMessage
Called before a message is written in the log file.
5.2.5. Inter.Pel statistics activity
- ExitStatArchived
Called after the processing of stat file archiving if asynchronous batch
processing program for statistics archiving is not used.
- ExitStatMessage
Called before a statistics record is formatted and written in the Inter.Pel stat
file.
5.2.6. PeSIT protocol exit function
- ExitPesitPreConnection
Called on reception of PeSIT pre-connection message. The message
contains the callers user ID and password.
- ExitPesitMsg
Called on reception of FPDU_MSG (PI 91). The message received is
converted into local machine's character set before passing to this exit.
5. EXIT FUNCTIONS C Programming Manual Page 44
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.2.7. ETEBAC3 exit functions
- Et3EncodeParameters
Called by ETEBAC3 client side before sending a parameter card to its bank.
It is used to format the parameter card before sending it.
- Et3DecodeParameters
Called by ETEBAC3 bank side on reception of a parameter card. It is used
retrieve the values of the parameters contained in the received parameter
card.
5.2.8. ODETTE exit function
- ExitOdtGetAppli
Called by ODETTE receiver side on reception of SFID FPDU. It is used to
retrieve name of the Inter.Pel application object.
Exits parameters are supplied in C data structures. Although common exits use the
same structure regardless of the protocol, some of the fields have different
meaning according the protocol used.
See "Exit appendix" section for details on the structures and parameters.
5.2.9. FTP exit function
- ExitFtpGetAppli
Called by the FTP receiver side on reception of STOR or STOU FPDU. It is
used to retrieve the name of the Inter.Pel application object.
Exit parameters are supplied in C data structures. Although common exits use the
same structure regardless of the protocol, some of the fields have different
meanings according to the protocol used.
See "Exit appendix" section for details on the structures and parameters.
5.2.10. Identification check for network client connection request
- ExitCSLogin
Called by the server of the client graphical user interface. It is used to check
the user name and password received from the client.
5. EXIT FUNCTIONS C Programming Manual Page 45
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.2.11. User Access Control Exits
The user Access Control Exits is used to insert your own control algorithms or to
connect to the existing system security package for resources access validation.
They are made up of the following routines, grouped in a single C source file
named exitsecu.c.
Note that unless all user access control exits are in a shared library (such as DLL),
you have to re-link the monitor executable (p_sup or p_sup.exe), when any of
them is modified.
- ExitCheckUserLogin
Called when the Monitor receives a user login request. This is where you
can validate users' identification and password.
- ExitCheckUserAccess
Called by the Monitor when a user requests to access a protected resource
such as site, application, transfer request, log file etc. Via this routine, you
can determine precisely who can do what.
- ExitCheckFileAccess
Called by the Monitor when a user requests to send or receive a file. through
this exit, you can grant or deny a user's access to individual files.
- ExitCheckUserLogout
Called by the Monitor when a user ends his login session.
5.2.12. User Login Parameters Exits
The user Login Parameters Exit allows you to program users' login name and
password, so that they don't have to supply these informations on every
commands. This routine is found in a C source file named EXITCLNT.C:
- ExitLoginParam
Called by the client program when a user issues a login request.
5.2.13. Generic protocol connection Exit
The generic protocol connection exit allows you to control incoming protocol
connection and change protocol session characteristics (change rules depend on
protocol in use). This routine is found in a C source file named EXITPCNX.C
- ExitProtocolConnection
Called at each incoming protocol connection.
5. EXIT FUNCTIONS C Programming Manual Page 46
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.2.14. ETEBAC5 exit functions
These exit functions are only available in server mode. They are intended for the
bank to check validity of the parameters issued by the requester partner and abort
the transfer if something wrong occurs.
These routines are found in a C source file named ET5EXITB.C
- Et5ExitConnectInd
Called when a CONNECT fpdu is received.
- Et5ExitCreateInd
Called when a CREATE fpdu is received.
- Et5ExitSelectInd
Called when a SELECT fpdu is received.
- Et5ExitOpentInd
Called when a OPE N fpdu is received.
- Et5ExitDtfEndInd
Called when a DTF.END fpdu is received.
- Et5ExitTransEndInd
Called when a TRANS.END fpdu is received.
- Et5ExitDeselectInd
Called when a DESELECT fpdu is received.
5. EXIT FUNCTIONS C Programming Manual Page 47
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.3. Transfer exit scheduling order
The exit scheduling order depends on two things:
- The transfer partner side: requester or server
- The transfer direction: sender or responder
Transfer mode Transfer direction Scheduling order
Requester Sender
ExitBeginSend1
ExitBeginConnexion
ExitBeginSend2
ExitEndSend
Server Receiver
ExitBeginConnexion
ExitBeginReceive1
ExitBeginReceive2
ExitEndReceive
Requester Receiver
ExitBeginConnexion
ExitBeginReceive1
ExitBeginReceive2
ExitEndReceive
Server Sender
ExitBeginSend1
ExiitBeginConnexion
ExitBeginSend2
ExitEndSend
Inter.Pel writes a log message at each execution of a transfer exit function.
Note that only common exit routines are referenced in this layout.
5.4. Using guidelines
You must keep in mind the following rules when writing your code in exits
functions, otherwise you may prevent Inter.Pel from running:
- Do not call an exit function from an other exit function
- Do not call functions that may crash the product
- Do not call an API routine from an exit function
- Do not modify or delete the product's environment variables
- Check that the field is completed before using its values
- As Inter.Pel waits for the return of exits functions to continue its
processing, you must avoid using procedures that could block exits
functions
The meaning of some fields depends on the protocol used. See "Exit appendix"
section for details on exits parameters.
5. EXIT FUNCTIONS C Programming Manual Page 48
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5. Description of exits functions
5.5.1. ExitBeginConnexion
Syntax
#include "exituser.h"
int ExitBeginConnexion(ExitConn_t *exit)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : Normal behavior. The transfer processing continues
-1 : Causes the failure of the connection request. The connection request
will be re-submitted later
Description
The ExitBeginConnexion function is called:
- In requester (connection initiator) mode, before the protocol
identification phase
- In server (connection responder) mode, after the protocol
identification phase
The input structure ExitConn_t contains parameters describing the remote
site.
This exit can be used to check the calling remote site.
Note
A message is written in the log before and after each call.
5. EXIT FUNCTIONS C Programming Manual Page 49
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.2. ExitBeginSend1
Syntax
#include "exituser.h"
int ExitBeginSend1(ExitXfer_t *exit)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : Normal behavior. The transfer processing continues
-1 : The transfer is rejected and the corresponding transfer request is
canceled
Description
The ExitBeginSend1 function is called on the requester (connection
initiator) side, before the transfer request is written in the MAILBOX.
The input structure ExitXfer_t contains the transfer request parameters.
This exit is normally used to check transfer parameters before recording
them in the MAILBOX. Nevertheless, the user can modify parameters of the
input structure before returning. The transfer processing will continue with
the new values.
Note
A message is written in the log before and after each call.
Avoid modifying the parameters of the input structure, because it may cause
unpredictable behavior if some inconsistencies are introduced inadvertently.
5. EXIT FUNCTIONS C Programming Manual Page 50
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.3. ExitBeginReceive1
Syntax
#include "exituser.h"
int ExitBeginReceive1(ExitXfer_t *exit)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : Normal behavior. The transfer processing continues
-1 : The transfer is rejected and the corresponding transfer request is
canceled
Description
The ExitBeginReceive1 function is called on the server (connection
acceptor) side, before the transfer request is written in the MAILBOX.
The input structure ExitXfer_t contains the transfer request parameters.
This exit is normally used to check the received transfer parameters before
recording them in the MAILBOX. However, the user can modify parameters
of the input structure before returning. The transfer processing will continue
with the new values.
Note
A message is written in the log before and after each call.
Avoid modifying the parameters of the input structure, because it may cause
unpredictable behavior if some inconsistency is introduced inadvertently.
5. EXIT FUNCTIONS C Programming Manual Page 51
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.4. ExitBeginSend2
Syntax
#include "exituser.h"
int ExitBeginSend2(ExitXfer_t *exit)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : Normal behavior. The transfer processing continues
-1 : The transfer is rejected and the corresponding transfer request is
canceled
Description
The ExitBeginSend2 function is called on the requester side, before the
data transmission phase.
The input structure ExitXfer_t contains the transfer request parameters.
This exit is normally used to check transfer parameters such as file attributes
before starting file data transfer. However, the user can modify parameters
of the input structure before returning. The transfer processing will continue
with the new values.
Note
A message is written in the log before and after each call.
Avoid modifying the parameters of the input structure, because it may cause
unpredictable behavior if some inconsistencies introduced inadvertently.
5. EXIT FUNCTIONS C Programming Manual Page 52
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.5. ExitBeginReceive2
Syntax
#include "exituser.h"
int ExitBeginReceive2(ExitXfer_t *exit)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : Normal behavior. The transfer processing continues
-1 : The transfer is rejected and the corresponding transfer request is
canceled
Description
The ExitBeginReceive2 function is called on the server side, before the
data reception phase.
The input structure ExitXfer_t contains the transfer request parameters.
This exit is normally used to check transfer parameters such as file attributes
before starting file data transfer. Nevertheless, the user can modify
parameters of the input structure before returning. The transfer processing
will continue with the new values.
Note
A message is written in the log before and after each call.
Avoid modifying the parameters of the input structure, because it may cause
unpredictable behavior if some inconsistencies are introduced inadvertently.
5. EXIT FUNCTIONS C Programming Manual Page 53
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.6. ExitEndSend
Syntax
#include "exituser.h"
int ExitEndSend(ExitXfer_t *exit)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : Normal behavior. The transfer processing continues
No other return value is allowed
Description
The ExitEndSend function is called on the sender side, after the transfer is
terminated.
The input structure ExitXfer_t contains the transfer request parameters.
This exit is normally used to automate post-transfer processing.
Note
A message is written in the log before and after the function call.
5. EXIT FUNCTIONS C Programming Manual Page 54
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.7. ExitEndReceive
Syntax
#include "exituser.h"
int ExitEndReceive(ExitXfer_t *exit)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : Normal behavior. The transfer processing continues
No other return Value is allowed
Description
The ExitEndReceive function is called on the receiver side, after the
transfer is terminated.
The input structure ExitXfer_t contains the transfer request parameters.
This exit is normally used to automate post-transfer processing.
Note
A message is written in the log before and the function call.
5. EXIT FUNCTIONS C Programming Manual Page 55
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.8. ExitCSLogin
Syntax
#include "exituser.h"
int ExitCSLogin(char * username, char * password)
Return value
1 : The user is authorized
0 : The password is not recognized. The connection request is rejected
Description
The ExitCSLogin function is called to check the identification of a user
who attempts to connect to Inter.Pel from a remote client station.
The input parameters are the login name or username: username and
password: password.
Note
This exit function is linked with the client station server process.
5. EXIT FUNCTIONS C Programming Manual Page 56
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.9. ExitLogArchived
Syntax
#include "exitlog.h"
int ExitLogArchived(char * path_name)
Return value
0 : No other return value is implemented in this version
Description
The ExitLogArchived function is called after a log file has been archived if
asynchronous batch processing program for log archiving is not used.
The input parameter path_name is the name of the file to be archived.
Note
This exit function is linked with the "SYS" process of Inter.Pel.
5. EXIT FUNCTIONS C Programming Manual Page 57
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.10. ExitLogMessage
Syntax
#include "exitlog.h"
int ExitLogMessage(LogMessage *msg, char * text)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : No other return value is implemented in this version
Description
ExitLogMessage function is called before a record is written in Inter.Pel log
file.
Input parameters:
- msg : Pointer to the message descriptor
- text : Pointer to the message text
The message descriptor contains the following parameters (their type is:
time_t time_stamp date of the event corresponding to the
message
char ident[20+1] message identification (example:
SUP101W)
int param_count number of variable parameters in the
message
(information not supplied in this version)
char *param_value[20] values of variable parameters in the message
(information not supplied in this version)
This function is used to automate processing on the occurrence of
pre-selected log messages.
Note
A list of log message identifiers is supplied in "Exit appendix" section. A
example of exit log implementation is also provided.
This exit function is linked with the "SYS" process of Inter.Pel.
5. EXIT FUNCTIONS C Programming Manual Page 58
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.11. ExitStatArchived
Syntax
#include "exitstat.h"
int ExitStatArchived(char * path_name)
Return value
0 : No other return value is implemented in this version.
Description
The ExitStatArchived function is called after a stat file has been archived if
asynchronous batch processing program for statistics archiving is not used.
The input parameter path_name is the name of the file to be archived.
Note
This exit function is linked with the "SYS" process of Inter.Pel.
5. EXIT FUNCTIONS C Programming Manual Page 59
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.12. ExitStatMessage
Syntax
#include "exitstat.h"
int ExitStatMessage(NotifXferRecord_t *param)
See "Exit appendix" section for the full description of the structure used.
Return value
0 : No statistics record is to be formatted
n : Statistics record format number to be formatted by Inter.Pel
Description
ExitStatMessage function is called before a statistics record is formatted
and written in the Inter.Pel stat file.
Input parameters:
- param : Pointer to the public structure of the transfer parameter
Note
This function can be use for creating a specific user STAT file.
This exit function is linked with the "SYS" process of Inter.Pel.
5. EXIT FUNCTIONS C Programming Manual Page 60
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.13. ExitPesitPreConnection
Syntax
#include "exituser.h"
int ExitPesitPreConnection(
char *userID,
char *password,
char *requester,
int bufsz
)
Return value
1 : Accept the pre-connection request
-1 : Refuse the pre-connection request
Description
Input parameters:
USER ID : User ID from the received pre-connection message
PASSWORD : Password from the received pre-connection message
REQUESTER : Associated requester ID to validate
buf size : Buffer size of "requestor" field
Note
Upon reception of a PeSIT pre-connection message, this routine is called to
allow user to validate the message's contents (user ID and password).
If the return code is 1, the request is accepted and a PeSIT ACK message is
sent.
If the return code is -1, the request is rejected and a PeSIT NAK message is
sent.
Other return code values are reserved for future enhancements.
In case of acceptance, the "requester" field can also be filled to indicate the
expected requester ID in the coming FPDU_CONNECT.
In this case, the requester ID (PI_3) in the coming FPDU_CONNECT must
match the specified value. Otherwise the FPDU_CONNECT will be rejected
with a diagnostic = 304 (unauthorized requester ID).
If the "requester" is not filled, PI_3 value will only be validated according to
INTER.PEL site definition as usual.
All character fields are passed in the local machine's character set in this
EXIT.
5. EXIT FUNCTIONS C Programming Manual Page 61
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.14. ExitPesitMsg
Syntax
#include "exituser.h"
int ExitPesitMsg(
char *origin,
char *destination,
int file_type,
char *file_name,
int xfer_id,
unsigned char *msg,
int len
)
Return value
0 : No other return value is implemented in this version
Description
This function is a PeSIT user exit routine. It is called on reception of
FPDU_MSG (PI 91) .
Input parameters:
Origin : PI 3
Destination : PI 4
File type : PI 11
File name : PI 12
Transfer ID : PI 13
Msg : PI 91
Len : Length of msg
On return, FPDU_ACKMSG is sent to the partner site with PI 2 (diagnostic
code) equal zero.
Note
Note that the 'MSG' field received is converted into local machine's
character set before passing to this exit function.
5. EXIT FUNCTIONS C Programming Manual Page 62
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.15. Et3EncodeParameters
Syntax
#include "et3publi.h"
int Et3EncodeParameters(
struct Et3Parameters *param,
char *buffer,
int length
)
See "Exit appendix" section for the full description of the structure used.
Return value
> 0 : Length (in bytes) of the buffer that contains the formatted parameter
card
-1 : An error has been detected during the parameter card formatting.
ETEBAC3 cancels the client attempt to connect to the bank
Description
Et3EncodeParameters exit function is called by ETEBAC3 client to
format the parameter card before sending it to its bank.
The parameter card is coded in EBCDIC characters using information
contained in Inter.Pel parameter card (Et3Parameters structure). It is
formatted agreed by the bank.
Diagnostic
If an error is detected (function return code -1), param->return_code field
of Et3Parameters card is used to return the diagnostic code of the error.
Note
A log message is supplied to help the user follow the exit activity. To use
this facility, call the function:
LogPrintf(LOG_INFO, "<format>", arg1, arg2, ...).
Example:
LogPrintf(LOG_INFO,"CARD_TO_SEND[%s/%d]\n",buffer,coded_len);
5. EXIT FUNCTIONS C Programming Manual Page 63
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.16. Et3DecodeParameters
Syntax
#include "et3publi.h"
int ExitDecodeParameters(
struct Et3Parameters *param,
char *buffer,
int length
)
See "Exit appendix" section for the full description of the structure used.
Return value
> 0 : Length (in bytes) of the buffer that contains the received parameter
card
-1 : An error has been detected during the parameters retrieving.
ETEBAC3 rejects the parameter card
Description
Et3DecodeParameters exit function is called by ETEBAC3 bank to
retrieve information contained in the incoming parameter card.
It used the information to fill Inter.Pel parameter card (Et3Parameters
structure) before transmitting it to the monitor.
The parameter card is coded in EBCDIC characters. Its format must be
known to the bank.
Diagnostic
If an error is detected (function return code -1), param->return_code field
of Et3Parameters card is used to return the diagnostic code of the error.
Note
A log message is supplied to help the user follow the exit activity.
To use this facility, call the function:
LogPrintf(LOG_INFO, "<format>", arg1, arg2, ...).
Example:
LogPrintf(LOG_INFO,"RECV_CARD[%s/%d]\n",buffer,coded_len);
5. EXIT FUNCTIONS C Programming Manual Page 64
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.17. ExitOdtGetAppli
Syntax
#include "exituser.h"
char *ExitOdtGetAppli(char *dest_alias,
char *file_name,
time_t date,
char *user_field,
char *destination,
char *originator
char *buffer,
int len
)
char *filename,......... /* content of file data set name field in SFID fpdu */
time_t date,............... /* date and time field of SFID fpdu convert in time_t format */
char *user_field,....... /* content of user field in SFID fpdu */
char *destination,..... /* alias name of final destination */
char *originator,......../* alias name of origin */
char *buffer,............. /* buffer to store application name */
int len)...................... /* max len of buffer parameter */
{
The arguments are described below.
Return value
0 : Application found in user exit
1 : Use of default application for FTP
2 : Application not found
Description
This function is a Odette user exit routine. It is called on reception of FPDU
SFID. It is used when both FILE DATASET NAME and USER MESSAGE
fields are already used by remote partner. This exit function is called only if
requested in remote site object (get_appli_method attribute).
Input parameters:
file name : FILE DATASET NAME
date : DATE & TIME
user_field : User field in SFID fpdu
destination : DESTINATION
originator : ORIGINATOR
Output parameters:
buffer : Application returned by user
len : Length of buffer
5. EXIT FUNCTIONS C Programming Manual Page 65
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Note
Note that the text fields received are converted into a local machine
character set before passing to this exit function.
5. EXIT FUNCTIONS C Programming Manual Page 66
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.18. ExitFtpGetAppli
Syntax
#include exituser.h
int ExitFtpGetAppli(char *dest_alias,
char *file_name,
short data_code,
char *appli,
char *destination,
char *origin,
char *buffer,
int len
)
Return value
0 : Application found in user exit
1 : Use of default application for FTP
2 : Application not found
Description
This function is a FTP user exit routine. It is called on reception of STOU or
STOR FTP commands. This exit function is called only if requested in
remote site object (that means that the get_appli_method attribute on the
remote site is set to APPLI_IN_USER_EXIT).
Input parameters:
- dest_alias : Remote physical site on current connection
- filename : FTP filename
- data_code : FTP data code used (ASCII, EBCDIC or BINARY)
- appli : Application name received with P_APPLI
<application_name> special Inter.Pel SITE
command
- destination : Protocol destination of transfer
- origin : Protocol originator of transfer
- len : Size of output buffer
Output parameter:
- buffer : A string buffer of length len which contains
the application to use
On return, FTP completes the transfer request and makes it available to the
Supervisor.
5. EXIT FUNCTIONS C Programming Manual Page 67
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Note
Note that the text fields received are transcoded into the local machine
character set before being passed to this exit function.
5. EXIT FUNCTIONS C Programming Manual Page 68
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.19. ExitCheckUserLogin
Syntax
#include <exitsecu.h>
#include <itperr.h>
int ExitCheckUserLogin(void **reference, char *name, char *password)
Output parameter:
- Reference : A context reference created by you. It will be passed
as input parameter in every other security exit
routines to allow you to correlate an exit routine to a
particular login session
Input parameter:
- Name : User's login name
- Password : User's login password
Return value
- E_UALLOWED : Access accepted
- E_UDENIED : Access denied
- E_UUNDEFINED : Access to be determined by Inter.Pel according to
its internal user database definition
Description
This routine is called by the Monitor when a user login request is received.
You can insert your own control algorithms or connect to the existing
security package to validate the request.
If either E_UALLOWED or E_UDENIED is returned, the access will be
accepted or denied respectively by Inter.Pel. Otherwise it will be validated
by Inter.Pel according to the defined internal user database.
See also
ExitCheckUserAccess()
ExitCheckUserLogout()
5. EXIT FUNCTIONS C Programming Manual Page 69
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.20. ExitCheckUserAccess
Syntax
#include <exitsecu.h>
#include <itperr.h>
int ExitCheckUserAccess(void *reference, int resource, int access)
Input parameters:
- Reference: A context reference created by you in the
ExitCheckUserLogin routine. It is passed as input
parameter to allow you to correlate to a particular login
session
- Resource: Resource identifier. It can be any of the following:
USER_SITE : Site objets
USER_APPLICATION : Application objets
USER_TRANSFER : Transfer request objets
USER_LOGFILE : Event file
USER_MODEL : Model objets
USER_LIST : Diffusion list objets
USER_USER : User objets
USER_PROFILE : Access profile objets
- Access: access type. It can be any of the following:
USER_ACCESS_READ : Read only access
USER_ACCESS_WRITE : Add or create access
USER_ACCESS_UPDATE : Update access
USER_ACCESS_DELETE : Delete access
USER_ACCESS_ADMIN : Administration access
Return value
- E_UALLOWED : Access accepted
- E_UDENIED : Access denied
- E_UUNDEFINED : Access to be determined by Inter.Pel according to
its internal user database definition
Description
This routine is called by the Monitor when a user accesses a protected
resource. You can insert your own control algorithms or connect to the
existing security package to validate the request.
If either E_UALLOWED or E_UDENIED is returned, the access will be
accepted or denied respectively by Inter.Pel. Otherwise it will be validated
by Inter.Pel according to the defined internal user database.
5. EXIT FUNCTIONS C Programming Manual Page 70
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
See also
ExitCheckFileAccess()
ExitCheckUserLogin()
5. EXIT FUNCTIONS C Programming Manual Page 71
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.21. ExitCheckFileAccess
Syntax
#include <exitsecu.h>
#include <itperr.h>
int ExitCheckFileAccess(void *reference, char *fileID, int access)
Input parameters:
- Reference : A context reference created by you in the
ExitCheckUserLogin() routine. It is passed as input
parameter to allow you to correlate to a particular
login session
- FileID : File identifier
- Access : Access type
It is always:
USER_ACCESS_READ: read only access
Return value
- E_UALLOWED : Access accepted
- E_UDENIED : Access denied
- E_UUNDEFINED : Access to be determined by INTER.PEL according to
its internal user database definition
Description
This routine is called by the Monitor when a user accesses a protected
resource. You can insert your own control algorithms or connect to the
existing security package to validate the request.
If either E_UALLOWED or E_UDENIED is returned, the access will be
accepted or denied respectively by INTER.PEL. Otherwise it will always be
accepted.
See also
ExitCheckUserAccess()
ExitCheckUserLogin()
5. EXIT FUNCTIONS C Programming Manual Page 72
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.22. ExitCheckUserLogout
Syntax
#include <exitsecu.h>
#include <itperr.h>
int ExitCheckUserLogout(void *reference)
Input parameters:
- Reference : A context reference created by you in the
ExitCheckUserLogin() routine. It is passed as input
parameter to allow you to correlate to a particular
login session
Return value
Description
This routine is called by the Monitor when a user ends his login session. It is
designed to allow you to do your own housekeeping or cleanup procedure.
The return code is ignored.
See also
ExitCheckUserAccess()
ExitCheckUserLogin()
5. EXIT FUNCTIONS C Programming Manual Page 73
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.23. ExitCheckXferRequest
Syntax
#include <exitclnt.h>
int ExitCheckXferRequest(char *itp_user_name,
Input/output parameters:
- req : Transfer Request to check or modify
Input parameters:
- itp_user_name : Name of Inter.Pel's user (can be different from
system user name)
Return value
- E_UALLOWED : Access accepted
- E_UDENIED : Access denied
- E_UUNDEFINED : Access accepted
Description
This routine is called by a client program when a user issues a transfer
request.
Typical client programs are Inter.Pel commands and operator interface.
This exit function can be used for external security checking or to modify
transfer request according to Inter.Pel username or some others external
parameters (such as system user).
Note that in contrast to other user access control exits, which run on the
server side, this routine is called from a client program and runs on the client
side. Unless ExitCheckXferRequest is in a shared library (such as DLL), you
have to re-link all client programs, when this routine is modified.
5. EXIT FUNCTIONS C Programming Manual Page 74
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.24. ExitLoginParam
Syntax
#include <exitclnt.h>
void ExitLoginParam( char *username,
int name_size,
char *password,
int password_size)
Input/output parameters:
- Username : A buffer to hold the returned username to use
- Password : A buffer to hold the returned password to use
Input parameters:
- name_size : Username buffer size
- password_size : Password buffer size
Return value
Description
This routine is called by a client program when a user issues a login request.
Typical client programs are Inter.Pel commands and operator interface.
The username and password buffer may or may not contain a value,
depending on the client program used. Any how, you always have the
possibility to override the supplied value. It is recommended that you supply
a programmed username and password if, and only if the input buffers do
not have one.
Note that in contrast to other user access control exits, which run on the
server side, this routine is called from a client program and runs on the client
side. Unless ExitLoginParam is in a shared library (such as DLL), you have
to re-link all client programs, when this routine is modified.
See also
ExitCheckUserLogin()
5. EXIT FUNCTIONS C Programming Manual Page 75
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.25. ExitNetConnReq
Syntax
#include <itpndsp.h>
#include <commpath.h>
int ExitNetConnResp (CommPath_t *site_comm,
char *proto_ident,
NDSP_tp_entity_t *tp_entity,
int tp_nbr)
Input parameters:
- site_comm : Network address of remote site
(network type and address, userdata if any)
- proto_ident : Protocol identifier of remote site
-tp_entity : List of available F.T. protocol processes
-tp_nbr : Number of elements in tp_entity
Return value
n : Index of the entry selected in tp_entity (relative to zero)
-1 : Request is to be refused
-2 : Allows the monitor to select the first available protocol process
Description
This exit is called on the reception of an incoming connection request.
It allows user to select an appropriate protocol process to process the
request.
The selected F.T. protocol process must be of the same type as the one
defined for the remote site involved in the transfer.
Additionally, this remote site must have been defined with either X25 or
TCP network access method, and the selected F.T. protocol entity must be
accessible with type of network defined for the remote site.
Note
A message is written in log file before and after the calling to this exit
function.
5. EXIT FUNCTIONS C Programming Manual Page 76
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.26. ExitNetConnResp
Syntax
int ExitNetConnReq(CommPath_t *site_comm,
NDSP_tp_entity_t *tp_entity,
NDSP_net_entity_t net_list[],
int net_nbr)
Input parameters:
- site_comm : Network address of remote site
(network type and address, userdata if any)
- tp_entity : Protocol parameters to be used
(F.T. protocol name and stack name, ...)
-net_list : List of available network processes
-net_nbr : Number of elements in net_list
Return value
n : Index of the entry selected in net_list (relative to zero)
-1 : Request is to be refused
-2 : Allows the monitor to select the first available network process
Description
This exit is called before an outgoing connection request.
It allows user to select an appropriate network process to process the
request.
Only X25 and TCP type of network can be selected with this exit.
The corresponding remote site and the selected network process must have
the same type of access method (TCP, X25).
Note
A message is written in log file before and after the calling to this exit
function.
5. EXIT FUNCTIONS C Programming Manual Page 77
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.27. ExitProtocolConnection
Syntax
int ExitProtocolConnection(In_ExitProtoConn_t *in,
Out_ExitProtoConn_t *out)
Input parameters:
- in : Attributes provided by exit (network parameters and
protocol identifiers)
- out : Protocol attributes provided by exit (creation of
dynamic site, store and forward)
Return value
-1 : Protocol connection refused
0 : Protocol connection accepted with change on protocol attributes
1 : Protocol connection accepted with no change on protocol
attributes
Description
This exit is called at each new incoming protocol connection (see note for
more explanations).
It allows the user to control protocol connections regardless of network
entry, and to set some protocol attributes or redefine them (depending on
protocol in use).
The user can also affect the automatic route of the incoming transfer,
changing protocol originator and destination if needed by the route
destination.
Explanations on fields of in structure:
These fields specify to the user exit all the parameters available on
current protocol session on how to process the entry.
protocol Protocol in use
login_user For PSIT pre-connection
and FTP user name
login_password For PSIT pre-connection
and FTP user password
login_sap Incoming sap in use
client_ident For PSIT only
PI 3 in FPDU_CONNECT
server_ident For PSIT only
PI 4 in FPDU_CONNECT
client_password For PSIT only
PI 5 in FPDU_CONNECT
5. EXIT FUNCTIONS C Programming Manual Page 78
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Explanations on fields of the out structure:
These fields allow the user to change protocol characteristics and
define automatic route rules if needed.
label Label of entry found in user file used
by exit
For PSIT only
PI 5 in FPDU_ACONNECT
client_agent Alias of model site for dynamic site
creation from this model
client_ident Name of dynamic site
route_local_agent Local agent alias of the routed
transfer
route_remote_agent Remote agent alias of the routed
transfer
route_originator_ident Route originator protocol ident
route_destination_ident Route destination protocol ident
5. EXIT FUNCTIONS C Programming Manual Page 79
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.28. Et5ExitConnectInd
Syntax
int Et5ExitConnectInd(Et5ExitConnectInd_t *ind, int *diag)
Input parameters:
- ind : Connection indication data structure
Output parameters:
- diag : Diagnostic code to send if abort is required
Return value
0 : Accept the connection
-1 : Reject the connection, the transfer is to be aborted
Description
This exit is called when a CONNECT fpdu is received.
It allows the user to check the parameters of the fpdu.
The Et5ExitConnectInd data structure contains the following fields:
requester : Pi 3
server : Pi 4
password : 8 first bytes of Pi 5
new_password : 8 next bytes of Pi 5
version : Pi 6, set to 2 for V1 and 3 for V2
message : Pi 99, reference of the partner product V2
If -1 is returned, the monitor will abort the transfer, using the diagnostic
code supplies in diag or a default value if diag is let to 0.
5. EXIT FUNCTIONS C Programming Manual Page 80
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.29. Et5ExitCreateInd
Syntax
int Et5ExitCreateInd(NotifXferRecord_t *notif,
Et5ExitCreateInd_t *ind,
int *diag)
Input parameters:
- notif : Transfer notification data structure
- ind : Create indication data structure
Output parameters:
- diag : Diagnostic code to send if abort is required
Return value
0 : Accept the transfer
-1 : Reject the transfer, the transfer is to be aborted
Description
This exit is called when a CREATE fpdu is received.
It allows the user to check the parameters of the fpdu.
The NotifXferRecord data structure contains the following fields:
file_type : Pi 11
file_name : Pi 12
id_client : Pi 61
id_banque : Pi 62
id_client_sec : Pi 3 bis
id_banque_sec : Pi 4 bis
auth_type : Pi 71
seal_type : Pi 73
ciph_type : Pi 75
sign_type : Pi 77
Other fields of the notification may be not significant at this stage.
The Et5ExitCreateInd data structure contains the following fields:
accr_auth : Abstract of Pi 80, type, ident and authority key
number
password : 8 first bytes of Pi 5
new_password : 8 next bytes of Pi 5
If -1 is returned, the monitor will abort the transfer, using the diagnostic
code supplies in diag or a default value if diag is let to 0.
5. EXIT FUNCTIONS C Programming Manual Page 81
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.30. Et5ExitSelectInd
Syntax
int Et5ExitSelectInd(NotifXferRecord_t *notif,
Et5ExitSelectInd_t *ind,
int *diag)
Input parameters:
- notif : Transfer notification data structure
- ind : Select indication data structure
Output parameters:
- diag : Diagnostic code to send if abort is required
Return value
0 : Accept the transfer
-1 : Reject the transfer, the transfer is to be aborted
Description
This exit is called when a SELECT fpdu is received.
It allows the user to check the parameters of the fpdu.
The NotifXferRecord data structure contains the following fields:
file_type : Pi 11
file_name : Pi 12
id_client : Pi 61
id_banque : Pi 62
auth_type : Pi 71
seal_type : Pi 73
ciph_type : Pi 75
sign_type : Pi 77
Other fields of the notification may be not significant at this stage.
The Et5ExitSelectInd data structure contains the following fields:
accr_auth : Abstract of Pi 80, type, ident and authority key
number
password : 8 first bytes of Pi 63
new_password : 8 next bytes of Pi 63
If -1 is returned, the monitor will abort the transfer, using the diagnostic
code supplies in diag or a default value if diag is let to 0.
5. EXIT FUNCTIONS C Programming Manual Page 82
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.31. Et5ExitOpenInd
Syntax
int Et5ExitOpenInd(NotifXferRecord_t *notif,
Et5ExitOpenInd_t *ind,
int *diag)
Input parameters:
- notif : Transfer notification data structure
- ind : Open indication data structure
Output parameters:
- diag : Diagnostic code to send if abort is required
Return value
0 : Accept the transfer
-1 : Reject the transfer, the transfer is to be aborted
Description
This exit is called when a ORF fpdu is received.
It allows the user to check the parameters of the fpdu.
The NotifXferRecord data structure contains the transfer record.
The Et5ExitSelectInd data structure contains the following fields:
accr_sign1 : Abstract of Pi 80, type, ident and authority key
number
accr_sign2 : Abstract of Pi 83, type, ident and authority key
number. It has sense only if double signature is
required as signature type (see Pi 77)
If -1 is returned, the monitor will abort the transfer, using the diagnostic
code supplies in diag or a default value if diag is let to 0.
5. EXIT FUNCTIONS C Programming Manual Page 83
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.32. Et5ExitDtfEndInd
Syntax
int Et5ExitDtfEndInd(NotifXferRecord_t *notif,
Et5ExitDtfEndInd_t *ind,
int *diag)
Input parameters:
- notif : Transfer notification data structure
- ind : dtfend indication data structure
Output parameters:
- diag : Diagnostic code to send if abort is required
Return value
0 : Accept the transfer
-1 : Reject the transfer, the transfer is to be aborted
Description
This exit is called when a DTF.END fpdu is received.
The NotifXferRecord data structure contains the transfer record.
The Et5ExitDtfEndInd data structure contains no data and should be ignored
(reserved for future use).
If -1 is returned, the monitor will abort the transfer, using the diagnostic
code supplies in diag or a default value if diag is let to 0.
5. EXIT FUNCTIONS C Programming Manual Page 84
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.33. Et5ExitTransEndInd
Syntax
int Et5ExitTransEndInd(NotifXferRecord_t *notif,
Et5ExitTransEndInd_t *ind,
int *diag)
Input parameters:
- notif : Transfer notification data structure
- ind : Transend indication data structure
Output parameters:
- diag : Diagnostic code to send if abort is required
Return value
0 : Accept the transfer
-1 : Reject the transfer, the transfer is to be aborted
Description
This exit is called when a TRANSEND fpdu is received.
The NotifXferRecord data structure contains the transfer record.
The Et5ExitTransEndInd data structure contains no data and should be
ignored (reserved for future use).
If -1 is returned, the monitor will abort the transfer, using the diagnostic
code supplies in diag or a default value if diag is let to 0.
5. EXIT FUNCTIONS C Programming Manual Page 85
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
5.5.34. Et5ExitTransEndInd
Syntax
int Et5ExitDeselectInd(NotifXferRecord_t *notif,
Et5ExitDeselectInd_t *ind)
Input parameters:
- notif : Transfer notification data structure
- ind : Deselect indication data structure
Return value
0 : Unique return value
Description
This exit is called when a DESELECT fpdu is received.
It is intented to enable end transfer processing.
The NotifXferRecord data structure contains the transfer record.
The Et5ExitDeselectInd data structure contains no data and should be
ignored (reserved for future use).
The only returnable value is 0, as it is not possible to reject the transfer at
this stage of the protocolar exchange.
6. API APPENDIX C Programming Manual Page 86
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6. API APPENDIX
6.1. Description of API data structures
#ifndef PPP_ITPAPI_INCLUDED
#define PPP_ITPAPI_INCLUDED
#include <itpdefs.h>
#include <time.h>
#if !defined(ITPAPI_MODULE) && !defined(CHECKSIZ_MODULE) &&
!defined(PELTRANS_CMD)
#ifndef XFER_LOCK
#define XFER_LOCK 1
#else
#error Conflicting definition, stopping immediately ...
#endif
#endif
/**
** File Transfer Request Record Definition
** ---------------------------------------
**/
/*
* transfer request identifier
* ---------------------------
*/
typedef struct
{
long local_ident; /* request identifier */
} ItpXferIdent_t;
typedef struct
{
ItpXferIdent_t ident; /* request identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* Origin */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* Destination */
char local_agent[ITP_SITE_ALIAS_MAX+1]; /* local physical site */
char remote_agent[ITP_SITE_ALIAS_MAX+1]; /* remote physical site */
char file_type[ITP_PROTO_FILE_TYPE_MAX+1]; /* protocol file_type */
char file_name[ITP_PROTO_FILE_NAME_MAX+1]; /* protocol file_name */
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char rcv_msg[ITP_USER_MSGX_MAX+1]; /* rcv user message */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
short compression; /* compression */
short direction; /* direction: send, receive */
short mode; /* mode: initiator, responder, both */
short priority; /* priority: 0, ..., N */
short retry_count_max; /* maximum number of retries) */
time_t date_to_begin; /* start date */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
char dir_path[ITP_DIR_PATH_MAX+1]; /* directory pathname */
char dir_file[ITP_FILE_NAME_MAX+1]; /* file component name */
short rec_fmt; /* record format */
long rec_len; /* record length */
short data_code; /* data character set */
short padding; /* file padding character */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
long rec_count; /* number of records */
6. API APPENDIX C Programming Manual Page 87
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
long file_size; /* number of bytes */
long key_len; /* reserved */
long key_offset; /* reserved */
unsigned char text_file; /* text file ? 1=YES, 0=NO */
short alloc_unit; /* file allocation unit */
long alloc_size; /* file allocation size */
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
short state; /* state of request */
short retry_count; /* current number of retries */
long x_bytes; /* number of bytes transfered */
long f_bytes; /* number of file data bytes transfered */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
int last_end_reason; /* last superviser raison code */
int last_end_diag; /* last protocol diagnostic code */
int last_end_err; /* last programming error code */
char originator[ITP_SITE_ALIAS_MAX+1]; /* originator site name */
char destination[ITP_SITE_ALIAS_MAX+1]; /* destination site name */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
char end_xfer_scriptpath[ITP_FILE_NAME_MAX+1]; /* end_xfer script path */
/* used */
long master_ident; /* master request ident for broadcasting list */
long next_xfer; /* next request ident of a broadcasting list */
/*
* Attributs historiques PESIT
*/
time_t hist_create_date;
time_t hist_extract_date;
/* PeSIT HS store and forward info */
char snd_user[ITP_PESIT_USER_MAX+1];
char snd_appli[ITP_PESIT_APPLI_MAX+1];
char snd_text[ITP_PESIT_TEXT_MAX+1];
char rcv_user[ITP_PESIT_USER_MAX+1];
char rcv_appli[ITP_PESIT_APPLI_MAX+1];
char rcv_text[ITP_PESIT_TEXT_MAX+1];
/* PeSIT HS generic selection info */
long select_req; /* master request_ident for selection */
long interval; /* call frenquency */
short maxi_requests; /* maximum number of requests to issue */
short maxi_files; /* maximum number of files expected */
short total_requests; /* total number of requests generated */
short total_files; /* total number of files received */
unsigned char purge_option;
unsigned char processed;
unsigned char permanent;
unsigned char ack_option;
/* superseded fields */
char msg1[ITP_USER_MSG_MAX+1]; /* user message no 1 */
char msg2[ITP_USER_MSG_MAX+1]; /* user message no 2 */
unsigned char option_file; /* scratch file and user processed */
/* option*/
char filler[39];
} ItpPesitRecord_t;
typedef struct
{
ItpXferIdent_t ident; /* request identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* origin */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* destination */
6. API APPENDIX C Programming Manual Page 88
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
char local_agent[ITP_SITE_ALIAS_MAX+1]; /* local physical site */
char remote_agent[ITP_SITE_ALIAS_MAX+1]; /* remote physical site */
char appli[ITP_PROTO_FILE_TYPE_MAX+1]; /* appli_name for PEL */
short yday; /* julian day */
short sequence; /* sequence number */
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char rcv_msg[ITP_USER_MSGX_MAX+1]; /* rcv user message */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
short compression; /* compression */
short direction; /* direction: send, receive */
short mode; /* mode: initiator, responder, both */
short priority; /* priority: 0, ..., N */
short retry_count_max; /* maximum number of retries) */
time_t date_to_begin; /* start date */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
char dir_path[ITP_DIR_PATH_MAX+1]; /* directory pathname */
char dir_file[ITP_FILE_NAME_MAX+1]; /* file component name */
short rec_fmt; /* record format */
long rec_len; /* record length */
short data_code; /* data character set */
short padding; /* file padding character */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
long rec_count; /* number of records */
long file_size; /* number of bytes */
unsigned char text_file; /* text file ? YES / NO */
short alloc_unit; /* file allocation unit */
long alloc_size; /* file allocation size */
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
short state; /* state of request */
short retry_count; /* current number of retries */
long x_bytes; /* number of bytes transfered */
long f_bytes; /* number of file data bytes transfered */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
int last_end_reason; /* last superviser raison code */
int last_end_diag; /* last protocol diagnostic code */
int last_end_err; /* last programming error code */
char originator[ITP_SITE_ALIAS_MAX+1]; /* originator site name */
char destination[ITP_SITE_ALIAS_MAX+1]; /* destination site name */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
char end_xfer_scriptpath[ITP_FILE_NAME_MAX+1]; /* end_xfer script path */
/* used */
long master_ident; /* master request ident for broadcasting list */
long next_xfer; /* next request ident of a broadcasting list */
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent;
/* superseded */
unsigned char option_file; /* scratch file option and user processed */
/*option */
char msg1[ITP_USER_MSG_MAX+1]; /* user message no 1 */
char msg2[ITP_USER_MSG_MAX+1]; /* user message no 2 */
char filler[39];
} ItpPelRecord_t;
6. API APPENDIX C Programming Manual Page 89
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
typedef struct
{
ItpXferIdent_t ident; /* request identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* origin */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* destination */
char local_agent[ITP_SITE_ALIAS_MAX+1]; /* local physical site */
char remote_agent[ITP_SITE_ALIAS_MAX+1]; /* remote physical site */
char appli[ITP_PROTO_FILE_TYPE_MAX+1]; /* appli_name */
short yday; /* julian day */
short sequence; /* sequence number */
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char rcv_msg[ITP_USER_MSGX_MAX+1]; /* rcv user message */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
short compression; /* compression */
short direction; /* direction: send, receive */
short mode; /* mode: initiator, responder, both */
short priority; /* priority: 0, ..., N */
short retry_count_max; /* maximum number of retries) */
time_t date_to_begin; /* start date */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
char dir_path[ITP_DIR_PATH_MAX+1]; /* directory pathname */
char dir_file[ITP_FILE_NAME_MAX+1]; /* file component name */
short rec_fmt; /* record format */
long rec_len; /* record length */
short data_code; /* data character set */
short padding; /* file padding character */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
long rec_count; /* number of records */
long file_size; /* number of bytes */
unsigned char text_file; /* text file ? YES / NO */
short alloc_unit; /* file allocation unit */
long alloc_size; /* file allocation size */
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
short state; /* state of request */
short retry_count; /* current number of retries */
long x_bytes; /* number of bytes transfered */
long f_bytes; /* number of file data bytes transfered */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
int last_end_reason; /* last superviser raison code */
int last_end_diag; /* last protocol diagnostic code */
int last_end_err; /* last programming error code */
char originator[ITP_SITE_ALIAS_MAX+1]; /* originator site name */
char destination[ITP_SITE_ALIAS_MAX+1]; /* destination site name */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
char end_xfer_scriptpath[ITP_FILE_NAME_MAX+1]; /* end_xfer script path */
/* used */
long master_ident; /* master request ident for broadcasting list */
long next_xfer; /* next request ident of a broadcasting list */
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent;
/* superseded */
unsigned char option_file; /* scratch file option and user
processed option*/
6. API APPENDIX C Programming Manual Page 90
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
char msg1[ITP_USER_MSG_MAX+1]; /* user message no 1 */
char msg2[ITP_USER_MSG_MAX+1]; /* user message no 2 */
char filler[39];
} ItpEtb3Record_t;
typedef struct
{
ItpXferIdent_t ident; /* request identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* request origin */
char server[ITP_SITE_ALIAS_MAX+1]; /* server site name */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* file destination */
char appli[ITP_PROTO_FILE_TYPE_MAX+1]; /* appli_name for PEL */
short yday; /* julian day */
long interval; /* poll interval */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
short priority; /* priority: 0, ..., N */
short retry_count_max; /* maximum number of retries) */
time_t date_to_begin; /* start date */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
short state; /* state of request */
short retry_count; /* current number of retries */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
int last_end_reason; /* last superviser raison code */
int last_end_diag; /* last protocol diagnostic code */
int last_end_err; /* last programming error code */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
char end_xfer_scriptpath[ITP_FILE_NAME_MAX+1]; /* end_xfer script path */
/* used */
long master_ident; /* master request ident for broadcasting list */
long next_xfer; /* next request ident of a broadcasting list */
unsigned char purge_option; /* scratch file option */
/* superseded */
unsigned char option_file; /* scratch file option and user processed */
/* option */
char filler[39];
} ItpPelLotRecord_t;
typedef struct
{
ItpXferIdent_t ident; /* request identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* origin */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* destination */
char local_agent[ITP_SITE_ALIAS_MAX+1]; /* local physical site */
char remote_agent[ITP_SITE_ALIAS_MAX+1]; /* remote physical site */
char file_name[ITP_PROTO_FILE_NAME_MAX+1]; /* protocol file_name */
char snd_msg[ITP_USER_MSGX_MAX+1]; /* user message */
char rcv_msg[ITP_USER_MSGX_MAX+1]; /* user message */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
char appli[ITP_PROTO_FILE_TYPE_MAX+1]; /* appli_name */
6. API APPENDIX C Programming Manual Page 91
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
short compression; /* compression */
short direction; /* direction: send, receive */
short mode; /* mode: initiator, responder, both */
short priority; /* priority: 0, ..., N */
short retry_count_max; /* maximum number of retries) */
time_t date_to_begin; /* start date */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
time_t hist_create_date; /* protocolar creation date */
char dir_path[ITP_DIR_PATH_MAX+1]; /* directory pathname */
char dir_file[ITP_FILE_NAME_MAX+1]; /* file component name */
short rec_fmt; /* record format */
long rec_len; /* record length */
short data_code; /* data character set */
short padding; /* file padding character */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
long rec_count; /* number of records */
long file_size; /* number of bytes */
unsigned char text_file; /* text file ? YES / NO */
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
short state; /* state of request */
short retry_count; /* current number of retries */
long x_bytes; /* number of bytes transfered */
long f_bytes; /* number of file data bytes transfered */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
int last_end_reason; /* last superviser raison code */
int last_end_diag; /* last protocol diagnostic code */
int last_end_err; /* last programming error code */
char originator[ITP_SITE_ALIAS_MAX+1]; /* originator site name */
char destination[ITP_SITE_ALIAS_MAX+1]; /* destination site name */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
char end_xfer_scriptpath[ITP_FILE_NAME_MAX+1]; /* end_xfer script path */
/* used */
long master_ident; /* master request ident for broadcasting list */
long next_xfer; /* next request ident of a broadcasting list */
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent;
unsigned char ack_option;
/* superseded fields */
unsigned char option_file; /* scratch file option and user processed */
/*option*/
char msg[ITP_USER_MSG_MAX+1]; /* user message */
char filler[39];
} ItpOdtRecord_t;
typedef struct
{
ItpXferIdent_t ident; /* request identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* origin */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* destination */
char local_agent[ITP_SITE_ALIAS_MAX+1]; /* local physical site */
char remote_agent[ITP_SITE_ALIAS_MAX+1]; /* remote physical site */
char file_type[ITP_PROTO_FILE_TYPE_MAX+1]; /* protocol file_type */
char file_name[ITP_PROTO_FILE_NAME_MAX+1]; /* protocol file_name */
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
6. API APPENDIX C Programming Manual Page 92
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
char msg1[ITP_USER_MSG_MAX+1]; /* user message no 1 */
char msg2[ITP_USER_MSG_MAX+1]; /* user message no 2 */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
short compression; /* compression */
short direction; /* direction: send, receive */
short mode; /* mode: initiator, responder, both */
short priority; /* priority: 0, ..., N */
short retry_count_max; /* maximum number of retries) */
time_t date_to_begin; /* start date */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
char dir_path[ITP_DIR_PATH_MAX+1]; /* directory pathname */
char dir_file[ITP_FILE_NAME_MAX+1]; /* file component name */
short rec_fmt; /* record format */
long rec_len; /* record length */
short data_code; /* data character set */
short padding; /* file padding character */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
long rec_count; /* number of records */
long file_size; /* number of bytes */
long key_len; /* reserved */
long key_offset; /* reserved */
unsigned char text_file; /* text file ? YES / NO */
short alloc_unit; /* file allocation unit */
long alloc_size; /* file allocation size */
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
short state; /* state of request */
short retry_count; /* current number of retries */
long x_bytes; /* number of bytes transfered */
long f_bytes; /* number of file data bytes transfered */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
int last_end_reason; /* last superviser raison code */
int last_end_diag; /* last protocol diagnostic code */
int last_end_err; /* last programming error code */
char originator[ITP_SITE_ALIAS_MAX+1]; /* nom protocolaire origine */
char destination[ITP_SITE_ALIAS_MAX+1]; /* nom protocolaire destination */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
char end_xfer_scriptpath[ITP_FILE_NAME_MAX+1]; /* end_xfer script path */
/* used */
long master_ident; /* master request ident for broadcasting list */
long next_xfer; /* next request ident of a broadcasting list */
/*
* Attributs historiques PESIT
*/
time_t hist_create_date;
time_t hist_extract_date;
/*
* Parametres de securite Etebac5
*/
unsigned char id_client[ITP_ETB5_IDENT_MAX+1]; /* client identifier */
unsigned char id_banque[ITP_ETB5_IDENT_MAX+1]; /* banque identifier */
unsigned char id_client_sec[ITP_ETB5_IDENT_MAX+1]; /* secondary client id
*/
unsigned char id_banque_sec[ITP_ETB5_IDENT_MAX+1]; /* secondary banque id
*/
unsigned char auth_type; /* authentication type */
unsigned char seal_type; /* sealing type */
unsigned char ciph_type; /* ciphering type */
6. API APPENDIX C Programming Manual Page 93
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
unsigned char sign_type; /* signature type */
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char paraf_used; /* paraf utilise */
unsigned char rsign1_used; /* 1st signature remote */
unsigned char rsign2_used; /* 2nd signature remote */
unsigned char memo_type; /* memo file type */
char userarea[ITP_USERAREA_MAX+1]; /* free user area */
/* superseded */
unsigned char option_file; /* scratch file option and user processed */
/* option*/
char filler[1001];
} ItpEtb5Record_t;
typedef struct
{
ItpXferIdent_t ident; /* request identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* origin */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* destination */
char local_agent[ITP_SITE_ALIAS_MAX+1]; /* local physical site */
char remote_agent[ITP_SITE_ALIAS_MAX+1]; /* remote physical site */
char appli[ITP_PROTO_FILE_TYPE_MAX+1]; /* appli_name */
char file_type[ITP_PROTO_FILE_TYPE_MAX+1]; /* protocol file_type */
char file_name[ITP_PROTO_FILE_NAME_MAX+1]; /* protocol file_name */
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char rcv_msg[ITP_USER_MSGX_MAX+1]; /* rcv user message */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
short compression; /* compression */
short direction; /* direction: send, receive */
short mode; /* mode: initiator, responder, both */
short priority; /* priority: 0, ..., N */
short retry_count_max; /* maximum number of retries) */
time_t date_to_begin; /* start date */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
char dir_path[ITP_DIR_PATH_MAX+1]; /* directory pathname */
char dir_file[ITP_FILE_NAME_MAX+1]; /* file component name */
short rec_fmt; /* record format */
long rec_len; /* record length */
short data_code; /* data character set */
short padding; /* file padding character */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
long rec_count; /* number of records */
long file_size; /* number of bytes */
long key_len; /* reserved */
long key_offset; /* reserved */
unsigned char text_file; /* text file ? YES / NO */
short alloc_unit; /* file allocation unit */
long alloc_size; /* file allocation size */
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
short state; /* state of request */
short retry_count; /* current number of retries */
long x_bytes; /* number of bytes transfered */
long f_bytes; /* number of file data bytes transfered */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
6. API APPENDIX C Programming Manual Page 94
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
int last_end_reason; /* last superviser raison code */
int last_end_diag; /* last protocol diagnostic code */
int last_end_err; /* last programming error code */
char originator[ITP_SITE_ALIAS_MAX+1]; /* originator site name */
char destination[ITP_SITE_ALIAS_MAX+1]; /* destination site name */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
char end_xfer_scriptpath[ITP_FILE_NAME_MAX+1]; /* end_xfer script path */
/* used */
/*
* Attributs historiques PESIT
*/
time_t hist_create_date;
time_t hist_extract_date;
long next_xfer; /* first request ident of a broadcasting */
/* list */
unsigned short nb_ended; /* transfers ended in a broadcasting */
/* request */
unsigned short nb_to_begin; /* transfers to_begin in a broadcasting */
/* request */
unsigned short nb_canceled; /* transfers canceled in a broadcasting */
/* request */
unsigned short nb_suspended; /* transfers suspended in a broadcasting */
/* request */
unsigned short nb_frozen; /* transfers frozen in a broadcasting */
/* request */
unsigned short nb_progressing; /* transfers progressing/servicing in a */
/* broadcasting request */
unsigned short nb_others; /* transfers in other states in a */
/* broadcasting request */
unsigned short nb_total; /* transfers in a broadcasting request */
unsigned char purge_option;
unsigned char permanent;
/* superseded */
unsigned char option_file; /* scratch file option and user processed */
/* option*/
char msg1[ITP_USER_MSG_MAX+1]; /* user message no 1 */
char msg2[ITP_USER_MSG_MAX+1]; /* user message no 2 */
char filler[39];
} ItpListRecord_t;
typedef struct
{
ItpXferIdent_t ident; /* request identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* origin */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* destination */
char local_agent[ITP_SITE_ALIAS_MAX+1]; /* local physical site */
char remote_agent[ITP_SITE_ALIAS_MAX+1]; /* remote physical site */
char file_name[ITP_PROTO_FILE_NAME_MAX+1]; /* protocol file_name */
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char rcv_msg[ITP_USER_MSGX_MAX+1]; /* rcv user message */
char appli[ITP_PROTO_FILE_TYPE_MAX+1]; /* appli_name */
short compression; /* compression */
short direction; /* direction: send, receive */
short mode; /* mode: initiator, responder, both */
short priority; /* Priority: 0, ..., N */
short retry_count_max; /* maximum number of retries) */
time_t date_to_begin; /* start date */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
time_t hist_create_date; /* protocolar creation date */
6. API APPENDIX C Programming Manual Page 95
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
char dir_path[ITP_DIR_PATH_MAX+1]; /* directory pathname */
char dir_file[ITP_FILE_NAME_MAX+1]; /* file component name */
short rec_fmt; /* record format */
long rec_len; /* record length */
short data_code; /* data character set */
short padding; /* file padding character */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
long rec_count; /* number of records */
long file_size; /* number of bytes */
unsigned char text_file; /* text file ? YES / NO */
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
short state; /* state of request */
short retry_count; /* current number of retries */
long x_bytes; /* number of bytes transfered */
long f_bytes; /* number of file data bytes transfered */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
int last_end_reason; /* last superviser raison code */
int last_end_diag; /* last protocol diagnostic code */
int last_end_err; /* last programming error code */
char originator[ITP_SITE_ALIAS_MAX+1]; /* originator site name */
char destination[ITP_SITE_ALIAS_MAX+1]; /* destination site name */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
char end_xfer_scriptpath[ITP_FILE_NAME_MAX+1]; /* end_xfer script path */
/* used */
long master_ident; /* master request ident for broadcasting list */
long next_xfer; /* next request ident of a broadcasting list */
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent; /* for permanent transfer in mailbox */
unsigned char uniq_filename; /* for use store uniq instead of store ftp */
/* command */
char usercommand[ITP_USER_COMMAND_MAX+1]; /* specific ftp commands */
char filler[39];
} ItpFtpRecord_t;
/*
* Msg Request Data structure
*
* M : mandatory input field
* O : optional input field
* . : output field only
* x : not applicable
*/
#define ITP_BGROUP_MSG XFER_BGROUP_MSG
typedef struct
{
/* request operation */ /* GET PUT PUT */
/* request type */ /* . MSG EERP */
short type; /* M M M */
ItpXferIdent_t ident; /* M . . */
ItpXferIdent_t reply_to_xfer; /* . . M */
/* protocol identification */
char sender_alias[ITP_SITE_ALIAS_MAX+1]; /* . M . */
char receiver_alias[ITP_SITE_ALIAS_MAX+1]; /* . M . */
char file_name[ITP_PROTO_FILE_NAME_MAX+1]; /* . M . */
char file_type[ITP_PROTO_FILE_TYPE_MAX+1]; /* . . . */
6. API APPENDIX C Programming Manual Page 96
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
char xfer_ident[ITP_PROTO_IDENT_MAX+1]; /* . . . */
/* message source */
char snd_msg[ITP_USER_MSGX_MAX+1]; /* . O O */
char rcv_msg[ITP_USER_MSGX_MAX+1]; /* . . . */
long msg_size; /* O O O */
char *msg_buf; /* O O O */
char pathname[ITP_FILE_PATH_MAX+1]; /* O O O */
char appli[ITP_PROTO_FILE_NAME_MAX+1]; /* O O O */
/* message data code */
short data_code; /* . O O */
short xfer_data_code; /* . O O */
/* request schedule info */
char model_name[ITP_MODEL_NAME_MAX+1]; /* x O x */
time_t date_to_begin; /* . O O */
time_t date_to_end; /* . O O */
short priority; /* . O O */
short retry_count_max; /* . O O */
/* user application info */
char param1[ITP_USER_PARAM_MAX+1]; /* . O O */
char param2[ITP_USER_PARAM_MAX+1]; /* . O O */
/* execution context & statistics */
time_t date_create; /* . x x */
time_t date_begin; /* . x x */
time_t date_end; /* . x x */
time_t hist_create_date; /* . x x */
int state; /* . x x */
int last_end_reason; /* . x x */
int last_end_diag; /* . x x */
int last_end_err; /* . x x */
short yday; /* . x x */
short mode; /* . x x */
short direction; /* . x x */
char local_agent[ITP_SITE_NAME_MAX+1]; /* . x x */
char remote_agent[ITP_SITE_NAME_MAX+1]; /* . x x */
/* for debugging only */
int trace; /* O O O */
char err_msg[256]; /* . . . */
char filler[200];
} ItpMsgRecord_t;
/*
* transfer request record definition
* ----------------------------------
*/
typedef struct
{
short protocol; /* file transfer protocol identifier, NA
for list type */
short type; /* request type : LOT/POLL/TRANS/LIST ...
*/
union
{
ItpPelRecord_t pel; /* PEL protocol F.T. record */
ItpEtb3Record_t etb3; /* Etebac3 protocol F.T. record */
ItpPelLotRecord_t lot; /* PEL LOT command F.T. record */
ItpPesitRecord_t pesit; /* PeSIT protocol F.T. record */
ItpOdtRecord_t odt; /* Odette protocol F.T. record */
ItpEtb5Record_t etb5; /* Etebac5 protocol F.T. record */
ItpListRecord_t list; /* List request record */
ItpFtpRecord_t ftp; /* FTP request record */
6. API APPENDIX C Programming Manual Page 97
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
ItpMsgRecord_t msg; /* MSG/EERP request record */
} record;
unsigned char user_state;
char filler[500];
} ItpXferRecord_t;
/**
** File transfer request parameters for PeSIT
**/
typedef struct
{
char appli[ITP_APPLICATION_NAME_MAX+1];
char org_alias[ITP_SITE_ALIAS_MAX+1];
char dest_alias[ITP_SITE_ALIAS_MAX+1];
char model_name[ITP_MODEL_NAME_MAX+1];
char pathname[ITP_FILE_PATH_MAX+1];
short mode;
short direction;
short compression;
char file_type[ITP_PROTO_FILE_TYPE_MAX+1];
char file_name[ITP_PROTO_FILE_NAME_MAX+1];
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char msg1[ITP_USER_MSG_MAX+1];
char msg2[ITP_USER_MSG_MAX+1];
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
time_t date_to_begin;
time_t date_to_end;
time_t hist_create_date;
short priority;
short retry_count_max;
short rec_fmt; /* file record format */
long rec_len; /* file record length */
short data_code; /* file data code */
short padding;
long key_len; /* reserved */
long key_offset; /* reserved */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
unsigned char text_file;
short alloc_unit;
long alloc_size;
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent;
unsigned char ack_option;
/* PeSIT HS store and forward info */
char snd_user[ITP_PESIT_USER_MAX+1];
char snd_appli[ITP_PESIT_APPLI_MAX+1];
char snd_text[ITP_PESIT_TEXT_MAX+1];
char rcv_user[ITP_PESIT_USER_MAX+1];
char rcv_appli[ITP_PESIT_APPLI_MAX+1];
char rcv_text[ITP_PESIT_TEXT_MAX+1];
/* PeSIT HS generic selection info */
long interval; /* call frenquency */
short maxi_requests; /* maximum number of requests to issue */
short maxi_files; /* maximum number of files expected */
/* superseded fields */
unsigned char option_file; /* scratch file option and user */
/* processed option*/
6. API APPENDIX C Programming Manual Page 98
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
char filler[39];
} ItpPesitPut_t;
/**
** File transfer request parameters for PEL
**/
typedef struct
{
char appli[ITP_APPLICATION_NAME_MAX+1];
char org_alias[ITP_SITE_ALIAS_MAX+1];
char dest_alias[ITP_SITE_ALIAS_MAX+1];
char model_name[ITP_MODEL_NAME_MAX+1];
char pathname[ITP_FILE_PATH_MAX+1];
short mode;
short direction;
short compression;
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
time_t date_to_begin;
time_t date_to_end;
short priority;
short retry_count_max;
short rec_fmt; /* PEL1 only */
long rec_len; /* PEL1 only */
short data_code; /* PEL1 only */
short padding; /* PEL1 only */
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
short xfer_rec_fmt; /* PEL1 only */
long xfer_rec_len; /* PEL1 only */
short xfer_data_code; /* PEL1 only */
unsigned char text_file;
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent;
/* superseded fields */
unsigned char option_file; /* scratch file and user processed option*/
char msg1[ITP_USER_MSG_MAX+1];
char msg2[ITP_USER_MSG_MAX+1];
char filler[39];
} ItpPelPut_t;
/**
** File transfer request parameters for Etebac3
**/
typedef struct
{
char appli[ITP_APPLICATION_NAME_MAX+1];
char org_alias[ITP_SITE_ALIAS_MAX+1];
char dest_alias[ITP_SITE_ALIAS_MAX+1];
char model_name[ITP_MODEL_NAME_MAX+1];
char pathname[ITP_FILE_PATH_MAX+1];
short mode;
short direction;
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char msg1[ITP_USER_MSG_MAX+1];
char msg2[ITP_USER_MSG_MAX+1];
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
time_t date_to_begin;
time_t date_to_end;
6. API APPENDIX C Programming Manual Page 99
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
short priority;
short retry_count_max;
/* Request with no application */
short rec_fmt;
long rec_len;
short data_code;
short padding;
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
long xfer_rec_len;
short xfer_data_code;
unsigned char text_file;
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent;
/* superseded fields */
unsigned char option_file; /* scratch file option and user */
/* processed option*/
char filler[39];
} ItpEtb3Put_t;
/**
** File transfer request parameters for PEL - LOT command
**/
typedef struct
{
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* request org_alias */
char server[ITP_SITE_ALIAS_MAX+1]; /* server site name */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* file dest_alias */
char appli[ITP_APPLICATION_NAME_MAX+1]; /* application */
short yday; /* Julian day */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
char model_name[ITP_MODEL_NAME_MAX+1];
time_t date_to_begin; /* date to start */
time_t date_to_end; /* deadline date */
short priority; /* schedule priority */
long interval; /* call frenquency */
unsigned char purge_option; /* scratch file option */
unsigned char processed;
/* superseded */
unsigned char option_file; /* scratch file option and user */
/* processed option*/
char filler[39];
} ItpPelLotPut_t;
typedef struct
{
char appli[ITP_APPLICATION_NAME_MAX+1];
char org_alias[ITP_SITE_ALIAS_MAX+1];
char dest_alias[ITP_SITE_ALIAS_MAX+1];
char pathname[ITP_FILE_PATH_MAX+1];
char model_name[ITP_MODEL_NAME_MAX+1];
short mode;
short direction;
short compression;
char file_name[ITP_PROTO_FILE_NAME_MAX+1];
char snd_msg[ITP_USER_MSGX_MAX+1];
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
time_t date_to_begin;
time_t date_to_end;
time_t hist_create_date;
short priority;
short retry_count_max;
6. API APPENDIX C Programming Manual Page 100
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
short rec_fmt; /* file record format */
long rec_len; /* file record length */
short data_code; /* file data code */
short padding;
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
unsigned char text_file;
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent;
unsigned char ack_option;
/* superseded */
unsigned char option_file; /* scratch file option and user processed */
/* option*/
char msg[ITP_USER_MSG_MAX+1];
char filler[39];
} ItpOdtPut_t;
/**
** File transfer request parameters for Etebac5
**/
typedef struct
{
char appli[ITP_APPLICATION_NAME_MAX+1];
char org_alias[ITP_SITE_ALIAS_MAX+1];
char dest_alias[ITP_SITE_ALIAS_MAX+1];
char model_name[ITP_MODEL_NAME_MAX+1];
char pathname[ITP_FILE_PATH_MAX+1];
short mode;
short direction;
short compression;
char file_type[ITP_PROTO_FILE_TYPE_MAX+1];
char file_name[ITP_PROTO_FILE_NAME_MAX+1];
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
time_t date_to_begin;
time_t date_to_end;
time_t hist_create_date;
short priority;
short retry_count_max;
short rec_fmt; /* file record format */
long rec_len; /* file record length */
short data_code; /* file data code */
short padding;
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
long key_len; /* reserved */
long key_offset; /* reserved */
unsigned char text_file;
short alloc_unit;
long alloc_size;
unsigned char id_client[ITP_ETB5_IDENT_MAX+1]; /* client identifier */
unsigned char id_banque[ITP_ETB5_IDENT_MAX+1]; /* banque identifier */
unsigned char id_client_sec[ITP_ETB5_IDENT_MAX+1]; /* secondary client id */
unsigned char id_banque_sec[ITP_ETB5_IDENT_MAX+1]; /* secondary banque id */
unsigned char auth_type; /* authentication type */
unsigned char seal_type; /* sealing type */
unsigned char ciph_type; /* ciphering type */
6. API APPENDIX C Programming Manual Page 101
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
unsigned char sign_type; /* signature type */
unsigned char purge_opt; /* scratch file option */
unsigned char option_file; /* scratch file option and user processed */
/* option*/
unsigned char paraf_used; /* paraphe used */
unsigned char rsign1_used; /* 1st signature remote */
unsigned char rsign2_used; /* 2nd signature remote */
unsigned char memo_type; /* memo file type */
char userarea[ITP_USERAREA_MAX+1];/* free user area */
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent;
/* superseded */
char msg1[ITP_USER_MSG_MAX+1];
char msg2[ITP_USER_MSG_MAX+1];
char filler[1001];
} ItpEtb5Put_t;
typedef struct
{
char appli[ITP_APPLICATION_NAME_MAX+1];
char org_alias[ITP_SITE_ALIAS_MAX+1];
char dest_alias[ITP_SITE_ALIAS_MAX+1];
char model_name[ITP_MODEL_NAME_MAX+1];
char pathname[ITP_FILE_PATH_MAX+1];
short mode;
short direction;
short compression;
char file_type[ITP_PROTO_FILE_TYPE_MAX+1];
char file_name[ITP_PROTO_FILE_NAME_MAX+1];
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
char param1[ITP_USER_PARAM_MAX+1]; /* user param no 1 */
char param2[ITP_USER_PARAM_MAX+1]; /* user param no 2 */
time_t date_to_begin;
time_t date_to_end;
time_t hist_create_date;
short priority;
short retry_count_max;
short rec_fmt; /* file record format */
long rec_len; /* file record length */
short data_code; /* file data code */
short padding;
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
long key_len; /* reserved */
long key_offset; /* reserved */
unsigned char text_file;
short alloc_unit;
long alloc_size;
unsigned char purge_option; /* scratch file option */
unsigned char permanent;
/* superseded fields */
unsigned char option_file; /* scratch file option and user
processed option*/
char msg1[ITP_USER_MSG_MAX+1];
char msg2[ITP_USER_MSG_MAX+1];
char filler[39];
} ItpListPut_t;
6. API APPENDIX C Programming Manual Page 102
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
typedef struct
{
char appli[ITP_APPLICATION_NAME_MAX+1];
char org_alias[ITP_SITE_ALIAS_MAX+1];
char dest_alias[ITP_SITE_ALIAS_MAX+1];
char pathname[ITP_FILE_PATH_MAX+1];
char model_name[ITP_MODEL_NAME_MAX+1];
short mode;
short direction;
short compression;
char file_name[ITP_PROTO_FILE_NAME_MAX+1];
char snd_msg[ITP_USER_MSGX_MAX+1]; /* snd user message */
time_t date_to_begin;
time_t date_to_end;
time_t hist_create_date;
short priority;
short retry_count_max;
short rec_fmt; /* file record format */
long rec_len; /* file record length */
short data_code; /* file data code */
short padding;
char file_sys_dep_param[ITP_FILE_SYS_DEP_PARAM_MAX+1];
long block_size;
short xfer_rec_fmt; /* rec_fmt on transfert */
long xfer_rec_len; /* rec_len on transfert */
short xfer_data_code; /* data_code on transfert */
unsigned char text_file;
unsigned char purge_option; /* scratch file option */
unsigned char processed;
unsigned char permanent; /* for permanent transfer in mailbox */
unsigned char uniq_filename; /* for use store uniq instead of store */
/* ftp command */
char usercommand[ITP_USER_COMMAND_MAX+1]; /* specific ftp commands */
char filler[39];
} ItpFtpPut_t;
typedef ItpMsgRecord_t ItpMsgPut_t;
/**
** File transfer request parameters
**/
typedef struct
{
short protocol; /* protocol identifier : PEL/PeSIT ...NA */
/* for list request*/
short type; /* request type : TRANS/LOT/POLL/LIST ... */
union
{
ItpPelPut_t pel; /* PEL request parameters */
ItpEtb3Put_t etb3; /* Etebac3 request parameters */
ItpPelLotPut_t lot; /* PEL LOT command parameters */
ItpPesitPut_t pesit; /* PeSIT request parameters */
ItpOdtPut_t odt; /* PeSIT request parameters */
ItpEtb5Put_t etb5; /* Etebac5 request parameters */
ItpListPut_t list; /* PeSIT request parameters */
ItpFtpPut_t ftp; /* Ftp request parameters */
ItpMsgPut_t msg; /* MSG/EERP request parameters
*/
} param;
unsigned char user_state;
char filler[100];
} ItpXferPut_t;
6. API APPENDIX C Programming Manual Page 103
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
/*
* transfer request record address in file
* ---------------------------------------
*/
typedef struct
{
long file_pos;
} ItpXferRfa_t;
/**
** transfer request selection criteria
**/
typedef struct
{
int count_max; /* maximum number of records */
unsigned char user_state_p; /* user_state flag */
unsigned char user_state; /* user_state value */
long local_ident; /* request identifier */
short protocol; /* protocol identifier */
char org_alias[ITP_SITE_ALIAS_MAX+1]; /* file org_alias */
char dest_alias[ITP_SITE_ALIAS_MAX+1]; /* final dest_alias */
char local_agent[ITP_SITE_ALIAS_MAX+1]; /* local physical site */
char remote_agent[ITP_SITE_ALIAS_MAX+1];/* remote physical site */
short direction; /* transfer direction */
time_t created_after; /* range for ... */
time_t created_before; /* request creation date */
short state_list_len; /* number of entries */
short state_list_val[ITP_XFER_LIST_LEN];/* status to select */
char application[ITP_APPLICATION_NAME_MAX+1]; /* PEL only */
short yday; /* PEL only */
short sequence; /* PEL only */
char file_type[ITP_PROTO_FILE_TYPE_MAX+1]; /* PeSIT only */
char file_name[ITP_PROTO_FILE_NAME_MAX+1]; /* PeSIT only */
char user_name[ITP_USER_NAME_MAX+1]; /* xfer record's owner name */
long master_ident; /* master request ident for broadcasting list */
int type; /* transfer request type LIST/LOTS/POLL/TRANS */
char filler[100];
} ItpXferSelect_t;
/*
* Fonctions d'acces aux demandes de transfert
*/
#ifdef __cplusplus
extern "C" {
#endif
int ItpSessionOpen(char *, char *);
int ItpSessionOpenExt(char *, char *, char *);
int ItpSessionClose(void);
char *ItpErrMsg(void);
long ItpXferPut(ItpXferPut_t *param);
int ItpXferGet(int options, ItpXferIdent_t *ident, ItpXferRecord_t *xfer);
int ItpXferUpdate(ItpXferPut_t *param);
int ItpXferDelete(void);
6. API APPENDIX C Programming Manual Page 104
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
int ItpXferUnlock(void);
int ItpXferOpenSet(ItpXferSelect_t *sel);
int ItpXferGetNext(int options, ItpXferRecord_t *xfer);
int ItpXferCloseSet(void);
int ItpXferCancel(ItpXferIdent_t *ident);
int ItpXferSuspend(ItpXferIdent_t *ident);
int ItpXferResume(ItpXferIdent_t *ident);
int ItpMsgGet(int option, ItpMsgRecord_t *msgReq);
int ItpMsgPut(ItpMsgRecord_t *msgReq);
int ItpMsgDelete(ItpMsgRecord_t *msgReq);
#ifdef __cplusplus
}
#endif
#define ItpBegin ItpSessionOpen
#define ItpOpenSession ItpSessionOpen
#define ItpCloseSession ItpSessionClose
#define ItpInit() ItpSessionOpen(NULL, NULL)
#define ItpEnd ItpSessionClose
#define ApiInit() ItpSessionOpen(NULL, NULL)
#define ApiEnd ItpSessionClose
#define ApiErrMsg ItpErrMsg
#define ApiXferPut ItpXferPut
#define ApiXferGet ItpXferGet
#define ApiXferUpdate ItpXferUpdate
#define ApiXferDelete ItpXferDelete
#define ApiXferUnlock ItpXferUnlock
#define ApiXferSelect ItpXferSelect
#define ApiXferRead ItpXferRead
#define ApiXferCancel ItpXferCancel
#define ApiXferSuspend ItpXferSuspend
#define ApiXferResume ItpXferResume
#endif /* PPP_ITPAPI_INCLUDED */
6. API APPENDIX C Programming Manual Page 105
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2. Parameters used to submit or update a file transfer
6.2.1. ItpPelPut_t
Used to submit a transfer request using PEL protocol. M stands for mandatory.
"from appli" means that the default value is set from the corresponding attribute of
the application object (if any). In brackets is the default value used if the
application does not supply the field.
M stands for mandatory (request without a model).
Name Default Values Comment
appli "PEL1" Default name used
org_alias Local Inter.Pel name
dest_alias
model_name
pathname Full name (resolved) of the file to
send
mode ITP_MODE_INITIATOR
direction ITP_DIRECTION_OUT
compression ITP_COMP_UNDEFINED
snd_msg NULL Transmitted unchanged
date_to_begin 0 0 means "as soon as possible"
date_to_end 0 0 means: not used
priority 0
retry_count_max 5
rec_fmt From appli[ITP_REC_STREAM]
rec_len From appli[512]
data_code From appli[ITP_CODE_BINARY]
padding From appli [ITP_CODE_BINARY]
file_sys_dep_param From appli
block_size
xfer_rec_fmt From appli[ITP_REC_STREAM]
xfer_rec_len From appli[512]
xfer_data_code From appli[ITP_CODE_BINARY]
text_file From appli["N"]
text_file From appli["N"]
6. API APPENDIX C Programming Manual Page 106
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2.2. ItpPelLotPut_t
Used to submit a LOTS or POLL type transfer request. The protocol used must be
PEL.
This structure is used to transfer a file from a remote host to the local machine
(requester/receiver mode).
Note that "origin alias" is the site that send the file, and "dest alias" the site that
receives it.
M stands for mandatory.
Name Default Values Comments
org_alias M Inter.Pel local name
server M Inter.Pel remote name Must be supplied if different from Inter.Pel
org aliasname
dest_alias
appli
yday All days
date_to_begin 0 0 means "as soon as possible"
date_to_end 0 Not used
priority 0
interval
option_file
param1
param2
model_name
6. API APPENDIX C Programming Manual Page 107
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2.3. ItpPesitPut_t
Used to submit a transfer request using PeSIT Hors SIT protocol.
"from appli" means that the default value is set from the corresponding attribute of
the application object (if any). In brackets is the default value used if the
application does not supply the field.
M stands for mandatory.
Name Values Comment
appli "DEFAULT" Default name used by Inter.Pel. It
is transmitted in PI 12
org_alias M PI 3 if physical site
(requester/sender mode)
PI 61 if logical site (store &
forward mode)
Must be supplied if direction input
dest_alias M PI 4 if physical site (server/receiver
mode)
PI 62 if logical site (store &
forward mode)
Must be supplied if direction is
output
model_name
pathname M Full name of the file
Must be supplied if direction is
output
mode ITP_MODE_INITIATOR
direction ITP_DIRECTION_OUT
compression ITP_COMP_UNDEFINED PI 21
file_type M 0 PI 11
file_name M PI 12
snd_msg PI 99
param1
param2
date_to_begin 0 0 means "as soon as possible"
date_to_end 0 0 means: not used
hist_create_date 0 0 means: current date
priority 0
retry_count_max 5
rec_fmt From appli[ITP_REC_STREAM] PI 31
rec_len PI 32
data_code From
appli[ITP_CODE_BINARY]
PI 16
padding From appli [0x0]
file_sys_dep_param From appli
block_size
6. API APPENDIX C Programming Manual Page 108
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Name Values Comment
xfer_rec_fmt From appli[ITP_REC_STREAM] PI 31
xfer_rec_len From appli[512] PI 32
xfer_data_code From
appli[ITP_CODE_BINARY]
PI 16
key_len From appli [0] PI 38
key_offset From appli [0] PI 39
text_file
alloc_unit From appli
[ITP_ALLOC_UNIT_KBYTES
]
PI 41
alloc_size PI 42
option_file
snd_user PI3 (store and forward only)
snd_appli PI3 (store and forward only)
snd_text PI3 (store and forward only)
rcv_user PI4 (store and forward only)
rcv_appli PI4 (store and forward only)
rcv_text PI4 (store and forward only)
interval Cyclic selection only
maxi_files Cyclic selection only
maxi_requests Cyclic selection only
6. API APPENDIX C Programming Manual Page 109
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2.4. ItpEt3Put_t
Used to submit a transfer request using ETEBAC3 protocol.
"from appli" means that the default value is set from the corresponding attribute of
the application object (if any). In brackets is the default value used if the
application does not supply the field.
M stands for mandatory.
Name Values Comments
appli M
org_alias M Client site name
dest_alias M Bank site name
pathname M Full name of the file to transfer
Must be supplied if direction is output
mode ITP_MODE_INITIATOR
direction ITP_DIRECTION_OUT
msg1 Transmitted unchanged
msg2 Transmitted unchanged
param1
param2
date_to_begin 0 0 means "as soon as possible"
date_to_end 0 0 means: not used for the scheduling
priority 0
retry_count_max 5 Not used
rec_fmt ITP_REC_FIXED If supplied, must be the default value
rec_len
data_code ITP_CODE_BINARY
padding
file_sys_dep_param From appli
block_size
xfer_rec_len If supplied, must be the default value
xfer_data_code ITP_CODE_BINARY
text_file From appli["N"]
option_file
6. API APPENDIX C Programming Manual Page 110
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2.5. ItpOdtPut_t
Used to submit a transfer request using Odette protocol.
"from appli" means that the default value is set from the corresponding attribute of
the application object (if any). In brackets is the default value used if the
application does not supply the field.
M stands for mandatory.
Name Values Comment
appli "DEFAULT" Default name used by Inter.Pel. It is
transmitted in FILE DATASET NAME
or USER MESSAGE field of SFID
FPDU.
org_alias Local site of session.
dest_alias M Remote site of session
model_name
pathname M Full name of the file
Must be supplied if direction is output
mode ITP_MODE_INITIATOR
direction ITP_DIRECTION_OUT
compression ITP_COMP_UNDEFINED
file_name M FILE DATASET NAME field
msg USER MESSAGE field
param1
param2
date_to_begin 0 0 means "as soon as possible"
date_to_end 0 0 means: not used
hist_create_date 0 0 means: current date
priority 0
retry_count_max 5
rec_fmt From
appli[ITP_REC_STREAM]
FILE FORMAT field
rec_len MAXIMUM RECORD SIZE field
data_code From
appli[ITP_CODE_BINARY]
padding From appli [0x0]
file_sys_dep_param From appli
block_size
xfer_rec_fmt From
appli[ITP_REC_STREAM]
FILE FORMAT field
xfer_rec_len From appli[512] MAXIMUM RECORD SIZE field
xfer_data_code From
appli[ITP_CODE_BINARY]
text_file
option_file
6. API APPENDIX C Programming Manual Page 111
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2.6. ItpEtb5Put_t
Used to submit a transfer request using ETEBAC5 protocol.
"from appli" means that the default value is set from the corresponding attribute of
the application object (if any). In brackets is the default value used if the
application does not supply the field.
M stands for mandatory.
Name Values Comment
appli "DEFAULT" Default name used by Inter.Pel. It
is transmitted in PI 12
org_alias M PI 3 if physical site
(requester/sender mode)
PI 61 if logical site (store &
forward mode)
Must be supplied if direction is
input
dest_alias M PI 4 if physical site (server/receiver
mode)
PI 62 if logical site (store &
forward mode)
Must be supplied if direction is
output
model_name
pathname M Full name of the file
mode ITP_MODE_INITIATOR
direction ITP_DIRECTION_OUT
compression ITP_COMP_UNDEFINED PI 21
file_type M PI 11
file_name M PI 12
snd.msg
param1
param2
date_to_begin 0 0 means "as soon as possible"
date_to_end 0 0 means: not used
hist_create_date 0 0 means: current date
priority 0
retry_count_max 5
rec_fmt From appli[ITP_REC_STREAM] PI 31
rec_len PI 32
data_code From
appli[ITP_CODE_BINARY]
PI 16
padding From appli [0x0]
file_sys_dep_param From appli
6. API APPENDIX C Programming Manual Page 112
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Name Values Comment
block_size
xfer_rec_fmt From appli[ITP_REC_STREAM] PI 31
xfer_rec_len From appli[512] PI 32
xfer_data_code From
appli[ITP_CODE_BINARY]
PI 16
key_len From appli [0] PI 38
key_offset From appli [0] PI 39
text_file
alloc_unit From appli
[ITP_ALLOC_UNIT_KBYTES
]
PI 41
alloc_size PI 42
id_client From appli PI 61
id_banque From appli PI 62
id_client_sec From appli PI 3 in Create or Ack (Select)
id_banque_sec From appli PI 4 in Create or Ack (Select)
auth_type From appli
[ITP_AUTH_TYPE_UNUSED}
PI 71
seal_type From appli
[ITP_SEAL_TYPE_UNUSED}
PI 73
ciph_type From appli
[ITP_CIPH_TYPE_UNUSED}
PI 75
sign_type From appli
[ITP_SIGN_TYPE_UNUSED}
PI 77
option_file
paraf_used
rsign1_used
rsign2_used
memo_type
userarea
6. API APPENDIX C Programming Manual Page 113
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2.7. ItpFtpPut_t
Used to submit a transfer request using FTP protocol.
from appli means that the default value is set from the corresponding attribute of
the application object (if any). In brackets is the default value used if the
application does not supply the field.
M stands for mandatory.
Name Values Comment
appli DEFAULT Default name used by Inter.Pel. It is
transmitted in SITE command with P_APPLI
parameter if needed
org_alias Local site of session.
dest_alias M Remote site of session
pathname M Full name of the file
Must be supplied if direction is output
mode ITP_MODE_INITIATOR
direction ITP_DIRECTION_OUT
compression ITP_COMP_UNDEFINED
file_name M Used in STOR, STOU or RETR ftp command
date_to_begin 0 0 means as soon as possible
date_to_end 0 0 means: not used
hist_create_date 0 0 means: current date
priority 0
retry_count_max 5
rec_fmt From appli[ITP_REC_STREAM]
rec_len
data_code From appli[ITP_CODE_BINARY]
Padding From appli [0x0]
file_sys_dep_param From appli
Block_size
xfer_rec_fmt From appli[ITP_REC_STREAM]
xfer_rec_len From appli[512]
xfer_data_code From appli[ITP_CODE_BINARY]
text_file
permanent 0 Set this parameter to create a permanent file
transfer in responder/sender mode. Each
time this transfer is used, a duplicate one is
created in the mailbox and used as the real
transfer
6. API APPENDIX C Programming Manual Page 114
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2.8. ItpListPut_t
Used to submit a broadcasting request or a transfer request using a model.
"from appli" means that the default value is set from the corresponding attribute of
the application object (if any). In brackets is the default value used if the
application does not supply the field.
M stands for mandatory.
Name Values Comment
appli "DEFAULT"
org_alias M Alias site name or list name
Must be supplied if direction is input
dest_alias M Alias site name or list name
Must be supplied if direction is output
model_name Model name to apply on request
pathname M Full name of the file
mode ITP_MODE_INITIATOR
direction ITP_DIRECTION_OUT
compression ITP_COMP_UNDEFINED
file_type M
file_name M
snd.msg
param1
param2
date_to_begin 0 0 means "as soon as possible"
date_to_end 0 0 means: not used
hist_create_date 0 0 means: current date
priority 0
retry_count_max 5
rec_fmt From appli[ITP_REC_STREAM]
rec_len
data_code From appli[ITP_CODE_BINARY]
padding From appli [0x0]
file_sys_dep_param From appli
block_size
xfer_rec_fmt From appli[ITP_REC_STREAM]
xfer_rec_len from appli[512]
xfer_data_code From appli[ITP_CODE_BINARY]
key_len From appli [0]
key_offset From appli [0] PI 39
text_file
alloc_unit From appli
[ITP_ALLOC_UNIT_KBYTES]
PI 41
alloc_size PI 42
option_file
6. API APPENDIX C Programming Manual Page 115
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.2.9. ItpMsgPut_t
ItpMsgPut_t data structure is used by ItpXferPut primitive to submit a MSG
(PeSIT HS E only) or an EERP (PeSIT HS E and Odette) request.
The following table lists the required parameters. M stands for mandatory.
Note that reply_to_xfer is for EERP request only, and org_alias, dest_alias
and file_name are for MSG request only.
The optional message content can come from one of three sources: snd_msg,
msg_buf or pathname. They are mutually exclusive and taken in that order. If the
message is less than 255 bytes long, it should be specified in snd_msg field.
Otherwise either msg_buf or pathname can be used.
Name Default values Comment
type M ITP_TYPE_MSG
ITP_TYPE_EERP
MSG request
EERP request
reply_to_xfer M
org_alias M PI 3 if physical site
PI 61 if logical site
dest_alias M PI 4 if physical site
PI 62 if logical site
file_name M PI 12
snd_msg Inline message (PI 91)
msg_buf Inline message buffer (PI 91)
msg_size Inline message buffer size
pathname Fullpath name of the message file
appli "DEFAULT" Define the file attributes
data_code ITP_CODE_BINARY PI 16
xfer_data_code ITP_CODE_BINARY PI 16
date_to_begin 0 0 means "as soon as possible"
date_to_end 0 0 means: not used
hist_create_date Current date 0 means: current date
priority 0
retry_count_max 5 Maximum retries allowed
model_name Broadcasting list model name
param1 For user usage only
param2 For user usage only
6. API APPENDIX C Programming Manual Page 116
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3. Parameters used to retrieve a transfer attributes
6.3.1. ItpPelRecord_t
Used to retrieve a transfer request using PEL protocol.
The possible values are defined in "itpdefs.h" header file. The transfer local
identifier is the only input parameter. All other parameters are outputs.
Name Type Meaning
ident ItpXferIdent_t Local request identifier. Input parameter
org_alias char string Alias site name of the origin of the file
dest_alias char string Alias site name of the destination of the file
local_agent char string Local physical site
remote_agent char string Remote physical site
appli char string appli_name for PEL
yday short Julian day
sequence short Sequence number : rank (in the day) for transfers
using the application
msg1 char string User message no 1 : received unchanged
msg2 char string User message no 2 : received unchanged
param1 char string User param 1
param2 char string User param 2
compression short Compression mode
direction short Direction: send, receive
mode short Mode: initiator, responder, both
priority short Priority: 0, ..., N
retry_count_max short Maximum number of retries
date_to_begin time_t Transfer start date
date_to_end time_t Transfer deadline date
date_create time_t Transfer creation date
dir_path char string Directory pathname locating the file
dir_file char string File component name : name of the file
rec_fmt short Record format
rec_len long Record length
data_code short File data character code
padding short Padding character used
file_sys_dep_param char string Platform dependent field
block_size long Platform dependent field
rec_count long Number of records
file_size long File size (in bytes)
text_file unsigned char string Text file ? YES / NO
alloc_unit short File allocation unit: record, kilobytes
alloc_size long File allocation size (in number of records)
xfer_rec_fmt short Record format on transfer
xfer_rec_len long Record length on transfer
xfer_data_code short Data code on transfer
state short State of the transfer request
retry_count short Current number of retries
x_bytes long Number of bytes transferred
Name Type Meaning
6. API APPENDIX C Programming Manual Page 117
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
f_bytes long Number of file data bytes transferred
date_begin time_t Actual start date of the transfer
date_end time_t Actual end date of the transfer
last_end_reason int Last reason code reported
last_end_diag int Last protocol diagnostic code reported
last_end_err int Last programming error code reported
originator char string Origin protocol site name
destination char string Destination protocol site name
user_name char string User associated with the transfer request
end_xfer_scriptpath char string User associated with the transfer request
master_ident long Ident of the broadcasting list associated with this
transfer record
next_xfer long Next xfer of a broadcasting list
option_file unsigned char Scratch file and user processed flags
6. API APPENDIX C Programming Manual Page 118
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3.2. ItpPelLotRecord_t
Used to retrieve a LOTS or POLL type transfer request. The protocol used must be
PEL.
The possible values are defined in "itpdefs.h" header file. The transfer local
identifier is the only input parameter. All other parameters are outputs.
Name Type Meaning
ident ItpXferIdent_t Local request identifier
org_alias char string File origin site name
server char string Server site name
dest_alias char string File destination site name
appli char string Appli_name for PEL
yday short Julian day
interval long Polling interval
param1 char string User param 1
param2 char string User param 2
priority short Priority: 0, ..., N
retry_count_max short Maximum number of retries
date_to_begin time_t Transfer start date
date_to_end time_t Transfer deadline date
date_create time_t Transfer creation date
state short State of the transfer request
retry_count short Current number of retries
date_begin time_t Actual start date
date_end time_t Actual end date
last_end_reason int Last reason code reported. 0 means no reason
last_end_diag int Last protocol diagnostic code reported
last_end_err int Last programming error code reported
user_name char string User associated with the transfer request
end_xfer_scriptpath char string User associated with the transfer request
master_ident long Ident of the broadcasting list associated with
this transfer record
option_file unsigned char Scratch file and user processed flags
next_xfer long Next xfer of a broadcasting list
6. API APPENDIX C Programming Manual Page 119
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3.3. ItpPesitRecord_t
Used to retrieve a transfer request using PeSIT Hors SIT protocol.
The possible values are defined in "itpdefs.h" header file. The transfer local
identifier is the only input parameter. All other parameters are outputs.
Name Type PI Comments
ident ItpXferIdent_t Local request identifier: input
org_alias char string PI 3 Origin site alias name.
=PI61 if logical site
dest_alias char string PI 4 Destination site alias name.
=PI62 if logical site
local_agent char string PI 3 Local physical site
remote_agent char string PI 4 Remote physical site
file_type char string PI 11 Protocol file_type
file_name char string PI 12 Protocol file_name
snd_msg char string User message sent
rcv_msg char string User message received
param1 char string User param 1
char string User param 2
compression short PI 21 Compression type
direction short Direction: send, receive
mode short Mode: initiator, responder, both
priority short Priority: 0, ..., N
retry_count_max short Maximum number of retries for the
transfer
date_to_begin time_t Start date of the transfer
date_to_end time_t Deadline date to start the transfer
date_create time_t Creation date
dir_path char string Directory pathname
dir_file char string File component name
rec_fmt short PI 31 Record format
rec_len long PI 32 Record length
data_code short PI 16 Data character set
padding short File padding character
file_sys_dep_param char string Platform dependent parameter
block_size long Platform dependent parameter
rec_count long Number of records
file_size long Number of bytes
key_len long PI 38 Reserved
key_offset long PI 39 Reserved
text_file unsigned char string Text file ? YES / NO
alloc_unit short PI 41 File allocation unit
alloc_size long PI 42 File allocation size
xfer_rec_fmt short PI 31 Record format on transfer
xfer_rec_len long PI 32 Record length on transfer
xfer_data_code short PI 16 Data code on transfer
state short State of request
retry_count short Current number of retries
Name Type PI Comments
6. API APPENDIX C Programming Manual Page 120
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
x_bytes long Number of bytes transferred
f_bytes long Number of file data bytes transferred
date_begin time_t Effective start date
date_end time_t Effective end date
last_end_reason int Last Supervisor raison code
last_end_diag int Last protocol diagnostic code
last_end_err int Last programming error code
originator char string Protocol Name of originator
destination char string Protocol name of destination
user_name char string User associated with the transfer
request
end_xfer_scriptpath char string Script name associated with the
transfer
master_ident long Ident of the broadcasting list
associated with this transfer record
next_xfer long Next xfer of a broadcasting list
option_file unsigned char Scratch file and user processed flags
hist_create_date time_t PI 51 PeSIT historical Attributes
hist_extract_date time_t PI 52 PeSIT historical Attributes
snd_user char string PI 3
snd_appli char string PI 3 For store and forward only
snd_text char string PI 3 For store and forward only
rcv_user char string PI 4 For store and forward only
rcv_appli char string PI 4 For store and forward only
rcv_text char string PI 4 For store and forward only
select_req long Selection request identifier
interval int Selection : repetition interval
maxi_files short Selection : maximum files allowed
maxi_requests short Selection : maximumrequests allowed
total_files short Selection :total nbr of files selected
total_requests short Selection :total nbr of requests
6. API APPENDIX C Programming Manual Page 121
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3.4. ItpEt3Record_t
Used to retrieve a transfer request using ETEBAC3 protocol.
The possible values are defined in "itpdefs.h" header file. The transfer local
identifier is the only input parameter. All other parameters are outputs.
Name Type Meaning
ident ItpXferIdent_t Local request identifier
org_alias char string File origin
dest_alias char string File destination
local_agent char string Local physical site
remote_agent char string Remote physical site
appli char string appli_name for PEL
yday short Julian day
sequence short Sequence number
snd_msg char string User message sent1
rcv_msg char string User message received
param1 char string User param 1
param2 char string User param 2
compression short Compression mode
direction short Direction: send, receive
mode short Mode: initiator, responder, both
priority short Priority: 0, ..., N
retry_count_max short Maximum number of retries)
date_to_begin time_t Start date
date_to_end time_t Deadline date
date_create time_t Creation date
dir_path char string Directory pathname
dir_file char string File component name
rec_fmt short Record format
rec_len long Record length
data_code short Data character set
padding short File padding character
file_sys_dep_param char string
block_size long
rec_count long Number of records
file_size long Number of bytes
text_file unsigned char string Text file ? YES / NO
alloc_unit short File allocation unit
alloc_size long File allocation size
xfer_rec_fmt short Rec_fmt on transfer
xfer_rec_len long Rec_len on transfer
xfer_data_code short Data_code on transfer
state short State of request
retry_count short Current number of retries
x_bytes long Number of bytes transferred
6. API APPENDIX C Programming Manual Page 122
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Name Type Meaning
f_bytes long Number of file data bytes transferred
date_begin time_t Effective start date
date_end time_t Effective end date
last_end_reason int Last Supervisor raison code
last_end_diag int Last protocol diagnostic code
last_end_err int Last programming error code
originator char string Protocol name of originator
destination char string Protocol name of destination
-user_name char string User name associated with the transfer request
end_xfer_scriptpath char string Script name associated with the transfer
master_ident long Ident of the broadcasting list associated with this
transfer record
next_xfer long Next xfer of a broadcasting list
option_file unsigned char Scratch file and user processed flags
6. API APPENDIX C Programming Manual Page 123
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3.5. ItpOdtRecord_t
Used to retrieve a transfer request using Odette protocol.
The possible values are defined in "itpdefs.h" header file. The transfer local
identifier is the only input parameter. All other parameters are outputs.
Name Type Meaning
ident ItpXferIdent_t Local request identifier
org_alias char string File origin
dest_alias char string File destination
local_agent char string Local physical site
remote_agent char string Remote physical site
file_name char string Protocol file_name
msg char string User message
param1 char string User param 1
param2 char string User param 2
appli char string appli_name for PEL
compression short Compression mode
direction short Direction: send, receive
mode short Mode: initiator, responder, both
priority short Priority: 0, ..., N
retry_count_max short Maximum number of retries)
date_to_begin time_t Start date
date_to_end time_t Deadline date
date_create time_t Creation date
dir_path char string Directory pathname
dir_file char string File component name
rec_fmt short Record format
rec_len long Record length
data_code short Data character set
padding short File padding character
file_sys_dep_param char string
block_size long
rec_count long Number of records
file_size long Number of bytes
text_file unsigned char string Text file ? YES / NO
xfer_rec_fmt short Rec_fmt on transfer
xfer_rec_len long Rec_len on transfer
xfer_data_code short Data_code on transfer
state short State of request
retry_count short Current number of retries
x_bytes long Number of bytes transferred
f_bytes long Number of file data bytes transferred
date_begin time_t Effective start date
date_end time_t Effective end date
last_end_reason int Last Supervisor raison code
last_end_diag int Last protocol diagnostic code
6. API APPENDIX C Programming Manual Page 124
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Name Type Meaning
last_end_err int Last programming error code
originator char string Protocol name of originator
destination char string Protocol name of destination
user_name char string User name associated with the transfer request
end_xfer_scriptpath char string Script name associated with the transfer
master_ident long Ident of the broadcasting list associated with this
transfer record
next_xfer long Next xfer of a broadcasting list
option_file unsigned char Scratch file and user processed flags
6. API APPENDIX C Programming Manual Page 125
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3.6. ItpEtb5Record_t
Used to retrieve a transfer request using ETEBAC5 protocol.
The possible values are defined in "itpdefs.h" header file. The transfer local
identifier is the only input parameter. All other parameters are outputs.
Name Type PI Comments
ident ItpXferIdent_t Local request identifier: input
org_alias char string PI 3 Origin site alias name.
=PI61 if logical site
dest_alias char string PI 4 Destination site alias name.
=PI62 if logical site
local_agent char string PI 3 Local physical site
remote_agent char string PI 4 Remote physical site
file_type char string PI 11 Protocol file_type
file_name char string PI 12 Protocol file_name
snd_msg char string User message sent
rcv_msg char string User message received
param1 char string User param 1
param 2 char string User param 2
compression short PI 21 Compression type
direction short Direction: send, receive
mode short Mode: initiator, responder, both
priority short Priority: 0, ..., N
retry_count_max short Maximum number of retries for the
transfer
date_to_begin time_t Start date of the transfer
date_to_end time_t Deadline date to start the transfer
date_create time_t Creation date
dir_path char string Directory pathname
dir_file char string File component name
rec_fmt short PI 31 Record format
rec_len long PI 32 Record length
data_code short PI 16 Data character set
padding short File padding character
file_sys_dep_param char string Platform dependent parameter
block_size long Platform dependent parameter
rec_count long Number of records
file_size long Number of bytes
key_len long PI 38 Reserved
key_offset long PI 39 Reserved
text_file unsigned char string Text file ? YES / NO
alloc_unit short PI 41 file allocation unit
alloc_size long PI 42 File allocation size
xfer_rec_fmt short PI 31 Record format on transfer
xfer_rec_len long PI 32 Record length on transfer
6. API APPENDIX C Programming Manual Page 126
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Name Type PI Comments
xfer_data_code short PI 16 Data code on transfer
state short State of request
retry_count short Current number of retries
x_bytes long Number of bytes transferred
f_bytes long Number of file data bytes transferred
date_begin time_t Effective start date
date_end time_t Effective end date
last_end_reason int Last Supervisor raison code
last_end_diag int Last protocol diagnostic code
last_end_err int Last programming error code
originator char string Protocol name of originator
destination char string Protocol name of destination
user_name char string User name associated with the
transfer request
end_xfer_scriptpath char string Script name associated with the
transfer
master_ident long Ident of the broadcasting list
associated with this transfer record
next_xfer long Next xfer of a broadcasting list
option_file unsigned char Scratch file and user processed flags
hist_create_date time_t PI 51 PeSIT historical Attributes
hist_extract_date time_t PI 52 PeSIT historical attributes
id_client char string PI 61 Client identifier
id_banque char string PI 62 Bank identifier
id_client_sec char string PI 3 In Create or Ack(Select)
id_banque_sec char string PI 4 In Create or Ack(Select)
auth_type char PI 71 Authentication type
seal_type char PI 73 Sealing type
ciph_type char PI 75 Ciphering type
sign_type char PI 77 Signature type
paraf_used unsigned char
rsign1_used unsigned char
rsign2_used unsigned char
memo_type unsigned char
userarea char string
6. API APPENDIX C Programming Manual Page 127
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3.7. ItpFtpRecord_t
Used to retrieve a transfer request using FTP protocol.
The possible values are defined in itpdefs.h header file. The transfer local
identifier is the only input parameter. All other parameters are output parameters.
Name Type Meaning
ident ItpXferIdent_t Local request identifier
org_alias char string File origin
dest_alias char string File destination
local_agent char string Local physical site
remote_agent char string Remote physical site
file_name char string Protocol file_name
snd_msg char string User message to send using QUOTE or SITE ftp
command
rcv_msg char string User message received with SITE P_MSG special
product command
appli char string Appli_name used
compression short Compression mode
direction short Direction: send, receive
mode short Mode: initiator, responder, both
priority short Priority: 0, ..., N
retry_count_max short Maximum number of retries
date_to_begin time_t Start date
date_to_end time_t Deadline date
date_create time_t Creation date
dir_path char string Directory pathname
dir_file char string File component name
rec_fmt short Record format
rec_len long Record length
data_code short Data character set
padding short File padding character
file_sys_dep_param char string
block_size long
rec_count long Number of records
file_size long Number of bytes
text_file unsigned char string Text file ? YES / NO
xfer_rec_fmt short Rec_fmt on transfer
xfer_rec_len long Rec_len on transfer
xfer_data_code short Data_code on transfer
state short State of request
retry_count short Current number of retries
x_bytes long Number of bytes transferred
f_bytes long Number of file data bytes transferred
date_begin time_t Effective start date
6. API APPENDIX C Programming Manual Page 128
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Name Type Meaning
date_end time_t Effective end date
last_end_reason time_t Last Supervisor reason code
last_end_diag int Last protocol diagnostic code
last_end_err int Last programming error code
originator char string Protocol name of originator
destination char string Protocol name of destination
user_name char string User name associated with the transfer request
end_xfer_scriptpath char string Script name associated with the transfer
master_ident long Ident of the broadcasting list associated with this
transfer record
next_xfer long Next xfer of a broadcasting list
purge_option char Scratch file option
processed char Processed by user
uniq_filename unsigned char Set when remote ftp client used STOU (store uniq)
instead of STOR (store) ftp command
permanent unigned char For keeping transfer in mailbox (a duplicate one is
created for the real transfer).
6. API APPENDIX C Programming Manual Page 129
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3.8. ItpListRecord_t
Used to retrieve a broadcasting request.
The possible values are defined in "itpdefs.h" header file.
The broadcasting request local identifier is the only input parameter. All other
parameters are outputs.
Name Type Comments
ident ItpXferIdent_t Local request identifier: input
org_alias char string Origin site alias name.
=PI61 if logical site
dest_alias char string Destination site alias name.
=PI62 if logical site
local_agent char string Local physical site
remote_agent char string Remote physical site
-appli char string Appli used to submit the Broadcasting request
file_type char string Protocol file_type
file_name char string Protocol file_name
snd_msg char string User message sent
rcv_msg char string User message received
param 1 char string User param 1
param 2 char string User param 2
compression short Compression type
direction short Direction: send, receive
mode short Mode: initiator, responder, both
priority short Priority: 0, ..., N
retry_count_max short Maximum number of retries for the transfer
date_to_begin time_t Start date of the transfer
date_to_end time_t Deadline date to start the transfer
date_create time_t Creation date
dir_path char string Directory pathname
dir_file char string File component name
rec_fmt short Record format
rec_len long Record length
data_code short Data character set
padding short File padding character
file_sys_dep_param char string Platform dependent parameter
block_size long Platform dependent parameter
rec_count long Number of records
file_size long Number of bytes
key_len long Reserved
key_offset long Reserved
text_file unsigned char string Text file ? YES / NO
alloc_unit short File allocation unit
alloc_size long File allocation size
xfer_rec_fmt short Record format on transfer
xfer_rec_len long Record length on transfer
6. API APPENDIX C Programming Manual Page 130
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
Name Type Comments
xfer_data_code short Data code on transfer
state short State of request
retry_count short Current number of retries
x_bytes long Number of bytes transferred
f_bytes long Number of file data bytes transferred
date_begin time_t Effective start date
date_end time_t Effective end date
last_end_reason int Last Supervisor raison code
last_end_diag int Last protocol diagnostic code
last_end_err int Last programming error code
originator char string Protocol name of originator
destination char string Protocol name of destination
user_name char string User name associated with the transfer request
end_xfer_scriptpath char string Script name associated with the transfer
next_xfer long Next xfer of a broadcasting list
hist_create_date time_t PeSIT historical Attributes
hist_extract_date time_t PeSIT historical attributes
option_file unsigned char Scratch file and user processed flags7
nb_ended unsigned short Number of transfer request s ended
nb_to_begin unsigned short Number of transfer requests to begin
nb_canceled unsigned short Number of transfer requests canceled
nb_suspended unsigned short Number of transfer requests suspended
nb_frozen unsigned short Number of transfer requests frozen
nb_progressing unsigned short Number of transfer requests progressing or
servicing
nb_others unsigned short Number of transfer requests in an other state
nb_total unsigned short Number of transfer requests in the broadcasting list
6. API APPENDIX C Programming Manual Page 131
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.3.9. ItpMsgRecord_t
ItpMsgRecord_t data structure is used by ItpXferGet primitive to retrieve a
MSG (PeSIT HS E only) or an EERP (PeSIT HS E and Odette) request.
The only mandatory input parameter needed is the requested transfer id.
If the message is less than 255 bytes, it is returned in the snd_msg or rcv_msg
field. Otherwise you have to supply either msg_buf (together with msg_size) or
pathname to accommodate the message.
If the msg_size supplied is smaller than the available message length, the later is
truncated. The actually message size retrieved is also returned in msg_size.
If no msg_buf is supplied and pathname is specified, the message (if any) is
written out in the file identified by pathname.
All other fields are output only.
Name type Comment
ident long Transfer request identifier
type ITP_TYPE_MSG
ITP_TYPE_EERP
MSG request
EERP request
reply_to_xfer long
org_alias char string PI 3 if physical site
PI 61 if logical site
dest_alias char string PI 4 if physical site
PI 62 if logical site
file_name char string PI 12 : protocol file name
file_type char string PI 11 : protocol file type
xfer_ident char string PI 13 : protocol xfer id
snd_msg char string Inline message (sent)
rcv_msg char string Inline message (received)
msg_buf char string Inline message bfffer
msg_size int Inline message buffer size
pathname char string Full path to message file
appli char string Define the file attributes
hist_create_date time_t PI 51
data_code short PI 16
xfer_data_code short PI 16
date_to_begin time_t 0 means "as soon as possible"
date_to_end time_t 0 means: not used
priority short Transfer scheduling priority
retry_count_max short Maximum retries allowed
date_create time_t Transfer creation date
date_begin time_t Transfer begin date
date_end time_t Transfer end date
state int Transfer state
last_end_reason int Transfer termination reason
Name type Comment
6. API APPENDIX C Programming Manual Page 132
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
last_end_diag int Transfer termination protocol diag
last_end_err int Transfer termination error code
yday short Julian day
mode short Transfer mode : initiator| responder
direction short Transfer direction : IN | OUT
local_agent char string
remote_agent char string
model_name char string Broadcasting list model name
param1 char string For user usage only
param2 char string For user usage only
6. API APPENDIX C Programming Manual Page 133
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
6.6. Parameters used to select file transfers
Structure used: : ItpXferSelect_t .
When a parameter is not supplied, the selection is made on all possible values of
that parameter.
Default values used by a field that is not supplied in the request are all available
values for that field.
The selection map result from the intersection of all criteria.
Name Default values Meaning
count_max Not used
user_state_p Presence of user_state criterium
user_state Value of user_state
local_ident Local request identifier
protocol All protocols Protocol identifier
org_alias File originator
dest_alias Final destination
local_agent Local physical site
remote_agent Remote physical site
direction All directions Transfer direction
created_after Transfer request created after this date only
created_before Transfer request created before this date
only
state_list_len Actual number of status entries in the status
array ( max = 5 )
state_list_val Array of status selected ( max. len = 5)
application PEL only
yday PEL only : day number in the year (1, 366)
sequence PEL only : rank of the transfer in that day
file_type PeSIT only : protocol file type ( PI 11)
file_name PeSIT only : protocol file name (PI 12)
user_name User name associated with the transfer
request
master_ident Master identifier of the associated
broadcasting list
type Request type (TRANS/LIST/LOTS/POLL)
7. EXIT APPENDIX C Programming Manual Page 134
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
7. EXIT APPENDIX
7.1. Description of exits functions data structures
7.1.1. exituser.h
#ifndef PPP_EXITUSER_INCLUDED
#define PPP_EXITUSER_INCLUDED
/*
* exituser.h - header file for user exit routines
* -------------------------------------------------
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <exitconn.h>
#include <exitxfer.h>
#ifdef OS2
#include <process.h>
#endif
#ifdef NETWARE
#include <nwbindry.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
int ExitPesitMsg(char *origin, char *destination, int file_type,
char *file_name, int xfer_id, unsigned char *msg, int len);
int ExitFtpGetAppli(char *dest_alias, char *filename, short data_code, char
*appli,
char *destination, char *originator, char *buffer, int len);
int ExitLogArchived(char *path_name);
int ExitCSLogin(char *username, char *password);
/*
* user exit functions prototype
* -----------------------------
*/
int ExitBeginConnexion(ExitConn_t *exit);
int ExitEndConnexion(ExitConn_t *exit);
int ExitBeginReceive1(ExitXfer_t *exit);
int ExitBeginReceive2(ExitXfer_t *exit);
int ExitBeginSend1(ExitXfer_t *exit);
int ExitBeginSend2(ExitXfer_t *exit);
int ExitEndReceive(ExitXfer_t *exit);
int ExitEndSend(ExitXfer_t *exit);
int ExitErrorReceive(ExitXfer_t *exit);
int ExitErrorSend(ExitXfer_t *exit);
/* definition for ExitProtocolConnection() */
typedef struct {
int protocol; /* protocol in use */
char login_user[ITP_LOGIN_IDENT_MAX+1]; /* for PSIT pre-connection
and FTP user name */
char login_password[ITP_LOGIN_PASSWORD_MAX+1]; /* for PSIT pre-connection
and FTP user password */
char login_sap[ITP_NET_SAP_MAX+1]; /* incoming sap in used */
char client_ident[ITP_PROTO_IDENT_MAX+1]; /* for PSIT only
(PI 3 in FPDU_CONNECT) */
char server_ident[ITP_PROTO_IDENT_MAX+1]; /* for PSIT only
(PI 4 in FPDU_CONNECT) */
char client_password[ITP_PASSWORD_MAX+1]; /* for PSIT only
(PI 5 in FPDU_CONNECT) */
7. EXIT APPENDIX C Programming Manual Page 135
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
char filler[50]; /* for future use */
} In_ExitProtoConn_t;
#define EXIT_PC_LABEL_MAX 25
typedef struct {
char label[EXIT_PC_LABEL_MAX+1]; /* for output in log */
char server_password[ITP_PASSWORD_MAX+1]; /* for PSIT only
(PI 5 in FPDU_ACONNECT) */
char client_agent[ITP_PROTO_IDENT_MAX+1]; /* alias of client site */
char client_ident[ITP_PROTO_IDENT_MAX+1]; /* for FTP only
client protocol name */
char route_agent[ITP_PROTO_IDENT_MAX+1]; /* alias of route site */
char route_originator_ident[ITP_PROTO_IDENT_MAX+1];
/* route originator protocol
ident */
char route_destination_ident[ITP_PROTO_IDENT_MAX+1];
/* route destination protocol
ident */
char filler[50]; /* for future use */
} Out_ExitProtoConn_t;
int ExitProtocolConnection( In_ExitProtoConn_t *in, Out_ExitProtoConn_t *out );
/*
* Exit library functions prototype
* --------------------------------
*/
int ExitDisplayConn(ExitConn_t *exit, const char *logfile, const char *label);
int ExitExecConn(ExitConn_t *exit, char *cmdfile);
int ExitDisplayXfer(ExitXfer_t *exit, const char *logfile, const char *label);
int ExitExecXfer(ExitXfer_t *exit, char *cmdfile);
#ifdef __cplusplus
}
#endif
#endif /* PPP_EXITUSER_INCLUDED */
7.1.2. exitconn.h
#ifndef PPP_EXITCONN_INCLUDED
#define PPP_EXITCONN_INCLUDED
#include <itpdefs.h>
/*
* Macro for test and setting READ/WRITE flags of a field
* ----------------------------------------------------------------------
*/
#define ExitC_IsReadFlagSet(e,f) \
((e)->flag_read[(EXITC_##f)/8] & (1<<((EXITC_##f)%8)))
#define ExitC_IsWriteFlagSet(e,f) \
((e)->flag_write[(EXITC_##f)/8] & (1<<((EXITC_##f)%8)))
#define ExitC_ModifFlagSet(e,f) \
{(e)->flag_modif[(EXITC_##f)/8] |= (1<<((EXITC_##f)%8));}
/*
* List of symbolic constants
* ----------------------------------------------------
*/
#define EXITC_NO NO
#define EXITC_YES YES
#define EXITC_PROTO_PSIT_HS_E ITP_PROTO_PSIT_HS_E
#define EXITC_PROTO_PSIT_HS ITP_PROTO_PSIT_HS
#define EXITC_PROTO_PSIT_HS_D ITP_PROTO_PSIT_HS_D
7. EXIT APPENDIX C Programming Manual Page 136
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
#define EXITC_PROTO_PSIT_HSS_E ITP_PROTO_PSIT_HSS_E
#define EXITC_PROTO_PSIT_HSS ITP_PROTO_PSIT_HSS
#define EXITC_PROTO_PSIT_S_E ITP_PROTO_PSIT_S_E
#define EXITC_PROTO_PSIT_S ITP_PROTO_PSIT_S
#define EXITC_PROTO_PSIT_S_D ITP_PROTO_PSIT_S_D
#define EXITC_PROTO_ETB3 ITP_PROTO_ETB3
#define EXITC_PROTO_ETB5 ITP_PROTO_ETB5
#define EXITC_PROTO_ODT ITP_PROTO_ODT
#define EXITC_PROTO_FTAM ITP_PROTO_FTAM
#define EXITC_PROTO_PEL ITP_PROTO_PEL
#define EXITC_PROTO_FTP ITP_PROTO_FTP
#define EXITC_COMM_UNDEFINED ITP_COMM_UNDEFINED
#define EXITC_COMM_X25 ITP_COMM_X25
#define EXITC_COMM_PAD ITP_COMM_PAD
#define EXITC_COMM_OSI_SESSION ITP_COMM_OSI_SESSION
#define EXITC_COMM_TCPIP ITP_COMM_TCPIP
#define EXITC_COMM_SNA_LU6_2 ITP_COMM_SNA_LU6_2
#define EXITC_CODE_UNDEFINED ITP_CODE_UNDEFINED
#define EXITC_CODE_ASCII ITP_CODE_ASCII
#define EXITC_CODE_EBCDIC ITP_CODE_EBCDIC
#define EXITC_CODE_BINARY ITP_CODE_BINARY
#define EXITC_CODE_ISO ITP_CODE_ISO
#define EXITC_CODE_OEMPC ITP_CODE_OEMPC
#define EXITC_CODE_USER1 ITP_CODE_USER1
#define EXITC_CODE_USER2 ITP_CODE_USER2
#define EXITC_CODE_USER3 ITP_CODE_USER3
#define EXITC_CODE_USER4 ITP_CODE_USER4
#define EXITC_CODE_USER5 ITP_CODE_USER5
#define EXITC_CODE_USER6 ITP_CODE_USER6
#define EXITC_CODE_USER7 ITP_CODE_USER7
#define EXITC_CODE_USER8 ITP_CODE_USER8
#define EXITC_CODE_USER9 ITP_CODE_USER9
#define EXITC_CODE_USER10 ITP_CODE_USER10
/*
* List of maximum length for character string fields
* ---------------------------------------------------------
*/
#define EXITC_PROTO_IDENT_MAX ITP_PROTO_IDENT_MAX
#define EXITC_LOGIN_IDENT_MAX ITP_LOGIN_IDENT_MAX
#define EXITC_LOGIN_PASSWORD_MAX ITP_LOGIN_PASSWORD_MAX
#define EXITC_USER_PARAM_MAX ITP_USER_PARAM_MAX
#define EXITC_USER_MSG_MAX ITP_USER_MSG_MAX
#define EXITC_USER_COMMENT_MAX ITP_USER_COMMENT_MAX
#define EXITC_COMM_USER_DATA_MAX ITP_COMM_USER_DATA_MAX
#define EXITC_COMM_OPTIONS_MAX ITP_COMM_OPTIONS_MAX
#define EXITC_COMM_ADDRESS_MAX ITP_COMM_ADDRESS_MAX
#define EXITC_LOGON_MAX ITP_LOGON_MAX
#define EXITC_PASSWORD_MAX ITP_PASSWORD_MAX
#define EXITC_DIR_PATH_MAX ITP_DIR_PATH_MAX
#define EXITC_GROUP_NAME_MAX ITP_GROUP_NAME_MAX
/*
* List of field identifier used in ExitConn_t structure
* -----------------------------------------------------
*/
#define EXITC_protocol 0
#define EXITC_site_ident 1
#define EXITC_comments 2
#define EXITC_param1 3
#define EXITC_param2 4
#define EXITC_message1 5
#define EXITC_message2 6
#define EXITC_comm_type 7
#define EXITC_address 8
#define EXITC_user_data 9
#define EXITC_user_data_len 10
#define EXITC_options 11
#define EXITC_options_len 12
7. EXIT APPENDIX C Programming Manual Page 137
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
#define EXITC_logon 13
#define EXITC_init_state 14
#define EXITC_resp_state 15
#define EXITC_trace_mode 16
#define EXITC_init_conn_count 17
#define EXITC_resp_conn_count 18
#define EXITC_send_xfer_total 19
#define EXITC_recv_xfer_total 20
#define EXITC_send_xfer_active 21
#define EXITC_recv_xfer_active 22
#define EXITC_retry_delay 23
#define EXITC_retry_count 24
#define EXITC_level 25
#define EXITC_init_sender 26
#define EXITC_resp_sender 27
#define EXITC_init_receiver 28
#define EXITC_resp_receiver 29
#define EXITC_init_conn_max 30
#define EXITC_resp_conn_max 31
#define EXITC_old_password 32
#define EXITC_password 33
#define EXITC_check_password 34
#define EXITC_restart_allowed 35
#define EXITC_resync_allowed 36
#define EXITC_retry_count_max 37
#define EXITC_retry_delay_min 38
#define EXITC_retry_delay_max 39
#define EXITC_dir_path 40
#define EXITC_char_code 41
#define EXITC_data_size_max 42
#define EXITC_data_window 43
#define EXITC_check_window 44
#define EXITC_login_ident 45
#define EXITC_login_password 46
#define EXITC_check_login_ident 47
#define EXITC_check_login_password 48
#define EXITC_group_name 49
/*
* remote site parameters used by the connection request
* ----------------------------------------------------
*/
typedef struct
{
unsigned char flag_modif[10];
unsigned char flag_read[10];
unsigned char flag_write[10];
short protocol; /* Protocol */
unsigned char level; /* protocol niveau */
char site_ident[ITP_SITE_NAME_MAX+1]; /* remote site name */
char comments[ITP_USER_COMMENT_MAX+1]; /* user comments */
char param1[ITP_USER_PARAM_MAX+1]; /* user parameter */
char param2[ITP_USER_PARAM_MAX+1]; /* user parameter */
char message1[ITP_USER_MSG_MAX+1]; /* user message */
char message2[ITP_USER_MSG_MAX+1]; /* user message */
short comm_type; /* type of communication */
unsigned char address[ITP_COMM_ADDRESS_MAX+1]; /* network address */
unsigned char user_data[ITP_COMM_USER_DATA_MAX]; /* call user data */
short user_data_len; /* call user data length */
unsigned char options[ITP_COMM_OPTIONS_MAX]; /* facility options */
short options_len; /* options length */
char logon[ITP_LOGON_MAX+1]; /* logon for preconnexion */
unsigned char init_state; /* initiator active ? */
unsigned char resp_state; /* responder active ? */
unsigned char trace_mode; /* trace options active */
unsigned char init_sender; /* initiator_sender allowed ? */
unsigned char resp_sender; /* responder-sender allowed ? */
unsigned char init_receiver; /* initiator_receiver allowed?*/
unsigned char resp_receiver; /* responder_receiver allowed?*/
short init_conn_max; /* maxi No. of outgoing conn */
short resp_conn_max; /* maxi No; of incoming xonn */
7. EXIT APPENDIX C Programming Manual Page 138
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
short init_conn_count; /* No. of outgoing connexions */
short resp_conn_count; /* No. of incoming connexions */
short send_xfer_total; /* total of xfers (send) */
short recv_xfer_total; /* total of xfers (receive) */
short send_xfer_active; /* No. of active Xfers (send) */
short recv_xfer_active; /* No. of active Xfers (recv) */
short retry_delay; /* retry delay in seconds */
short retry_count; /* retry count */
char group_name[ITP_GROUP_NAME_MAX+1]; /* Groupe associant sites */
applications */
char old_password[ITP_PASSWORD_MAX+1]; /* old-password (initiator) */
char password[ITP_PASSWORD_MAX+1]; /* password (initiator) */
char check_password[ITP_PASSWORD_MAX+1]; /* pswd to verify (respondor) */
unsigned char restart_allowed; /* restart allowed ? */
unsigned char resync_allowed; /* resynchronisation allowed ?*/
short retry_count_max; /* Maxi retry count */
short retry_delay_min; /* minimum retry delay */
short retry_delay_max; /* maximum retry delay */
char dir_path[ITP_DIR_PATH_MAX+1]; /* directory for received files */
short char_code; /* character:EBCDIC,ASCII */
long data_size_max; /* maximum PDU size */
short data_window; /* data window */
short check_window; /* CHECK POINT window */
char login_ident[ITP_LOGIN_IDENT_MAX+1]; /* preconnexion login ID */
char login_password[ITP_LOGIN_PASSWORD_MAX+1]; /* preconnexion login pswd */
char check_login_ident[ITP_LOGIN_IDENT_MAX+1]; /* preconnexion login ID */
char check_login_password[ITP_LOGIN_PASSWORD_MAX+1]; /* preconnexion login pswd
*/
char filler2[100];
} ExitConn_t;
#endif /* PPP_EXITCONN_INCLUDED */
7.1.3. exitxfer.h
#ifndef PPP_EXITXFER_INCLUDED
#define PPP_EXITXFER_INCLUDED
#include <time.h>
#include <itpdefs.h>
/*
* Macro for tesing or modifying field's READ/WRITE flags
* ----------------------------------------------------------------------
*/
#define ExitX_IsReadFlagSet(e,f) \
((e)->flag_read[(EXITX_##f)/8] & (1<<((EXITX_##f)%8)))
#define ExitX_IsWriteFlagSet(e,f) \
((e)->flag_write[(EXITX_##f)/8] & (1<<((EXITX_##f)%8)))
#define ExitX_ModifFlagSet(e,f) \
{(e)->flag_modif[(EXITX_##f)/8] |= (1<<((EXITX_##f)%8));}
7. EXIT APPENDIX C Programming Manual Page 139
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
/*
* List of symbolic constants
* ----------------------------------------------------
*/
#define EXITX_ORG_UNDEFINED ITP_ORG_UNDEFINED
#define EXITX_ORG_SEQUENTIAL ITP_ORG_SEQUENTIAL
#define EXITX_ORG_INDEXED ITP_ORG_INDEXED
#define EXITX_ORG_RELATIVE ITP_ORG_RELATIVE
#define EXITX_REC_UNDEFINED ITP_REC_UNDEFINED
#define EXITX_REC_FIXED ITP_REC_FIXED
#define EXITX_REC_VARIABLE ITP_REC_VARIABLE
#define EXITX_REC_STREAM ITP_REC_STREAM
#define EXITX_CODE_UNDEFINED ITP_CODE_UNDEFINED
#define EXITX_CODE_ASCII ITP_CODE_ASCII
#define EXITX_CODE_EBCDIC ITP_CODE_EBCDIC
#define EXITX_CODE_BINARY ITP_CODE_BINARY
#define EXITX_CODE_ISO ITP_CODE_ISO
#define EXITX_CODE_OEMPC ITP_CODE_OEMPC
#define EXITX_CODE_USER1 ITP_CODE_USER1
#define EXITX_CODE_USER2 ITP_CODE_USER2
#define EXITX_CODE_USER3 ITP_CODE_USER3
#define EXITX_CODE_USER4 ITP_CODE_USER4
#define EXITX_CODE_USER5 ITP_CODE_USER5
#define EXITX_CODE_USER6 ITP_CODE_USER6
#define EXITX_CODE_USER7 ITP_CODE_USER7
#define EXITX_CODE_USER8 ITP_CODE_USER8
#define EXITX_CODE_USER9 ITP_CODE_USER9
#define EXITX_CODE_USER10 ITP_CODE_USER10
/* ST Modif */
#define EXITX_ALLOC_UNIT_UNDEFINED ITP_ALLOC_UNIT_UNDEFINED
#define EXITX_ALLOC_UNIT_RECORD ITP_ALLOC_UNIT_RECORD
#define EXITX_ALLOC_UNIT_KBYTES ITP_ALLOC_UNIT_KBYTES
#define EXITX_NO 0
#define EXITX_YES 1
#define EXITX_DIRECTION_IN ITP_DIRECTION_IN
#define EXITX_DIRECTION_OUT ITP_DIRECTION_OUT
#define EXITX_DIRECTION_BOTH ITP_DIRECTION_BOTH
#define EXITX_MODE_INITIATOR ITP_MODE_INITIATOR
#define EXITX_MODE_RESPONDER ITP_MODE_RESPONDER
#define EXITX_MODE_BOTH ITP_MODE_BOTH
#define EXITX_COMP_UNDEFINED ITP_COMP_UNDEFINED
#define EXITX_COMP_HORIZONTAL ITP_COMP_HORIZONTAL
#define EXITX_COMP_VERTICAL ITP_COMP_VERTICAL
#define EXITX_COMP_BOTH ITP_COMP_BOTH
#define EXITX_PROTO_PSIT_HS_E ITP_PROTO_PSIT_HS_E
#define EXITX_PROTO_PSIT_HS_D ITP_PROTO_PSIT_HS_D
#define EXITX_PROTO_ETB3 ITP_PROTO_ETB3
#define EXITX_PROTO_ETB5V1 ITP_PROTO_ETB5V1
#define EXITX_PROTO_ETB5V2 ITP_PROTO_ETB5V2
#define EXITX_PROTO_ODT ITP_PROTO_ODT
#define EXITX_PROTO_PEL ITP_PROTO_PEL
#define EXITX_PROTO_FTP ITP_PROTO_FTP
7. EXIT APPENDIX C Programming Manual Page 140
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
/*
* List of maximum length for character string fields
* ---------------------------------------------------------
*/
#define EXITX_DIR_PATH_MAX_LEN ITP_DIR_PATH_MAX
#define EXITX_FILE_NAME_MAX_LEN ITP_FILE_NAME_MAX
#define EXITX_FILE_LABEL_MAX_LEN ITP_FILE_LABEL_MAX
#define EXITX_IDENT_MAX ITP_SITE_NAME_MAX
#define EXITX_FILE_TYPE_MAX ITP_PROTO_FILE_TYPE_MAX
#define EXITX_FILE_NAME_MAX ITP_PROTO_FILE_NAME_MAX
#define EXITX_XFER_IDENT_MAX ITP_PROTO_XFER_IDENT_MAX
#define EXITX_PARAM_MAX ITP_USER_PARAM_MAX
#define EXITX_MSG_MAX ITP_USER_MSG_MAX
#define EXITX_PASSWORD_MAX ITP_PASSWORD_MAX
#define EXITX_USER_NAME_MAX ITP_USER_NAME_MAX
#define EXITX_SYS_DEP_MAX ITP_FILE_SYS_DEP_PARAM_MAX
/*
* List of field identifier in ExitXfer_t structure
* ----------------------------------------------------
*/
#define EXITX_file_org 0
#define EXITX_rec_fmt 1
#define EXITX_rec_len 2
#define EXITX_key_len 3
#define EXITX_key_offset 4
#define EXITX_data_code 5
#define EXITX_alloc_unit 6
#define EXITX_seek_opt 7
#define EXITX_text_file 8
#define EXITX_padding 9
#define EXITX_dir_path 10
#define EXITX_file_name 11
#define EXITX_file_label 12
#define EXITX_create_date 13
#define EXITX_extract_date 14
#define EXITX_max_alloc_size 15
#define EXITX_file_size 16
#define EXITX_rec_count 17
#define EXITX_access_right 18
#define EXITX_direction 19
#define EXITX_mode 20
#define EXITX_priority 21
#define EXITX_retry_count_max 22
#define EXITX_date_to_begin 23
#define EXITX_date_to_end 24
#define EXITX_date_create 25
#define EXITX_param1 26
#define EXITX_param2 27
#define EXITX_compression 30
#define EXITX_remote_agent 31
#define EXITX_local_agent 32
#define EXITX_last_err 33
#define EXITX_retry_count 34
#define EXITX_x_bytes 35
#define EXITX_f_bytes 36
#define EXITX_date_begin 37
#define EXITX_date_end 38
#define EXITX_last_end_reason 39
#define EXITX_last_end_diag 40
#define EXITX_last_end_err 41
#define EXITX_protocol 42
#define EXITX_org_alias 43
#define EXITX_dest_alias 44
#define EXITX_file_type 45
7. EXIT APPENDIX C Programming Manual Page 141
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
#define EXITX_file_name2 46
#define EXITX_xfer_ident 47
#define EXITX_xfer_file_org 48
#define EXITX_xfer_rec_fmt 49
#define EXITX_xfer_rec_len 50
#define EXITX_xfer_data_code 51
#define EXITX_local_ident 52
#define EXITX_yday 53
#define EXITX_sequence 54
#define EXITX_state 55
#define EXITX_type 56
#define EXITX_sys_dep 57
#define EXITX_user_name 60
#ifdef OLD_ETEBAC5
#define EXITX_id_client 61
#define EXITX_id_banque 63
#define EXITX_id_client_sec 64
#define EXITX_id_banque_sec 65
#define EXITX_auth_type 66
#define EXITX_seal_type 67
#define EXITX_ciph_type 68
#define EXITX_sign_type 69
#endif
#define EXITX_master_ident 70
#define EXITX_nb_ended 71
#define EXITX_nb_to_begin 72
#define EXITX_nb_canceled 73
#define EXITX_nb_suspended 74
#define EXITX_nb_frozen 75
#define EXITX_nb_progressing 76
#define EXITX_nb_total 77
#define EXITX_user_state 80
#define EXITX_originator 81
#define EXITX_destination 82
#ifdef OLD_ETEBAC5
#define EXITX_paraf_used 83
#define EXITX_rsign1_used 84
#define EXITX_rsign2_used 85
#define EXITX_memo_type 86
#define EXITX_userarea 87
#endif
#define EXITX_reply_by_xfer 89
#define EXITX_snd_user 90
#define EXITX_snd_appli 91
#define EXITX_snd_text 92
#define EXITX_rcv_user 93
#define EXITX_rcv_appli 94
#define EXITX_rcv_text 95
#define EXITX_select_req 96
#define EXITX_maxi_requests 97
#define EXITX_maxi_files 98
#define EXITX_total_requests 99
#define EXITX_total_files 100
#define EXITX_ack_option 110
#define EXITX_permanent 111
#define EXITX_uniq_filename 112
#define EXITX_purge_option 113
#define EXITX_snd_msg 114
#define EXITX_rcv_msg 115
/* superseded fields */
#define EXITX_option_file 58
#define EXITX_msg1 28
#define EXITX_msg2 29
7. EXIT APPENDIX C Programming Manual Page 142
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
/*
* transfert parameters definition
* -------------------------------
*/
typedef struct
{
unsigned char flag_modif[20];
unsigned char flag_read[20];
unsigned char flag_write[20];
short file_org; /* file origanization */
short rec_fmt; /* record format */
short data_code; /* : ASCII, EBCDIC, BINAIRE */
long rec_len; /* record length */
short xfer_file_org; /* file origanization */
short xfer_rec_fmt; /* record format */
short xfer_data_code; /* : ASCII, EBCDIC, BINAIRE */
long xfer_rec_len; /* record length */
long key_len; /* key length */
long key_offset; /* key field offset */
unsigned char seek_opt; /* seek option : YES/NO */
unsigned char text_file; /* 1:NO, 2:YES */
short padding; /* padding character */
char dir_path[ITP_DIR_PATH_MAX+1]; /* file directory path */
char file_name[ITP_FILE_NAME_MAX+1]; /* file name */
char file_label[ITP_FILE_LABEL_MAX+1]; /* file label */
time_t create_date; /* creation date */
time_t extract_date; /* extraction date */
short alloc_unit; /* allocation unit */
long max_alloc_size; /* allocation size */
long file_size; /* file size in bytes */
long rec_count; /* number of records */
long access_right; /* access rights */
char sys_dep[ITP_FILE_SYS_DEP_PARAM_MAX+1] /* system parameter */;
short state; /* current state of Xfer */
short direction; /* sens of transfer */
short mode; /* Mode: initiator, responder */
short type; /* type of Xfer Request */
short priority; /* Priorite: 0, ..., N */
short compression; /* compression option */
short yday; /* Julien day */
short sequence; /* xfer sequence No. */
long local_ident; /* Xfer local identifier No. */
time_t date_to_begin; /* date to start */
time_t date_to_end; /* deadline date */
time_t date_create; /* creation date */
char param1[ITP_USER_PARAM_MAX+1]; /* user parameters */
char param2[ITP_USER_PARAM_MAX+1]; /* user parameter */
char user_name [ITP_USER_NAME_MAX+1]; /* user message */
char remote_agent[ITP_SITE_NAME_MAX+1]; /* remote (adjacent) site */
char local_agent [ITP_SITE_NAME_MAX+1]; /* local site */
short retry_count_max; /* maximum retries */
short retry_count; /* No. of effectif retries */
long x_bytes; /* No. of bytes transfered */
long f_bytes; /* No. of file bytes */
time_t date_begin; /* effective start date */
time_t date_end; /* effective end date */
int last_end_reason; /* transfer end reason */
int last_end_diag; /* transfer end diagnostic */
int last_end_err; /* transfer end error code */
unsigned char user_state; /* request user state */
short protocol; /* protocol */
char originator [ITP_PROTO_IDENT_MAX+1]; /* protocol ident originator */
char destination [ITP_PROTO_IDENT_MAX+1]; /* protocol ident destination */
char org_alias [ITP_SITE_NAME_MAX+1]; /* file origine */
char dest_alias[ITP_SITE_NAME_MAX+1]; /* file dest_alias */
7. EXIT APPENDIX C Programming Manual Page 143
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
char file_type [ITP_PROTO_FILE_TYPE_MAX+1]; /* or appli_name for PEL */
char file_name2 [ITP_PROTO_FILE_NAME_MAX+1]; /* Pesit/Etb5/Odette filename */
char xfer_ident [ITP_PROTO_XFER_IDENT_MAX+1]; /* transfer protocol ID */
unsigned char id_client[ITP_ETB5_IDENT_MAX+1]; /* client id */
unsigned char id_banque[ITP_ETB5_IDENT_MAX+1]; /* bank id */
unsigned char id_client_sec[ITP_ETB5_IDENT_MAX+1]; /* secondary client id */
unsigned char id_banque_sec[ITP_ETB5_IDENT_MAX+1]; /* secondary bank id */
unsigned char auth_type; /* authentication type */
unsigned char seal_type; /* sealing type */
unsigned char ciph_type; /* ciphering type */
unsigned char sign_type; /* signature type */
unsigned char paraf_used; /* remote paraf is used */
unsigned char rsign1_used; /* 1st signature is remote */
unsigned char rsign2_used; /* 2nd signature is remote */
unsigned char memo_type; /* memo file type */
char userarea[ITP_USERAREA_MAX]; /* free user area */
long master_ident; /* reference to the broadcast list object */
unsigned short nb_ended; /* nb transfers ended in the terminated list */
unsigned short nb_to_begin; /* nb transfers to begin in the broadcast list */
unsigned short nb_canceled; /* nb transfers canceled in the broadcast list */
unsigned short nb_suspended; /* nb transfers suspended in the broadcast list */
unsigned short nb_frozen; /* nb transfers frozen in the broadcast list */
unsigned short nb_progressing; /* nb transfers progressing/servicing in the */
/* broadcast list*/
unsigned short nb_total; /* nb total of transfers in the broadcast list */
/* new 6.6 fields */
char snd_user[ITP_PESIT_USER_MAX+1];
char snd_appli[ITP_PESIT_APPLI_MAX+1];
char snd_text[ITP_PESIT_TEXT_MAX+1];
char rcv_user[ITP_PESIT_USER_MAX+1];
char rcv_appli[ITP_PESIT_APPLI_MAX+1];
char rcv_text[ITP_PESIT_TEXT_MAX+1];
long reply_by_xfer; /* pesit msg : request replied to */
long select_req; /* pesit selection : selection request */
short maxi_requests; /* pesit selection : maximum requests allowed */
short maxi_files; /* pesit selection : maximum files allowed */
short total_requests; /* pesit selection : total requests genreated */
short total_files; /* pesit selection : total files received */
char snd_msg [ITP_USER_MSGX_MAX+1]; /* snd user message */
char rcv_msg [ITP_USER_MSGX_MAX+1]; /* rcv user message */
unsigned char purge_option; /* option de purge du fichier */
unsigned char ack_option; /* option d'acquittement du fichier */
unsigned char permanent; /* option d'attribut permanent */
unsigned char uniq_filename; /* option de d'unicite de depot (ftp) */
/* superseded fields */
char msg1 [ITP_USER_MSG_MAX+1]; /* user message */
char msg2 [ITP_USER_MSG_MAX+1]; /* user message */
unsigned char option_file; /* option de scratch du fichier */
char filler[30];
} ExitXfer_t;
#endif /* PPP_EXITXFER_INCLUDED */
7.1.4. exitlog.h
#define EXIT_TO_NOTIF (7825)
typedef struct
{
7. EXIT APPENDIX C Programming Manual Page 144
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
time_t time_stamp; /* Date of event */
char ident[20+1]; /* Message number */
int param_count; /* Number of variable parameters */
char (*param_value)[20]; /* Parameters map */
} LogMessage;
int ExitLogArchived(char *path_name);
int ExitLogMessage(LogMessage *msg, char *text);
7.1.5. exitstat.h
/*
* exitstat.h
*/
#include <itpdefs.h>
#include <itpnotif.h>
int ExitStatMessage(NotifXferRecord_t *param);
int ExitStatArchived(char *path_name);
7.1.6. exitclnt.h
#ifndef PPP_EXITCLNT_INCLUDE
#define PPP_EXITCLNT_INCLUDE
void ExitLoginParam(char *user_name, int szn, char *password, int szp);
#endif
7.1.7. exitsecu.h
#ifndef PPP_EXITSECU_INCLUDED
#define PPP_EXITSECU_INCLUDED
/* resource access types */
#define USER_ACCESS_READ 1 << 0
#define USER_ACCESS_WRITE 1 << 1
#define USER_ACCESS_UPDATE 1 << 2
#define USER_ACCESS_DELETE 1 << 3
#define USER_ACCESS_ADMIN 1 << 4
/* list of resources under control */
#define USER_SITE 1
#define USER_APPLICATION 5
#define USER_TRANSFER 6
#define USER_LOGFILE 7
#define USER_MODEL 8
#define USER_LIST 9
#define USER_USER 10
#define USER_PROFILE 11
7. EXIT APPENDIX C Programming Manual Page 145
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
/* function prototype */
int ExitCheckUserLogin(void **login_token, char *user_name, char *password);
int ExitCheckUserLogout(void *login_token);
int ExitCheckUserAccess(void *login_token, int resource, int access);
int ExitCheckFileAccess(void *login_token, char *path, int access);
#endif
7.1.8. Itpndsp.h
#ifndef PPP_NDSP_INCLUDED
#define PPP_NDSP_INCLUDED
#include <stdio.h>
#include <commpath>
#define ENTITY_NAME_MAX 16
#define STACK_NAME_MAX 16
#define PROTO_NAME_MAX 16
#define ROUTE_NAME_MAX 20
#define X25_ADD_MAX 31
#define X25_USER_DATA_MAX 32
#define IP_ADD_MAX 30
#define IP_PORT_MAX 5
#define ALIAS_SITE_NAME_MAX 25
#define SAP_MAX 32
/* Flags definitions for addresses tables */
#define CTRL_FLAG_STR "CTRL"
#define RC_FLAG_STR "RC"
#define CHKC_FLAG_STR "CHKC"
#define CTRL_FLAG (1 << 0)
#define RC_FLAG (1 << 1)
#define CHKC_FLAG (1 << 2)
/* States definitions for the net entity */
#define DOWN 0
#define UP 1
/* States definitions for the disconnect phase */
#define DISCONN_RETRY_SAME 1
#define DISCONN_RETRY_NEXT 2
#define DISCONN_END_SITE 3
#define DISCONN_END_TRANS 4
/* Structures definitions */
typedef struct NDSP_tp_entity
{
int tp_entity_ident;
/* tp entity ident number */
char tp_entity_name[ENTITY_NAME_MAX+1]; /* tp entity name */
char stack_name[STACK_NAME_MAX+1]; /* protocol stack name */
char tp_protocol_name[PROTO_NAME_MAX+1]; /* file transfer protocol */
int init_conn_max;
/* concurrent outgoing max */
int resp_conn_max;
/* concurrent incoming max */
}
NDSP_tp_entity_t;
typedef struct NDSP_net_entity
{
int net_entity_ident; /* net entity ident number */
char net_entity_name[ENTITY_NAME_MAX+1]; /* net entity name */
char stack_name[STACK_NAME_MAX+1]; /* protocol stack name */
int comm_type;
/* network access method */
int init_conn_max;
/* concurrent outgoing max */
int resp_conn_max;
/* concurrent incoming max */
7. EXIT APPENDIX C Programming Manual Page 146
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
int state;
/* net entity state */
char sap_pel[SAP_MAX+1]; /* port number for PEL */
char sap_phsd[SAP_MAX+1]; /* port number for PHSD */
char sap_phse[SAP_MAX+1]; /* port number for PHSE */
char sap_etb3[SAP_MAX+1]; /* port number for ETB3 */
char sap_etb5[SAP_MAX+1]; /* port number for ETB5 */
char sap_odt[SAP_MAX+1]; /* port number for ODT */
}
NDSP_net_entity_t;
typedef struct NDSP_net_ressources
{
int comm_type;
char device_name[30];
int net_entity_index;
int state;
}
NDSP_net_ressources_t;
typedef struct NDSP_x25_table_adr
{
char route_name[ROUTE_NAME_MAX+1]; /* record name (access key) */
char in[X25_ADD_MAX+1]; /* X25 call address */
char inf;
/* accept call flags */
char inu[X25_USER_DATA_MAX]; /* user data */
char site_name[ALIAS_SITE_NAME_MAX+1]; /* site alias */
}
NDSP_x25_table_t;
typedef struct NDSP_ip_table_adr
{
char route_name[ROUTE_NAME_MAX+1]; /* record name (access key) */
char in[IP_ADD_MAX+1]; /* IP call address */
char inf;
/* accept call flags */
char portin[IP_PORT_MAX+1]; /* listen port number */
char site_name[ALIAS_SITE_NAME_MAX+1]; /* site alias */
}
NDSP_ip_table_t;
/* Functions definitions */
#ifdef __cpluscplus
extern "C" {
#endif
/*
* ExitNetConnReq:
*
* Description:
* This exit is called whenever an outgoing connection request
* is to be made. It allows user to select an appropriate
* network process to process the request.
*
* Input parameters are:
* - destination remote site network type and address
* - calling tp entity
* - list of available net processes
* - net array size
* Output parameters are:
* - rc= n: index of selected entry (relative to zero)
* - rc= -1: request is to be refused
* - rc= -2: select the first available process
*
*/
int ExitNetConnReq(CommPath_t *site_comm, /* destination site net info */
NDSP_tp_entity_t *tp_entity, /* calling tp_entity */
NDSP_net_entity_t net_list[], /* available net processes */
int net_nbr);
/* net array size */
7. EXIT APPENDIX C Programming Manual Page 147
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.
/*
* ExitNetConnResp:
*
* Description:
* This exit is called whenever an incoming connection request
* is received. It allows user to select an appropriate
* protocol process to process the request.
*
* Input parameters are:
* - calling remote site network type and address
* - calling site's protocol identifier
* - list of available net processes
* - size of the tp array
* Output parameters are:
* - rc= n: index of selected entry (relative to zero)
* - rc= -1: request is to be refused
* - rc= -2: select the first available process
*
*/
int ExitNetConnResp( CommPath_t *site_comm, /* calling site net info */
char *proto_ident, /* protocol identifier */
NDSP_tp_entity_t tp_list[], /* available tp processes */
int tp_nbr);
/* tp array size */
#ifdef __cpluscplus
}
#endif
#endif /* PPP_NDSP_INCLUDED */
7. EXIT APPENDIX C Programming Manual Page 148
__________________________________________________________________________________________________
Inter.Pel 6.6 SOPRA.

Vous aimerez peut-être aussi