capt_get_packet(): check for key press only every 20ms
[iptraf-ng.git] / src / fltdefs.h
blobcc0512fb2dcfccb5b33ec65d161332c7a2a22828
1 #ifndef IPTRAF_NG_FLTDEFS_H
2 #define IPTRAF_NG_FLTDEFS_H
4 /***
6 fltdefs.h - declarations for the TCP, UDP, and misc IP filters
8 ***/
11 #define FLT_FILENAME_MAX 40
13 #define FLT_RESOLVE 1
14 #define FLT_DONTRESOLVE 0
16 #define F_ALL_IP 0
17 #define F_TCP 6
18 #define F_UDP 17
19 #define F_OTHERIP 59
20 #define F_ICMP 1
21 #define F_IGMP 2
22 #define F_OSPF 89
23 #define F_IGP 9
24 #define F_IGRP 88
25 #define F_GRE 47
26 #define F_L2TP 115
27 #define F_IPSEC_AH 51
28 #define F_IPSEC_ESP 50
30 #define MATCH_OPPOSITE_ALWAYS 1
31 #define MATCH_OPPOSITE_USECONFIG 2
34 * IP filter parameter entry
36 struct hostparams {
37 char s_fqdn[45];
38 char d_fqdn[45];
39 char s_mask[20];
40 char d_mask[20];
41 in_port_t sport1;
42 in_port_t sport2;
43 in_port_t dport1;
44 in_port_t dport2;
45 int filters[256];
46 char protolist[70];
47 char reverse;
48 char match_opposite;
52 struct filterent {
53 struct hostparams hp;
55 unsigned long saddr;
56 unsigned long daddr;
57 unsigned long smask;
58 unsigned long dmask;
59 unsigned int index;
60 struct filterent *next_entry;
61 struct filterent *prev_entry;
64 struct filterlist {
65 struct filterent *head;
66 struct filterent *tail;
67 unsigned int lastpos;
70 #endif /* IPTRAF_NG_FLTDEFS_H */