[j-sim-users] how to define different interface types in tcl

pei zhongmin peizhongmin at gmail.com
Mon Oct 23 04:31:12 CDT 2006


hi:
   i am wondering how to ploy and draw graph in jsim? Is there any tools
such as xgraph,gnuplot etc.in NS2? thanks!
  btw,i am learning jsim these days for WSN research, very glad to join this
group!


Pei Zhongmin


2006/10/20, ling shi <shiling18 at hotmail.com>:
>
>  Here's the script. I'm coding a wireless extention to OSPF in a package
> called ospfmdr. I would like to specify the interface type 5 during the node
> creation.
>
> ------------------------------------
>
> # six node scenario
> #
> cd [mkdir -q drcl.comp.Component /example]
>
> # create the topology
> puts "create topology..."
>
> # create node 0
> puts "create node 0"
> set node0 [mkdir drcl.comp.Component n0]
> cd n0
> mkdir drcl.inet.mac.LL              ll
> mkdir drcl.inet.mac.ARP             arp
> mkdir drcl.inet.core.queue.FIFO     queue
> mkdir drcl.inet.mac.Mac_802_11      mac
> mkdir drcl.inet.mac.WirelessPhy     phy
> mkdir drcl.inet.mac.FreeSpaceModel  propagation
> mkdir drcl.inet.mac.MobilityModel   mobility
> mkdir drcl.inet.core.Hello    hello
> mkdir drcl.inet.protocol.ospfmdr.OSPF  ospf
> set PD [mkdir drcl.inet.core.PktDispatcher      pktdispatcher]
> set RT [mkdir drcl.inet.core.RT                 rt           ]
> set ID [mkdir drcl.inet.core.Identity           id           ]
> $PD bind $RT
> $PD bind $ID
>
> # enable route_back flag at PktDispatcher
> ! pktdispatcher setRouteBackEnabled true
>
> # connect components in node 0
> puts "connect components in node 0"
> connect phy/.mobility@    -and mobility/.query@
> connect phy/.propagation@ -and propagation/.query@
> connect mac/down@ -and phy/up@
> connect mac/up@   -and queue/output@
> connect ll/.mac@ -and mac/.linklayer@
> connect ll/down@ -and queue/up@
> connect ll/.arp@ -and arp/.arp@
> connect -c pktdispatcher/0 at down -and ll/up@
> connect -c ospf/down@ -and pktdispatcher/698 at up
> connect ospf/.service_rt@ -and rt/.service_rt@
> connect ospf/.service_id@ -and id/.service_id@
> connect ospf/.service_if@ -and hello/.service_if@
> connect hello/.service_id@ -and id/.service_id@
> #connect mac/.linkbroken@ -and ospf/.linkbroken@
>
> ! arp setAddresses  0 0
> ! ll  setAddresses  0 0
> ! mac setMacAddress 0
> ! phy setNid        0
> ! mobility setNid   0
> ! id setDefaultID   0
> ! hello setStaticEnabled true
> #public InterfaceInfo (int type_, long localAddress_, long
> localAddressMask_,int mtu_, double bw_, int bufferSize_)
> set iinfo [java::new drcl.inet.data.InterfaceInfo 5 0 -8 -1 -1 -1]
> ! hello _setInterfaceInfo 0 $iinfo
> ! hello _setInterfaceInfo 1 [java::new drcl.inet.data.InterfaceInfo 0 -8]
> ! hello _setInterfaceInfo 2 [java::new drcl.inet.data.InterfaceInfo 5 0 -8
> -1 -1 -1]
>
> #                                   maxX   maxY     minX   minY
> dX      dY     dZ
> ! mobility setTopologyParameters  2000.0    0.0   2000.0    0.0   300.0
> 300.0   10.0
> ! mobility setPosition 0.0 0.0 0.0 0.0
>
> ! mac disable_PSM
> ! arp setBypassARP   true
>
> ! queue setMode      "packet"
> ! queue setCapacity  40
>
> cd ..
>
> # create node 1
> puts "create node 1"
> set node1 [mkdir drcl.comp.Component n1]
> cd n1
>
> mkdir drcl.inet.mac.LL              ll
> mkdir drcl.inet.mac.ARP             arp
> mkdir drcl.inet.core.queue.FIFO     queue
> mkdir drcl.inet.mac.Mac_802_11      mac
> mkdir drcl.inet.mac.WirelessPhy     phy
> mkdir drcl.inet.mac.FreeSpaceModel  propagation
> mkdir drcl.inet.mac.MobilityModel   mobility
> mkdir drcl.inet.core.Hello    hello
> mkdir drcl.inet.protocol.ospfmdr.OSPF  ospf
> set PD [mkdir drcl.inet.core.PktDispatcher      pktdispatcher]
> set RT [mkdir drcl.inet.core.RT                 rt           ]
> set ID [mkdir drcl.inet.core.Identity           id           ]
> $PD bind $RT
> $PD bind $ID
>
> #enable route_back flag at PktDispatcher
> ! pktdispatcher setRouteBackEnabled true
>
> puts "connect components in node 1"
> connect phy/.mobility@    -and mobility/.query@
> connect phy/.propagation@ -and propagation/.query@
> connect mac/down@ -and phy/up@
> connect mac/up@   -and queue/output@
> connect ll/.mac@ -and mac/.linklayer@
> connect ll/down@ -and queue/up@
> connect ll/.arp@ -and arp/.arp@
> connect -c pktdispatcher/0 at down -and ll/up@
> connect -c ospf/down@ -and pktdispatcher/698 at up
> connect ospf/.service_rt@ -and rt/.service_rt@
> connect ospf/.service_id@ -and id/.service_id@
> connect ospf/.service_if@ -and hello/.service_if@
> connect hello/.service_id@ -and id/.service_id@
> #connect mac/.linkbroken@ -and ospf/.linkbroken@
>
> ! arp setAddresses  1 1
> ! ll  setAddresses  1 1
> ! phy setNid        1
> ! mac setMacAddress 1
> ! mobility setNid   1
> ! id setDefaultID   1
> ! hello setStaticEnabled true
> #! hello _setInterfaceInfo 0 [java::new drcl.inet.data.InterfaceInfo 1 -8]
> set iinfo [java::new drcl.inet.data.InterfaceInfo 5 1 -8 -1 -1 -1]
> ! hello _setInterfaceInfo 0 $iinfo
>
> #                                   maxX   maxY     minX   minY
> dX      dY     dZ
> ! mobility setTopologyParameters  2000.0    0.0   2000.0    0.0   300.0
> 300.0   10.0
> ! mobility setPosition 0.0 200.0 0.0 0.0
>
> ! mac disable_PSM
> ! arp setBypassARP   true
>
> ! queue setMode      "packet"
> ! queue setCapacity  40
>
> cd ..
>
> # create node 2
> puts "create node 2"
> set node2 [mkdir drcl.comp.Component n2]
> cd n2
>
> mkdir drcl.inet.mac.LL              ll
> mkdir drcl.inet.mac.ARP             arp
> mkdir drcl.inet.core.queue.FIFO     queue
> mkdir drcl.inet.mac.Mac_802_11      mac
> mkdir drcl.inet.mac.WirelessPhy     phy
> mkdir drcl.inet.mac.FreeSpaceModel  propagation
> mkdir drcl.inet.mac.MobilityModel   mobility
> mkdir drcl.inet.core.Hello    hello
> mkdir drcl.inet.protocol.ospfmdr.OSPF  ospf
> set PD [mkdir drcl.inet.core.PktDispatcher      pktdispatcher]
> set RT [mkdir drcl.inet.core.RT                 rt           ]
> set ID [mkdir drcl.inet.core.Identity           id           ]
> $PD bind $RT
> $PD bind $ID
>
> #enable route_back flag at PktDispatcher
> ! pktdispatcher setRouteBackEnabled true
>
> puts "connect components in node 2"
> connect phy/.mobility@    -and mobility/.query@
> connect phy/.propagation@ -and propagation/.query@
> connect mac/down@ -and phy/up@
> connect mac/up@   -and queue/output@
> connect ll/.mac@ -and mac/.linklayer@
> connect ll/down@ -and queue/up@
> connect ll/.arp@ -and arp/.arp@
> connect -c pktdispatcher/0 at down -and ll/up@
> connect -c ospf/down@ -and pktdispatcher/698 at up
> connect ospf/.service_rt@ -and rt/.service_rt@
> connect ospf/.service_id@ -and id/.service_id@
> connect ospf/.service_if@ -and hello/.service_if@
> connect hello/.service_id@ -and id/.service_id@
> #connect mac/.linkbroken@ -and ospf/.linkbroken@
>
> ! arp setAddresses  2 2
> ! ll  setAddresses  2 2
> ! phy setNid        2
> ! mac setMacAddress 2
> ! mobility setNid   2
> ! id setDefaultID   2
> ! hello setStaticEnabled true
> #! hello _setInterfaceInfo 0 [java::new drcl.inet.data.InterfaceInfo 2 -8]
> set iinfo [java::new drcl.inet.data.InterfaceInfo 5 2 -8 -1 -1 -1]
> ! hello _setInterfaceInfo 0 $iinfo
> setflag trace true ospf/down@
> setflag trace true pktdispatcher/0 at down
> setflag trace true pktdispatcher/698 at up
> setflag trace true ll/up@
>
> #                                   maxX   maxY     minX   minY
> dX      dY     dZ
> ! mobility setTopologyParameters  2000.0    0.0   2000.0    0.0   300.0
> 300.0   10.0
> ! mobility setPosition 0.0 400.0 0.0 0.0
>
> ! mac disable_PSM
> ! arp setBypassARP   true
>
> ! queue setMode      "packet"
> ! queue setCapacity  40
>
> cd ..
>
> # create node 3
> puts "create node 3"
> set node3 [mkdir drcl.comp.Component n3]
> cd n3
>
> mkdir drcl.inet.mac.LL              ll
> mkdir drcl.inet.mac.ARP             arp
> mkdir drcl.inet.core.queue.FIFO     queue
> mkdir drcl.inet.mac.Mac_802_11      mac
> mkdir drcl.inet.mac.WirelessPhy     phy
> mkdir drcl.inet.mac.FreeSpaceModel  propagation
> mkdir drcl.inet.mac.MobilityModel   mobility
> mkdir drcl.inet.core.Hello    hello
> mkdir drcl.inet.protocol.ospfmdr.OSPF  ospf
> set PD [mkdir drcl.inet.core.PktDispatcher      pktdispatcher]
> set RT [mkdir drcl.inet.core.RT                 rt           ]
> set ID [mkdir drcl.inet.core.Identity           id           ]
> $PD bind $RT
> $PD bind $ID
>
> #enable route_back flag at PktDispatcher
> ! pktdispatcher setRouteBackEnabled true
>
> puts "connect components in node 3"
> connect phy/.mobility@    -and mobility/.query@
> connect phy/.propagation@ -and propagation/.query@
> connect mac/down@ -and phy/up@
> connect mac/up@   -and queue/output@
> connect ll/.mac@ -and mac/.linklayer@
> connect ll/down@ -and queue/up@
> connect ll/.arp@ -and arp/.arp@
> connect -c pktdispatcher/0 at down -and ll/up@
> connect -c ospf/down@ -and pktdispatcher/698 at up
> connect ospf/.service_rt@ -and rt/.service_rt@
> connect ospf/.service_id@ -and id/.service_id@
> connect ospf/.service_if@ -and hello/.service_if@
> connect hello/.service_id@ -and id/.service_id@
> #connect mac/.linkbroken@ -and ospf/.linkbroken@
>
> ! arp setAddresses  3 3
> ! ll  setAddresses  3 3
> ! phy setNid        3
> ! mac setMacAddress 3
> ! mobility setNid   3
> ! id setDefaultID   3
> ! hello setStaticEnabled true
> #! hello _setInterfaceInfo 0 [java::new drcl.inet.data.InterfaceInfo 3 -8]
> set iinfo [java::new drcl.inet.data.InterfaceInfo 5 3 -8 -1 -1 -1]
> ! hello _setInterfaceInfo 0 $iinfo
>
> #                                   maxX   maxY     minX   minY
> dX      dY     dZ
> ! mobility setTopologyParameters  2000.0    0.0   2000.0    0.0   300.0
> 300.0   10.0
> ! mobility setPosition 0.0 600.0 0.0 0.0
>
> ! mac disable_PSM
> ! arp setBypassARP   true
>
> ! queue setMode      "packet"
> ! queue setCapacity  40
>
> cd ..
>
> # create node 4
> puts "create node 4"
> set node4 [mkdir drcl.comp.Component n4]
> cd n4
>
> mkdir drcl.inet.mac.LL              ll
> mkdir drcl.inet.mac.ARP             arp
> mkdir drcl.inet.core.queue.FIFO     queue
> mkdir drcl.inet.mac.Mac_802_11      mac
> mkdir drcl.inet.mac.WirelessPhy     phy
> mkdir drcl.inet.mac.FreeSpaceModel  propagation
> mkdir drcl.inet.mac.MobilityModel   mobility
> mkdir drcl.inet.core.Hello    hello
> mkdir drcl.inet.protocol.ospfmdr.OSPF  ospf
> set PD [mkdir drcl.inet.core.PktDispatcher      pktdispatcher]
> set RT [mkdir drcl.inet.core.RT                 rt           ]
> set ID [mkdir drcl.inet.core.Identity           id           ]
> $PD bind $RT
> $PD bind $ID
>
> #enable route_back flag at PktDispatcher
> ! pktdispatcher setRouteBackEnabled true
>
> puts "connect components in node 4"
> connect phy/.mobility@    -and mobility/.query@
> connect phy/.propagation@ -and propagation/.query@
> connect mac/down@ -and phy/up@
> connect mac/up@   -and queue/output@
> connect ll/.mac@ -and mac/.linklayer@
> connect ll/down@ -and queue/up@
> connect ll/.arp@ -and arp/.arp@
> connect -c pktdispatcher/0 at down -and ll/up@
> connect -c ospf/down@ -and pktdispatcher/698 at up
> connect ospf/.service_rt@ -and rt/.service_rt@
> connect ospf/.service_id@ -and id/.service_id@
> connect ospf/.service_if@ -and hello/.service_if@
> connect hello/.service_id@ -and id/.service_id@
> #connect mac/.linkbroken@ -and ospf/.linkbroken@
>
> ! arp setAddresses  4 4
> ! ll  setAddresses  4 4
> ! phy setNid        4
> ! mac setMacAddress 4
> ! mobility setNid   4
> ! id setDefaultID   4
> ! hello setStaticEnabled true
> #! hello _setInterfaceInfo 0 [java::new drcl.inet.data.InterfaceInfo 4 -8]
> set iinfo [java::new drcl.inet.data.InterfaceInfo 5 4 -8 -1 -1 -1]
> ! hello _setInterfaceInfo 0 $iinfo
>
> #                                   maxX   maxY     minX   minY
> dX      dY     dZ
> ! mobility setTopologyParameters  2000.0    0.0   2000.0    0.0   300.0
> 300.0   10.0
> ! mobility setPosition 0.0 100.0 200.0 0.0
>
> ! mac disable_PSM
> ! arp setBypassARP   true
>
> ! queue setMode      "packet"
> ! queue setCapacity  40
>
> cd ..
>
> # create node 5
> puts "create node 5"
> set node5 [mkdir drcl.comp.Component n5]
> cd n5
>
> mkdir drcl.inet.mac.LL              ll
> mkdir drcl.inet.mac.ARP             arp
> mkdir drcl.inet.core.queue.FIFO     queue
> mkdir drcl.inet.mac.Mac_802_11      mac
> mkdir drcl.inet.mac.WirelessPhy     phy
> mkdir drcl.inet.mac.FreeSpaceModel  propagation
> mkdir drcl.inet.mac.MobilityModel   mobility
> mkdir drcl.inet.core.Hello    hello
> mkdir drcl.inet.protocol.ospfmdr.OSPF  ospf
> set PD [mkdir drcl.inet.core.PktDispatcher      pktdispatcher]
> set RT [mkdir drcl.inet.core.RT                 rt           ]
> set ID [mkdir drcl.inet.core.Identity           id           ]
> $PD bind $RT
> $PD bind $ID
>
> #enable route_back flag at PktDispatcher
> ! pktdispatcher setRouteBackEnabled true
>
> puts "connect components in node 5"
> connect phy/.mobility@    -and mobility/.query@
> connect phy/.propagation@ -and propagation/.query@
> connect mac/down@ -and phy/up@
> connect mac/up@   -and queue/output@
> connect ll/.mac@ -and mac/.linklayer@
> connect ll/down@ -and queue/up@
> connect ll/.arp@ -and arp/.arp@
> connect -c pktdispatcher/0 at down -and ll/up@
> connect -c ospf/down@ -and pktdispatcher/698 at up
> connect ospf/.service_rt@ -and rt/.service_rt@
> connect ospf/.service_id@ -and id/.service_id@
> connect ospf/.service_if@ -and hello/.service_if@
> connect hello/.service_id@ -and id/.service_id@
> #connect mac/.linkbroken@ -and ospf/.linkbroken@
>
> ! arp setAddresses  5 5
> ! ll  setAddresses  5 5
> ! phy setNid        5
> ! mac setMacAddress 5
> ! mobility setNid   5
> ! id setDefaultID   5
> ! hello setStaticEnabled true
> #! hello _setInterfaceInfo 0 [java::new drcl.inet.data.InterfaceInfo 5 -8]
> set iinfo [java::new drcl.inet.data.InterfaceInfo 5 5 -8 -1 -1 -1]
> ! hello _setInterfaceInfo 0 $iinfo
>
> #                                   maxX   maxY     minX   minY
> dX      dY     dZ
> ! mobility setTopologyParameters  2000.0    0.0   2000.0    0.0   300.0
> 300.0   10.0
> ! mobility setPosition 0.0 300.0 200.0 0.0
>
> ! mac disable_PSM
> ! arp setBypassARP   true
>
> ! queue setMode      "packet"
> ! queue setCapacity  40
>
> cd ..
>
> puts "create channel"
>
> mkdir drcl.inet.mac.Channel channel
> mkdir drcl.inet.mac.NodePositionTracker tracker
> #                 maxX    minX  maxY    minY   dX      dY
> ! tracker setGrid 2000.0  0.0   2000.0  0.0    300.0  300.0
>
> connect channel/.tracker@ -and tracker/.channel@
> connect /example/n0/mobility/.report@ -and /example/tracker/.node@
> connect /example/n1/mobility/.report@ -and /example/tracker/.node@
> connect /example/n2/mobility/.report@ -and /example/tracker/.node@
> connect /example/n3/mobility/.report@ -and /example/tracker/.node@
> connect /example/n4/mobility/.report@ -and /example/tracker/.node@
> connect /example/n5/mobility/.report@ -and /example/tracker/.node@
>
> ! channel setCapacity 6
>
> connect n0/phy/down@ -to channel/.node@
> ! channel attachPort 0 [! /example/n0/phy getPort .channel]
>
> connect n1/phy/down@ -to channel/.node@
> ! channel attachPort 1 [! /example/n1/phy getPort .channel]
>
> connect n2/phy/down@ -to channel/.node@
> ! channel attachPort 2 [! /example/n2/phy getPort .channel]
>
> connect n3/phy/down@ -to channel/.node@
> ! channel attachPort 3 [! /example/n3/phy getPort .channel]
>
> connect n4/phy/down@ -to channel/.node@
> ! channel attachPort 4 [! /example/n4/phy getPort .channel]
>
> connect n5/phy/down@ -to channel/.node@
> ! channel attachPort 5 [! /example/n5/phy getPort .channel]
>
> puts "setup source and sink..."
>
> mkdir drcl.inet.transport.TCP n0/tcp
> connect -c n0/tcp/down@ -and n0/pktdispatcher/17 at up
> ! n0/tcp setMSS 512;                       # bytes
>
> mkdir drcl.inet.transport.TCPSink n3/tcpsink
> connect -c n3/tcpsink/down@ -and n3/pktdispatcher/17 at up
>
> ! n0/tcp setPeer 3
>
> set src_ [mkdir drcl.inet.application.BulkSource n0/source]
> $src_ setDataUnit 512
> connect -c $src_/down@ -and n0/tcp/up@
>
> set sink_ [mkdir drcl.inet.application.BulkSink n3/sink]
> connect -c $sink_/down@ -and n3/tcpsink/up@
>
> #code to test the interface type before simulation
> mkdir drcl.comp.Component test
> connect -c test/h@ -and n1/hello/.service_if@
> set ii [java::call drcl.inet.contract.IFQuery getInterfaceInfos [!
> test/h@]]
> puts [[$ii get 0] toString]
>
> puts "simulation begins..."
> set sim [attach_simulator .]
>
> #watch -label NEIGHBOR -add n2/hello/.service_if@
> #set the debug flagg on node 2 to observe the result
> setflag debug true -at sample n2/ospf
>
> run .
>
> script {stop n1} -at 40 -on $sim
> $sim stopAt 75
>
> --------------------------------
> Regards,
> ling
>
> ------------------------------
> From:  *"Hung-ying Tyan" <tyanh at ieee.org>*
> To:  *"ling shi" <shiling18 at hotmail.com>*
> CC:  *j-sim-users at cs.uiuc.edu*
> Subject:  *Re: [j-sim-users] how to define different interface types in
> tcl*
> Date:  *Fri, 20 Oct 2006 23:59:46 +0800*
> >Ling:
> >
> >How do you build the nodes?  If you use nodeBuilder, hello should be
> >in n0/csl/.  Can you share your script?
> >
> >HT
> >
> >On 10/20/06, ling shi <shiling18 at hotmail.com> wrote:
> >>
> >>
> >>
> >>Hei,
> >>I copied the "numberOfIfaces" row first then the other three rows,
> >>and
> >>copied from different nodes, which caused the mixing of "n1" and
> >>"n0", sorry
> >>about that.
> >>
> >>The hello's service interface is connected to the router(ospf)'s
> >>service
> >>interface.
> >>mkdir drcl.inet.core.Hello    hello
> >>connect ospf/.service_if@ -and hello/.service_if@
> >>connect hello/.service_id@ -and id/.service_id@
> >>
> >>The n1/csl/hello does not exit, therefore I made a little
> >>modification on
> >>your test script by changing from n1/csl/hello/.service_if@  to
> >>n1/hello/.service_if@
> >>
> >>The result of the testing script shows also that the type is 0.
> >>type:0, local:<1,-8>, peers:<null>, timeouts:<null_double[]>,
> >>MTU=2147483647, BW=-1.0, buffer=-1
> >>
> >>Regards,
> >>ling
> >>
> >>
> >>
> >>
> >>  ________________________________
> >>
> >>From:  "Hung-ying Tyan" <tyanh at ieee.org>
> >>To:  "ling shi" <shiling18 at hotmail.com>
> >>CC:  j-sim-users at cs.uiuc.edu
> >>Subject:  Re: [j-sim-users] how to define different interface types
> >>in tcl
> >>Date:  Fri, 20 Oct 2006 18:23:54 +0800
> >>
> >> >Ling:
> >> >
> >> >Which method is your code in?  Why is it mixed with "n1"?
> >> >
> >> >Meanwhile, you may try the following script before starting the
> >> >simulation:
> >> >
> >> >mkdir drcl.comp.Component test
> >> >connect -c test/h@ -and n1/csl/hello/.service_if@
> >> >set ii [java::call drcl.inet.contract.IFQuery getInterfaceInfos
> >>[!
> >> >test/h@]]
> >> >puts [[$ii get 0] toString]
> >> >
> >> >Check if the interface type is correct.
> >> >
> >> >HT
> >> >
> >> >On 10/20/06, ling shi <shiling18 at hotmail.com> wrote:
> >> >>
> >> >>
> >> >>
> >> >>Hei,
> >> >>
> >> >>I'm making an extention to the existing OSPF codes. Here is the
> >> >>code I used
> >> >>to check the interface info.
> >> >>
> >> >>   int numberOfIfaces=IFQuery.getNumOfInterfaces(ifport);
> >> >>   drcl.inet.data.InterfaceInfo[] ifs =
> >> >>IFQuery.getInterfaceInfos(ifport);
> >> >>
> >> >>   debug("numberOfIfaces:"+numberOfIfaces);
> >> >>   for (int i=0;i<numberOfIfaces;i++){
> >> >>    if(ifs[i]!=null){
> >> >>     debug("interface "+ i+" type: "+ifs[i].getType());
> >> >>    }else debug("interface "+i+" is null");
> >> >>   }
> >> >>
> >> >>
> >> >>The result is as follows:
> >> >>DEBUG| 1.0| /example/n1/ospf/| numberOfIfaces:3
> >> >>DEBUG| 1.0| /example/n0/ospf/| interface 0 type: 0
> >> >>DEBUG| 1.0| /example/n0/ospf/| interface 1 is null
> >> >>DEBUG| 1.0| /example/n0/ospf/| interface 2 is null
> >> >>
> >> >>There are actually two things I don't understand of the result.
> >>1)
> >> >>Why the
> >> >>interface type is 0 although I've set it to be 5 in the tcl
> >>script.
> >> >>   2) Why
> >> >>the number of interfaces is 3 although I've only added one
> >> >>interface in the
> >> >>script.
> >> >>
> >> >>regards,
> >> >>ling
> >> >>
> >> >>  ________________________________
> >> >>
> >> >>From:  "Hung-ying Tyan" <tyanh at ieee.org>
> >> >>To:  "ling shi" <shiling18 at hotmail.com>
> >> >>CC:  j-sim-users at cs.uiuc.edu
> >> >>Subject:  Re: [j-sim-users] how to define different interface
> >>types
> >> >>in tcl
> >> >>Date:  Fri, 20 Oct 2006 11:43:05 +0800
> >> >>
> >> >> >Ling:
> >> >> >
> >> >> >Can you be more specific?  The script looks fine.  What do you
> >>do
> >> >>to
> >> >> >check the interface info and it still returns type 0?
> >> >> >
> >> >> >HT
> >> >> >
> >> >> >On 10/19/06, ling shi <shiling18 at hotmail.com> wrote:
> >> >> >>
> >> >> >>Hei,
> >> >> >>I'm coding a routing protocol with multiple interface types.
> >>The
> >> >> >>following
> >> >> >>line returns the default interface type 0.
> >> >> >>
> >> >> >>! hello _setInterfaceInfo 1 [java::new
> >> >>drcl.inet.data.InterfaceInfo
> >> >> >>0 -8]
> >> >> >>
> >> >> >>I then changed the script and hope that the returning
> >>interface
> >> >> >>type will be
> >> >> >>5, but it remains to be 0.
> >> >> >>
> >> >> >>set iinfo [java::new drcl.inet.data.InterfaceInfo 5 0 -8 -1
> >>-1
> >> >>-1]
> >> >> >>! hello _setInterfaceInfo 0 $iinfo
> >> >> >>
> >> >> >>What am I missing here?
> >> >> >>
> >> >> >>B.R.
> >> >> >>ling
> >> >> >>________________________________
> >> >> >>Express yourself instantly with MSN Messenger! MSN Messenger
> >> >> >>Download today
> >> >> >>it's FREE!
> >> >> >>_______________________________________________
> >> >> >>j-sim-users mailing list
> >> >> >>j-sim-users at cs.uiuc.edu
> >> >> >>http://lists.cs.uiuc.edu/mailman/listinfo/j-sim-users
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>________________________________
> >> >>FREE pop-up blocking with the new MSN Toolbar MSN Toolbar Get it
> >> >>now!
> >> >>_______________________________________________
> >> >>j-sim-users mailing list
> >> >>j-sim-users at cs.uiuc.edu
> >> >>http://lists.cs.uiuc.edu/mailman/listinfo/j-sim-users
> >> >>
> >> >>
> >> >>
> >>
> >>________________________________
> >>Express yourself instantly with MSN Messenger! MSN Messenger
> >>Download today
> >>it's FREE!
> >>_______________________________________________
> >>j-sim-users mailing list
> >>j-sim-users at cs.uiuc.edu
> >>http://lists.cs.uiuc.edu/mailman/listinfo/j-sim-users
> >>
> >>
> >>
>
>
> ------------------------------
> Express yourself instantly with MSN Messenger! MSN Messenger<http://g.msn.com/8HMAEN/2743??PS=47575>Download today it's FREE!
>
> _______________________________________________
> j-sim-users mailing list
> j-sim-users at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/j-sim-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/j-sim-users/attachments/20061023/2b86824b/attachment-0001.html 


More information about the j-sim-users mailing list