dtnperf-server.c File Reference

#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <strings.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include "dtn_api.h"
#include <sys/stat.h>

Go to the source code of this file.

Defines

#define BUFSIZE   16
#define BUNDLE_DIR_DEFAULT   "/var/lib/dtn/dtnperf"
#define OUTFILE   "dtnbuffer.rcv"
#define CHECK_SET(_arg, _what)

Functions

void print_usage (char *)
void parse_options (int, char **)
dtn_endpoint_id_tparse_eid (dtn_handle_t, dtn_endpoint_id_t *, char *)
int main (int argc, char **argv)

Variables

const char * progname
int use_file = 1
int verbose = 0
int aggregate = 0
int debug = 0
char * endpoint = "/dtnperf:/dest"
char * bundle_dir = BUNDLE_DIR_DEFAULT


Define Documentation

#define BUFSIZE   16

Definition at line 45 of file dtnperf-server.c.

#define BUNDLE_DIR_DEFAULT   "/var/lib/dtn/dtnperf"

Definition at line 46 of file dtnperf-server.c.

#define CHECK_SET ( _arg,
_what   ) 

Value:

if (_arg == 0) {                                                    \
        fprintf(stderr, "\nSYNTAX ERROR: %s must be specified\n", _what);      \
        print_usage(argv[0]);                                                  \
        exit(1);                                                        \
    }

#define OUTFILE   "dtnbuffer.rcv"

Definition at line 47 of file dtnperf-server.c.

Referenced by main().


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 74 of file dtnperf-server.c.

References aggregate, dtn_bundle_payload_t::buf, dtn_bundle_payload_t::buf_len, dtn_bundle_payload_t::buf_val, BUFSIZE, bundle_dir, count, debug, dtn_bundle_spec_t::dest, dtn_build_local_eid(), dtn_close(), dtn_copy_eid(), dtn_errno(), dtn_open(), DTN_PAYLOAD_FILE, DTN_PAYLOAD_MEM, dtn_recv(), DTN_REG_DEFER, DTN_REGID_NONE, dtn_register(), dtn_strerror(), DTN_SUCCESS, dtn_reg_info_t::endpoint, endpoint, errno, dtn_reg_info_t::expiration, dtn_reg_info_t::failure_action, dtn_bundle_payload_t::filename, dtn_bundle_payload_t::filename_val, handle, OUTFILE, parse_options(), dtn_reg_info_t::regid, regid, dtn_bundle_spec_t::source, dtn_endpoint_id_t::uri, use_file, and verbose.

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 68 of file dtnrecv.c.

void print_usage ( char *  progname  ) 


Variable Documentation

int aggregate = 0

Definition at line 58 of file dtnperf-server.c.

Referenced by main().

char* bundle_dir = BUNDLE_DIR_DEFAULT

Definition at line 61 of file dtnperf-server.c.

Referenced by main().

int debug = 0

Definition at line 59 of file dtnperf-server.c.

char* endpoint = "/dtnperf:/dest"

Definition at line 60 of file dtnperf-server.c.

Referenced by dtn::APIClient::handle_find_registration(), dtn::APIClient::handle_register(), main(), and parse_options().

const char* progname

Definition at line 54 of file dtnperf-server.c.

int use_file = 1

Definition at line 55 of file dtnperf-server.c.

int verbose = 0

Definition at line 57 of file dtnperf-server.c.


Generated on Sat Sep 8 08:36:19 2007 for DTN Reference Implementation by  doxygen 1.5.3