[ns] How to write tcl
Hi i want to ask that how i can write a tcl file to use my own protocol for communication. On 3/14/09, ns-users-requ...@isi.edu ns-users-requ...@isi.edu wrote: Send Ns-users mailing list submissions to ns-users@isi.edu To subscribe or unsubscribe via the World Wide Web, visit http://mailman.isi.edu/mailman/listinfo/ns-users or, via email, send a message with subject or body 'help' to ns-users-requ...@isi.edu You can reach the person managing the list at ns-users-ow...@isi.edu When replying, please edit your Subject line so it is more specific than Re: Contents of Ns-users digest... Today's Topics: 1. wireless access point (mm) 2. How to simulate mutiple priority queues in ns-2 (Thanh D. Do) 3. how to set threshold level to queue (muralikrishna g) 4. upgrade ns2.32 to ns2.33 (mm) 5. how to get queue size (muralikrishna g) 6. Re: wireless access point (Kiran K Chauhan) 7. Re: ns-2 on windows vista (hakki) 8. How to get information of a node from an agent? (Truong Thuy) 9. Neighbor List (Mayank Daga) 10. How to send a message from one node to another node (i.e. to send an integer value) (muralikrishna g) 11. How to Drop Packets From a Particular Sender (muralikrishna g) 12. Re: How to send a message from one node to another node (i.e. to send an integer value) (Sidney Doria) 13. Re: How to Drop Packets From a Particular Sender (Teerawat Issariyakul) 14. Re: How to Drop Packets From a Particular Sender (Mats Folke) 15. TCO flag in trace file (antonioli) 16. TCO flag in trace file (antonioli) 17. Help!! (vap) -- Message: 1 Date: Fri, 13 Mar 2009 11:12:46 +0800 From: mm min...@gmail.com Subject: [ns] wireless access point To: ns-users@ISI.EDU Message-ID: 6e5ba8080903122012ib207fffl9cb3bd384e791...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hello and thank you very much for all your efforts Could you please tell me if NS2 (version 2.32) can support simulation of wireless networks in infrastructure mode (it means wireless nodes connected to a wireless access point)? Thanks in advance -- Message: 2 Date: Thu, 12 Mar 2009 23:21:23 -0400 From: Thanh D. Do th...@wayne.edu Subject: [ns] How to simulate mutiple priority queues in ns-2 To: ns-users@ISI.EDU Message-ID: 96c42cba0903122021j64e53151v52875156a90e4...@mail.gmail.com Content-Type: text/plain; charset=utf-8 Hi folks, I am a newbie with ns-2. I have a problem of simulating multiple priority queues. In Linux, normally, there is a socket buffer corresponding to each connection. Data streaming into each socket buffer is encapsulated into packets which obtain TCP headers and IP headers. Throughout this processing, the packet streams corresponding to each connection is kept separate. Finally, there is a single ??priority queue?, into which all streams feed. All streams that have data ready to send take equal turns draining into the priority queue. (FAIR) There is another possible approach. Instead of a single priority queue (transmit queue), there are 16 priority queues. These are called bands and they range in number from 0 to 15, where band 15 has lowest priority and band 0 has highest priority. All the connections of i priority feed fairly into the i th priority queue. (SPRT). I have attached a figure describing these two approaches. My question is, is it possible to simulate both FAIR and SPRT in ns-2. Could you guys give me some hints how to do that? I really appreciate any suggestion. Sincerely, Thanh -- Message: 3 Date: Fri, 13 Mar 2009 10:01:34 +0530 From: muralikrishna g muralikrishn...@gmail.com Subject: [ns] how to set threshold level to queue To: NS-mail ns-users@ISI.EDU Message-ID: d2b7457a0903122131p573d8e14rc6ae051ed50b6...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 hi to all.. how to set a threshold level to queue in a router.. and if the threshold level is reached i have to send a message to upstream router.. how to do it.. please help me.. i am in need thank you -- Message: 4 Date: Fri, 13 Mar 2009 13:03:53 +0800 From: mm min...@gmail.com Subject: [ns] upgrade ns2.32 to ns2.33 To: ns-users@ISI.EDU Message-ID: 6e5ba8080903122203i4a4731f3mb4b2e742864e9...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hello and thanks a lot I have installed ns2.32 on ubuntu7.10 now I want to upgrade my ns2 to NS2.33. could you please tell me how can I upgrade that? Thanks in advance -- Message: 5 Date: Fri, 13 Mar 2009 11:59:21 +0530 From: muralikrishna g muralikrishn...@gmail.com Subject: [ns] how to get queue size To: NS-mail ns-users@ISI.EDU Message-ID:
[ns] how to get queue_size at run time
hi to all.. i am using ns-2.33, how to access the queue size at run time, is there any tcl script to get the queue size at run time, please help me regarding this.. by muralikrishna gaddam
[ns] NEED HELP IN LEACH TCL
Hi... I generated tcl for LEACH protocol using Script generator tool in manasim framework...i am using ns 2.29..Its not working properly.simulation time,data transfer, nam...nothing works .please help me THANKS
[ns] NEED HELP IN LEACH
nodes generate data...I need to send them to clusterheads and forward to the destination...How to do this..?i generated tcl using script generator tool available in manasim framework...(ns 2.29).. but data transfer is not taking place. PLEASE HELP METHANKS
[ns] Fw: Hello Everyone
From: cdhcq Sent: Saturday, March 14, 2009 10:28 AM To: ns-users@isi.edu Subject: Hello Everyone Dear All: I have a problem when I test the mflood example. Now I send you the problem I have faced! Please help me! thanks some related files are as follows: mflood-3nodes.tcl mflood-seqtable.h mflood.cc mflood-packet.h mflood.h mflood-seqtable.cc/*= # mflood.cc = */ #include mflood.h #include mflood-packet.h #include random.h #include cmu-trace.h #include iostream // New packet type int hdr_mflood::offset_; static class MFloodHeaderClass : public PacketHeaderClass { public: MFloodHeaderClass() : PacketHeaderClass(PacketHeader/MFlood, sizeof(hdr_mflood)) { bind_offset(hdr_mflood::offset_); } } class_mfloodhdr; // TCL Hooks static class MFloodclass : public TclClass { public: MFloodclass() : TclClass(Agent/MFlood) {} TclObject* create(int argc, const char*const* argv) { assert(argc == 5); return (new MFlood((nsaddr_t) atoi(argv[4]))); // PBO agrv[4] is index_} } } class_rtProtoMFlood; int MFlood::command(int argc, const char*const* argv) { Tcl tcl = Tcl::instance(); if(argc == 2) { if(strncasecmp(argv[1], id, 2) == 0) { tcl.resultf(%d, index_); return TCL_OK; } else if (strcmp(argv[1], uptarget) == 0) { if (uptarget_ != 0) tcl.result(uptarget_-name()); return (TCL_OK); } } else if(argc == 3) { if(strcmp(argv[1], index_) == 0) { index_ = atoi(argv[2]); return TCL_OK; } else if(strcmp(argv[1], log-target) == 0 || strcmp(argv[1], tracetarget) == 0) { logtarget = (Trace*) TclObject::lookup(argv[2]); if(logtarget == 0) return TCL_ERROR; return TCL_OK; } else if (strcmp(argv[1], uptarget) == 0) { if (*argv[2] == '0') { target_ = 0; return (TCL_OK); } uptarget_ = (NsObject*)TclObject::lookup(argv[2]); if (uptarget_ == 0) { tcl.resultf(no such object %s, argv[2]); return (TCL_ERROR); } return (TCL_OK); } //µ×ϵĴaÊǹPÕßÐÂÔöµÄ else if (strcasecmp (argv[1], port-dmux) == 0) { TclObject *obj; port_dmux_ = (NsObject *) obj; return TCL_OK; } } return Agent::command(argc, argv); } MFlood::MFlood(nsaddr_t id) : Agent(PT_MFLOOD), port_dmux_(0) { index_ = id; logtarget = 0; myseq_ = 0; } // Route Handling Functions void MFlood::rt_resolve(Packet *p) { struct hdr_cmn *ch = HDR_CMN(p); struct hdr_ip *ih = HDR_IP(p); struct hdr_mflood *fh = HDR_MFLOOD(p); MFlood_RTEntry* rt; rt = rtable_.rt_lookup(ih-saddr()); if(rt == NULL) { rt = new MFlood_RTEntry(ih-saddr(), fh-seq_); LIST_INSERT_HEAD(rtable_.rthead,rt,rt_link); printf(%.8f %d,no uptarget,\n,NOW_,index_); forward(rt,p,FORWARD_DELAY); printf(%.8f %d,no rt,so forward.rt_seq:%d,pkt seq:%d\n,NOW_,index_,rt-max_seqno,fh-seq_); rtable_.rt_print(); } // else if(rt-seq_ fh-seq_ ) else if(rt-isNewSeq(fh-seq_) ) { printf(%.8f %d,no uptarget,\n,NOW_,index_); forward(rt, p, FORWARD_DELAY); // rt-seq_ = fh-seq_; rt-addSeq(fh-seq_); printf(%.8f %d,rt seq too small,so forward,rt_seq:%d,packet seq:%d.\n, NOW_,index_,rt-max_seqno,fh-seq_); rtable_.rt_print(); } else { drop(p, LOWSEQ); } } // Packet Reception Routines void MFlood::recv(Packet *p, Handler*) { struct hdr_cmn *ch = HDR_CMN(p); struct hdr_ip *ih = HDR_IP(p); struct hdr_mflood *fh = HDR_MFLOOD(p); assert(initialized()); if((ih-saddr() == index_) (ch-num_forwards() == 0)) { // Must be a packet I'm originating... ch-size() += IP_HDR_LEN; // Add the IP Header ih-ttl_ = NETWORK_DIAMETER; fh-seq_ = myseq_++; forward((MFlood_RTEntry*)1,p,0); return; } else if(ih-saddr() == index_) { // I received a packet that I sent. Probably a routing loop. drop(p, DROP_RTR_ROUTE_LOOP); return; } else { // Packet I'm forwarding... if(--ih-ttl_ == 0) { // Check the TTL. If it is zero, then discard. drop(p, DROP_RTR_TTL); return; } } rt_resolve(p); } // Packet Transmission Routines void MFlood::forward(MFlood_RTEntry* rt, Packet *p, double delay) { struct hdr_cmn *ch = HDR_CMN(p); struct hdr_ip *ih = HDR_IP(p); assert(ih-ttl_ 0); assert(rt != 0); // assert(rt-rt_flags == RTF_UP); ch-next_hop_ = -1; //Broadcast address ch-addr_type() = NS_AF_INET; ch-direction() = hdr_cmn::DOWN; //important: change the packet's direction if(delay 0.0) { Scheduler::instance().schedule(target_, p, Random::uniform(delay*2)); } else { // Not a broadcast packet, no delay, send immediately Scheduler::instance().schedule(target_, p, 0.); } } /*=== mflood.h
[ns] SENDING DATA IN LEACH
Hi... I generated tcl for LEACH protocol using Script generator tool in manasim framework...i am using ns 2.29..Its not working properly.simulation time,data transfer, nam...nothing works .please help me THANKS
[ns] Packet dropping with multiple agents
Hi all, I have two nodes with different source agents for UDP but sink is same for the two. In the simulation most of the packets get dropped. I have tried changing the node positions making them sufficiently close so that transmission range couldn't be problem but still getting most of packets dropped. Please let me know if anybody has the solution. Thanks Arslan
[ns] installing ns in linux
hi i worked with ns-2 under cygwin and now decide to installing linux an after that ns-2 under linux. because xgraph and nam didnt work under cygwin. now i need help for installing linux which version is good for ns? (for example suse,redhat,.) whats the diffrence between versions for ns-2? whats the methode of installing with winxp? i should install both of them (winxp and linux) thanks mr.ali.balador homepage:www.balador.org
Re: [ns] FW: Query regarding nam
hi its my problem. V K rathi wrote: Respected members, I have installed ns-2.33 on cygwin on my vista home basic laptop. while running simple example programs, I get error, $ nam: no display name and no $DISPLAY environment variable. I tried set it with export DSIPLAY=:0.0 it gives error $ nam: couldn't connect to display 0.0 I also tried startx before running programs, it gives following error, $ nam: [code omitted because of length] : no event type or button # or keysym while executing bind Listbox MouseWheel { %W yview scroll [expr {- (%D / 120) * 4}] units } invoked from within if {[tk windowingsystem] eq classic || [tk windowingsystem] eq aqua} { bind Listbox MouseWheel { %W yview scroll [expr {- (%D)}] units } bind Li... I tried xhost+ command, it says command not found. can anybody figure out where the problem lies? I am new to ns-2 as well as linux environment so please. Thanks in anticipation. Regards, Vinod Kumar Maheshwari. st106...@ait.ac.th. Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie. Learn Now _ See how Windows connects the people, information, and fun that are part of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/ -- View this message in context: http://www.nabble.com/FW%3A-Query-regarding-nam-tp22058156p22421274.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Ns2 error : Makefile errors
Hi, I am new to the ns2 community. I was implementing the Mark Greis implemetation of the new ping protocol for my ns-2.33 on Ubuntu 8.04. Everything from creating a new header file, C++ code and relevant changes to the ns source files have been done. The tutorial says *Remember that you have to do a 'make depend' before you do the 'make', otherwise these two files might not be recompiled *where we have added new packet information to the packet.h file. Now I want to ask that whether I should run a makedepend for packet.h to recompile it ( in that case it is giving me an error that no Makefile present) , or to run a makedepend on ping.h and ping.cc ( in case of that it gives me warning like this for all header files included : *makedepend: warning: ping.cc (reading ping.h, line 51): cannot find include file packet.h not in packet.h not in packet.h not in /usr/include/packet.h *) Ignoring this warning, when I type in make it says : *Makefile:361: *** missing separator. Stop.* I am stuck . Kindly help Regards, Mayank Sharma