/* Function Specification *********************************************/
/* */
/* Function Name: CheckClientAddress */
/* */
/* Descriptive Name: Check the IP address of the originating session */
/* from the input argument (ClientIPaddr_p) to */
/* ensure it is in valid dotted-decimal format, */
/* and that the client system is allowed access. */
/* This is an example of an input validity check. */
/* */
/* Notes: */
/* */
/* Dependencies: */
/* None */
/* */
/* Restrictions: */
/* None */
/* */
/* Messages: */
/* None */
/* */
/* Side Effects: */
/* None */
Figure 301. Sample FTPLogon Exit Program (Part 23 of 26)
/* */
/* Functions/Macros called: */
/* */
/* strspn - Search for first occurrence of a string. */
/* */
/* Input: */
/* char * ClientIPaddr_p - Internet Protocol address from which */
/* the session originates. */
/* int * Lgth_ClientIPaddr - Length (in bytes) of IP address. */
/* */
/* Output: */
/* int rc - Return code indicating validity of IP */
/* address from ClientIPaddr_p input. */
/* 0 = Reject the logon operation. */
/* ClientIPaddr_p is one that is not */
/* allowed, or contains a character */
/* that is not valid. */
/* 1 = Continue the logon operation. */
/* */
/* Exit Normal: (See OUTPUT) */
/* */
/* Exit Error: None. */
/* */
Figure 301. Sample FTPLogon Exit Program (Part 24 of 26)
AppendixE. TCP/IP Application Exit Points and Programs 567