1 
2 #define DIR_TO   0  /* address1 --> address2 */
3 #define DIR_BOTH 1  /* address1 <-> address2 */
4 #define DIR_FROM 2  /* address1 <-- address2 */
5 
6 struct address_filter {
7   u_short level;       /* 0 = IP, 1 = DLC */
8   char address1[64];   /* ASCII src address */
9   char address2[64];   /* ASCII dst address */
10   char name1[64];      /* ASCII name of address 1 */
11   char name2[64];      /* ASCII name of address 2 */
12   u_short direction;   /* DIR_TO, DIR_BOTH */
13   u_short include;     /* 0 = exclude, 1 = include  */
14   u_short and;         /* 0 = OFF, 1 = AND , 2 = OR */
15 };
16 
17 struct filter {
18   u_long protocol;    /* bitmask */
19   struct address_filter addr[2];
20   u_short port;
21 };
22 
23 extern u_short D_Src_Port, D_Dst_Port;
24 extern char D_Src_Host[], D_Dst_Host[], D_Proto[];
25 
26 extern struct filter Filter;
27 extern char Fstr[];		/* the ASCII filter string fed to parse() */
28 
29 #define PROTO(x)  ( Filter.protocol & (1<<x) )
30 
31 /* PROTOCOLS for filter */
32 #define PROTO_ALL  0
33 #define PROTO_IP   1
34 #define PROTO_ARP  2
35 #define PROTO_RARP 3
36 #define PROTO_ICMP 4
37 #define PROTO_UDP  5
38 #define PROTO_TCP  6
39 #define NUM_PROTOS 7	/* total number of protocols including ALL */
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56