[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: icmp messages
hi mark,
i had to implement the same. my requirement was to
send an icmp source quench message to source A
whenever a router drops a packet from source A.
the way i did it is like this:
* define an ICMP agent
* each node has an ICMP agent residing on port 0.
this is done whenever you create the node.
* the queueing mechanism in the router has a pointer to
the icmp agent in the router( you can just derive a class
from whatever queueing mechanism you like and add the
pointer field)
this is done when a simplex-link from the router is
created
* when the queue drops a packet, it calls the
sendSourceQuench(pkt) method in the icmp agent using
the pointer to the icmp agent.
* since the icmp agent always resides in port 0, it is
easy to find the destination agent for the icmp
source quench pkt from the src field in "pkt"
* use the send function to send the packet.
hope it helps.
-Anand
--
Anand P. Rangarajan Email: [email protected]
Graduate Student, Comp. Science URL : http://www.cs.ucsb.edu/~anandr
UCSB, CA - 93117, USA Phone: (805) 562 8703(H),805 893 5731(O)
>
>
> Folks-
>
> I am stumped. I want to generate an ICMP-like source quesnch
> message in ns, somehow. But, I want there to be some sort of
> interaction with a queue. Basically, what I want is when a bunch of
> conditions happen in the queueing routines I generate an SQ in the
> opposite direction (back to the sender). However, from poking at
> the code for awhile, it would seem that it is very difficult to
> generate a new segment that is going in the opposite direction in
> the queueing routines. Is that true? Am I missing something? Does
> anyone have a suggestion for a way to do this?
>
> Any help/pointers would be appreciated.
>
> allman
>
>
> ---
> http://roland.grc.nasa.gov/~mallman/
>