logswan

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

output.h (865B)


      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 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 *fileName;
     23 	off_t fileSize;
     24 	uint64_t invalidLines;
     25 	uint64_t processedLines;
     26 	uint64_t bandwidth;
     27 	uint64_t hits;
     28 	uint64_t hitsIPv4;
     29 	uint64_t hitsIPv6;
     30 	uint64_t visits;
     31 	uint64_t visitsIPv4;
     32 	uint64_t visitsIPv6;
     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 */