logswan

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

parse.h (755B)


      1 /*
      2  * Logswan 2.1.13
      3  * Copyright (c) 2015-2022, Frederic Cambus
      4  * https://www.logswan.org
      5  *
      6  * Created:      2015-05-31
      7  * Last Updated: 2021-02-15
      8  *
      9  * Logswan is released under the BSD 2-Clause license.
     10  * See LICENSE file for details.
     11  *
     12  * SPDX-License-Identifier: BSD-2-Clause
     13  */
     14 
     15 #ifndef PARSE_H
     16 #define PARSE_H
     17 
     18 struct date {
     19 	char *day;
     20 	char *month;
     21 	char *year;
     22 	char *hour;
     23 	char *minute;
     24 	char *second;
     25 };
     26 
     27 struct logline {
     28 	char *remote_host;
     29 	char *date;
     30 	char *request;
     31 	char *status_code;
     32 	char *object_size;
     33 };
     34 
     35 struct request {
     36 	char *method;
     37 	char *resource;
     38 	char *protocol;
     39 };
     40 
     41 void parse_date(struct date *, char *);
     42 void parse_line(struct logline *, char *);
     43 void parse_request(struct request *, char *);
     44 
     45 #endif /* PARSE_H */