/********************************************************************/
/* Define a return URL to use - echo any operation specific info */
/********************************************************************/
if (Lgth_OperSpecInfo && !strncmp("http://", OperSpecInfo_p, 7)) {
strcpy(URL, OperSpecInfo_p);
} else {
strcpy(URL, "http://www.ibm.com");
} /* endif */
record("wsgexit: Set URL: >%s<\n", URL);
/********************************************************************/
/* Accept the following client systems for AS/400 sign-on bypass. */
/* */
/* AS400.IBM.COM (1.222.33.44) */
/* AS401.IBM.COM (1.222.33.55) */
/* AS402.IBM.COM (1.222.33.66) */
/* */
/* */
/********************************************************************/

Figure 302. Sample WSG Server Logon Exit Program (Part 23 of 50)

Reject = "1.222.33.77 1.222.33.88 1.222.33.99 ";
/********************************************************************/
/* Validate Client IP address */
/********************************************************************/
record("wsgexit: Validate IP address\n");
if (NULL != strstr(Accept, ClientIPaddr)) {
/******************************************************************/
/* Parse the "OperSpecInfo_p" input string: */
/* Return AllowOper of '1' - Accept this clients request. */
/* Set return values for client browser: */
/******************************************************************/
memcpy(UserProfile, "SOMEUSER ", 10);
memcpy(Password, "SOMEPW ", 10);
memcpy(ProgramLib, " ", 10);
memcpy(ProgramName, "QCMD ", 10);
memcpy(InitialMenu, " ", 10);
memcpy(AllowOper, "1", 1);
record("wsgexit: Client is in Accept list: AllowOper='1'\n");
} else { /* Check if client is in "Reject" list */
if (NULL != strstr(Reject, ClientIPaddr)) {

Figure 302. Sample WSG Server Logon Exit Program (Part 24 of 50)

582 OS/400 TCP/IPConfiguration and Reference V4R4