dc_mcf_tdctle - Shut down a logical terminal

Format

ANSI C, C++

#include <dcmcf.h>
int dc_mcf_tdctle (DCLONG action, dcmcf_tdctleopt *leopt,
char *proinf, DCLONG *resv02,
char *resv03, char *resv04)

K&R C

#include <dcmcf.h>
int dc_mcf_tdctle (action, leopt, proinf, resv02, resv03, resv04)
DCLONG action;
dcmcf_tdctleopt *leopt;
char *proinf;
DCLONG *resv02;
char *resv03;
char *resv04;

Description

The dc_mcf_tdctle() function shuts down a logical terminal.

Normal termination of the dc_mcf_tdctle() function indicates that the logical terminal shutdown request was accepted successfully by the protocol product. However, this does not necessarily mean that the logical terminal has been shut down.

If you intend to perform any operation related to the logical terminal after calling the dc_mcf_tdctle() function, first use the dc_mcf_tlsle() function to check the logical terminal's status.

Arguments whose values are set in the UAP

action

Depending on the communication protocol, specify in one of the following formats the method used to specify for this function the logical terminal that is shut down:

DCMCFLE[|DCMCFPRO]

DCMCFLE
Specifies that the logical terminal name is used.
DCMCFPRO
Specifies that the function depends on the communication protocol being used.

leopt

Set in a dcmcf_tdctleopt structure the information about the logical terminal that is to be the subject of this function's processing.

The following shows the format of the structure:

typedef struct {
               DCLONG    mcfid;        ...MCF communication
                                          process identifier
               char      resv01[4];    ...Reserved
               char      idnam[9];     ...Logical terminal name
               char      resv02[7];    ...Reserved
               char      resv03[112];  ...Reserved
               char      resv04[376];  ...Reserved
               } dcmcf_tdctleopt;

proinf

Specify a protocol-specific area.

If you do not use a function that depends on the communication protocol, specify NULL.

The following shows the format of a protocol-specific area:

[Figure]

The maximum size of a protocol-specific area is 1024 bytes.

The permitted value depends on the communication protocol being used. For details, see the applicable OpenTP1 Protocol manual.

resv02, resv03, resv04

Specify NULL.

Return values

Return valueReturn value (numeric)Explanation
DCMCFRTN_000000Normal termination.
DCMCFRTN_71001-12001The dc_mcf_tdctle() function cannot be accepted because the MCF is under start processing.
DCMCFRTN_71002-12002The dc_mcf_tdctle() function cannot be accepted because the MCF is under termination processing.
DCMCFRTN_71004-12004A memory shortage occurred during dc_mcf_tdctle() function processing.
DCMCFRTN_71005-12005A communication error occurred. For the cause, see the message log file.
DCMCFRTN_71006-12006An internal error occurred. For the cause, see the message log file.
DCMCFRTN_71008-12008The specified logical terminal name has not been registered.
DCMCFRTN_71009-12009The dc_mcf_tdctle() function is not supported by the applicable MCF communication process.
DCMCFRTN_71010-12010Although the request to shut down the logical terminal was issued to the MCF communication process, the request was not accepted. For the cause, see the message log file.
DCMCFRTN_71011-12011The dc_mcf_tdctle() function cannot be accepted because the logical terminal has been deleted.
DCMCFRTN_72050-13050DCMCFLE is not set in action.
An unsupported flag is set in action.
DCMCFRTN_72051-13051NULL is set in leopt.
DCMCFRTN_72052-13052When DCMCFPRO is not set in action:
NULL is not set in proinf.
When DCMCFPRO is set in action:
A value smaller than 0 or a value 1025 or greater is specified for the size of protocol-specific area L pointed to by proinf.
DCMCFRTN_72053-13053NULL is not set in resv02.
DCMCFRTN_72054-13054NULL is not set in resv03.
DCMCFRTN_72055-13055NULL is not set in resv04.
DCMCFRTN_72061-13061A value smaller than 0 or a value 240 or greater is specified for mcfid in dcmcf_tdctleopt.
DCMCFRTN_72062-13062resv01 in dcmcf_tdctleopt is not filled with null characters.
DCMCFRTN_72063-13063idnam in dcmcf_tdctleopt begins with the null character.
DCMCFRTN_72064-13064resv02 in dcmcf_tdctleopt is not filled with null characters.
DCMCFRTN_72065-13065resv03 in dcmcf_tdctleopt is not filled with null characters.
DCMCFRTN_72067-13067resv04 in dcmcf_tdctleopt is not filled with null characters.
DCMCFRTN_72073-13073The character string set in idnam in dcmcf_tdctleopt is 9 or more bytes in length.
DCMCFRTN_72074-13074The character string set in idnam in dcmcf_tdctleopt contains an invalid character.