X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=spamass-milter.h;h=0590cf1c6eb61c859d252ddd90eafa3555b15695;hb=6d013c96afd4f99f07dfb988c1cb35f3477c7ba2;hp=c11b631669c6dc01e5f82b20205df07af64564e9;hpb=4823759849e9bd836cd098b86228f10d720e63c3;p=deb_pkgs%2Fspamass-milter.git diff --git a/spamass-milter.h b/spamass-milter.h index c11b631..0590cf1 100644 --- a/spamass-milter.h +++ b/spamass-milter.h @@ -1,6 +1,6 @@ //-*-c++-*- // -// $Id: spamass-milter.h,v 1.22 2004/09/21 20:51:06 dnelson Exp $ +// $Id: spamass-milter.h,v 1.28 2014/08/15 01:51:19 kovert Exp $ // // Main include file for SpamAss-Milter // @@ -56,16 +56,30 @@ sfsistat mlfi_abort(SMFICTX*); extern struct smfiDesc smfilter; /* struct describing a single network */ -struct net +union net { - struct in_addr network; - struct in_addr netmask; + struct + { + uint8_t af; + } net; + struct + { + uint8_t af; + struct in_addr network; + struct in_addr netmask; + } net4; + struct + { + uint8_t af; + struct in6_addr network; + int netmask; /* Just the number of bits for IPv6 */ + } net6; }; /* an array of networks */ struct networklist { - struct net *nets; + union net *nets; int num_nets; }; @@ -165,7 +179,7 @@ public: /* Private data structure to carry per-client data between calls */ struct context { - struct in_addr connect_ip; // remote IP address + char connect_ip[64]; // remote IP address char *helo; SpamAssassin *assassin; // pointer to the SA object if we're processing a message }; @@ -182,8 +196,10 @@ string::size_type find_nocase(const string&, const string&, string::size_type = int cmp_nocase_partial(const string&, const string&); void closeall(int fd); void parse_networklist(char *string, struct networklist *list); -int ip_in_networklist(struct in_addr ip, struct networklist *list); +int ip_in_networklist(struct sockaddr *addr, struct networklist *list); void parse_debuglevel(char* string); char *strlwr(char *str); +void warnmacro(const char *macro, const char *scope); +FILE *popenv(char *const argv[], const char *type, pid_t *pid); #endif