#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 | 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 | ) |
if (_arg == 0) { \ fprintf(stderr, "dtnsend: %s must be specified\n", _what); \ print_usage(); \ exit(1); \ }
void fill_payload | ( | dtn_bundle_payload_t * | payload | ) |
Definition at line 559 of file dtnsend.cc.
References copies, data_source, date_buf, DTN_PAYLOAD_TEMP_FILE, dtn_set_payload(), errno, and payload_type.
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 | |||
) |
Definition at line 531 of file dtnsend.cc.
References dtn_build_local_eid(), dtn_parse_eid_string(), and verbose.
void parse_options | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 360 of file dtnsend.cc.
References arg_dest, arg_receive, arg_replyto, arg_source, bundle_count, CHECK_SET, copies, COS_BULK, COS_EXPEDITED, COS_NORMAL, COS_RESERVED, custody, custody_receipts, data_source, date_buf, DEFAULT_BUNDLE_COUNT, delivery_options, delivery_receipts, DOPTS_CUSTODY, DOPTS_CUSTODY_RCPT, DOPTS_DELETE_RCPT, DOPTS_DELIVERY_RCPT, DOPTS_DO_NOT_FRAGMENT, DOPTS_FORWARD_RCPT, DOPTS_MULTINODE_DEST, DOPTS_RECEIVE_RCPT, DOPTS_SINGLETON_DEST, DTN_PAYLOAD_FILE, DTN_PAYLOAD_MEM, DTN_PAYLOAD_TEMP_FILE, expiration, ext_blocks, forwarding_receipts, from_bundles_flag, ExtBlock::num_meta_blocks_, obsoletes_id, payload_type, print_usage(), priority, progname, receive_receipts, regid, sequence_id, sleep_time, verbose, and wait_for_report.
void print_eid | ( | char * | label, | |
dtn_endpoint_id_t * | eid | |||
) |
Definition at line 554 of file dtnsend.cc.
References dtn_endpoint_id_t::uri.
void print_usage | ( | ) |
Definition at line 325 of file dtnsend.cc.
References progname.
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.
Referenced by fill_payload(), and parse_options().
int delivery_options = 0 |
Definition at line 55 of file dtnsend.cc.
Referenced by main(), and parse_options().
int expiration = 3600 |
Definition at line 54 of file dtnsend.cc.
std::vector<ExtBlock> ext_blocks |
Definition at line 114 of file dtnsend.cc.
Referenced by main(), and parse_options().
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(), parse_options(), 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 |
Definition at line 50 of file dtnsend.cc.
Referenced by main(), and parse_options().
int verbose = 0 |
Definition at line 49 of file dtnsend.cc.
int wait_for_report = 0 |
Definition at line 51 of file dtnsend.cc.