/*
 * ipxtunnel.h
 */

#ifndef IPXTUNNEL_H_INC
#define IPXTUNNEL_H_INC

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <signal.h>
#include <string.h>
#include <netdb.h>
#include <errno.h>
#include <endian.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <arpa/nameser.h>
#include <arpa/inet.h>
#include <linux/if_ether.h>

#ifdef DEBUG
#define DPRINT(s)	printf(s)
#define DPRINT2(s, a)	printf(s, a)
#else
#define DPRINT(s)
#define DPRINT2(s, a)
#endif

#ifndef MAX
#define MAX(a, b)	((a) > (b) ? (a) : (b))
#endif

#ifndef FALSE
#define FALSE 0
#define TRUE 1
#endif

#define CONFIG_FILE	"/etc/ipxtunnel.conf"
#define DEFAULT_PORT	7666			/* send birthday cards */

#define REMOTE		0
#define LOCAL		1
#define HASHLEN		211	/* Size of hashtable */
#define MAXAGE		10
#define AGEINTERVAL	20	/* Interval (secs) to check ages of addressinfos */

#define COMPRESSED	0x1
#define UNCOMPRESSED	0x2
#define HDR_COMPRESSED	0x4

struct packet {
	unsigned short	flag;
	unsigned short	len;
	char		buf[ETH_FRAME_LEN];
};

#endif /* IPXTUNNEL_H_INC */
