Subject: [dtn-users] Starting with DTN2

From: "Pantelis N. Karamolegkos" <[email-masked]>
Date: Tue, 22 May 2012 17:12:16 +0300

Hi,

I successfully installed DTN2 and run the typical dtnping, dtnsend, dtnrecv
commands of the manual.

I would like to go a bit deeper to the subject and I was just playing around
with the API, trying to make a simple app that sends/receives/pings over DTN
(using just the localhost as sender / receiver)

The following code is not working and I would really appreciate any kind of
help / support since I am not sure I am on the right track here.

Many thanx.

int main(int argc, char** argv) {

                char *const ps_argv[] = {"dtnping", 0};

                execv("/home/pantelis/dtn/apps/dtnping", ps_argv);

                return (EXIT_SUCCESS);

}

I am using NetBeans7, on Ubuntu 11.10

---

From: "Iannicca, Dennis C. (GRC-RHN0)" <[email-masked]>
Date: Tue, 22 May 2012 09:59:14 -0500

On May 22, 2012, at 10:12 AM, Pantelis N. Karamolegkos wrote:
I would like to go a bit deeper to the subject and I was just playing around with the API, trying to make a simple app that sends/receives/pings over DTN (using just the localhost as sender / receiver)

The following code is not working and I would really appreciate any kind of help / support since I am not sure I am on the right track here.

Many thanx.

int main(int argc, char** argv) {
                char *const ps_argv[] = {“dtnping”, 0};
                execv(“/home/pantelis/dtn/apps/dtnping”, ps_argv);
                return (EXIT_SUCCESS);
}

I'd start by looking at the source code for the DTN2 apps instead.  For instance dtn2/apps/dtnping/dtnping.c or dtn2/apps/dtnsend/dtnsend.cc.  That will show you how to use the DTN2 API to send bundles from within your program.  The dtnsend.cc example should be pretty straightforward.