[ns] Questions about mobile simulation
Francisco J. Ros
fjrm at dif.um.es
Wed Sep 28 02:16:18 PDT 2005
For questions (1) and (2) you may find useful our tutorial:
On Wednesday 28 September 2005 08:59, Hajer FERJANI wrote:
> Hi All,
> I'm trying to add and simulate a new protocol to ns, and I'm facing some
> 1/ I defined the structure of a new packet header. I also added the packet
> type to the enum pt_packet (in packet.h) just before the PT_NTYPE field and
> added the name of the packet to the name_ array of the packet_info class. I
> recompiled, but still get "undefined" as a protocol type in trace files.
> Any suggestions about the cause of the error?
> 2/ I'm simulating an ad hoc network and I want to broadcast a packet 2
> hops away. So I'm setting daddr (of the ip header) as IP_BROADCAST and ttl
> (of the ip header) as 2. But the message is only sent to direct neighbors
> and broadcast stops. Is that the expected behavior (in this case I should
> handle forwarding at agent level)? Or is there something wrong in what I
> did. 3/ I set the simulation area as 670*670, and then I noticed that a
> node that is giving an initial position outside the simulation area (at
> position (800,0)) is active and can send and receive messages. I thought
> that nodes are implicitly turned off as they move outside of sim area.
> Is'nt the case? How can I turn off nodes that are laying outside of
> simulation area? Thanks a lot for your help.
More information about the Ns-users