Link Search Menu Expand Document

OpenDTN TCL Interpreter Commands

Command dtn::endpoint

Use to configure endpoints on the local node.

This command may be issued interactively or via script.


dtn::endpoint add <uri>

  • uri URI of the form scheme :// node_name / endpoint. Currently, dtn is the only supported scheme. Returns endpoint id, otherwise -1 upon fail.

dtn::endpoint del <endpoint_id>

endpoint_id is returned by the add subcommand. del returns 0 upon success, otherwise -1.

dtn::endpoint fetch <if_name>

  • if_name was to have been created via the add subcommand.

Retrieves and returns a dictionary object for the given endpoint id.


dtn::endpoint add

set uri "dtn://node-20/send"

set id [dtn::endpoint add $uri]

if {$id < 0} {
	puts "Error: dtn::endpoint add"
} else {
	puts "New endpoint with id: $id"

dtn::endpoint del

set result [dtn::endpoint del $id]

if {$result < 0} {
	puts "Error: dtn::endpoint del"
} else {
	puts "Endpoint deleted with id: $id"

dtn::endpoint fetch

Capture dictionary object and display values from keys.

set if_name "udp0"

set result [dtn::endpoint fetch $if_name]

if {[dict size $result] == 0} {
	puts "if_name is not configured"
} else {
	foreach k [dict keys $result] {
		set v [dict get $result $k]
		puts "\t$k = $v"