forked from p0f/p0f
-
Notifications
You must be signed in to change notification settings - Fork 0
/
p0f.h
57 lines (36 loc) · 1.34 KB
/
p0f.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
/*
p0f - exports from the main routine
-----------------------------------
Copyright (C) 2012 by Michal Zalewski <lcamtuf@coredump.cx>
Distributed under the terms and conditions of GNU LGPL.
*/
#ifndef _HAVE_P0F_H
#define _HAVE_P0F_H
#include "types.h"
#include "process.h"
extern u8 daemon_mode;
extern s32 link_type;
extern u32 max_conn, max_hosts, conn_max_age, host_idle_limit, hash_seed;
void start_observation(char* keyword, u8 field_cnt, u8 to_srv,
struct packet_flow* pf);
void list_interfaces(void);
void add_observation_field(char* key, u8* value);
/*Add to communicate with GuiP0f*/
void set_up_iface(char *iface_choose);
void set_up_file(char* file_choose);
void go();
#define OBSERVF(_key, _fmt...) do { \
u8* _val; \
_val = alloc_printf(_fmt); \
add_observation_field(_key, _val); \
ck_free(_val); \
} while (0)
#include "api.h"
struct api_client {
s32 fd; /* -1 if slot free */
struct p0f_api_query in_data; /* Query recv buffer */
u32 in_off; /* Query buffer offset */
struct p0f_api_response out_data; /* Response transmit buffer */
u32 out_off; /* Response buffer offset */
};
#endif /* !_HAVE_P0F_H */