//#include "ftpproxy.h"

#include <stdio.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>

#define TRUE 1
#define FALSE 0
#define BUF_SIZE 4096
//#define STR_SIZE 255

//structure for database record
struct addr{
    int ClientAddr;
    int ServerAddr;
    time_t tm;
    struct addr *next;
};

//virtual list - addres data base
class addrlist{
    struct addr *list;
public:
  addrlist(void){
      list=NULL;
  }
  ~addrlist(void){
      if(list!=NULL){
          struct addr *rec=list,*crec;
          do{
              crec=rec;
              rec=crec->next;
              delete crec;
          }
          while(rec!=NULL);
      }
  };
  int addaddr(int ClientAddr,int ServerAddr);
  int findaddr(int ClientAddr);
  int exists(int ClientAddr,int ServerAddr);
  void checktimeout();
  int output();
};

extern int iADBMDelTimeOut;

void proccesdb();//process ftp proxy and netscan request's
int sendtoadbm(char *lpszBuf);//send request to adbm and get reply


