<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Adhy,</p>
    <p>A few questions:<br>
    </p>
    <p>Have you installed the recompiled version of NFD before starting
      the forwarder?<br>
    </p>
    <p>Are you running the producer and consumer on the same host,
      connected to the same instance of NFD? If not, do all intermediate
      forwarders also support CustomTag/CustomTagField?<br>
    </p>
    <p>Eric<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 07/27/2017 04:47 PM, Adhy Satya
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAAQ-83PAfwFjwOo7b36dWx-Gd25-eQ117cHsNwgz1=1TXsE-9A@mail.gmail.com">
      <div dir="ltr">Dear list members,
        <div><br>
        </div>
        <div>I wonder if you have a chance to look into this issue of
          the new field I created in NDNLPv2. It seems that it's not
          being transferred to the end host (maybe a wire encode
          problem?).</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Thank you</div>
        <div><br>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Fri, Jul 21, 2017 at 4:39 PM,
              Adhy Satya <span dir="ltr"><<a
                  href="mailto:adhysatya820@gmail.com" target="_blank"
                  moz-do-not-send="true">adhysatya820@gmail.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div dir="ltr">Just an update:
                  <div>I was able to create a new field in the NDNLP
                    packet.
                    <div><br>
                    </div>
                    <div>I changed the following files:</div>
                    <div>"ndn-cxx/src/lp/fields.hpp"</div>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div>    typedef detail::FieldDecl<field_<wbr>location_tags::Header,</div>
                      <div>                                           
                        uint64_t,</div>
                      <div>                                           
                        tlv::CustomTag> CustomTagField;</div>
                      <div>    BOOST_CONCEPT_ASSERT((Field<<wbr>CustomTagField>));</div>
                      <div>    </div>
                      <div>
                        <div>    CustomTagField</div>
                      </div>
                      <div>
                        <div>     > FieldSet;</div>
                      </div>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>"ndn-cxx/src/lp/tags.hpp"<br>
                    </div>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div>typedef SimpleTag<uint64_t, 0x60000001>
                        CustomTag;</div>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>"ndn-cxx/src/lp/tlv.hpp"<br>
                    </div>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div>CustomTag= 901</div>
                      <div><br>
                      </div>
                    </blockquote>
                    <div>compiled with ./waf</div>
                    <div><br>
                    </div>
                    "NFD/daemon/face/generic-link-<wbr>service.cpp"<br>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div>
                        <div>void</div>
                      </div>
                      <div>
                        <div>GenericLinkService::<wbr>encodeLocalFields(const
                          ndn::TagHost& netPkt, lp::Packet&
                          lpPacket)</div>
                      </div>
                      <div>
                        <div>{</div>
                      </div>
                      <div>
                        <div>  shared_ptr<lp::<wbr>IncomingFaceIdTag>
                          incomingFaceIdTag = netPkt.getTag<lp::<wbr>IncomingFaceIdTag>();</div>
                      </div>
                      <div>
                        <div>  if (incomingFaceIdTag != nullptr) {</div>
                      </div>
                      <div>
                        <div>    lpPacket.add<lp::<wbr>IncomingFaceIdField>(*<wbr>incomingFaceIdTag);</div>
                      </div>
                      <div>
                        <div>  }</div>
                      </div>
                      <div>
                        <div><br>
                        </div>
                      </div>
                      <div>
                        <div>  shared_ptr<lp::CustomTag> customTag
                          = netPkt.getTag<lp::CustomTag>()<wbr>;</div>
                      </div>
                      <div>
                        <div>  if (customTag != nullptr) {</div>
                      </div>
                      <div>
                        <div>    lpPacket.add<lp::<wbr>CustomTagField>(*customTag);</div>
                      </div>
                      <div>
                        <div>  }</div>
                      </div>
                      <div>
                        <div>}</div>
                      </div>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>compiled with ./waf<br>
                    </div>
                    <div><br>
                    </div>
                    <div>"ndn-cxx/examples/consumer.<wbr>cpp"</div>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div>
                        <div>    // Insert Packet Tag</div>
                      </div>
                      <div>
                        <div>    interest.setTag(std::make_<wbr>shared<lp::CustomTag>(54321));</div>
                      </div>
                      <div>
                        <div>    std::cout << "Tag value: "
                          << interest.getTag<lp::CustomTag><wbr>()
                          << std::endl;</div>
                      </div>
                      <div>
                        <div><br>
                        </div>
                      </div>
                      <div>
                        <div>    m_face.expressInterest(<wbr>interest,</div>
                      </div>
                      <div>
                        <div>                         
                           bind(&Consumer::onData, this,  _1, _2),</div>
                      </div>
                      <div>
                        <div>                         
                           bind(&Consumer::onTimeout, this, _1));</div>
                      </div>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>and finally, on the producer app</div>
                    <div>"ndn-cxx/examples/producer.<wbr>cpp"<br>
                    </div>
                    <blockquote style="margin:0px 0px 0px
                      40px;border:none;padding:0px">
                      <div>
                        <div>onInterest(const InterestFilter&
                          filter, const Interest& interest)</div>
                      </div>
                      <div>
                        <div>  {</div>
                      </div>
                      <div>
                        <div>    std::cout << "<< I: "
                          << interest << std::endl;</div>
                      </div>
                      <div><br>
                      </div>
                      <div>
                        <div>    // Read Packet Tag</div>
                      </div>
                      <div>
                        <div>    std::shared_ptr<lp::CustomTag>
                          tag = interest.getTag<lp::CustomTag><wbr>();</div>
                      </div>
                      <div>
                        <div>    std::cerr << "Tag from Consumer:
                          " << tag << std::endl;</div>
                      </div>
                    </blockquote>
                    <div><br>
                    </div>
                  </div>
                  <div>compiled with ./waf<br>
                  </div>
                  <div>and ran the applications, but the tag doesn't
                    arrive at the producer:</div>
                  <blockquote style="margin:0 0 0
                    40px;border:none;padding:0px">
                    <div>
                      <div><< I: /example/testApp/randomData?<wbr>ndn.MustBeFresh=1&ndn.<wbr>InterestLifetime=1000&ndn.<wbr>Nonce=1547038398</div>
                    </div>
                    <div>
                      <div>Tag from Consumer: 0</div>
                    </div>
                  </blockquote>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>Is there anything missing?</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>Thank you</div>
                  <div>
                    <div class="h5">
                      <div><br>
                      </div>
                      <div class="gmail_extra"><br>
                        <div class="gmail_quote">On Thu, Jul 20, 2017 at
                          10:54 PM, Adhy Satya <span dir="ltr"><<a
                              href="mailto:adhysatya820@gmail.com"
                              target="_blank" moz-do-not-send="true">adhysatya820@gmail.com</a>></span>
                          wrote:<br>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            <div dir="ltr">Hi,
                              <div><br>
                              </div>
                              <div>Following the idea of exchanging
                                information between the consumer and the
                                producer, what's the difference between
                                creating a ndn::lp::Packet or
                                a ndn::TagHost? Which method should I
                                use?</div>
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                              <div>I saw older posts (<a
href="http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2017-February/002260.html"
                                  target="_blank" moz-do-not-send="true">this</a>,
                                and <a
href="http://www.lists.cs.ucla.edu/pipermail/nfd-dev/2016-February/001536.html"
                                  target="_blank" moz-do-not-send="true">this</a>),
                                but this methods are for CachePolicy and
                                NextHopFaceIdTag. I want to send a
                                string "Hello" (type Name actually).</div>
                              <div><br>
                              </div>
                              <div>In line with what Ashlesh did, I
                                added the following lines at Consumer (<a
href="https://github.com/named-data/ndn-cxx/blob/master/examples/consumer.cpp#L42"
                                  target="_blank" moz-do-not-send="true">https://github.com/named-data<wbr>/ndn-cxx/blob/master/examples/<wbr>consumer.cpp#L42</a>),
                                but need help with the commented lines.</div>
                              <div><br>
                              </div>
                              <div>    ndn::lp::Packet lpPacket;<br>
                              </div>
                              <div>    // add string ("Hello") to
                                lpPacket</div>
                              <div>    // send lpPacket</div>
                              <div><br>
                              </div>
                              <div>And then I'll need to read that
                                packet in the producer.</div>
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                              <div>Thanks again for your help.</div>
                              <div><br>
                              </div>
                              <div><br>
                              </div>
                            </div>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Nfd-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nfd-dev@lists.cs.ucla.edu">Nfd-dev@lists.cs.ucla.edu</a>
<a class="moz-txt-link-freetext" href="http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev">http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>