ibrdtn / ibrdtn

A modular and lightweight implementation of the bundle protocol.
78 stars 60 forks source link

How to get `local_uri` through the socket? #158

Closed auzias closed 9 years ago

auzias commented 9 years ago

Hi everyone,

Everything is in the title. I could not find in the API documentation a way to get the local_uri (from the conf file) using the socket API.

Is it possible? (without a "hack" in which an random endpoint is set, sends a bundle to itself and parses the source/destination URI)

morgenroth commented 9 years ago

You can ask for the local endpoint with the keyword "nodename".

nodename
200 NODENAME dtn://node-a

Additionally, you can query the current endpoint of the registration.

endpoint get
200 ENDPOINT GET dtn://node-a/GgBZGzQHdlxxTknd

Or the list of registered endpoints:

registration list
200 REGISTRATION LIST
dtn://node-a/GgBZGzQHdlxxTknd