00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef HAVE_CONFIG_H
00018 # include <dtn-config.h>
00019 #endif
00020
00021 #include "APICommand.h"
00022 #include "applib/APIServer.h"
00023
00024 namespace dtn {
00025
00026 APICommand::APICommand(APIServer* server)
00027 : TclCommand("api")
00028 {
00029 bind_var(new oasys::BoolOpt("enabled", server->enabled_ptr(),
00030 "Whether or not to enable the api server"));
00031
00032 bind_var(new oasys::InAddrOpt("local_addr", server->local_addr_ptr(),
00033 "addr",
00034 "The IP address on which the "
00035 "API Server will listen. "
00036 "Default is localhost."));
00037
00038 bind_var(new oasys::UInt16Opt("local_port", server->local_port_ptr(),
00039 "port",
00040 "The TCP port on which the "
00041 "API Server will listen. "
00042 "Default is 5010."));
00043 }
00044
00045 }