IBR-DTNSuite
0.12
|
#include "config.h"
#include <ibrdtn/data/Bundle.h>
#include <ibrdtn/api/Client.h>
#include <ibrcommon/net/socket.h>
#include <ibrcommon/data/File.h>
#include <ibrcommon/thread/SignalHandler.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
Go to the source code of this file.
Functions | |
void | print_help () |
int | init (int argc, char **argv) |
void | term (int signal) |
int | main (int argc, char **argv) |
Variables | |
bool | _running = true |
ibrcommon::socketstream * | _conn = NULL |
std::string | _appname = "trigger" |
std::string | _script = "" |
std::string | _shell = "/bin/sh" |
ibrcommon::File | blob_path ("/tmp") |
dtn::data::EID | group |
bool | signed_only = false |
int init | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 64 of file dtntrigger.cpp.
References _appname, _script, _shell, blob_path, ibrcommon::BLOB::changeProvider(), ibrcommon::File::exists(), print_help(), and signed_only.
Referenced by main(), and ibrcommon::ThreadsafeState< THREAD_STATE >::reset().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 147 of file dtntrigger.cpp.
References _appname, _running, _script, _shell, blob_path, ibrcommon::socketstream::close(), dtn::api::Client::close(), dtn::api::Client::connect(), dtn::data::PrimaryBlock::DTNSEC_STATUS_VERIFIED, dtn::data::Bundle::find(), dtn::data::PrimaryBlock::get(), dtn::api::Client::getBundle(), ibrcommon::File::getPath(), dtn::data::EID::getString(), ibrcommon::SignalHandler::handle(), init(), ibrcommon::SignalHandler::initialize(), ibrcommon::BLOB::Reference::iostream(), ibrcommon::File::remove(), signed_only, ibrcommon::Thread::sleep(), dtn::data::BundleID::source, and term().
void print_help | ( | ) |
Definition at line 50 of file dtntrigger.cpp.
void term | ( | int | signal) |
Definition at line 135 of file dtntrigger.cpp.
References _running, and ibrcommon::socketstream::close().
std::string _appname = "trigger" |
Definition at line 40 of file dtntrigger.cpp.
ibrcommon::socketstream* _conn = NULL |
Definition at line 38 of file dtntrigger.cpp.
bool _running = true |
Definition at line 35 of file dtntrigger.cpp.
std::string _script = "" |
Definition at line 41 of file dtntrigger.cpp.
std::string _shell = "/bin/sh" |
Definition at line 42 of file dtntrigger.cpp.
ibrcommon::File blob_path("/tmp") |
dtn::data::EID group |
Definition at line 46 of file dtntrigger.cpp.
Referenced by dtn_dht_handle_lookup_result(), ibrcommon::multicastsocket::join(), ibrcommon::multicastsocket::leave(), and main().
bool signed_only = false |
Definition at line 48 of file dtntrigger.cpp.