Poisson Distribution patch for ns 2.35

576 views
Skip to first unread message

amith khandakar

unread,
Dec 16, 2013, 10:24:22 AM12/16/13
to ns-u...@googlegroups.com
Dear All

Can anyone help me in providing me with patch that has the Poisson Traffic generator in it.

Will Really appreciate it.
Regards

Andreas Andreou

unread,
Apr 3, 2014, 10:27:47 AM4/3/14
to ns-u...@googlegroups.com
Did you ever find a patch for ns-2.35. There is one for 2.28 and 2.29

knudfl

unread,
Apr 3, 2014, 12:37:10 PM4/3/14
to ns-u...@googlegroups.com
@Andreas Andreou ,,, Hi.

The old patches for ns227, ns228, ns229 :  I can't find any valid links for the "packages".
( poisson-patch-ns-2.27.gz, ns-2.28-poisson.patch.tar.gz, etc.)
... If you have the patches, could you please attach those to a new post ?

But I found "poisson.cc", originally for ns-2.26 :
http://www.iis.sinica.edu.tw/~cclljj/misc/notes/poisson.cc.html
Please also read the advices for creating the simulation : In the file poisson.cc .

It appears that the file
poisson.cc fits nicely with ns-2.35, no issues with the build. (g++-4.4).
No edits done. Except adding <TAB>tools/poisson.o \ to the Makefile.in , line 337 .
( Must be the last line in section OBJ_CC ).
... So I have attached my "patch" , poisson-ns235-files.tar.gz , for you to try out.
( I don't know if any code should be added to tcl/lib/ns-default.tcl , etc. :
Please check with the old patches.)

This what I did :
cd ns-allinone-2.35/
tar xvf
poisson-ns235-files.tar.gz && export CC=gcc-4.4 CXX=g++-4.4 && ./install

-


On Thursday, April 3, 2014 4:27:47 PM UTC+2, Andreas Andreou wrote:
poisson-ns235-files.tar.gz

Andreas Andreou

unread,
Apr 4, 2014, 1:40:33 PM4/4/14
to ns-u...@googlegroups.com
Yes I have them. Basically what I did was open the patch file and read it manually and accordingly make the necessary changes written. In that sense they are the same. However I have attached them. In the 2.28 I also have two seperate files which are the corresponding poisson.cc from the patch you found (Ling-Jyh Chen) and from the other (Kostas Pentikousis).
They are pretty similar but they do have a major difference in the getting the next time. Do you know the why's of both approaches by any chance and can you talk about it here when you look at them. Other than that Ling uses the lambda while Kostas uses the interval (1/lambda). Both overload the init() with almost the same code but Ling also calculates the nextPkttime which seems redundant since start also does that. Kostas overloads the start() as well but keeps it the same except he deletes the line for the nextPkttime and uncomments timeout which is said to do if you want the generator to send immediately upon start and Ling overloads timeout() which he keeps almost the same but replaces send with agent_->sendmsg(nbytes) which is what the body of send is in the parent class application...
ns-2.28-poisson.patch.rar
ns-2.29-poisson.patch.rar

Bilal Khan

unread,
Jun 15, 2016, 11:26:12 PM6/15/16
to Network Simulator 2 (NS2)
@knudfl,...Hi,

Can I use poisson-ns235-files.tar.gz in ns-2.33?? If yes then how?
Do I have to follow the same steps you already mentioned for the ns-2.35?
Thanks
Bilal



Thanks

knudfl

unread,
Jun 16, 2016, 7:08:55 AM6/16/16
to Network Simulator 2 (NS2)
@Bilal Khan ,  Hi.

Please explain the reason for using ns-2.33 .

1) ? Is it becuase you want to use "poisson" together with another "extra added protocol" ?

2) You can have as many versions of ns-allinone-2.xx as you want, installed at the same time :
.... /usr/local/bin/{ ns226, ns229, ns233, ns234, ns235, ns235-
poisson }.
I.e. copy ns to ns-name, and # cp ns-name
/usr/local/bin/
 → → All examples.tcl can be run with 'ns<any-name> example.tcl'

-

Bilal Khan

unread,
Jun 16, 2016, 7:12:11 AM6/16/16
to ns-u...@googlegroups.com
Thanks for your prompt reply. 
I just installed poisson patch on ns-2.33.
The reason I'm using ns-2.33 is that it has IEEE 802.11 PCF (point coordination function) developed in it. 
So I wanted to use PCF along with poisson traffic.

-Bilal

--
You received this message because you are subscribed to a topic in the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-users/Ek4Fa9ETz4Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-users+u...@googlegroups.com.
To post to this group, send email to ns-u...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-users.
For more options, visit https://groups.google.com/d/optout.



--
Bilal Khan
PhD Scholar
Decpartment of Computer Science and Engineering
Dongguk University
Seoul, South Korea

knudfl

unread,
Jun 16, 2016, 2:20:36 PM6/16/16
to Network Simulator 2 (NS2)
@Bilal Khan.

A poisson patch or a "patch-package.tar.gz" will change or overwrite your files, and I don't think you want that.

"poisson-ns235-files.tar.gz" is the edited files for ns-2.35.
.... Which I made up from the original patch = ns-2.29-poisson.patch. (Attached.)
Please read the file to know the changes.
And unpack poisson-ns235-files.tar.gz in a new empty folder to see the changes for ns-2.35 .
Details : See the files.rej in  test-patch__poisson-ns229.tar → attached.
And : Please read my above post "4/3/14".

Note : I cannot make a new patch for ns-2.33 not knowing the 'IEEE 802.11PCF' changes

-
test-patch__poisson-ns229.tar.gz
ns-2.29-poisson.patch

Mustafa Altekreeti

unread,
Jun 19, 2018, 12:54:45 PM6/19/18
to Network Simulator 2 (NS2)
I tried the patch for ns2.35, it does not work, it gave me the following error:

invalid command name "Application/Traffic/Poisson"

any idea?
Mustafa

knudfl

unread,
Jun 19, 2018, 2:39:44 PM6/19/18
to Network Simulator 2 (NS2)
@Mustafa Altekreeti.

»» invalid command name "Application/Traffic/Poisson" «« :
You are using a wrong copy of the executable 'ns',  or you have a failed build.

HOWTO
tar xvf ns-allinone-2.35_gcc5.tar.gz    
           
// 2014 update for g++ -4.4 ... -5.4  (Don't use -5.5 or later)
https
://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns
-allinone-2.35/
patch
-p0 < Poisson_ns235.patch
https
://drive.google.com/file/d/19LbEEdNRE66JScOzyaAGMnFT-YUcMPg3/view?usp=sharing
export CC=gcc-4.8 CXX=g++-4.8 && ./install
           
// Please use the gcc/g++ -4.4 ..-5.4 available for your OS.
cd ns
-2.35/
cp ns ns235
-poisson
sudo cp ns
/usr/local/bin/

---------- Simulation ----------
ns235-poisson ns-poisson.tcl     // location: tcl/poisson/

Mustafa Altekreeti

unread,
Jun 19, 2018, 3:00:36 PM6/19/18
to ns-u...@googlegroups.com
I am using ns2.35 so far and it is working fine for me,
I applied your patch for ns2.35 to be able to use Poisson traffic generator and it gave me the above error,
Mustafa

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.

Mustafa Altekreeti

unread,
Jun 19, 2018, 4:22:00 PM6/19/18
to Network Simulator 2 (NS2)
what is the purpose of last command?
ns235-poisson ns-poisson.tcl
is it just an example?

knudfl

unread,
Jun 20, 2018, 5:27:16 AM6/20/18
to Network Simulator 2 (NS2)
@Mustafa Altekreeti

ns235-poisson ns-poisson.tcl  is my command for the default simulation example →
→ cd ns-2.35/tcl/poisson/ && ns235-poisson ns-poisson.tcl

I.e. ns235-poisson is a copy of the executable 'ns' patched with Poisson.
....  See my previous post.
Using "ns_new-name" is important when you have multiple ns2 installs.
See my example from one OS : usr.local.bin-05.18.txt
usr.local.bin-05.18.txt
ns2-INFO.txt

knudfl

unread,
Jun 20, 2018, 9:42:05 AM6/20/18
to Network Simulator 2 (NS2)
@Mustafa Altekreeti.

Sorry,   "ns-poisson.tcl" is just a kind of Template.

Two Poisson examples are attached.
P-aodv-Soumia.tcl
40p-aodv-40.tcl
Reply all
Reply to author
Forward
0 new messages