LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-21-2019, 12:41 AM   #1
Asifkhan112
LQ Newbie
 
Registered: Nov 2019
Posts: 9

Rep: Reputation: Disabled
Ns2 how to add new mac protocol in ns2


Hi every one , i have an issue with ns2. How can i add new mac protocol. I am try to add TMAC ( timeout mac) i have its tmac.h file also i have its tmac.cc file and also tmac.tcl file but i don't know how to simulate it on ns2,. Also i want to know that the file smac is already present in the ns2 files, how can i simulate it and how can i make changes to the file and then compare it with the original file.
 
Old 11-21-2019, 03:56 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Welcome to LQ.

SMAC is the easy part : SMAC-examples-4.tar.gz
https://drive.google.com/file/d/1nO4...ew?usp=sharing
Code:
set opt(mac) Mac/802_11
                 ## is / was simply edited to
set opt(mac) Mac/SMAC

TMac : Tested 2013 and earlier according to my old backups
. https://drive.google.com/file/d/0B7S...ew?usp=sharing
. https://drive.google.com/file/d/0B7S...ew?usp=sharing

The example, tmac-example.tcl was run with one of the AquaSim executable, e.g. 'ns-aqua-1010', see aquasim-examples-12.17.tar.gz
https://drive.google.com/file/d/1xcf...ew?usp=sharing
I.e. TMac (Timeout MAC) is a well known "Underwater MAC protocol"
Code:
ns-2.30/underwatersensor/uw_mac/
├── tmac.cc
├── tmac.h
Simulation example → TMac entry ...
Code:
set opt(mac)		Mac/UnderwaterMac/TMac
Aqua-Sim-1.0.tgz https://drive.google.com/file/d/0B7S...ew?usp=sharing

Aqua-Sim INFO https://www.linuxquestions.org/questions/tags/aquasim/
ns2-INFO https://drive.google.com/file/d/1FCj...ew?usp=sharing
~100 ns2 "apps", `aquasim-ns2_2.30-1.el6_i386.deb´ etc.
https://drive.google.com/drive/folde...FE?usp=sharing

? Which tmac code have you got ?
Please upload the files to e.g. Dropbox or `Google Drive´, and post a shared link.

A "non AquaSim" TMAC simulation code example :
https://drive.google.com/file/d/1EKR...ew?usp=sharing

-

Last edited by knudfl; 11-21-2019 at 04:42 AM.
 
Old 11-21-2019, 08:49 AM   #3
Asifkhan112
LQ Newbie
 
Registered: Nov 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
Smile

I have aqua-sim-ng-master.zip. but i have already tmac.cc and tmac.h files, and i want to run these files on ns2, and then i want to make some changes like the tact time of the tmac, i want to minimize it, and then compare both, how it will be done. And please give me a link or a video of doing all these into ns2, that when i download these files which you are mentioned here, how will i make it in ns2. How will i run it on ns2. Or is there any other way to simulate the tmac easily and then compare it after changes.
 
Old 11-21-2019, 09:35 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Re #3.

"aqua-sim-ng-master.zip" is ns3 code https://github.com/rmartin5/aqua-sim-ng

? Where did you get {tmac.cc, tmac.h} ? A link, please.
Or upload the files .... see post #2.

Note :
Please be aware that e.g. the ns2 RFID files {tmac.cc, tmac.h} are not "timeout__T-MAC"

ns2 AquaSim : tmac__ns2-aquasim-files.tar.gz
https://www.dropbox.com/s/vx1ciylprq...es.tar.gz?dl=0

-
 
Old 12-02-2019, 01:44 AM   #5
Asifkhan112
LQ Newbie
 
Registered: Nov 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
this is the file which i am using,

https://drive.google.com/open?id=1g2...BtB1ZFLeT1NUju

sir kindly show me how to simulate the SMAC and TMAC on ns2 and how to change the code and then how to compare it.
 
Old 12-02-2019, 06:47 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,316

Rep: Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578Reputation: 3578
Re #5.

`tmac1.0´ : Seems to be a tcl setup. Not related to otcl and ns2.

General Tcl questions : My suggestion is to ask also here
https://stackoverflow.com/questions/tagged/linux
... And hopefully one of the experts will answer.

Note : stackoverflow is an "Ask for coding issues" site.
So you will have to show some code / code snippet(s) .... for solutions.

And you can of course start a new thread here at LQ, asking for solutions about default Tcl.


Note2 : "Timeout TMAC" →
The only {tmac.cc, tmac.h} still available for ns2 is the AquaSim "Underwater TMAC", AFAIK.

-
 
Old 12-03-2019, 12:30 AM   #7
Asifkhan112
LQ Newbie
 
Registered: Nov 2019
Posts: 9

Original Poster
Rep: Reputation: Disabled
thank you sir
 
  


Reply

Tags
ns2, tmac


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running SPAN protocol on ns2 !! errors !! Hi, I am trying to SPAN protocol on ns2.28 using cygwin on windows 10 phyotay3 Linux - Wireless Networking 2 10-23-2019 09:11 AM
how to add mac protocol to ns2 ? Nesrine Linux - Newbie 1 04-10-2017 07:26 AM
I add new protocol in ns-2 name "binary marking congestion protocol(bmcc )" bhavinsorathiya Linux - Software 10 01-16-2014 09:18 AM
weight throwing protocol using ns2 code,diffusion based protocol using ns2 code rajrupa Linux - Networking 1 05-27-2010 04:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration