<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    ndnpoke is still serving the Interest issued by ndnpeek. I think
    that the reason is that both daemons register all the existing
    network interfaces at boot, so a face for veth1 is created and
    linked for each daemon. When nfd1 forwards to the program thanks to
    the rule set by nfdc the Interest goes through veth1, so both nfd2
    and my program get the Interest packet. <br>
    <br>
    Even if I unregister that face from nfd2 using nfdc (btw, how to
    manipulate nfd2's FIB using nfdc? the client.conf trick seems to not
    work with this utility and nfdc always modifies nfd1's FIB), the
    daemon after a while rescans a list of interfaces it holds and
    registers it back again. What could I do to stop such behavior? Is
    there any configuration related to such thing?<br>
    <br>
    Best,<br>
    Salvatore<br>
    <br>
    <div class="moz-cite-prefix">On 01/07/2016 11:00 AM, Salvatore
      Signorello wrote:<br>
    </div>
    <blockquote cite="mid:568E3727.8060805@uni.lu" type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Thanks Junxiao, this could be the option that I'm looking for.
      I've given it a try and it seems to work.<br>
      There a couple of fixes that I report here for sake of
      completeness, just in case someone else would like to replicate
      this set-up. <br>
      <br>
      1) According to the diagram you drew, ndnpoke should connect to
      nfd2.sock and ndnpeek to nfd1.sock and not vice versa as you
      wrote.<br>
      2) I changed the syntax of the URI in client.conf according to
      what I read on the nfd log, so I used strings like
      "transport=unix:///run/nfda.sock" into my client.conf files. I
      guess you may get the right syntax looking at the nfd log when it
      starts up and registers all the faces. Otherwise ndnpoke either
      did not register itself to the right daemon or crashed throwing
      malformed URI exceptions. Anyway, we should keep in mind that I'm
      not using the latest version of the daemon and the tools, so the
      syntax could have slightly changed.<br>
      <br>
      I did a quick trial and the ndn-apps communicated with the right
      daemons and the software behind the veth2 received first Interest
      and then Data packets. Now I'm looking at the daemons' logs to be
      sure that the packets went through the right path.<br>
      <br>
      Best,<br>
      Salvatore<br>
      <br>
      <div class="moz-cite-prefix">On 01/06/2016 05:32 PM, Junxiao Shi
        wrote:<br>
      </div>
      <blockquote cite="mid:568d4183.c72a620a.95ae0.16db@mx.google.com"
        type="cite">
        <meta name="Generator" content="Microsoft Word 15 (filtered
          medium)">
        <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
        <div class="WordSection1">
          <p class="MsoNormal">Hi Salvatore</p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">How about running two NFD instances?</p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">ndnpeek    ndnpoke<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">   |          |<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New""> NFD1       NFD2<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">   |          |<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New""> veth1      veth2<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">   |          |<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">   your program<o:p></o:p></span></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">You can have two NFD instances running on
            the same host by specifying different nfd.conf files on
            “--config” parameter. Each nfd.conf should have distinct
            Unix socket path and port numbers. If you need to edit
            nfd.conf in a script, check out <a moz-do-not-send="true"
              href="https://github.com/NDN-Routing/infoedit">infoedit</a>.</p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal">Then, have ndnpeek and ndnpoke connect to
            different NFD instances by specifying different client.conf,
            like:</p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">mkdir -p /tmp/ndnpoke-home/.ndn<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">echo transport=unix:/var/run/nfd1.sock >
              /tmp/ndnpoke-home/.ndn/client.conf<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">HOME=/tmp/ndnpoke-home ndnpoke /A<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">mkdir -p /tmp/ndnpeek-home/.ndn<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">echo transport=unix:/var/run/nfd2.sock >
              /tmp/ndnpeek-home/.ndn/client.conf<o:p></o:p></span></p>
          <p class="MsoNormal"><span style="font-family:"Courier
              New"">HOME=/tmp/ndnpeek-home ndnpeek /A<o:p></o:p></span></p>
          <p class="MsoNormal"><o:p> </o:p></p>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif">Yours, Junxiao<o:p></o:p></span></p>
          <div
            style="mso-element:para-border-div;border:none;border-top:solid
            #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;border:none;padding:0in"><br>
              <b>From: </b><a moz-do-not-send="true"
                href="mailto:salvatore.signorello@uni.lu">Salvatore
                Signorello</a><br>
              <b>Sent: </b>Wednesday, January 6, 2016 05:52<br>
              <b>To: </b><a moz-do-not-send="true"
                href="mailto:shijunxiao@email.arizona.edu">Junxiao Shi</a><br>
              <b>Cc: </b><a moz-do-not-send="true"
                href="mailto:nfd-dev@lists.cs.ucla.edu"><nfd-dev@lists.cs.ucla.edu></a><br>
              <b>Subject: </b>Re: [Nfd-dev] generatation of NDN-like
              packets with Scapy</p>
          </div>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif"><o:p> </o:p></span></p>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif">Hi Junxiao,<br>
              <br>
              thanks again, but I forgot to tell that changing that
              piece of software is not worth doing (long and complex
              process), I must use it as it is. This brings us back to
              my original dilemma of writing an application that sends
              ndn packets to specific network interfaces or simply
              writing a module for a packet generator? How difficult
              would be to do the former?<br>
              <br>
              <br>
              Best,<br>
              Salvatore</span><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif"><o:p></o:p></span></p>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <div>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;font-family:"Times New
                  Roman",serif">On Jan 6, 2016 01:40, "Salvatore
                  Signorello" <<a moz-do-not-send="true"
                    href="mailto:salvatore.signorello@uni.lu">salvatore.signorello@uni.lu</a>>

                  wrote:<o:p></o:p></span></p>
              <blockquote style="border:none;border-left:solid #CCCCCC
                1.0pt;padding:0in 0in 0in
                6.0pt;margin-left:4.8pt;margin-right:0in">
                <div>
                  <p class="MsoNormal" style="margin-bottom:12.0pt"><span
                      style="font-size:12.0pt;font-family:"Times
                      New Roman",serif">Hi Junxiao,<br>
                      <br>
                      thanks for your prompt feedback, below follows a
                      short description of my quick&dirty "set-up"
                      and then few more comments in-line:<br>
                      <br>
                      Scenario in mind (caveat: I don't know if it makes
                      sense, but that's what I need; so if you think of
                      an alternative, as I guess you already did
                      according to your previous suggestion, please feel
                      free of throwing away what follows and propose sth
                      else)<br>
                      -----------------------<br>
                      On the same machine where nfd is running, I use
                      the ndnpeedk to generate an Interest with prefixA.
                      My nfd has a rule that forwards Interests with
                      prefixA out to a specific veth1. On that veth1 I
                      have some software running that processes the
                      Interest and then forwards the same Interest back
                      to the nfd through a different interface, veth2.
                      In the meantime I've started a local producer
                      (ndnpoke -w) for that content that correctly
                      receives the Interest(the 2nd one received on veth
                      and not the 1st one issued by ndnpeek) and answers
                      back with the Data. The nfd forwards the data back
                      to veth2, the software processes it and then
                      forwards it to nfd through veth1. Nfd forwards the
                      data back to ndnpeek.<br>
                      <br>
                      Why am I doing this? I need two applications, one
                      consumer and one producer, like ndnpeek and
                      ndnpoke that generate ndn packets. <br>
                      <br>
                      The problems that I would like to avoid are the
                      following:<br>
                      - the pit record for the Interest issued by
                      ndnpeek risks to  drop the Interest received on
                      veth2 [SOLVED] I change the nonce when I process
                      the Interest for the 2nd time.<br>
                      - ndnpeek and ndnpoke cannot be started
                      simultaneously, otherwise ndnpoke will provide the
                      Data to ndnpeek in one step<br>
                      - if the 1st Interest creates a PIT record, how to
                      avoid that nfd will use it when receiving Data
                      from ndnpoke? The daemon will have a PIT record
                      like the following<br>
                              "prefixA/content ---- facex(local to
                      ndnpeek), facey(to veth2)"<br>
                          and it should choose only facey<br>
                          <br>
                      Quick and dirty workaround<br>
                      -----------------------------------------<br>
                      By now I simulate the scenario above in the
                      following way:<br>
                      1. Starting nfd and registering prefixA to veth1
                      with the nfdc cmd<br>
                      2. Issuing an Interest for prefixA/content with
                      ndnpeek<br>
                      3. The Interest is correctly forwarded to my
                      software through veth1 where I hold it for a while<br>
                      4. After ndnpeek timeout, I unregister prefixA
                      from nfd<br>
                      5. Starting ndnpoke for prefixA/content with a
                      long waiting time <br>
                      6. Unpausing my software that forwards the
                      original Interest to nfd through veth2<br>
                      7. nfd forwards it to ndnpoke and I get the data
                      back from veth2<br>
                      8. holding again the Data<br>
                      9. register prefixA again like done in 2<br>
                      10. issuing a new Interest with ndnpeek<br>
                      11. unpausing the Data to forwarded it back first
                      to nfd and then to ndnpeek<br>
                      <br>
                      Crazy, isn't it?<o:p></o:p></span></p>
                </div>
              </blockquote>
            </div>
          </blockquote>
        </div>
      </blockquote>
      <br>
      <pre class="moz-signature" cols="72">-- 
Salvatore Signorello
PhD student @ SecanLab

Interdisciplinary Centre for Security, Reliability and Trust
SnT, University of Luxembourg
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://wwwen.uni.lu/snt/people/salvatore_signorello">http://wwwen.uni.lu/snt/people/salvatore_signorello</a></pre>
      <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>
    <pre class="moz-signature" cols="72">-- 
Salvatore Signorello
PhD student @ SecanLab

Interdisciplinary Centre for Security, Reliability and Trust
SnT, University of Luxembourg
<a class="moz-txt-link-freetext" href="http://wwwen.uni.lu/snt/people/salvatore_signorello">http://wwwen.uni.lu/snt/people/salvatore_signorello</a></pre>
  </body>
</html>