aftp_extract_security_type

The aftp_extract_security_type call extracts the type of APPC conversation security used. If the aftp_set_security_type call has not been invoked, the AFTP default security type value is returned.

AFTP_ENTRY aftp_extract_security_type(
IN AFTP_HANDLE_TYPE
connection_id,
OUT AFTP_SECURITY_TYPE AFTP_PTR
security_type,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR
return_code
);

Parameters

connection_id
An AFTP connection object originally created with aftp_create.
security_type
The security to be used when connecting to the AFTP server.
AFTP_SECURITY_NONE
No APPC conversation security is used.
AFTP_SECURITY_SAME
The local security information determined at logon time will be transferred to the AFTP server.
AFTP_SECURITY_PROGRAM
A user identifier and password will be sent to be verified by the AFTP server. You must use the aftp_set_userid and aftp_set_password calls with this security type, or the connection attempt will fail.
return_code
The return code issued for this function. See AFTP Return Codes for the list of possible return codes.

Example

{
    AFTP_HANDLE_TYPE              connection_id;
    AFTP_RETURN_CODE_TYPE         aftp_rc;
    AFTP_SECURITY TYPE            sec_type;

    /*
     * Before issuing the example call, you must have:
     *    a connection_id, use:  aftp_create()
     */

    /*
     * Extract the APPC security type for AFTP.
     */

    aftp_extract_security_type(
        connection_id,
        &sec_type,
        &aftp_rc);
    if (aftp_rc != AFTP_RC_OK) {
        fprintf(stderr,
        "Error extracting AFTP security type.\n");
    }
}
 

Line Flows

None.