"Fossies" - the Fresh Open Source Software Archive

Member "srg-1.3.6/include/prototypes.h" (5 Aug 2009, 3098 Bytes) of package /linux/privat/old/srg-1.3.6.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.

    1 /*
    2     SRG - Squid Report Generator
    3     Prototypes header
    4     Copyright 2005 University of Waikato
    5 
    6     This file is part of SRG.
    7 
    8     SRG is free software; you can redistribute it and/or modify
    9     it under the terms of the GNU General Public License as published by
   10     the Free Software Foundation; either version 2 of the License, or
   11     (at your option) any later version.
   12 
   13     SRG is distributed in the hope that it will be useful,
   14     but WITHOUT ANY WARRANTY; without even the implied warranty of
   15      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16     GNU General Public License for more details.
   17 
   18     You should have received a copy of the GNU General Public License
   19     along with SRG; if not, write to the Free Software
   20     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   21 
   22 */
   23 
   24 #ifndef PROTOTYPES_H
   25 #define PROTOTYPES_H
   26 
   27 /* Function Prototypes */
   28 bool do_configuration(int argc, char **argv);
   29 void usage(void);
   30 void set_defaults(void); 
   31 int parse_line(char * , log_line *);
   32 void print_line(const log_line *line);
   33 void generate_email_report(void);
   34 void process_logs(void);
   35 int process_log(const char *filename);
   36 int process_line(const log_line *line);
   37 bool is_cache_hit(const char * resultCode);
   38 bool is_cache_denied(const char * resultCode);
   39 bool isInSubnet(const in_addr clientAddress, const in_addr networkAddress, 
   40         const in_addr netmask);
   41 void getNetworkAddress(const in_addr clientAddress, const in_addr netmask, 
   42         in_addr *network);
   43 void generate_reports(const char *basedir);
   44 char * cleanseStr(char *);
   45 char * FormatOutput(unsigned long long);
   46 void make_date_index();
   47 void recurse_unlink(const char *);
   48 void cull_oldreports(int);
   49 void init_ip2user(void);
   50 bool ip2username(const in_addr, char **);
   51 void init_sitefilter(void);
   52 bool destination_is_excluded(const char *site_hostname);
   53 char * md5this(const char *);
   54 int shortmonth2int(const char *);
   55 int getMonthByName(const char *name);
   56 char *break_string(char *string, char delim);
   57 char *asprintURL(url_request *req);
   58 int parseURL(const char*URL, url_request *req);
   59 void freeURL(url_request *req);
   60 char *generate_datename(const time_t start, const time_t end);
   61 time_t parse_timestring(const char *tstring);
   62 void html_header(FILE *outfile, const char *rootpath);
   63 void html_footer(FILE *outfile, const char *rootpath);
   64 int compare_datename(const char *date1, const char *date2);
   65 int compare_datepart(const char *date1, const char *date2);
   66 void check_environment(void);
   67 void get_file_version(const char *filename, const char *versionkey, 
   68         char *fileversion, int fvlen);
   69 int file_present(const char *filename, const char *versionkey);
   70 void init_file(const char *filename);
   71 
   72 
   73 inline bool isInSubnet(const in_addr clientAddress,
   74         const in_addr networkAddress, const in_addr netmask) {
   75     return ((clientAddress.s_addr&netmask.s_addr)==
   76             (networkAddress.s_addr&netmask.s_addr));
   77 }
   78 
   79 /* External Variables */
   80 extern "C" time_t get_date (const char *p, const time_t *now);
   81 extern char *month_names[];
   82 extern Resolver *dnscache;
   83 extern config_info srg;
   84 extern char *progname;
   85 extern char *version;
   86 extern char *cvsid;
   87 
   88 #endif // PROTOTYPES_H