dtnrecv.c File Reference

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

Go to the source code of this file.

Defines

#define BUFSIZE   16
#define BLOCKSIZE   8192
#define COUNTER_MAX_DIGITS   9
#define PATH_MAX   1024

Functions

void usage ()
void parse_options (int argc, char **argv)
static void print_data (char *buffer, u_int length)
int buildfilename (char *template, char *newfilename, int counter)
int handle_file_transfer (dtn_bundle_spec_t spec, dtn_bundle_payload_t payload, int *total_bytes, int counter)
int main (int argc, char **argv)

Variables

const char * progname
int verbose = 0
int quiet = 0
char * endpoint = NULL
dtn_reg_id_t regid = DTN_REGID_NONE
int expiration = 30
int count = 0
int failure_action = DTN_REG_DEFER
char * failure_script = ""
int register_only = 0
int change = 0
int unregister = 0
int recv_timeout = -1
int no_find_reg = 0
char filename [PATH_MAX]
dtn_bundle_payload_location_t bundletype = DTN_PAYLOAD_MEM


Define Documentation

#define BLOCKSIZE   8192

Definition at line 33 of file dtnrecv.c.

Referenced by handle_file_transfer().

#define BUFSIZE   16

Definition at line 32 of file dtnrecv.c.

#define COUNTER_MAX_DIGITS   9

Definition at line 34 of file dtnrecv.c.

Referenced by buildfilename().

#define PATH_MAX   1024


Function Documentation

int buildfilename ( char *  template,
char *  newfilename,
int  counter 
)

Definition at line 248 of file dtnrecv.c.

References COUNTER_MAX_DIGITS.

Referenced by handle_file_transfer().

int handle_file_transfer ( dtn_bundle_spec_t  spec,
dtn_bundle_payload_t  payload,
int *  total_bytes,
int  counter 
)

int main ( int  argc,
char **  argv 
)

void parse_options ( int  argc,
char **  argv 
)

static void print_data ( char *  buffer,
u_int  length 
) [static]

Definition at line 199 of file dtnrecv.c.

References BUFSIZE.

Referenced by main().

void usage (  ) 

Definition at line 66 of file dtnrecv.c.

References progname.


Variable Documentation

Definition at line 63 of file dtnrecv.c.

Referenced by main(), and parse_options().

int change = 0

Definition at line 58 of file dtnrecv.c.

Referenced by dtn::LinkScheduleEstimator::badness_of_match(), main(), and parse_options().

int count = 0

Definition at line 54 of file dtnrecv.c.

char* endpoint = NULL

Definition at line 51 of file dtnrecv.c.

int expiration = 30

Definition at line 53 of file dtnrecv.c.

int failure_action = DTN_REG_DEFER

Definition at line 55 of file dtnrecv.c.

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

char* failure_script = ""

Definition at line 56 of file dtnrecv.c.

Referenced by main(), and parse_options().

char filename[PATH_MAX]

int no_find_reg = 0

Definition at line 61 of file dtnrecv.c.

Referenced by main(), and parse_options().

const char* progname

Definition at line 47 of file dtnrecv.c.

int quiet = 0

Definition at line 50 of file dtnrecv.c.

Referenced by main(), and parse_options().

int recv_timeout = -1

Definition at line 60 of file dtnrecv.c.

Referenced by main(), and parse_options().

dtn_reg_id_t regid = DTN_REGID_NONE

Definition at line 52 of file dtnrecv.c.

int register_only = 0

Definition at line 57 of file dtnrecv.c.

Referenced by main(), and parse_options().

int unregister = 0

Definition at line 59 of file dtnrecv.c.

Referenced by main(), and parse_options().

int verbose = 0

Definition at line 49 of file dtnrecv.c.


Generated on Fri Jan 30 09:27:00 2009 for DTN Reference Implementation by  doxygen 1.5.8