#ifndef _CHECKIP_H_e9a7851b_ #define _CHECKIP_H_e9a7851b_ #include /* * Check if an IP address is acceptable. The IP address is passed as * the first argument. The acceptability status, which must be one of * the IPSTAT_* values below, is returned through the second. The * third and fourth are used to return strings describing the error, * if any (these strings are unused and need not be set if the status * is IPSTAT_OK) - the third argument is the string to be returned in * the SMTP error message, the fourth a short tag inserted into log * entry generated. * * In all cases, check_ipv4 owns the returned strings. If they need * freeing, check_ipv4 should save the pointers and free them next * call; they do not need to remain valid beyond the entry into the * next call. */ extern void check_ipv4(const struct in_addr *, int *, const char **, const char **); #define IPSTAT_OK 1 #define IPSTAT_BAD 2 #define IPSTAT_FAIL 3 #endif