inc/apacheLog.h

Go to the documentation of this file.
00001 /* apacheLog - stuff to parse out apache web server logs, currently
00002  * just the access log. */
00003 
00004 #ifndef APACHELOG_H
00005 #define APACHELOG_H
00006 
00007 struct apacheAccessLog
00008 /* Parsed out apache access log line */
00009     {
00010     struct apacheAccessLog *next;
00011     char *buf;          /* All memory for apacheAccessLog fields is allocated at once here. */
00012     char *ip;           /* IP Address: dotted quad of numbers, or xxx.com. */
00013     char *dash1;        /* Unknown, usually a dash */
00014     char *dash2;        /* Unknown, usually a dash */
00015     char *timeStamp;    /* Time stamp like 23/Nov/2003:04:21:08 */
00016     char *timeZone;     /* Extra number after timeStamp, usually -0800 */
00017     char *method;       /* GET/POST etc. */
00018     char *url;          /* Requested URL */
00019     char *httpVersion;  /* Something like HTTP/1.1 */
00020     int status;         /* Status code - 200 is good! */
00021     char *num1;         /* Some number, I'm not sure what it is. */
00022     char *referrer;     /* Referring URL, may be NULL. */
00023     char *program;      /* Requesting program,  often Mozilla 4.0 */
00024     };
00025 
00026 
00027 struct apacheAccessLog *apacheAccessLogParse(char *line, 
00028         char *fileName, int lineIx);
00029 /* Return a apacheAccessLog from line.  Return NULL if there's a parsing 
00030  * problem, but don't abort. */
00031 
00032 void apacheAccessLogFree(struct apacheAccessLog **pLl);
00033 /* Free up apacheAccessLog. */
00034 
00035 #endif /* APACHELOG_H */

Generated on Tue Dec 25 18:39:29 2007 for blat by  doxygen 1.5.2