-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
58 lines (52 loc) · 1.61 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Copyright (c) 2013 The Board of Trustees of Carnegie Mellon University.
*
* Author: Chris Rapier <rapier@psc.edu>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the MIT License.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the MIT License for more details.
*
* You should have received a copy of the MIT License along with this library;
* if not, see http://opensource.org/licenses/MIT.
*
*/
#ifndef MAIN_H
#define MAIN_H
#define _GNU_SOURCE 1
#include "config.h"
#ifdef HAVE_LIBJSONC
#include <json-c/json.h>
#else
#include <json/json.h>
#endif
#include <websock/websock.h> // websocket lib
#include "estats/estats.h"
#include "uthash.h"
#include "parse.h"
#include "string-funcs.h"
#include "report.h"
#include "geoip.h"
#include "version.h"
#include "debug.h"
#include "mysql/mysql.h"
#include "mysql/my_global.h"
typedef struct CmdLineCID {
int cid;
char cmdline[256];
UT_hash_handle hh;
} CmdLineCID;
void get_metric_mask (struct estats_mask *, char *);
void add_cmdline_to_hash(int, char *, CmdLineCID **);
void get_cmdline_from_cid_hash(char ** , int, CmdLineCID **);
void delete_all_from_hash(CmdLineCID **);
void get_connection_data (char **, struct FilterList *);
void *analyze_inbound(libwebsock_client_state *, libwebsock_message *);
int confirm_cid (int);
int onmessage(libwebsock_client_state *, libwebsock_message *);
int onopen(libwebsock_client_state *);
int onclose(libwebsock_client_state *);
#endif