/* STRUCTS */
struct pseudo_header{  /* For TCP header checksum */
  u_long source_address;
  u_long dest_address;
  u_char placeholder;
  u_char protocol;
  u_short tcp_length;
  struct tcphdr tcp;
};

struct target_host {
  struct in_addr addr;
  u_short port;
};

struct gre_packet {
  u_short bitfield;
#define GRE_CKSUM 0x8000
#define GRE_ROUTE 0x4000
#define GRE_KEY   0x2000
#define GRE_SEQ   0x1000
#define GRE_SSR   0x0800
#define GRE_RECUR 0x0700
#define GRE_ACK   0x0080  
#define GRE_FLAGS 0x0078
#define GRE_VERS  0x0007
  u_short proto;
  u_short KeyHW;
  u_short KeyLW;
  u_long  seqnumber;
  u_long  acknumber;
};

/* DEFINES */
#define SIZE_U_CHAR	1
#define SIZE_U_SHORT	2
#define SIZE_U_LONG 	4
#define SIZE_IN_ADDR	4
#define SIZE_ETHER_H 	14
#define SIZE_IP_H 	20
#define SIZE_TCP_H	20
#define SIZE_PSEUDO_H	32
#define SIZE_FULL_PKT   54
#define MAXDLBUF        8192


#ifdef SOLARIS
#define DEVICENAME "le0"
#endif
#ifdef BPF
#define DEVICENAME "zp0"
#define BPF_DEVICE      "/dev/bpf0"
#define SESSION_BUFFER  2048
#endif

