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

Re: [ns] can i dis"connect" a link between a src and sink?



Hi Nick,

This is what i understand from below.

 --- "Nikolaos Katsarakis Austauschstud. (M.
Schweigel)" <[email protected]> wrote: >
Suppose you have 4 agents, A, B, C, D.
> 
> 1) If you first do connect A,B,  then A sends to B
> and B to A.


WHEN A,B IS CONNECTED, THERE IS A TWO WAY CONNECTION
SETUP AND HENCE BOTH DIRECTIONS CAN BE USED TO SEND TO
EACH OTHER.


> 2) If you do afterwards connect A,C, then A sends to
> C and C to A. B sends to A
> from the previous connect.


HERE ONCE AGAIN THE CONNECTION IS ESTABLISHED, IS LIKE
THE ABOVE CASE 1). BUT DOES IT NOT ALSO INCLUDE THE
CASE OF A SENDS TO B AS WELL? IF SO, IT MAKES MORE
SENSE TO ME THEN ABOUT THE REST OF THE STEPS AS WELL.


> 3) Then if you do connect C,D, A sends to C, B to A,
> C to D and D to C.


IF C AND D ARE CONNECTED, DON'T THEY GO FIRST? I.E. C
SEND TO D AND D SEND TO C, BEFORE THE REST?


> 4) And then with connect C,B, A sends to C, B to C,
> C to B and D to C.
> 
> So the only thing connect A,B does is to set the
> target of A to B and B to A,
> and does not disconnect any previous connected
> agents.
> 
> This way in a for loop, in order to be sure where
> you want to send, you should
> issue the connect command just before sending. This
> way you will always send
> where you want and you can even get acks until the
> next connect command
> involving the target agent (like above 1,2,3)


THIS MEANS TO MAKE SURE THAT THE DATA THAT I WANT TO
SEND IS GOING WHERE I WANT IT TO... I MUST FIRST
INSERT THE "$NS CONNECT $NODEA $NODEB" BEFORE SENDING
THE DATA ACROSS..

BUT WILL THIS GO TO OTHER DESTINATIONS AS WELL IF
THERE ARE OTHER PREVIOUS CONNECTIONS MADE?

ONE MORE THING I JUST THOUGHT OF.. CAN YOU CONFIRM ..
I ALWAYS THOUGHT THAT ONE MUST HAVE A PAIR OF SRC AND
SINK AND IT CAN ONLY BE USED ONCE IN A CONNECTION AND
ONCE USED, CANNOT BE RE - CONNECT WIF OTHERS..??

TA

> 
> You surely don't need to dig into C++ code, most
> propably you should read the
> connect command in /ns/tcl/lib/ns-lib.tcl, which
> will hopefully make this all
> clear to you.
> 
> Bye
> 
> Nick
> 
> melvin thomas wrote:
> 
> >  --- "Nikolaos Katsarakis Austauschstud. (M.
> > Schweigel)" <[email protected]> wrote:
> >
> > Don't know about disconnect, but maybe it is
> > > possible to do a connect between
> > > source and target just before sending data.
> Although
> >
> > THIS METHOD THAT U SUGGEST ... I AM THINKING THAT
> IF I
> > SET THIS LINK UP INSIDE A FOR LOOP .. IT WILL BE
> > UN-CONNECTED AFTER IT INCR ?
> >
> > OR IS THERE NO WAY OF DOING THIS OTHER THAN
> DELVING
> > INTO C++ ? AND IF THIS IS SO, WHERE DO I EVEN
> BEGIN ?
> >
> > PLS ADVISE ME ON WHAT I CAN DO TO RESOLVE THIS.
> >
> > TA
> >
> > > I don't know if it will
> > > work with token ring, it surely works with UDP
> > > agents who don't have acks.
> > >
> > > bye
> > >
> > > melvin thomas wrote:
> > >
> > > > Dear NS-USERS,
> > > >
> > > > I came across a disconnect in p296 of the
> on-line
> > > > manual but it is referenced to html ... can i
> use
> > > it?
> > > >
> > > > I am wondering if one can:
> > > >
> > > > $ns connect $source $sink
> > > >
> > > > can one also,
> > > >
> > > > $ns "disconnect" $source $sink  ?
> > > >
> > > > I require this because I wish to simulate a
> token
> > > ring
> > > > wif randomness using rng so that any nodes can
> > > send
> > > > any other nodes other than
> 
> 
> 
> > . all nodes
> > > created
> > > > are equiped wif both src and sinks.
> > > >
> > > > pls advise if this is possible and/or
> feasible?
> > > >
> > > > Ta
> > > >
> > > >
> > >
> >
>
_____________________________________________________________________________
> > > > http://messenger.yahoo.com.au - Yahoo!
> Messenger
> > > > - Voice chat, mail alerts, stock quotes and
> > > favourite news and lots more!
> > >
> >
> >
>
_____________________________________________________________________________
> > http://messenger.yahoo.com.au - Yahoo! Messenger
> > - Voice chat, mail alerts, stock quotes and
> favourite news and lots more!
>  

_____________________________________________________________________________
http://messenger.yahoo.com.au - Yahoo! Messenger
- Voice chat, mail alerts, stock quotes and favourite news and lots more!