<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I want to build a new routing protocol, but I need to extract
interest name out of from consumer application and returns run-time
error.<br>
<br>
Ptr<Interest> interest = Create<Interest> ();<br>
const Name prefix = interest->GetName () ;<br>
<br>
<br>
This is from consumer.cc<br>
<br>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"> Ptr<Name>
nameWithSequence = Create<Name> (<a class="code"
href="http://ndnsim.net/1.0/doxygen/classns3_1_1ndn_1_1_consumer.html#a11d6716730a853a7cb2ead9c50bbefbc"
style="color: rgb(70, 101, 162); font-weight: bold;
text-decoration: none;">m_interestName</a>);<br>
nameWithSequence->appendSeqNum (seq); </div>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"><a name="l00199"
style="color: rgb(145, 165, 1); font-weight: bold;
text-decoration: none;"></a><span class="lineno"
style="padding-right: 4px; text-align: right;
border-right-width: 2px; border-right-style: solid;
border-right-color: rgb(0, 255, 0); white-space: pre;
background-color: rgb(232, 232, 232);"> 199</span> <span
class="comment" style="color: rgb(128, 0, 0);">//</span></div>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"><a name="l00200"
style="color: rgb(145, 165, 1); font-weight: bold;
text-decoration: none;"></a><span class="lineno"
style="padding-right: 4px; text-align: right;
border-right-width: 2px; border-right-style: solid;
border-right-color: rgb(0, 255, 0); white-space: pre;
background-color: rgb(232, 232, 232);"> 200</span> </div>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"><a name="l00201"
style="color: rgb(145, 165, 1); font-weight: bold;
text-decoration: none;"></a><span class="lineno"
style="padding-right: 4px; text-align: right;
border-right-width: 2px; border-right-style: solid;
border-right-color: rgb(0, 255, 0); white-space: pre;
background-color: rgb(232, 232, 232);"> 201</span>
Ptr<Interest> interest = Create<Interest> ();</div>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"><a name="l00202"
style="color: rgb(145, 165, 1); font-weight: bold;
text-decoration: none;"></a><span class="lineno"
style="padding-right: 4px; text-align: right;
border-right-width: 2px; border-right-style: solid;
border-right-color: rgb(0, 255, 0); white-space: pre;
background-color: rgb(232, 232, 232);"> 202</span>
interest->SetNonce (<a class="code"
href="http://ndnsim.net/1.0/doxygen/classns3_1_1ndn_1_1_consumer.html#a02140ca5d187282fd6f2b029deb3a946"
style="color: rgb(70, 101, 162); font-weight: bold;
text-decoration: none;">m_rand</a>.GetValue ());</div>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"><a name="l00203"
style="color: rgb(145, 165, 1); font-weight: bold;
text-decoration: none;"></a><span class="lineno"
style="padding-right: 4px; text-align: right;
border-right-width: 2px; border-right-style: solid;
border-right-color: rgb(0, 255, 0); white-space: pre;
background-color: rgb(232, 232, 232);"> 203</span>
interest->SetName (nameWithSequence);</div>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"><a name="l00204"
style="color: rgb(145, 165, 1); font-weight: bold;
text-decoration: none;"></a><span class="lineno"
style="padding-right: 4px; text-align: right;
border-right-width: 2px; border-right-style: solid;
border-right-color: rgb(0, 255, 0); white-space: pre;
background-color: rgb(232, 232, 232);"> 204</span>
interest->SetInterestLifetime (<a class="code"
href="http://ndnsim.net/1.0/doxygen/classns3_1_1ndn_1_1_consumer.html#adad8e55fa1027e4c9850538e1e8622a7"
style="color: rgb(70, 101, 162); font-weight: bold;
text-decoration: none;">m_interestLifeTime</a>);</div>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"><a name="l00205"
style="color: rgb(145, 165, 1); font-weight: bold;
text-decoration: none;"></a><span class="lineno"
style="padding-right: 4px; text-align: right;
border-right-width: 2px; border-right-style: solid;
border-right-color: rgb(0, 255, 0); white-space: pre;
background-color: rgb(232, 232, 232);"> 205</span> </div>
<div class="line" style="font-weight: normal; font-style: normal;
font-variant: normal; font-stretch: normal; font-size: 13px;
line-height: 1; font-family: monospace, fixed; min-height: 13px;
white-space: pre-wrap; word-wrap: break-word; text-indent: -53px;
padding-left: 53px; padding-bottom: 0px; margin: 0px;
transition-property: background-color, box-shadow;
-webkit-transition-property: background-color, box-shadow;
transition-duration: 0.5s; -webkit-transition-duration: 0.5s;
color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto;
text-align: start; text-transform: none; widows: 1; word-spacing:
0px; -webkit-text-stroke-width: 0px;"><a name="l00206"
style="color: rgb(145, 165, 1); font-weight: bold;
text-decoration: none;"></a><span class="lineno"
style="padding-right: 4px; text-align: right;
border-right-width: 2px; border-right-style: solid;
border-right-color: rgb(0, 255, 0); white-space: pre;
background-color: rgb(232, 232, 232);"> 206</span> <span
class="comment" style="color: rgb(128, 0, 0);">// NS_LOG_INFO
("Requesting Interest: \n" << *interest);</span></div>
</body>
</html>