logswan

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

output.h (918B)


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