#ifndef PARSE_FLOWFILES #define PARSE_FLOWFILES #include "types.h" #include "flowfile.h" #define SUPERNETS "our.nets" #define NETDETAIL "custs" /* IPtable for all our nets */ #define HASHSIZE 786433 /* Should be prime */ #define HASHJUMP 88919 /* too */ #define HASHFUNC(p) (((p)^((p)>>7)^((p)>>15)^((p)>>23)) % HASHSIZE) typedef struct _cust_t { char custid[20]; char name[255]; uint32 network; unsigned char netmask; } cust_t; typedef struct _iptable_t { uint32 ipaddr; uint64 inbytes; uint64 outbytes; cust_t *customer; u_char free; uint32 starttime; uint32 stoptime; uint32 inpkts; uint32 outpkts; uint64 localinbytes; /* Local Traffic only */ uint64 localoutbytes; /* in our.nets */ } iptable_t; /* Prototypes */ int init_iptable(void); int matchip(uint32); int dump_iptable(); int addsrcbytes(uint32, uint32 , uint32 ); int adddstbytes(uint32, uint32 , uint32 ); int addflow(struct saveflow *, uint32 ); #endif