C++ Function

C Function

Description

 

 

 

exit_child_init()

exit_child_init_c()

Use this function as the first line in a user exit

 

 

program to initialize communications between

 

 

Sterling Connect:Direct and the user exit program.

 

 

 

recv_exit_msg()

recv_exit_msg_c()

Used by both Sterling Connect:Direct and the user

 

 

exit program to receive a message from the other

 

 

Process. The receive exit messages wait for a

 

 

response from the other Process.

 

 

 

send_exit_file()

send_exit_file_c()

The user exit program uses this function when it

 

 

has opened a file for Sterling Connect:Direct. This

 

 

function uses underlying UNIX methods to pass

 

 

an open file descriptor. from one Process to

 

 

another.

 

 

 

send_exit_msg()

send_exit_msg_c()

Both Sterling Connect:Direct and the user exit

 

 

program use this function to send a message to

 

 

the other Process. Send messages are followed

 

 

with a receive message to get the response from

 

 

the other Process.

 

 

 

Initializing Communications with exit_child_init() or exit_child_init_c()

Use the exit_child_init() or exit_child_init_c() function as the first line of code of the user exit program to initialize communications. This function performs a check to verify that each side is ready to communicate. Following is the format of the exit_child_init() function:

int exit_child_init( char * logfile )

The exit_child_init() or exit_child_init_c() function has the following parameter:

Parameter

Description

Value

 

 

 

logfile

The name of the log or trace file that is opened for

Name of log file or

 

use by the user exit programs. Because the file open

trace file

 

and security exit are started by SMGR, which is

 

 

running as root, the exits also run as root. Running

 

 

the exits as root can cause problems with file

 

 

permissions of the log file, so logfile enables you to

 

 

easily change owner or permissions on the file. See

 

 

the sample exit in d_dir/ndm/src/exit_skeleton.c

 

 

for more details.

 

 

 

 

The exit_child_init() or exit_child_init_c() function have the following return codes. Return codes for the function are defined in ndmapi.h.

Return Code

GOOD_RC

ERROR_RC

Description

Communications between Sterling Connect:Direct and the user exit program were successfully initialized.

Communications between Sterling Connect:Direct and the user exit program could not be initialized.

76Sterling Connect:Direct for UNIX: User Guide

Page 82
Image 82
IBM 4J manual Return Code, Goodrc Errorrc