#define DIR_TO 0 /* address1 --> address2 */ #define DIR_BOTH 1 /* address1 <-> address2 */ #define DIR_FROM 2 /* address1 <-- address2 */ struct address_filter { u_short level; /* 0 = IP, 1 = DLC */ char address1[64]; /* ASCII src address */ char address2[64]; /* ASCII dst address */ char name1[64]; /* ASCII name of address 1 */ char name2[64]; /* ASCII name of address 2 */ u_short direction; /* DIR_TO, DIR_BOTH */ u_short include; /* 0 = exclude, 1 = include */ u_short and; /* 0 = OFF, 1 = AND , 2 = OR */ }; struct filter { u_long protocol; /* bitmask */ struct address_filter addr[2]; u_short port; }; extern u_short D_Src_Port, D_Dst_Port; extern char D_Src_Host[], D_Dst_Host[], D_Proto[]; extern struct filter Filter; extern char Fstr[]; /* the ASCII filter string fed to parse() */ #define PROTO(x) ( Filter.protocol & (1<