[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] send (pkt, 0) ?



What I am now trying to do is to create an agent *in
C++* that will have to send out both multicast packets
(to only one group) and unicast packets (to some
particular members of this group from time to time).

As far as I know, send(pkt,0) will only send the
packets to the destination (no matter it's multicast
or unicast) of current connections.  If current
connection is multicast (i.e. dst_addr_ and dst_port_
are group address), it sends packets to that group; if
dst_addr_ and dst_port_ is a unicast agent, it sends
to that agent.  So, you mean I should connect{} each
time I switch between unicast and multicast ? 
However, I need to do it in my newly created agent in
C++.  Is there a way to do it ?

Thanks,
Frank

--- Haobo Yu <[email protected]> wrote:
> You can reset the "connection" using
> Simulator::connect{}. Essentially it
> resets addr and port but doing it this way is
> perhaps cleaner. 
> 
> On Sun, 14 May 2000, Frank Chu wrote:
> 
> > Date: Sun, 14 May 2000 21:41:17 -0700 (PDT)
> > From: Frank Chu <[email protected]>
> > To: [email protected]
> > Subject: [ns] send (pkt, 0) ?
> > 
> > Hi, folks, I need to change sending destinations
> from
> > time to time at a sending agent.  I wonder if
> > send(pkt,0) will send the packet to my destination
> > (set by dst_ ) therefore I just need to change
> dst_
> > from time to time?
> > 
> > Thanks,
> > Frank
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Send instant messages & get email alerts with
> Yahoo! Messenger.
> > http://im.yahoo.com/
> > 
> 


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/