aftp_extract_partner_lu_name

The aftp_extract_partner_lu_name call extracts the fully qualified LU name of the server. A connection to the AFTP server must occur before this call can be invoked.

AFTP_ENTRY aftp_extract_partner_lu_name(
IN AFTP_HANDLE_TYPE
connection_id,
OUT unsigned char AFTP_PTR
partner_lu_name,
IN AFTP_LENGTH_TYPE
partner_lu_name_size,
OUT AFTP_LENGTH_TYPE AFTP_PTR
returned_length,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR
return_code
);

Parameters

connection_id
An AFTP connection object originally created with aftp_create.
partner_lu_name
Buffer to which the fully qualified LU name is written.

Use the AFTP_FQLU_NAME_SIZE constant to define the length of this buffer. Add 1 to the size if you want to be able to add a null terminator to the text in the buffer.

partner_lu_name_size
The size of the buffer to which the partner LU name will be written.
returned_length
The actual length of the partner_lu_name parameter in bytes.
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;
    unsigned char            partner[AFTP_FQLU_NAME_SIZE+1];
    AFTP_LENGTH_TYPE         returned_length;

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

    /*
     * Extract the partner LU name for AFTP.
     */

    aftp_extract_partner_lu_name(
        connection_id,
        partner,
        (AFTP_LENGTH_TYPE)sizeof(partner)-1,
        &returned_length,
        &aftp_rc);
    if (aftp_rc != AFTP_RC_OK) {
        fprintf(stderr, "Error extracting AFTP destination.\n");
    }
}
 

Line Flows

None.