logswan

Fast Web log analyzer using probabilistic data structures
Log | Files | Refs | README | LICENSE

parse.h (704B)


      1 /*
      2  * Logswan 2.1.8
      3  * Copyright (c) 2015-2020, Frederic Cambus
      4  * https://www.logswan.org
      5  *
      6  * Created:      2015-05-31
      7  * Last Updated: 2019-01-19
      8  *
      9  * Logswan is released under the BSD 2-Clause license.
     10  * See LICENSE file for details.
     11  */
     12 
     13 #ifndef PARSE_H
     14 #define PARSE_H
     15 
     16 struct date {
     17 	char *day;
     18 	char *month;
     19 	char *year;
     20 	char *hour;
     21 	char *minute;
     22 	char *second;
     23 };
     24 
     25 struct logLine {
     26 	char *remoteHost;
     27 	char *date;
     28 	char *request;
     29 	char *statusCode;
     30 	char *objectSize;
     31 };
     32 
     33 struct request {
     34 	char *method;
     35 	char *resource;
     36 	char *protocol;
     37 };
     38 
     39 void parseDate(struct date *, char *);
     40 void parseLine(struct logLine *, char *);
     41 void parseRequest(struct request *, char *);
     42 
     43 #endif /* PARSE_H */