dtn_types.h File Reference

#include <rpc/rpc.h>
#include <limits.h>

Go to the source code of this file.

Classes

struct  dtn_endpoint_id_t
 Specification of a dtn endpoint id, i.e. More...
struct  dtn_timestamp_t
struct  dtn_service_tag_t
 Specification of a service tag used in building a local endpoint identifier. More...
struct  dtn_reg_info_t
 Registration state. More...
struct  dtn_extension_block_t
 Extension block. More...
struct  dtn_sequence_id_t
 A Sequence ID is a vector of (EID, counter) values in the following text format: More...
struct  dtn_bundle_spec_t
 Bundle metadata. More...
struct  dtn_bundle_id_t
 Type definition for a unique bundle identifier. More...
struct  dtn_bundle_status_report_t
 Type definition for a bundle status report. More...
struct  dtn_bundle_payload_t

Defines

#define DTN_MAX_ENDPOINT_ID   256
#define DTN_MAX_PATH_LEN   PATH_MAX
#define DTN_MAX_EXEC_LEN   ARG_MAX
#define DTN_MAX_AUTHDATA   1024
#define DTN_MAX_REGION_LEN   64
#define DTN_MAX_BUNDLE_MEM   50000
#define DTN_MAX_BLOCK_LEN   1024
#define DTN_MAX_BLOCKS   256
#define DTN_TIMEOUT_INF   ((dtn_timeval_t)-1)
 An infinite wait is a timeout of -1.
#define DTN_REGID_NONE   0
 Value for an unspecified registration cookie (i.e.

Typedefs

typedef struct dtn_endpoint_id_t dtn_endpoint_id_t
typedef u_int dtn_reg_id_t
 A registration cookie.
typedef u_int dtn_timeval_t
 DTN timeouts are specified in seconds.
typedef struct dtn_timestamp_t dtn_timestamp_t
typedef struct dtn_service_tag_t dtn_service_tag_t
typedef enum dtn_reg_flags_t dtn_reg_flags_t
typedef struct dtn_reg_info_t dtn_reg_info_t
typedef enum dtn_bundle_priority_t dtn_bundle_priority_t
typedef enum
dtn_bundle_delivery_opts_t 
dtn_bundle_delivery_opts_t
typedef enum
dtn_extension_block_flags_t 
dtn_extension_block_flags_t
typedef struct
dtn_extension_block_t 
dtn_extension_block_t
typedef struct dtn_sequence_id_t dtn_sequence_id_t
typedef struct dtn_bundle_spec_t dtn_bundle_spec_t
typedef struct dtn_bundle_id_t dtn_bundle_id_t
typedef enum
dtn_status_report_reason_t 
dtn_status_report_reason_t
typedef enum
dtn_status_report_flags_t 
dtn_status_report_flags_t
typedef struct
dtn_bundle_status_report_t 
dtn_bundle_status_report_t
typedef enum
dtn_bundle_payload_location_t 
dtn_bundle_payload_location_t
typedef struct dtn_bundle_payload_t dtn_bundle_payload_t

Enumerations

enum  dtn_reg_flags_t {
  DTN_REG_DROP = 1, DTN_REG_DEFER = 2, DTN_REG_EXEC = 3, DTN_SESSION_CUSTODY = 4,
  DTN_SESSION_PUBLISH = 8, DTN_SESSION_SUBSCRIBE = 16
}
 

Registration flags are a bitmask of the following:

More...
enum  dtn_bundle_priority_t { COS_BULK = 0, COS_NORMAL = 1, COS_EXPEDITED = 2, COS_RESERVED = 3 }
 

Bundle priority specifier.

More...
enum  dtn_bundle_delivery_opts_t {
  DOPTS_NONE = 0, DOPTS_CUSTODY = 1, DOPTS_DELIVERY_RCPT = 2, DOPTS_RECEIVE_RCPT = 4,
  DOPTS_FORWARD_RCPT = 8, DOPTS_CUSTODY_RCPT = 16, DOPTS_DELETE_RCPT = 32, DOPTS_SINGLETON_DEST = 64,
  DOPTS_MULTINODE_DEST = 128, DOPTS_DO_NOT_FRAGMENT = 256
}
 

Bundle delivery option flags.

More...
enum  dtn_extension_block_flags_t {
  BLOCK_FLAG_NONE = 0, BLOCK_FLAG_REPLICATE = 1, BLOCK_FLAG_REPORT = 2, BLOCK_FLAG_DELETE_BUNDLE = 4,
  BLOCK_FLAG_LAST = 8, BLOCK_FLAG_DISCARD_BLOCK = 16, BLOCK_FLAG_UNPROCESSED = 32
}
 

Extension block flags.

More...
enum  dtn_status_report_reason_t {
  REASON_NO_ADDTL_INFO = 0x00, REASON_LIFETIME_EXPIRED = 0x01, REASON_FORWARDED_UNIDIR_LINK = 0x02, REASON_TRANSMISSION_CANCELLED = 0x03,
  REASON_DEPLETED_STORAGE = 0x04, REASON_ENDPOINT_ID_UNINTELLIGIBLE = 0x05, REASON_NO_ROUTE_TO_DEST = 0x06, REASON_NO_TIMELY_CONTACT = 0x07,
  REASON_BLOCK_UNINTELLIGIBLE = 0x08
}
 

Bundle Status Report "Reason Code" flags.

More...
enum  dtn_status_report_flags_t {
  STATUS_RECEIVED = 0x01, STATUS_CUSTODY_ACCEPTED = 0x02, STATUS_FORWARDED = 0x04, STATUS_DELIVERED = 0x08,
  STATUS_DELETED = 0x10, STATUS_ACKED_BY_APP = 0x20
}
 

Bundle Status Report status flags that indicate which timestamps in the status report structure are valid.

More...
enum  dtn_bundle_payload_location_t { DTN_PAYLOAD_FILE = 0, DTN_PAYLOAD_MEM = 1, DTN_PAYLOAD_TEMP_FILE = 2 }
 

The payload of a bundle can be sent or received either in a file, in which case the payload structure contains the filename, or in memory where the struct contains the data in-band, in the 'buf' field.

More...

Functions

bool_t xdr_dtn_endpoint_id_t ()
bool_t xdr_dtn_reg_id_t ()
bool_t xdr_dtn_timeval_t ()
bool_t xdr_dtn_timestamp_t ()
bool_t xdr_dtn_service_tag_t ()
bool_t xdr_dtn_reg_flags_t ()
bool_t xdr_dtn_reg_info_t ()
bool_t xdr_dtn_bundle_priority_t ()
bool_t xdr_dtn_bundle_delivery_opts_t ()
bool_t xdr_dtn_extension_block_flags_t ()
bool_t xdr_dtn_extension_block_t ()
bool_t xdr_dtn_sequence_id_t ()
bool_t xdr_dtn_bundle_spec_t ()
bool_t xdr_dtn_bundle_id_t ()
bool_t xdr_dtn_status_report_reason_t ()
bool_t xdr_dtn_status_report_flags_t ()
bool_t xdr_dtn_bundle_status_report_t ()
bool_t xdr_dtn_bundle_payload_location_t ()
bool_t xdr_dtn_bundle_payload_t ()

Define Documentation

#define DTN_MAX_AUTHDATA   1024

Definition at line 50 of file dtn_types.h.

#define DTN_MAX_BLOCK_LEN   1024

Definition at line 53 of file dtn_types.h.

Referenced by xdr_dtn_extension_block_t(), and xdr_dtn_sequence_id_t().

#define DTN_MAX_BLOCKS   256

Definition at line 54 of file dtn_types.h.

Referenced by xdr_dtn_bundle_spec_t().

#define DTN_MAX_BUNDLE_MEM   50000
#define DTN_MAX_ENDPOINT_ID   256
#define DTN_MAX_EXEC_LEN   ARG_MAX

Definition at line 49 of file dtn_types.h.

Referenced by xdr_dtn_reg_info_t().

#define DTN_MAX_PATH_LEN   PATH_MAX

Definition at line 48 of file dtn_types.h.

Referenced by xdr_dtn_bundle_payload_t().

#define DTN_MAX_REGION_LEN   64

Definition at line 51 of file dtn_types.h.

#define DTN_REGID_NONE   0

Value for an unspecified registration cookie (i.e.

indication that the daemon should allocate a new unique id).

Definition at line 111 of file dtn_types.h.

Referenced by TcaController::dtn_reg(), DTNSendCommand::init_opts(), main(), parse_options(), reader_thread(), TcaController::send_bundle(), and to_bundles().

#define DTN_TIMEOUT_INF   ((dtn_timeval_t)-1)

An infinite wait is a timeout of -1.

Definition at line 85 of file dtn_types.h.

Referenced by dtntunnel::DTNTunnel::main(), and main().


Typedef Documentation

Definition at line 198 of file dtn_types.h.

Definition at line 295 of file dtn_types.h.

Definition at line 369 of file dtn_types.h.

Definition at line 383 of file dtn_types.h.

Definition at line 168 of file dtn_types.h.

Definition at line 279 of file dtn_types.h.

Definition at line 342 of file dtn_types.h.

Definition at line 68 of file dtn_types.h.

Definition at line 222 of file dtn_types.h.

Definition at line 236 of file dtn_types.h.

Definition at line 135 of file dtn_types.h.

typedef u_int dtn_reg_id_t

A registration cookie.

Definition at line 74 of file dtn_types.h.

Definition at line 152 of file dtn_types.h.

Definition at line 251 of file dtn_types.h.

Definition at line 105 of file dtn_types.h.

Definition at line 325 of file dtn_types.h.

Definition at line 311 of file dtn_types.h.

Definition at line 91 of file dtn_types.h.

typedef u_int dtn_timeval_t

DTN timeouts are specified in seconds.

Definition at line 80 of file dtn_types.h.


Enumeration Type Documentation

Bundle delivery option flags.

Note that multiple options may be selected for a given bundle.

DOPTS_NONE - no custody, etc DOPTS_CUSTODY - custody xfer DOPTS_DELIVERY_RCPT - end to end delivery (i.e. return receipt) DOPTS_RECEIVE_RCPT - per hop arrival receipt DOPTS_FORWARD_RCPT - per hop departure receipt DOPTS_CUSTODY_RCPT - per custodian receipt DOPTS_DELETE_RCPT - request deletion receipt DOPTS_SINGLETON_DEST - destination is a singleton DOPTS_MULTINODE_DEST - destination is not a singleton DOPTS_DO_NOT_FRAGMENT - set the do not fragment bit

Enumerator:
DOPTS_NONE 
DOPTS_CUSTODY 
DOPTS_DELIVERY_RCPT 
DOPTS_RECEIVE_RCPT 
DOPTS_FORWARD_RCPT 
DOPTS_CUSTODY_RCPT 
DOPTS_DELETE_RCPT 
DOPTS_SINGLETON_DEST 
DOPTS_MULTINODE_DEST 
DOPTS_DO_NOT_FRAGMENT 

Definition at line 186 of file dtn_types.h.

The payload of a bundle can be sent or received either in a file, in which case the payload structure contains the filename, or in memory where the struct contains the data in-band, in the 'buf' field.

When sending a bundle, if the location specifies that the payload is in a temp file, then the daemon assumes ownership of the file and should have sufficient permissions to move or rename it.

When receiving a bundle that is a status report, then the status_report pointer will be non-NULL and will point to a dtn_bundle_status_report_t structure which contains the parsed fields of the status report.

DTN_PAYLOAD_MEM - payload contents in memory DTN_PAYLOAD_FILE - payload contents in file DTN_PAYLOAD_TEMP_FILE - in file, assume ownership (send only)

Enumerator:
DTN_PAYLOAD_FILE 
DTN_PAYLOAD_MEM 
DTN_PAYLOAD_TEMP_FILE 

Definition at line 364 of file dtn_types.h.

Bundle priority specifier.

COS_BULK - lowest priority COS_NORMAL - regular priority COS_EXPEDITED - important COS_RESERVED - TBD

Enumerator:
COS_BULK 
COS_NORMAL 
COS_EXPEDITED 
COS_RESERVED 

Definition at line 162 of file dtn_types.h.

Extension block flags.

Note that multiple flags may be selected for a given block.

BLOCK_FLAG_NONE - no flags BLOCK_FLAG_REPLICATE - block must be replicated in every fragment BLOCK_FLAG_REPORT - transmit report if block can't be processed BLOCK_FLAG_DELETE_BUNDLE - delete bundle if block can't be processed BLOCK_FLAG_LAST - last block BLOCK_FLAG_DISCARD_BLOCK - discard block if it can't be processed BLOCK_FLAG_UNPROCESSED - block was forwarded without being processed

Enumerator:
BLOCK_FLAG_NONE 
BLOCK_FLAG_REPLICATE 
BLOCK_FLAG_REPORT 
BLOCK_FLAG_DELETE_BUNDLE 
BLOCK_FLAG_LAST 
BLOCK_FLAG_DISCARD_BLOCK 
BLOCK_FLAG_UNPROCESSED 

Definition at line 213 of file dtn_types.h.

Registration flags are a bitmask of the following:

Delivery failure actions (exactly one must be selected): DTN_REG_DROP - drop bundle if registration not active DTN_REG_DEFER - spool bundle for later retrieval DTN_REG_EXEC - exec program on bundle arrival

Session flags: DTN_SESSION_CUSTODY - app assumes custody for the session DTN_SESSION_PUBLISH - creates a publication point DTN_SESSION_SUBSCRIBE - create subscription for the session

Enumerator:
DTN_REG_DROP 
DTN_REG_DEFER 
DTN_REG_EXEC 
DTN_SESSION_CUSTODY 
DTN_SESSION_PUBLISH 
DTN_SESSION_SUBSCRIBE 

Definition at line 127 of file dtn_types.h.

Bundle Status Report status flags that indicate which timestamps in the status report structure are valid.

Enumerator:
STATUS_RECEIVED 
STATUS_CUSTODY_ACCEPTED 
STATUS_FORWARDED 
STATUS_DELIVERED 
STATUS_DELETED 
STATUS_ACKED_BY_APP 

Definition at line 317 of file dtn_types.h.

Bundle Status Report "Reason Code" flags.

Enumerator:
REASON_NO_ADDTL_INFO 
REASON_LIFETIME_EXPIRED 
REASON_FORWARDED_UNIDIR_LINK 
REASON_TRANSMISSION_CANCELLED 
REASON_DEPLETED_STORAGE 
REASON_ENDPOINT_ID_UNINTELLIGIBLE 
REASON_NO_ROUTE_TO_DEST 
REASON_NO_TIMELY_CONTACT 
REASON_BLOCK_UNINTELLIGIBLE 

Definition at line 300 of file dtn_types.h.


Function Documentation

bool_t xdr_dtn_bundle_delivery_opts_t (  ) 
bool_t xdr_dtn_bundle_id_t (  ) 
bool_t xdr_dtn_bundle_payload_location_t (  ) 
bool_t xdr_dtn_bundle_payload_t (  ) 
bool_t xdr_dtn_bundle_priority_t (  ) 
bool_t xdr_dtn_bundle_spec_t (  ) 
bool_t xdr_dtn_bundle_status_report_t (  ) 
bool_t xdr_dtn_endpoint_id_t (  ) 
bool_t xdr_dtn_extension_block_flags_t (  ) 
bool_t xdr_dtn_extension_block_t (  ) 
bool_t xdr_dtn_reg_flags_t (  ) 

Referenced by _wrap_xdr_dtn_reg_flags_t(), and XS().

bool_t xdr_dtn_reg_id_t (  ) 
bool_t xdr_dtn_reg_info_t (  ) 
bool_t xdr_dtn_sequence_id_t (  ) 
bool_t xdr_dtn_service_tag_t (  ) 
bool_t xdr_dtn_status_report_flags_t (  ) 
bool_t xdr_dtn_status_report_reason_t (  ) 
bool_t xdr_dtn_timestamp_t (  ) 
bool_t xdr_dtn_timeval_t (  ) 
Generated on Sun Nov 21 11:40:49 2010 for DTN Reference Implementation by  doxygen 1.6.3