Hi,
Adding a new mac needs you to add it in the following files, referring to the
Mac/802_11.
tcl/lan/ns-mac-802_11.tcl
tcl/lan/ns-mac.tcl
tcl/lib/ns-mobilenode.tcl
tcl/lib/ns-packet.tcl
tcl/lib/ns-default.tcl
Best,
Pei
Hi,
I don't think you want to classify packets in mac layer. Instead, you want
your packets to be submitted to aodv. Thus, in aodv.cc, you need to identify
your packets in AODV::recv(Packet *p). In fact, as you know, all packets first
arrive at such a recv function in any layer. So if you
Hi,
I have never done anything with TCP layer, so I'm not sure.
But a general rule I summarized is that
1) If the two layers you want to cross-access are adjacent, you can use
uptarget_/downtarget_
2) If they are not, it is a bit of difficult to make the pointer clear. My
met
re you want to do this. For example you want to do this in
PHY layer, you just:
uptarget_->
You may want to refer to the overview diagram provided in NS manual
chapter 16. I'm new to NS, hope this helps!
2008/10/16 Daniel Dekst :
>
>
> Hi, everyone,
>
> I know how to acce
h...plz tell more about it, as it
looks ok to me, as well.
best
basima
2008/10/16 Daniel Dekst <[EMAIL PROTECTED]>
Hi, everyone,
I know how to access physical layer since Class Node provides a variable
ifhead_ for list of phys.
So
WirelessPhy* physicalLayer = (WirelessPhy*)(node_-&
Hi, everyone,
I know how to access physical layer since Class Node provides a variable
ifhead_ for list of phys.
So
WirelessPhy* physicalLayer = (WirelessPhy*)(node_->ifhead()).lh_first;
works.
But it does not provide list of mac, thus can I access mac layer similar as
above?
I know tcl may wo
It is printed by
sprintf(log_target_->pt_->buffer(),"N -t %f -n %d -e %f", s.clock(),
address_, energy_model_->energy());
in function
MobileNode::log_energy()
So maybe only the author knows the meaning of N, eNergy? Node? I think you
can just regard it as a tag to identify en
Thanks a lot!
reza mohammadi <[EMAIL PROTECTED]> wrote: hello
you must set some variable in ns-default.tcl file
for example
set mac/802_11 bandwidth_ 1e6
ns-default.tcl is in ns-allinone-2.32/ns-2.32/tcl/lib
good luck
Mubashir Rehmani <[EMAIL PROTECTED]> wrote:
Hi
I think that
here any method that
can list all tcl files which will call a certain command?
Best,
Pei
Mubashir Rehmani <[EMAIL PROTECTED]> wrote:
Hi Daniel Dekst,
You can find the variables here
http://www-rp.lip6.fr/ns-doc/ns226-doc/html/functions.htm
Regards
Mubashir Husain Rehmani
Hi, everyone,
How to find where a variable is initialized ?
I add a new mac same as mac-802_11, but it puts warning
MAC_RMAC: accessing MAC cache_ array out of range (src 0, dst 1, size 0)!
I found out that it is due to cache_node_count_ = 0.
It must be set somewhere in MAC/802_11, but I do not k
Hi,
I'm trying to use
vector stl
in ns.
I add
#include
#include
in the file.
but it claims:
Error: vector is undeclared
However, if I use a single file to try the program.
$g++ test.cpp -g -o test
It works well.
So why ns cannot recognize it?
-
雅虎邮箱,您的终生邮箱!
seems "$node off" works
-
抢注雅虎免费邮箱3.5G容量,20M附件!
I also want to know whether there is any simple way to shut down nodes.
I use "$ns_ node-config -IncomingErrProc UniformErr" to assign nodes
different link loss.
But I have to add a "kill-node" command to shut down nodes.
>--
>
>Message: 17
>Date: Wed
Hi,
Why I always get 'cannot post' message. That considerably affects my passion.
:>
In my experience, Pt_ seems to be the max transmission power and relate to
something that count the affected neighbors.
So if we change Pt_ directly, some nodes will not receive packets as we
tho
maybe you can extract the info from packet and encapsulate again
try:
struct msg_struct msg_name
memcpy(&msg_name, Pkt->accessdate(), sizeof(struct msg_struct));
[EMAIL PROTECTED] 写道:
--
Message: 10
Date: 21 May 2007 14:23:49 -
From: "SB"
Subject: [ns] How to
Hi,
I'm not quite sure about that. Just see from mac-802_11.cc, it
dosen't drop any packet whose dst = MAC_BROADCAST.
And in files like aodv.cc, in function recv(), it will drop packets
whose src = itself and forward hop num !=0 (==0 mean it generates the
packet).
So I thought all nodes i
Hi,
I'm also confused at how to compare my method with another concerning energy
consumption. Some use success ratio vs. time to illustrate the better
performance on energy save.
If you have any idea, pls tell me.
Pei
--
Message: 3
Date: Thu, 21 Dec 2006 09:38:47
Hi, all
What's the relationship of Pt_ and Pt_consume_?
I know when a node receive a packet, it will calculate Pr according to Pt_,
then decide whether successfully capture this packet. If I calculate "txPower"
according to the distance between two nodes, and replace the Pt_ then th
Hi, all
Who have once changed the rts_frame?
I added a variable (double ldDistSum) into the "struct rts_frame", then we
cannot forward packet. The dh_ra, dh_ta seems erratic. where set the
"mh->dh_ra, mh->dh_ta" of RTS. (mh = HDR_MAC802_11(pktRTS_))
I've debugged it for two days w
I'm not Matthias, but it's seems that you haven't declared "node_wakeup"
"node_sleep" in your mac/mac-tdma.h
you can try it.
Or "make clean, make depend, make", maybe they are declared somewhere
Pei
Message: 3
Date: Wed, 29 Nov 2006 13:02:25 +0100
From: "juan manuel gomez garcia"
S
You may can achieve your purpose by insert your own function in the "recv()"
function
Pei
Message: 5
Date: Wed, 29 Nov 2006 17:41:49 +0100
From: "[EMAIL PROTECTED]"
Subject: [ns] recall a procedure every time that a packet arrives
To: "ns-users"
Message-ID:
Content-Type: text/plain; ch
You might need to find a tutorial to learn something basic.
You can refer to
"Implementing a New Manet Unicast Routing Protocol in NS2" Francisco J. Ros
Pedro M. Ruiz
Or
http://blog.chinaunix.net/u/10654/showart.php?id=52030
http://140.116.72.80/~smallko/ns2/ns2.htm (need to un
Hi, all
How to access mac layer of each node?
If I create a command “attach-traceDebug” in mac-802_11.cc to transmit debug
file name to it. How could I call this command in tcl script.
Like “set ftp [new Application/FTP], $ftp attach-agent $tcp”, what should
be the first par
24 matches
Mail list logo