[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with ns-2.1b4 installation on Win98





Yesterday I posted the following:
>On my Windows 98 system, I used Visual C++ 5.0 to compile ns-2.1b4 and
>all of its required packages (Tcl/Tk/Otcl/Tclcl).  The compiles were
>successful(*), and an executable ns.exe was produced.  However, when I
>run ns.exe, it does something strange: it outputs the entire
>ASCII-fied contents of the gen/ns_tcl.cc file and exits.  I never get
>a "%" prompt.  Any idea why this is happening?
>
>(*) The ns-2.1b4 distribution did not contain prune.cc and prune.h.  I
>had to use the ns-2.1b3 versions.

I located the problem.  The makefile for Visual C++ had not been
updated for the ns-2.1b4 release.  I've attached a patch to fix this
problem below.

When I updated the Makefile, I also found a problem in the new
filter.h file.  One of the instances of the enumerated type filter_e
(DUPLICATE) seems to be defined already by the Visual C++ compiler,
and this created a conflict.  I renamed it DUPLIC and moved the
enumerated type declaration into the public section of the Filter
class, because its current location in the protected section was
making it invisible in some places where it was needed by filter.cc
(e.g., line 97).  I have attached another patch to fix this problem.

Brett


Index: makefile.vc
======================================================================
--- makefile.vc	Wed Sep  2 19:15:29 1998
+++ makefile.vc	Wed Oct 28 12:07:32 1998
@@ -98,7 +98,7 @@
 	scheduler.o object.o \
 	packet.o ip.o route.o connector.o ttl.o \
 	trace.o trace-ip.o \
-	classifier.o classifier-addr.o classifier-hash.o \
+	classifier.o classifier-addr.o classifier-hash.o classifier-virtual.o \
 	classifier-mcast.o classifier-mpath.o replicator.o \
 	classifier-mac.o \
 	app.o telnet.o tcplib-telnet.o \
@@ -122,7 +122,7 @@
 	delay.o ll.o snoop.o \
 	channel.o mac.o mac-csma.o mac-802_11.o mac-multihop.o \
 	dynalink.o rtProtoDV.o net-interface.o \
-	ctrMcast.o prune.o srm.o \
+	ctrMcast.o mcast_ctrl.o srm.o \
 	sessionhelper.o delaymodel.o srm-ssm.o \
 	srm-topo.o \
 	alloc-address.o address.o \
@@ -130,7 +130,7 @@
 	$(LIB_DIR)dmalloc_support.o \
 	webcache/http.o webcache/tcp-simple.o webcache/pagepool.o \
 	webcache/inval-agent.o webcache/tcpapp.o webcache/http-aux.o \
-	lanRouter.o
+	lanRouter.o tfcc.o filter.o
 
 # what was here before is now in emulate/
 OBJ_C =


Index: filter.h
======================================================================
--- filter.h	Tue Oct  6 14:39:34 1998
+++ patch/filter.h	Wed Oct 28 12:07:36 1998
@@ -29,11 +29,11 @@
 public:
 	Filter();
 	inline NsObject* filter_target() { return filter_target_; }
+	enum filter_e { DROP, PASS, FILTER, DUPLIC };
 protected:
-	enum filter_e { DROP, PASS, FILTER, DUPLICATE };
 	virtual filter_e filter(Packet* p);
 
-	int command(int argc, const char*const* argv);
+	int command(int argc, const char* const* argv);
 	void recv(Packet*, Handler* h= 0);
 	NsObject* filter_target_; // target for the matching packets
 };