IBM AS/400e Computer Hardware User Manual


 
Qus_EC_t error_code = /* QSYRUSRI API error code structure: */
{
sizeof(Qus_EC_t), /* Set bytes provided */
0, /* Initialize bytes available */
' ',' ',' ',' ',' ',' ',' ' /* Initialize Exception Id */
};
char *pcTest_p; /* Upper-case User Identifier pointer*/
int i; /* "For" loop counter variable */
/********************************************************************/
/* Code */
/********************************************************************/
/* Test validity of application ID input argument. */
if(1 NEQ ApplId)
{
/* ERROR - Not FTP server application. */
/* Return Code of 0 is used here to indicate */
/* that an incorrect input argument was received. */
/* The server logon operation will be rejected. */
rc = 0; /* Application ID not valid */
Figure 301. Sample FTP Logon Exit Program (Part 15 of 26)
} /* End If the application identifier is NOT for FTP server */
else /* FTP server application identifier */
{
/* Validate the client IP address input argument. */
rc = CheckClientAddress(ClientIPaddr_p,
Lgth_ClientIPaddr);
if(0 NEQ rc) /* Valid, acceptable client address */
{
/* Initialize User_Id; used to hold upper-cased user identifier */
memset(User_Id, BLANK, sizeof(User_Id));
/* Initialize pcTest_p to point to UserId_p input argument. */
pcTest_p = UserId_p;
/* Uppercase all of the user ID to compare for ANONYMOUS user. */
for(i = 0; i < Lgth_UserId; i++)
{
User_Id[i] = (char)toupper(*pcTest_p);
pcTest_p += 1;
}
Figure 301. Sample FTP Logon Exit Program (Part 16 of 26)
Appendix E. TCP/IP Application Exit Points and Programs 563