    for (; i < MAX_PACKETS ; i++) {
      ident[i] = -1;
      offset[i] = -1;
-   }
- 
-+  sbuflen = rbuflen = ROUNDUP(sizeof(struct ip) + Packet::hdrlen_, sizeof(unsigned long) )
-+                      + sizeof(unsigned long);
-+  sendbuf = new unsigned char[sbuflen];
-+  recvbuf = new unsigned char[rbuflen];
- }
- 
-+IPTapAgent::~IPTapAgent()
-+{
-+  delete[] sendbuf;
-+  delete[] recvbuf;
-+}
- 
- /*
-  * Checking for duplicate packets.  Need to do this, if running
-@@ -141,7 +213,57 @@
+@@ -141,6 +202,52 @@
    
    /* TCP header info from the grabbed packet. */
    unsigned char tcphlen;

+  double bpf_ts_to_iptap_min_delay;
+  int data_idx;
+  double bpf_ts_to_iptap[80000];
+#endif
+  unsigned char *sendbuf;
+  unsigned int sbuflen;
+  unsigned char *recvbuf;
+  unsigned int rbuflen;
 };
 
 #endif /* iptap_h */
--- dist/ns-allinone-2.26/ns-2.26/emulate/net-ip.cc	Wed Feb 26 15:08:40 2003
+++ ns-allinone-2.26/ns-2.26/emulate/net-ip.cc	Thu Oct 16 13:44:08 2003
@@ -668,6 +668,20 @@
 				tcl.result("1");
 			return (TCL_OK);
 		}
+/* This may not be defined since it is a custom socket option that
+   was added. Look in <sys/socket.h> */
+#ifndef SO_RTABID
+#define SO_RTABID 0x1010
+#endif
+		if (strcmp(argv[1], "setrtabid") == 0) {
+			unsigned int rtabid = atoi(argv[2]);
+			if( ::setsockopt(ssock_, SOL_SOCKET, SO_RTABID,
+					 &rtabid, sizeof(rtabid)) < 0 ) {
+			  tcl.result(strerror(errno));
+			  return (TCL_ERROR);
+			}
+			return (TCL_OK);
+		}
 	}
 	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	Tue Aug 12 16:16:17 2003
@@ -69,83 +69,6 @@
 #include "tclcl.h"
 #include "packet.h"

  * as there are from the packet capture facility.
  * For every packet received through the callback, it populates the ns packet
  * ttl value and inject it into the simulator by calling target_->recv
@@ -197,14 +405,17 @@
 void
 IPTapAgent::recvpkt()
 {
