"Fossies" - the Fresh Open Source Software Archive

Member "spammilt-0.5.0-rc7/xfunctions.h" (27 Aug 2004, 2902 Bytes) of package /linux/privat/old/spammilt-0.5.0-rc7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "xfunctions.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 #-------------------------------------------------------------------------------
    3 #
    4 # $Id: xfunctions.h,v 1.6 2004/08/27 20:03:37 mardan Exp $ 
    5 #
    6 # $Log: xfunctions.h,v $
    7 # Revision 1.6  2004/08/27 20:03:37  mardan
    8 # Added filtering of spam based on X-Spam-Score from the SpamAssassin package
    9 #
   10 # Revision 1.5  2003/12/30 22:57:55  mardan
   11 # Changed resolve function in xfunctions.c
   12 # Updated documentation
   13 # Bumbed to version 0.5.0-rc4
   14 #
   15 # Revision 1.4  2003/12/25 22:58:14  mardan
   16 # Fixed free bugs in temporary list in mlfi structure
   17 # Some code improvements..
   18 # Bumped to version 0.5.0-rc2
   19 #
   20 # Revision 1.3  2003/11/29 18:06:09  mardan
   21 # Updated documentation
   22 # Added discard option
   23 # Re-introduced the reserved (LAN) ip range scan, to skip dnsbl queries
   24 #
   25 # Revision 1.2  2003/11/17 23:06:57  mardan
   26 # Added multiple dnsbl hosts, needs testing and lots of cleanups
   27 #
   28 # Revision 1.1  2002/09/01 16:08:25  mardan
   29 # Complete rewrite of spammilt due to stability problem.
   30 # Reduced number of .c files to spammilt.c and xfunctions.c
   31 # Diff between last spammilt and this version will be enormous when viewing
   32 # with cvsweb.
   33 # Added daemon mode.
   34 #
   35 #
   36 #
   37 # Copyright (c) 2002 by D.Wijsman (mardan@tweegy.demon.nl). 
   38 # All rights reserved.
   39 #
   40 # This program is free software; you can redistribute it and/or modify it
   41 # under the terms of the GNU General Public License as published by the Free
   42 # Software Foundation; either version 2 of the License, or (at your option)
   43 # any later version.
   44 # 
   45 # This program is distributed in the hope that it will be useful, but WITHOUT
   46 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   47 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
   48 # more details.
   49 #
   50 # You should have received a copy of the GNU General Public License
   51 # along with this program; see the file COPYING.  If not, write to
   52 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
   53 #
   54 #
   55 #-------------------------------------------------------------------------------
   56 */
   57 
   58 #include <string.h>
   59 #include <stdio.h>
   60 #include <stdlib.h>
   61 #include <regex.h>
   62 #include <syslog.h>
   63 #include <netdb.h>
   64 #include <arpa/inet.h>
   65 #include <errno.h>
   66 
   67 #ifndef _HAVE_L_IP
   68     typedef unsigned long L_IP;
   69 #define _HAVE_L_IP 1
   70 #endif
   71 
   72 char *search_replace (char *buffer, char *search, char *replace);
   73 int lookup_ip(char *host, char *host_ip);
   74 int check_dnsbl(char *ip, char *query_host, char *host_ip);
   75 void err_log(char *err_msg,char *arg);
   76 int match(char *string, char *pattern);
   77 void *xcalloc(size_t nmemb, size_t size);
   78 void *xrealloc(void *oldbuffer, size_t newsize);
   79 char **FreeList(char **List, int *Size);
   80 char **ReadList(char *FileName, int *Size);
   81 char *xstrdup (const char *dup);
   82 
   83 int check_iprange(char *header_ip);
   84 int inrange(L_IP test, L_IP min, L_IP max);
   85 L_IP convert(const char *dotted);
   86 float get_assassin_score(char *string);
   87 
   88 
   89 /* The End */
   90  
   91 
   92 
   93 
   94