OpenDTN TCL Interpreter Commands
Command dtn::outbound
Configure outbound interfaces by constructing a socket for sending bundles on the local node.
This command may be issued interactively or via script.
Subcommands
dtn::outbound add <out_name> <clm> <ip> <port>
- out_name is a user given string representation of this interface.
- clm is the convergence layer module used to receive bundles.
- ip is the local nodes ip address.
- port is the local node port used by this CLM.
Returns a unique id if successfully added, otherwise returns -1.
dtn::outbound del <out_name>
dtn::outbound delete <out_name>
-
out_name was given by the
add
subcommand. Eitherdel
ordelete
can be used.del
returns 0 upon success, otherwise -1.
Returns 0 upon success, otherwise returns -1.
dtn::outbound enable <out_name>
-
out_name was given by the
add
subcommand.enable
returns 0 upon success, otherwise -1.
Enabling an interface causes opendtnd
to create the interface with the configured outbound parameters.
dtn::outbound disable <out_name>
-
out_name was given by the
add
subcommand.disable
returns 0 upon success, otherwise -1.
Disabling an interface causes opendtnd
to shutdown the named interface.
dtn::outbound fetch <out_name>
-
out_name was to have been created via the
add
subcommand.
Retrieves a dictionary object for the given interface.
Examples
dtn::outbound add <out_name> <clm> <ip> <port>
set id [dtn::outbound add "out_udp0" udpclm "10.0.20.10" 4556]
if {$id < 0} {
puts "Error: add interface"
} else {
puts "Added interface with id: $id"
}
dtn::outbound del <out_name>
dtn::outbound delete <out_name>
set result [dtn::outbound del "out_udp0"]
if {$result < 0} {
puts "Error: del interface"
} else {
puts "Deleted interface "out_udp0"
}
dtn::outbound enable <out_name>
set out_name "out_udp0"
set result [dtn::outbound enable $out_name]
if {$result < 0} {
puts "Error: enable interface"
} else {
puts "Interface $out_name enabled"
}
dtn::outbound disable <out_name>
set out_name "out_udp0"
set result [dtn::outbound disable $out_name]
if {$result < 0} {
puts "Error: disable interface"
} else {
puts "Interface $out_name disabled"
}
dtn::outbound fetch <out_name>
set out_name "out_udp0"
set result [dtn::outbound fetch $out_name]
if {[dict size $result] == 0} {
puts "$out_name is not configured"
} else {
foreach k [dict keys $result] {
set v [dict get $result $k]
puts "\t$k = $v"
}
}