#include <assert.h>#include <stdio.h>#include <unistd.h>#include <errno.h>#include <string.h>#include <strings.h>#include <stdlib.h>#include <sys/time.h>#include <time.h>#include <vector>#include "dtn_api.h"Go to the source code of this file.
Classes | |
| class | ExtBlock |
Defines | |
| #define | PATH_MAX 1024 |
| #define | CHECK_SET(_arg, _what) |
Functions | |
| void | parse_options (int, char **) |
| dtn_endpoint_id_t * | parse_eid (dtn_handle_t handle, dtn_endpoint_id_t *eid, char *str) |
| void | print_usage () |
| void | print_eid (char *label, dtn_endpoint_id_t *eid) |
| void | fill_payload (dtn_bundle_payload_t *payload) |
| int | main (int argc, char **argv) |
Variables | |
| char * | progname |
| int | copies = 1 |
| int | verbose = 0 |
| int | sleep_time = 0 |
| int | wait_for_report = 0 |
| int | expiration = 3600 |
| int | delivery_options = 0 |
| dtn_bundle_priority_t | priority = COS_NORMAL |
| dtn_bundle_payload_location_t | payload_type = DTN_PAYLOAD_FILE |
| char * | data_source = NULL |
| char | date_buf [256] |
| std::vector< ExtBlock > | ext_blocks |
| char * | arg_replyto = NULL |
| char * | arg_source = NULL |
| char * | arg_dest = NULL |
| dtn_reg_id_t | regid = DTN_REGID_NONE |
| #define CHECK_SET | ( | _arg, | |||
| _what | ) |
Value:
if (_arg == 0) { \ fprintf(stderr, "dtnsend: %s must be specified\n", _what); \ print_usage(); \ exit(1); \ }
| #define PATH_MAX 1024 |
Definition at line 38 of file dtnsend.cc.
| void fill_payload | ( | dtn_bundle_payload_t * | payload | ) |
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 133 of file dtnsend.cc.
References arg_dest, arg_replyto, arg_source, dtn_bundle_spec_t::blocks, dtn_bundle_spec_t::blocks_len, dtn_bundle_spec_t::blocks_val, dtn_bundle_payload_t::buf, buf, dtn_bundle_payload_t::buf_len, bundle_id, bundle_spec, copies, dtn_bundle_id_t::creation_ts, dtn_extension_block_t::data, dtn_extension_block_t::data_len, dtn_extension_block_t::data_val, delivery_options, dtn_bundle_spec_t::dest, dtn_bundle_spec_t::dopts, dtn_close(), dtn_copy_eid(), dtn_errno(), dtn_open(), DTN_PAYLOAD_MEM, dtn_recv(), DTN_REG_DROP, dtn_register(), dtn_send(), dtn_strerror(), DTN_SUCCESS, DTN_TIMEOUT_INF, dtn_reg_info_t::endpoint, expiration, dtn_bundle_spec_t::expiration, dtn_reg_info_t::expiration, ext_blocks, fill_payload(), dtn_extension_block_t::flags, dtn_reg_info_t::flags, dtnsim::gettimeofday(), handle, dtn_bundle_spec_t::metadata, dtn_bundle_spec_t::metadata_len, dtn_bundle_spec_t::metadata_val, ExtBlock::num_meta_blocks_, parse_eid(), parse_options(), print_eid(), priority, dtn_bundle_spec_t::priority, regid, dtn_reg_info_t::regid, reply_payload, reply_spec, dtn_bundle_spec_t::replyto, dtn_timestamp_t::secs, dtn_timestamp_t::seqno, sleep_time, dtn_bundle_id_t::source, dtn_bundle_spec_t::source, dtn_extension_block_t::type, dtn_endpoint_id_t::uri, verbose, and wait_for_report.
| dtn_endpoint_id_t* parse_eid | ( | dtn_handle_t | handle, | |
| dtn_endpoint_id_t * | eid, | |||
| char * | str | |||
| ) |
| void parse_options | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 90 of file dtnrecv.c.
References bundletype, change, count, DTN_PAYLOAD_FILE, DTN_REG_DEFER, DTN_REG_DROP, DTN_REG_EXEC, DTN_REGID_NONE, endpoint, expiration, failure_action, failure_script, filename, no_find_reg, PATH_MAX, progname, quiet, recv_timeout, regid, register_only, unregister, usage(), and verbose.
| void print_eid | ( | char * | label, | |
| dtn_endpoint_id_t * | eid | |||
| ) |
| void print_usage | ( | ) |
| char* arg_dest = NULL |
Definition at line 119 of file dtnsend.cc.
| char* arg_replyto = NULL |
Definition at line 117 of file dtnsend.cc.
| char* arg_source = NULL |
Definition at line 118 of file dtnsend.cc.
| int copies = 1 |
Definition at line 48 of file dtnsend.cc.
| char* data_source = NULL |
Definition at line 61 of file dtnsend.cc.
| char date_buf[256] |
Definition at line 62 of file dtnsend.cc.
| int delivery_options = 0 |
| int expiration = 3600 |
Definition at line 54 of file dtnsend.cc.
| std::vector<ExtBlock> ext_blocks |
| dtn_bundle_payload_location_t payload_type = DTN_PAYLOAD_FILE |
Definition at line 60 of file dtnsend.cc.
| dtn_bundle_priority_t priority = COS_NORMAL |
Definition at line 56 of file dtnsend.cc.
Referenced by _wrap_dtn_bundle_priority_set(), _wrap_dtn_bundle_spec_t_priority_set(), main(), make_spec(), and XS().
| char* progname |
Definition at line 45 of file dtnsend.cc.
| dtn_reg_id_t regid = DTN_REGID_NONE |
Definition at line 121 of file dtnsend.cc.
| int sleep_time = 0 |
| int verbose = 0 |
Definition at line 49 of file dtnsend.cc.
| int wait_for_report = 0 |
Definition at line 51 of file dtnsend.cc.
1.5.8