I simply added the following to ManagementConnection.cpp :
if( cmd[0] == "route"){
if(cmd.size() == 4){
if(cmd[1] == "add"){
dtn::core::BundleCore::getInstance().addRoute(cmd[2], cmd[3], 3600);
_stream << ClientHandler::API_STATUS_OK << " ROUTE ADDED FOR " << cmd[2] << " THROUGH " << cmd[3] << std::endl;
}
if(cmd[1] == "del"){
dtn::core::BundleCore::getInstance().removeRoute(cmd[2], cmd[3]);
_stream << ClientHandler::API_STATUS_OK << " ROUTE REMOVED FOR " << cmd[2] << " THROUGH " << cmd[3] << std::endl;
}
}
else{
_stream << ClientHandler::API_STATUS_OK << " WRONG NUMBER OF ARGUMENTS" << std::endl;
}
}
And it seems to be working like a charm simply using "route add dtn://n1.dtn dtn://n2.dtn" or "route del dtn://n1.dtn dtn://n2.dtn"