The aftp_set_mode_name call specifies the mode name for the connection to the AFTP server. This call can only be invoked prior to the establishment of a connection to the AFTP server. When a connection is open, the mode name cannot be changed.
AFTP_ENTRY aftp_set_mode_name(
IN AFTP_HANDLE_TYPE connection_id,
IN unsigned char AFTP_PTR mode_name,
IN AFTP_LENGTH_TYPE length,
OUT AFTP_RETURN_CODE_TYPE AFTP_PTR return_code
);
{
AFTP_HANDLE_TYPE connection_id;
static unsigned char AFTP_PTR mode_name = "#INTER";
AFTP_RETURN_CODE_TYPE aftp_rc;
/*
* Before issuing the example call, you must have:
* a connection_id, use: aftp_create()
*
* You cannot have an open connection.
*/
/*
* Set the mode name for the AFTP connection.
*/
aftp_set_mode_name(
connection_id,
mode_name,
(AFTP_LENGTH_TYPE)strlen(mode_name),
&aftp_rc);
if (aftp_rc != AFTP_RC_OK) {
fprintf(stderr, "Error setting AFTP mode name.\n");
}
}
None.