OpenTP1 Version 7 Programming Reference C Language
dc_mcf_tactcn - Establish a connection
Format
ANSI C, C++
#include <dcmcf.h> int dc_mcf_tactcn (DCLONG action, dcmcf_tactcnopt *cnopt, char *proinf, DCLONG *resv02, char *resv03, char *resv04) |
K&R C
#include <dcmcf.h> int dc_mcf_tactcn (action, cnopt, proinf, resv02, resv03, resv04) DCLONG action; dcmcf_tactcnopt *cnopt; char *proinf; DCLONG *resv02; char *resv03; char *resv04; |
Description
The dc_mcf_tactcn() function establishes a connection.
Normal termination of the dc_mcf_tactcn() function indicates that the connection establishment request was accepted successfully by the protocol product. However, this does not necessarily mean that connection with the remote system has been established.
If you intend to perform any connection-related operation after calling the dc_mcf_tactcn() function, first use the dc_mcf_tlscn() function to check the connection 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 connection that is established:
{DCMCFLE|DCMCFCN}[|DCMCFPRO]
cnopt
Set in a dcmcf_tactcnopt structure the connection information that is to be subject to 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 or connection ID char resv02[7]; ...Reserved char resv03[112]; ...Reserved char scnnam[9]; ...Area used by MCF char resv04[7]; ...Reserved char yournam[9]; ...Area used by MCF char resv05[7]; ...Reserved char hostnam[143]; ...Area used by MCF char resv06[17]; ...Reserved char resv07[184]; ...Reserved } dcmcf_tactcnopt;
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:
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 value | Return value (numeric) | Explanation |
---|---|---|
DCMCFRTN_00000 | 0 | Normal termination. |
DCMCFRTN_71001 | -12001 | The dc_mcf_tactcn() function cannot be accepted because the MCF is under start processing. |
DCMCFRTN_71002 | -12002 | The dc_mcf_tactcn() function cannot be accepted because the MCF is under termination processing. |
DCMCFRTN_71004 | -12004 | A memory shortage occurred during dc_mcf_tactcn() function processing. |
DCMCFRTN_71005 | -12005 | A communication error occurred. For the cause, see the message log file. |
DCMCFRTN_71006 | -12006 | An internal error occurred. For the cause, see the message log file. |
DCMCFRTN_71007 | -12007 | The specified connection name has not been registered. |
DCMCFRTN_71008 | -12008 | The specified logical terminal name has not been registered. |
DCMCFRTN_71009 | -12009 | The dc_mcf_tactcn() function is not supported by the applicable MCF communication process. |
DCMCFRTN_71010 | -12010 | Although the request to establish a connection was issued to the MCF communication process, the request was not accepted. For the cause, see the message log file. |
DCMCFRTN_71011 | -12011 | The dc_mcf_tactcn() function cannot be accepted because the connection has been deleted. |
DCMCFRTN_71014 | -12014 | The specified logical terminal name belongs to TP1/NET/NCSB or TP1/NET/X25-Extended; or, the specified connection group name belongs to TP1/NET/OSI-TP or TP1/NET/TCP/IP. |
DCMCFRTN_72050 | -13050 | An unsupported flag is set in action. |
DCMCFRTN_72051 | -13051 | NULL is set in cnopt. |
DCMCFRTN_72052 | -13052 | When 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 | -13053 | NULL is not set in resv02. |
DCMCFRTN_72054 | -13054 | NULL is not set in resv03. |
DCMCFRTN_72055 | -13055 | NULL is not set in resv04. |
DCMCFRTN_72060 | -13060 | DCMCFLE and DCMCFCN cannot be specified together in action. |
DCMCFRTN_72061 | -13061 | A value smaller than 0 or a value 240 or greater is specified for mcfid in dcmcf_tactcnopt. |
DCMCFRTN_72062 | -13062 | resv01 in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72063 | -13063 | idnam in dcmcf_tactcnopt begins with the null character. |
DCMCFRTN_72064 | -13064 | resv02 in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72065 | -13065 | resv03 in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72066 | -13066 | scnnam in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72067 | -13067 | resv04 in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72068 | -13068 | yournam in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72069 | -13069 | resv05 in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72070 | -13070 | hostnam in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72071 | -13071 | resv06 in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72072 | -13072 | resv07 in dcmcf_tactcnopt is not filled with null characters. |
DCMCFRTN_72073 | -13073 | The character string set in idnam in dcmcf_tactcnopt is 9 or more bytes in length. |
DCMCFRTN_72074 | -13074 | The character string set in idnam in dcmcf_tactcnopt contains an invalid character. |
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.