Subject: [dtn-users] new branches in mercurial tree(s)
From: Michael Demmer <[email-masked]>
To: dtn-users <[email-masked]>
Date: Wed, 20 Feb 2008 15:56:04 -0800
List-Id: dtn-users mailing list <dtn-users.mailman.dtnrg.org>

I've recently updated the DTN2 mercurial source tree with some  
branches and figured it warranted a heads-up to the people on the list.

First, DTN2, the 'session' branch contains initial support for a DTN  
session layer as a framework to implement pull-based DTN applications,  
i.e. where an application requests content that is then generated on- 
demand as opposed to having a sender always pushing the content. The  
current implementation supports both unicast and multicast sessions,  
but is quite limited.

Second, in oasys and DTN2, the 'apr-port' branch contains the  
beginnings of a rework of oasys to use the apache portable runtime  
library and thereby make a future port of the DTN software to Windows.

Feel free to email me off-list if you have questions about the above  
or any problems working with mercurial and branches.

-m

Content-class: urn:content-classes:message
Date: Mon, 11 Feb 2008 16:30:12 -0800
From: "Smith, Brian J" <[email-masked]>
To: <[email-masked]>
Subject: [dtn-users] End-To-End Delivery Receipt Problem Using dtncp and dtncpd
Reply-To: dtn-users mailing list <[email-masked]>

I did some more investigation, and I think I've solved my problem.  I
block and wait for a receipt to be delivered with dtn_recv(...).  If a
receipt is delivered, compare the receipt destination URI and the bundle
source destination URI, if they don't match then I loop, blocking and
waiting for a receipt to be delivered until the receipt destination URI
equals the bundle source destination URI.  The important thing is to
make sure that the bundle source destination URI is always unique.  I
cut and pasted an excerpt from the dtncp.c source file below.  In
hindsight it appears that Michael answered this question in the response
to my question last month, "How to Differentiate Bundle Reception,
Bundle Forwarding, and End-To-End Delivery Receipts", by using different
EID's to parse message receipts.  Doh!  Sorry about that.

...

if (delivery_receipts)
{
    memset(&reply_spec, 0, sizeof(reply_spec));
    memset(&reply_payload, 0, sizeof(reply_payload));

   // now we block waiting for the echo reply
   if ((ret = dtn_recv(handle, &reply_spec, DTN_PAYLOAD_MEM,
&reply_payload, -1)) < 0)
   {
      fprintf(stderr, "error getting reply: %d (%s)\n", ret,
dtn_strerror(dtn_errno(handle)));
     exit(1);
   }

   // My modification starts here
   printf("reply_spec.dest.uri: %s\n", reply_spec.dest.uri);
   printf("bundle_spec.source.uri: %s\n", bundle_spec.source.uri);

   while(strcmp(reply_spec.dest.uri, bundle_spec.source.uri) != 0)
   {
      // now we block waiting for the echo reply
      if ((ret = dtn_recv(handle, &reply_spec, DTN_PAYLOAD_MEM,
&reply_payload, -1)) < 0)
      {
            fprintf(stderr, "error getting reply: %d (%s)\n", ret,
dtn_strerror(dtn_errno(handle)));
            exit(1);
      }
   	printf("reply_spec.dest.uri: %s\n", reply_spec.dest.uri);
   	printf("bundle_spec.source.uri: %s\n", bundle_spec.source.uri);
   }
   // My modification ends here

...

______________________________________________ 
From: 	Smith, Brian J  
Sent:	Friday, February 08, 2008 8:32 PM
To:	[email-masked]'
Cc:	Smith, Brian J
Subject:	End-To-End Delivery Receipt Problem Using dtncp and
dtncpd

I'm having some trouble figuring out which end-to-end delivery receipts
correspond to a particular bundle.  I have four computers with DTN
installed on them.  I use the first computer <DTN_HOST1> to send out
three different bundles using three separate instances of dtncp.  The
other three computers <DTN_HOST2>, <DTN_HOST3>, and <DTN_HOST4> have the
dtncpd daemon running on them waiting for bundles to be delivered. I
send out three bundles with end-to-end delivery receipt flags set using
dtncp from <DTN_HOST1> to the other three computers running dtncpd
<DTN_HOST2>, <DTN_HOST3>, and <DTN_HOST4>.  The first two DTN
destinations <DTN_HOST2> and <DTN_HOST3> are not currently reachable
from <DTN_HOST1>, so the bundles are stored locally and those instances
of dtncp block waiting for an end-to-end delivery receipt.  I then send
out the third bundle to <DTN_HOST4> which is reachable.  At this point
all four dtncp instances on <DTN_HOST1> exit and claim to have received
end-to-end delivery receipts, even though the first two bundles have
still not been delivered.  What do I need to do so that I can tell which
end-to-end delivery receipt corresponds to a particular bundle?  Thank
you in advance, I really appreciate the help!  Below is a summary of how
I have things set up on each computer:

*****<DTN_HOST2>*****

$ DTN2/apps/dtncpd/dtncpd   /home/host2/dtn/incoming

*****<DTN_HOST3>*****

$ DTN2/apps/dtncpd/dtncpd   /home/host3/dtn/incoming

*****<DTN_HOST4>*****

$ DTN2/apps/dtncpd/dtncpd   /home/host4/dtn/incoming

*****<DTN_HOST1>*****

On xterm 1:
$ DTN2/apps/dtncp/dtncp -D /home/bs/test2 dtn://host2.dtn
...blocks waiting for DTN_HOST2 to become reachable

On xterm 2:
$ DTN2/apps/dtncp/dtncp -D /home/bs/test3  dtn://host3.dtn
...blocks waiting for DTN_HOST3 to become reachable

On xterm 3:
$ DTN2/apps/dtncp/dtncp -D /home/bs/test4  dtn://host4.dtn
...all dtncp instances receive notification that their bundle was
delivered and exits, even though this was the only bundle successfully
delivered 

Content-class: urn:content-classes:message
Date: Fri, 8 Feb 2008 20:31:50 -0800
From: "Smith, Brian J" <[email-masked]>
To: <[email-masked]>
Cc: "Smith, Brian J" <[email-masked]>
Subject: [dtn-users] End-To-End Delivery Receipt Problem Using dtncp and dtncpd
Reply-To: dtn-users mailing list <[email-masked]>

I'm having some trouble figuring out which end-to-end delivery receipts
correspond to a particular bundle.  I have four computers with DTN
installed on them.  I use the first computer <DTN_HOST1> to send out
three different bundles using three separate instances of dtncp.  The
other three computers <DTN_HOST2>, <DTN_HOST3>, and <DTN_HOST4> have the
dtncpd daemon running on them waiting for bundles to be delivered. I
send out three bundles with end-to-end delivery receipt flags set using
dtncp from <DTN_HOST1> to the other three computers running dtncpd
<DTN_HOST2>, <DTN_HOST3>, and <DTN_HOST4>.  The first two DTN
destinations <DTN_HOST2> and <DTN_HOST3> are not currently reachable
from <DTN_HOST1>, so the bundles are stored locally and those instances
of dtncp block waiting for an end-to-end delivery receipt.  I then send
out the third bundle to <DTN_HOST4> which is reachable.  At this point
all four dtncp instances on <DTN_HOST1> exit and claim to have received
end-to-end delivery receipts, even though the first two bundles have
still not been delivered.  What do I need to do so that I can tell which
end-to-end delivery receipt corresponds to a particular bundle?  Thank
you in advance, I really appreciate the help!  Below is a summary of how
I have things set up on each computer:

*****<DTN_HOST2>*****

$ DTN2/apps/dtncpd/dtncpd   /home/host2/dtn/incoming

*****<DTN_HOST3>*****

$ DTN2/apps/dtncpd/dtncpd   /home/host3/dtn/incoming

*****<DTN_HOST4>*****

$ DTN2/apps/dtncpd/dtncpd   /home/host4/dtn/incoming

*****<DTN_HOST1>*****

On xterm 1:
$ DTN2/apps/dtncp/dtncp -D /home/bs/test2 dtn://host2.dtn
...blocks waiting for DTN_HOST2 to become reachable

On xterm 2:
$ DTN2/apps/dtncp/dtncp -D /home/bs/test3  dtn://host3.dtn
...blocks waiting for DTN_HOST3 to become reachable

On xterm 3:
$ DTN2/apps/dtncp/dtncp -D /home/bs/test4  dtn://host4.dtn
...all dtncp instances receive notification that their bundle was
delivered and exits, even though this was the only bundle successfully
delivered