<html><head><meta http-equiv="Content-Type" content="text/html charset=GB2312"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi Xu,</div><div><br></div><div>There are two different things that are called "metric".  One thing that is metric for the face as managed by setMetric() method in ndn::NetDeviceFace.  This parameter is configured for the scenario in topology file (<a href="http://ndnsim.net/examples.html#node-grid-example-using-topology-plugin">http://ndnsim.net/examples.html#node-grid-example-using-topology-plugin</a>; 4th element on each line in 'link' block).</div><div><br></div><div>The other "metric" belongs to FIB entry:  priority with which interests for the prefix should be routed via this face.  This metric can be either configured manually via "AddRoute" call (<a href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_stack_helper.html#aa30137bf3324ce86d1a3c0708c0ac1f2">http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_stack_helper.html#aa30137bf3324ce86d1a3c0708c0ac1f2</a>), or if you use ndn::GlobalRoutingContoller, will be set automatically as a sum of individual ndn::NetDeviceFace metrics on the path.</div><div><br></div><div>I hope this clarifies the confusion,</div><div>Alex</div><br><div><div>On Nov 2, 2013, at 8:11 PM, <a href="mailto:xuzhw2001@gmail.com">xuzhw2001@gmail.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 14px; font-family: 微软雅黑; line-height: 1.5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 10px;"><div>  Hi, Alex</div><div> </div><div>  Thank you for the reply, that help a lot. I have understood these items. But what does <FACE-METRIC> here stand for exactly? I have read the  <a href="http://ndn-fib-entry.cc/">ndn-fib-entry.cc</a><span class="Apple-converted-space"> </span>and its .h.</div><div>  There is an int32_t  variable named metric, and the class is also named FaceMetric. I am confused, since the class FaceMetric has many factors such as status,rtt, how can you only use  one variable to represent this class? Is the int32_t  variable metric a point of the class FaceMetric? But why setMetric() in<span class="Apple-converted-space"> </span><a href="http://ndn-net-device-face.cc/">ndn-net-device-face.cc</a><span class="Apple-converted-space"> </span>set the varialbe to be 1 on the line 63.</div><div>  Look forward to your reply, thanks a lot.</div><div> </div><hr align="left" size="1" style="height: 1px; width: 210px;"><span><div><div style="font-size: 10pt; font-family: verdana; margin: 10px;"><div>Xu Zhiwei</div><div> </div></div></div><div> </div><div style="border-top-color: rgb(181, 196, 223); border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0cm 0cm;"><div style="font-size: 12px; font-family: tahoma; background-color: rgb(239, 239, 239); padding: 8px;"><div><b>发件人:</b> <a href="mailto:alexander.afanasyev@ucla.edu">Alex Afanasyev</a></div><div><b>发送时间:</b> 2013-11-02 06:08</div><div><b>收件人:</b> <a href="mailto:xuzhw2001@gmail.com">xuzhw2001</a></div><div><b>抄送:</b> <a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a></div><div><b>主题:</b> Re: A question about ndnSim routing item</div></div></div><div><div class="FoxDiv20131103085942722725" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; background-color: white;"><base href="x-msg://1387/"><div>Hi Xu,</div><div><br></div><div>I hope the list you showed is not for the same node, otherwise something is strange.</div><div><br></div><div>You can see the implementation detail on what is printed inside in model/<a href="http://ndn-net-device-face.cc">ndn-net-device-face.cc</a> and model/fw/<a href="http://ndn-fib-entry.cc">ndn-fib-entry.cc</a> (last methods), but here is brief summary:</div><div><br></div><div>dev[0]=net(0,0-4)(2,y,1)</div><div><br></div><div>for NetDeviceFace with PointToPointNetDevice</div><div><br></div><div>dev[<NODE ID>) = net(<FACE-ID>, <NODE-ID of one side of P2PChannel>-<NODE-ID of the other side of the channel))(<TOTAL-ROUTING-COST>, <STATUS-Y-for-yellow-G-for-gree-R-for-red>, <FACE-METRIC>)</div><div><br></div><div>for AppFace</div><div>dev = local(<FACE-ID>)</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Oct 22, 2013, at 7:22 PM,<span class="Apple-converted-space"> </span><a href="mailto:xuzhw2001@gmail.com">xuzhw2001@gmail.com</a><span class="Apple-converted-space"> </span>wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite" style="margin-bottom: 0px; margin-left: 2em; margin-top: 0px;"><div style="white-space: normal; text-transform: none; word-spacing: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-size: inherit; line-height: 1.5; font-family: 微软雅黑; margin: 10px; orphans: 2; widows: 2; letter-spacing: normal; text-indent: 0px; -webkit-text-stroke-width: 0px;"><div foxmail_class="mail_content_body" style="margin: 10px;"><div>Hi, Alex</div><div> </div><div>I have written some experiments on ndnSim recently. Now, I have two problem about the routing process in ndnSim.</div><div>(1) I can't understand the detail of the routing item which I got in my experiment, listed as below:</div><div><div style="font-size: 14px; font-family: arial; line-height: 1.7;">/root    dev[0]=net(0,0-4)(2,y,1)<br>/root    dev[0]=net(0,0-4)(2,y,1)<br>/root    dev[4]=net(2,4-6)(1,y,1)<br>/root    dev[4]=net(2,4-6)(1,y,1)<br>/root    dev=local(2)(0,g,0)<br>/root    dev=local(2)(0,g,0)</div></div><div> </div><div>Can you do me a favor to explain  the meaning of the parts in these routing items?  Thanks a lot.</div><hr align="left" size="1" style="height: 1px; width: 210px;"><span>xu zhiwei</span></div></div></blockquote></div></div></div></span></div></blockquote></div><br></body></html>