Not at all. You dont need any agent at Node3. Its an intermediate node. It
just forwards the packets.


Regards,
Ubaid

2009/5/28 tan cam <bem...@yahoo.com>

>
> Thank you Ubaid,
> Your explaint is very clearly, but I have some question.
> Ubaid, I have a topology, and I have 4 agents: UDP1 agent on node1, UDP2
> agent on node2, sink14 on node4 (connect to UDP1) and sink24 on node4
> (connect to UDP2). Must I have any UDP agent on node3?
>
> Node1___________Node3___________________Node4
>                 /
>                /
>               /
>              /
>             /
>            /
> Node2______/
> Thanks Ubaid, againt.
>
> ===========================
> Nguyen Tan Cam
>
> HCMUS
> ===========================
>
>
>
> --- On Thu, 5/28/09, obaid abbasi <obaidabb...@gmail.com> wrote:
>
> > From: obaid abbasi <obaidabb...@gmail.com>
> > Subject: Re: [ns] Please help me, I want to count the number of packet,
> that  the intermediate node recieved.
> > To: "tan cam" <bem...@yahoo.com>
> > Date: Thursday, May 28, 2009, 2:22 PM
> > Hi,
> >
> > If you are using UDP agent then you have to look for file
> > udp.cc and then change its receive function. whichever agent
> > you are using, you have to make changes in its
> > "cc" file.
> >
> > Hope it works.
> >
> >
> > Best Regards,
> > Ubaid
> >
> > 2009/5/28 tan cam <bem...@yahoo.com>
> >
> >
> >
> > Thank you, Obaid Abbasi,
> >
> > But I don't know, what agent that I modify it's
> > recv() function.
> >
> > More information that, I want to count the received packet
> > on each node, and my counting have a frequency.
> >
> > example: if frequency is 10s, and array of counting result
> > is count[]:
> >
> >          from second 1 to second 10, I have count[0] =
> > 102 packets
> >
> >          from second 11 to second 20, I have count[1] =
> > 15 packets
> >
> >          ...
> >
> > Please help me,
> >
> > Thank you so much.
> >
> >
> >
> > ===========================
> >
> > Nguyen Tan Cam
> >
> > HCMUS
> >
> > ===========================
> >
> >
> >
> >
> >
> >
> >
> > --- On Tue, 5/26/09, obaid abbasi
> > <obaidabb...@gmail.com>
> > wrote:
> >
> >
> >
> > > From: obaid abbasi <obaidabb...@gmail.com>
> >
> > > Subject: Re: [ns] Please help me, I want to
> > count the number of packet, that  the intermediate node
> > recieved.
> >
> > > To: "tan cam" <bem...@yahoo.com>
> >
> > > Cc: ns-users@isi.edu
> >
> > > Date: Tuesday, May 26, 2009, 6:48 PM
> >
> > > Hi,
> >
> > >
> >
> > >
> >
> > > This is very simple. In the recv(Packet* p,
> >
> > > Handler*) function, access the ip header hdr_ip* iph
> >
> > > = hdr_ip::access(p)
> >
> > > and then write an "if condition" to check
> > the
> >
> > > packet received at node 2. Increment the counter in
> >
> > > "if" block every time a packet is received
> > at node
> >
> > > 2.
> >
> > >
> >
> > >
> >
> > >
> >
> > > Best Regards,
> >
> > > Ubaid
> >
> > >
> >
> > >
> >
> > > 2009/5/26 tan cam <bem...@yahoo.com>
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > > Hi everyone,
> >
> > >
> >
> > > I have the problem when I try to count the number of
> >
> > > packet, that the intermediate node received.
> >
> > >
> >
> > > I have a topology, that have 4 nodes (following
> > figure):
> >
> > >
> >
> > > node1_________Node3___________________Node4
> >
> > >
> >
> > >                /
> >
> > >
> >
> > >               /
> >
> > >
> >
> > >              /
> >
> > >
> >
> > >             /
> >
> > >
> >
> > > node2______/
> >
> > >
> >
> > >  That mean, Node1 link to Node3
> >
> > >
> >
> > >             Node2 link to Node3
> >
> > >
> >
> > >             Node3 link to Node4
> >
> > >
> >
> > > I have two agent that send packet from Node1 to Node4
> > and
> >
> > > Node2 to node4.
> >
> > >
> >
> > > (example Node1 ping node4 and Node2 ping Node4).
> >
> > >
> >
> > > Of course, all of packet through Node3 before arrive
> >
> > > node4.
> >
> > >
> >
> > > My problem is:
> >
> > >
> >
> > > I want to count the number of packet, that Node3
> >
> > > (intermediate node) received during Node1 sent packet
> > to
> >
> > > node4 and node2 sent packet to node4.
> >
> > >
> >
> > > I use NS2 version 2.33 for Redhat Linux 4.0
> >
> > >
> >
> > >
> >
> > >
> >
> > > Thank you so much.
> >
> > >
> >
> > > ===========================
> >
> > >
> >
> > > Nguyen Tan Cam
> >
> > >
> >
> > >
> >
> > >
> >
> > > HCMUS
> >
> > >
> >
> > > ===========================
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>

Reply via email to