diff -uNr libpcap-0.4.orig/gencode.c libpcap-0.4/gencode.c
--- libpcap-0.4.orig/gencode.c	Sun Jul 12 15:07:07 1998
+++ libpcap-0.4/gencode.c	Tue May  8 19:52:40 2001
@@ -36,6 +36,9 @@
 
 #include <netinet/in.h>
 #include <netinet/if_ether.h>
+#ifdef _AIX
+#include <netinet/if_802_5.h>
+#endif
 
 #include <stdlib.h>
 #include <memory.h>
@@ -512,10 +515,12 @@
 #endif
 		return;
 
+#ifndef _AIX
 	case DLT_IEEE802:
 		off_linktype = 20;
 		off_nl = 22;
 		return;
+#endif
 
 	case DLT_ATM_RFC1483:
 		/*
@@ -530,6 +535,12 @@
 		off_linktype = -1;
 		off_nl = 0;
 		return;
+#ifdef _AIX
+	case DLT_TOKEN:
+		off_linktype = DLT_TOKEN;
+		off_nl = sizeof(struct ie5_hdr);
+		return;
+#endif
 	}
 	bpf_error("unknown data link type 0x%x", linktype);
 	/* NOTREACHED */
diff -uNr libpcap-0.4.orig/pcap-bpf.c libpcap-0.4/pcap-bpf.c
--- libpcap-0.4.orig/pcap-bpf.c	Sun Jul 12 15:14:56 1998
+++ libpcap-0.4/pcap-bpf.c	Tue May  8 19:53:10 2001
@@ -184,7 +184,11 @@
 		sprintf(ebuf, "kernel bpf filter out of date");
 		goto bad;
 	}
+#ifdef _AIX
+	v = 5000;	/* XXX this should be a user-accessible hook */
+#else
 	v = 32768;	/* XXX this should be a user-accessible hook */
+#endif
 	/* Ignore the return value - this is because the call fails on
 	 * BPF systems that don't have kernel malloc.  And if the call
 	 * fails, it's no big deal, we just continue to use the standard
diff -uNr libpcap-0.4.orig/pcap.h libpcap-0.4/pcap.h
--- libpcap-0.4.orig/pcap.h	Wed Oct 15 23:59:16 1997
+++ libpcap-0.4/pcap.h	Fri Mar 30 13:14:27 2001
@@ -76,6 +76,31 @@
 	bpf_u_int32 linktype;	/* data link type (DLT_*) */
 };
 
+#ifdef _AIX
+#include <net/if_types.h>
+#undef DLT_NULL
+#undef DLT_EN10MB
+#undef DLT_EN3MB
+#undef DLT_AX25
+#undef DLT_PRONET
+#undef DLT_CHAOS
+#undef DLT_ARCNET
+#undef DLT_SLIP
+#undef DLT_PPP
+#undef DLT_FDDI
+#undef DLT_IE5
+
+#define DLT_NULL IFT_OTHER
+#define DLT_EN10MB IFT_ETHER
+#define DLT_EN3MB IFT_ETHER
+#define DLT_AX25 IFT_X25
+#define DLT_ARCNET IFT_ARCNET
+#define DLT_SLIP IFT_SLIP
+#define DLT_PPP IFT_PPP
+#define DLT_FDDI IFT_FDDI
+#define DLT_TOKEN IFT_ISO88025 
+#endif  /* _AIX */
+
 /*
  * Each packet in the dump file is prepended with this generic header.
  * This gets around the problem of different headers for different
