#define MAX_DELAY 123451   /* milleseconds ?? */
#define MAX_RANGE 1000000  /* range of random numbers */
#define TRUE 1
#define FALSE 0

#define DROP -1
#define NOW 0
#define DLM ':'

#define CONN_FILE "conn_table"

typedef struct conn_status CONN_STATUS;
 
struct conn_status {
  Addr addr1;     /* udpaddr, sockaddr ? */
  Addr addr2;
  long t_range_start; /* beginning time for this characteristic set */
  long t_range_end; 
  int max_delay;   /*  max delay range */
  int min_delay;   /*  min delay range */
  int delayed;       /* % of packets delayed */
  int drop;          /* % of packets lost */
  int duplicate;     /* % of packets duplicated */
  unsigned long random_sd;   /* this connection seed for its random # stream */
};

/* it is assumed that the #'s lost, duplicated & delayed will be < 100,
   and that the rest will be delivered ontime */


struct pending_send {
  Packet *packet;
  int duplicate; /* yes or no */
  Card32 when; /* when to send, absolute */
  CONN_STATUS *conn_ptr;
  struct pending_send *next;
};


typedef struct pending_send TOSEND;

/*
 * Socket address, internet style. -- DAMN I hate finding these decls 
struct sockaddr_in {
        short   sin_family;
        u_short sin_port;
        struct  in_addr sin_addr;
        char    sin_zero[8];
};

*/
