diff -u /tmp/odinseye-orig/odinseye.pro ./odinseye.pro
--- /tmp/odinseye-orig/odinseye.pro	Thu Jan 17 07:53:43 2002
+++ ./odinseye.pro	Mon Jan 28 00:35:59 2002
@@ -24,7 +24,9 @@
 FORMS	= formodinseye.ui prefsdialog.ui 
 TEMPLATE	=app
 CONFIG	+= qt warn_on release thread opengl debug network gprof
-DEFINES	+= QT_MODULE_NETWORK
+DEFINES	+= QT_MODULE_NETWORK _BSD_SOURCE INTERFACE=\"any\"
+# freebsd DEFINE.  change 'fxp0' to whatever interface you want to listen on
+#DEFINES += QT_MODULE_NETWORK _BSD_SOURCE INTERFACE=\"fxp0\" FREEBSD
 INCLUDEPATH	+= /usr/include/pcap/
 LIBS	+= -lpcap -lglut -lGLU -lXi
 DBFILE	= odinseye.db
diff -u /tmp/odinseye-orig/oeConnection.cpp ./oeConnection.cpp
--- /tmp/odinseye-orig/oeConnection.cpp	Sun Jan 20 06:28:07 2002
+++ ./oeConnection.cpp	Mon Jan 28 00:22:11 2002
@@ -16,12 +16,14 @@
  *
  */
 
-#include <netinet/ip.h>
 #include <sys/types.h>
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
 #include <sys/socket.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <linux/netfilter_ipv4.h>
+// #include <linux/netfilter_ipv4.h>  not needed for linux?
 #include <arpa/inet.h>
 #include <qstring.h>
 #include <qfile.h>
diff -u /tmp/odinseye-orig/oeConnection.h ./oeConnection.h
--- /tmp/odinseye-orig/oeConnection.h	Thu Jan 17 08:29:17 2002
+++ ./oeConnection.h	Mon Jan 28 00:20:41 2002
@@ -28,6 +28,7 @@
 #include <qsemaphore.h>
 #include <qptrdict.h>
 #include <qdict.h>
+#include <sys/types.h>
 #include <netinet/in.h>
 #include <qmemarray.h>
 #include <qdatetime.h>
diff -u /tmp/odinseye-orig/oeSniffer.cpp ./oeSniffer.cpp
--- /tmp/odinseye-orig/oeSniffer.cpp	Sun Jan 20 06:00:58 2002
+++ ./oeSniffer.cpp	Mon Jan 28 00:21:38 2002
@@ -20,8 +20,9 @@
 #include <netinet/in.h>
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <netinet/in_systm.h>
 #include <netinet/ip.h>
-#include <netinet/ether.h>
+#include <netinet/if_ether.h>
 #include <netinet/udp.h>
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
@@ -180,11 +181,11 @@
   struct tcphdr *tcp;
 
   d=tcppacket->data();
-  tcp=(struct tcphdr *) (d+sizeof(struct iphdr));
+  tcp=(struct tcphdr *) (d+sizeof(struct ip));
   dataptr=(const char *)tcp;
-  dataptr+=4 * tcp->doff;
+  dataptr+=4 * tcp->th_off;
   dlen=tcppacket->size() - (dataptr - d);
-  from=(ntohl(tcp->seq) - baseseq);
+  from=(ntohl(tcp->th_seq) - baseseq);
   data.duplicate(dataptr,dlen);
 }
 
@@ -249,7 +250,7 @@
   }
 #endif
 
-  pcap=pcap_open_live("any", 2000, 0x0100, 250, buff);
+  pcap=pcap_open_live(INTERFACE, 2000, 0x0100, 250, buff);
   if (!pcap) {
     qFatal(QString("pcap failed open: %1").arg(buff));
     return;
@@ -295,7 +296,7 @@
 }
 
 void oeSniffer::handlePacket(const struct pcap_pkthdr *ph, const u_char *data) {
-  struct iphdr *ip;
+  struct ip *iph;
   QByteArray *ba;
 
   if (ph->caplen != ph->len) {
@@ -303,7 +304,7 @@
     return;
   }
 
-  if (ph->caplen < (sizeof(struct ether_header)+sizeof(struct iphdr))) {
+  if (ph->caplen < (sizeof(struct ether_header)+sizeof(struct ip))) {
     qWarning("Undersized packet. Dropped.");
     return;
   }
@@ -313,17 +314,20 @@
    * we simply add the size of the header here.
    */
 
-  ip=(struct iphdr *)(data+16);
+  iph=(struct ip *)(data+16);
+#ifdef FREEBSD
+  iph=(struct ip*)(data+sizeof(ether_header));
+#endif
 
-  switch (ip->protocol) {
-    case SOL_TCP:
-    case SOL_UDP:
+  switch (iph->ip_p) {
+    case IPPROTO_TCP:
+    case IPPROTO_UDP:
       ba=new QByteArray();
-      ba->duplicate((char *)ip, ntohs(ip->tot_len));
+      ba->duplicate((char *)iph, ntohs(iph->ip_len));
       add(ba);
       break;
     default:
-      qWarning("Got non TCP/UDP packet");
+      qWarning("Got non TCP/UDP packet: %d",iph->ip_p);
       break;
   }
 }
@@ -345,7 +349,7 @@
 }
 
 void oeSniffer::processPacket(QByteArray *ba) {
-  struct iphdr *ip;
+  struct ip *iph;
   struct udphdr *udp;
   struct tcphdr *tcp;
   char *data;
@@ -359,16 +363,16 @@
   int len, plen;
 
   data=ba->data();
-  ip=(struct iphdr *) data;
+  iph=(struct ip *) data;
 
-  if (ip->protocol == SOL_UDP) {
-    udp=(struct udphdr *) (data+sizeof(struct iphdr));
-    n=nets.find((void *)ip->daddr);
+  if (iph->ip_p == IPPROTO_UDP) {
+    udp=(struct udphdr *) (data+sizeof(struct ip));
+    n=nets.find((void *)iph->ip_dst.s_addr);
     if (! n)
       return;
-    len=ntohs(udp->len);
+    len=ntohs(udp->uh_ulen);
     len-=sizeof(struct udphdr);
-    data+=sizeof(struct iphdr)+sizeof(struct udphdr);
+    data+=sizeof(struct ip)+sizeof(struct udphdr);
     while (len > 2) {
       plen=(data[0]<<8) + data[1] + 3;
       data+=2;
@@ -382,39 +386,39 @@
       len-=plen;
       data+=plen;
     }
-  } else if (ip->protocol == SOL_TCP) {
-    tcp=(struct tcphdr *) (data+sizeof(struct iphdr));
+  } else if (iph->ip_p == IPPROTO_TCP) {
+    tcp=(struct tcphdr *) (data+sizeof(struct ip));
     
-    if ((tcp->syn) && (tcp->ack)) {
-      n=nets.take((void *)ip->daddr);
+    if ((tcp->th_flags & TH_SYN) && (tcp->th_flags & TH_ACK)) {
+      n=nets.take((void *)iph->ip_dst.s_addr);
       if (n) {
         delete n;
       }
       n=new oeNet();
-      n->n_client_addr=ip->daddr;
-      n->n_server_addr=ip->saddr;
-      n->server=new oeTCP(ntohl(tcp->seq)+1);
-      n->client=new oeTCP(ntohl(tcp->ack_seq));
+      n->n_client_addr=iph->ip_dst.s_addr;
+      n->n_server_addr=iph->ip_src.s_addr;
+      n->server=new oeTCP(ntohl(tcp->th_seq)+1);
+      n->client=new oeTCP(ntohl(tcp->th_ack));
       n->c=new oeConnection(n, link);
 
-      nets.insert((void *)ip->daddr, n);
+      nets.insert((void *)iph->ip_dst.s_addr, n);
 
-    } else if (tcp->fin) {
-      n=nets.take((void *)ip->daddr);
+    } else if (tcp->th_flags & TH_FIN) {
+      n=nets.take((void *)iph->ip_dst.s_addr);
       if (! n) 
-        n=nets.take((void *)ip->saddr);
+        n=nets.take((void *)iph->ip_src.s_addr);
       if (n) {
         delete n;
       }
     } else {
       // A normal packet? Whoa..
-      n=nets.find((void *)ip->daddr);
+      n=nets.find((void *)iph->ip_dst.s_addr);
       if (! n)
-        n=nets.find((void *)ip->saddr);
+        n=nets.find((void *)iph->ip_src.s_addr);
       if (! n)
         return;
       checkpackets=false;
-      if (ip->saddr == n->n_client_addr) {
+      if (iph->ip_src.s_addr == n->n_client_addr) {
         serverpck=false;
         checkpackets=n->client->add(ba);
       } else {
