Hello Varrian, Thanks for the code.
Which is the main udp you are referring to? How will packets be copied from the sink to the source (assuming i have a single source/sink agent) and then retransmitted to n2? Thank you. On 6/27/06, Varrian Hall <[EMAIL PROTECTED]> wrote: > > Hi, > I think the only difference in udp and udpsink is the sink has a > receive function that frees the packet where the source udp may not have a > receive function. If the source has a receive it's probably to receive an > ack back from the sink then it frees the packet. Therefore, to use the same > udp for source and sink you will have to add those receive and/or other > functions in the sink to the main udp, then you can use this new udp as a > source and sink. I attached both cc and header file. Ignore the accounting > and rate calculation using scaling unless you're interested. The link below > has more info. > > http://nile.wpi.edu/NS/new_app_agent.html > > later, > Varrian > > > On 6/27/06, Nicholas Loulloudes < [EMAIL PROTECTED]> wrote: > > > > Varrian , thanks for the prompt responce. > > > > You mean i have to modify the UDP C++ class to do so? Do you have any > > fragment of code you can post to make it more clear? > > > > Thanks in advance. > > > > > > On 6/27/06, Varrian Hall <[EMAIL PROTECTED]> wrote: > > > > > > Yep, > > > You have to create a shared or global class variable within the > > > application that is attached to the agent. Create a app_recv and a > > > app_fwd > > > application and attach to udp agent. Attach both udp agents to node 1. > > > When agent_recv gets the packet and sends up to the app where it saves the > > > pkt data, now agent_fwd can access same global class and send to node 2. > > > In > > > my scenario, I modified UDP to UDPxx to act as both a source and sink. I > > > then attached this udp to all nodes. > > > > > > later, > > > Varrian > > > > > > > > > On 6/26/06, Nicholas Loulloudes < [EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > > Hello, > > > > > > > > I have three nodes in ns2 (n0-n1-n2). n0 is connected to n1 and n1 > > > > is > > > > connected to n2. > > > > > > > > I have created a UDP agent on n0 and a UDP sink on n1 to send some > > > > packets. > > > > > > > > Is there a way the packets received from n1 to be forwarded to n2??? > > > > > > > > > > > > I don't want to connect n0 to n2....just only forward packets of a > > > > specific > > > > flow ton n2 from n1 > > > > > > > > Regards, > > > > > > > > -- > > > > Nicholas Loulloudes > > > > > > > > Postgraduate at Communication Networks and Software. > > > > > > > > BSc in Computer Science. > > > > > > > > > > > > > > > > -- > > > "As a leader you should learn like you'll live forever and live like > > > you'll die tomorrow. Either way, you're covered." Dr. John C. Maxwell > > > > > > > > > > > -- > > > > Nicholas Loulloudes > > > > Postgraduate at Communication Networks and Software. > > > > BSc in Computer Science. > > > > > > -- > "As a leader you should learn like you'll live forever and live like > you'll die tomorrow. Either way, you're covered." Dr. John C. Maxwell > > -- Nicholas Loulloudes Postgraduate at Communication Networks and Software. BSc in Computer Science.
