logswan

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

output.h (874B)


      1 /*
      2  * Logswan 2.1.10
      3  * Copyright (c) 2015-2021, 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 
     13 #ifndef OUTPUT_H
     14 #define OUTPUT_H
     15 
     16 #include <sys/types.h>
     17 #include <stdint.h>
     18 
     19 #include "config.h"
     20 
     21 struct results {
     22 	char *file_name;
     23 	off_t file_size;
     24 	uint64_t invalid_lines;
     25 	uint64_t processed_lines;
     26 	uint64_t bandwidth;
     27 	uint64_t hits;
     28 	uint64_t hits_ipv4;
     29 	uint64_t hits_ipv6;
     30 	uint64_t visits;
     31 	uint64_t visits_ipv4;
     32 	uint64_t visits_ipv6;
     33 	uint64_t continents[CONTINENTS];
     34 	uint64_t countries[COUNTRIES];
     35 	uint64_t hours[24];
     36 	uint64_t methods[METHODS];
     37 	uint64_t protocols[PROTOCOLS];
     38 	uint64_t status[STATUS_CODE_MAX];
     39 	double runtime;
     40 	char timestamp[20];
     41 };
     42 
     43 char *output(struct results *);
     44 
     45 #endif /* OUTPUT_H */