    /* 
       At this point, all I have to do is to grab the ttl value 
       from the received packet and put it in p's ttl field after
-@@ -150,8 +248,6 @@
+@@ -150,8 +258,6 @@
    */
  
    ipheader = (struct ip *) p->accessdata();

 	return (Network::command(argc, argv));
 }
--- dist-ns-allinone-2.26/ns-2.26/emulate/net-pcap.cc	Wed Feb 26 15:08:40 2003
+++ ns-allinone-2.26/ns-2.26/emulate/net-pcap.cc	Thu Apr  1 17:02:04 2004
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1998 The Regents of the University of California.

 }
 
+bool PacketDecapsulateIfNeeded(Packet *p) {
+    struct ip *ipheader = (struct ip *)p->accessdata();
+    if (!ipheader || ipheader->ip_p != IPPROTO_ENCAP )
+	return false;
