SDNV.cc File Reference

#include <stdio.h>
#include <stdlib.h>
#include <oasys/compat/inttypes.h>

Go to the source code of this file.

Defines

#define SDNV_FN(_what)   sdnv_##_what
#define ASSERT(x)
#define log_err_p(p, args...)   fprintf(stderr, "error: (" p ") " args);
#define MAX_LENGTH   10

Functions

int SDNV_FN() encode (u_int64_t val, u_char *bp, size_t len)
size_t SDNV_FN() encoding_len (u_int64_t val)
int SDNV_FN() decode (const u_char *bp, size_t len, u_int64_t *val)


Define Documentation

#define ASSERT (  ) 

Value:

do {                                                            \
    if (! (x)) {                                                \
        fprintf(stderr, "ASSERTION FAILED (" #x ") at %s:%d\n", \
                __FILE__, __LINE__);                            \
        exit(1);                                                \
    }                                                           \
} while (0)

Definition at line 39 of file SDNV.cc.

#define log_err_p ( p,
args...   )     fprintf(stderr, "error: (" p ") " args);

Definition at line 49 of file SDNV.cc.

#define MAX_LENGTH   10

Definition at line 51 of file SDNV.cc.

Referenced by dtn::BlockProcessor::consume_preamble(), decode(), and encode().

#define SDNV_FN ( _what   )     sdnv_##_what

Definition at line 36 of file SDNV.cc.

Referenced by encoding_len().


Function Documentation

int SDNV_FN() decode ( const u_char *  bp,
size_t  len,
u_int64_t *  val 
)

Definition at line 112 of file SDNV.cc.

References log_err_p, and MAX_LENGTH.

Referenced by dtn::PrimaryBlockProcessor::consume(), dtn::BlockProcessor::consume_preamble(), dtn::StreamConvergenceLayer::Connection::handle_ack_segment(), dtn::StreamConvergenceLayer::Connection::handle_contact_initiation(), dtn::StreamConvergenceLayer::Connection::handle_data_segment(), dtn::CustodySignal::parse_custody_signal(), and dtn::BundleStatusReport::parse_status_report().

int SDNV_FN() encode ( u_int64_t  val,
u_char *  bp,
size_t  len 
)

Definition at line 57 of file SDNV.cc.

References ASSERT, and MAX_LENGTH.

Referenced by dtn::CustodySignal::create_custody_signal(), dtn::BundleStatusReport::create_status_report(), encoding_len(), dtn::PrimaryBlockProcessor::generate(), dtn::BlockProcessor::generate_preamble(), dtn::StreamConvergenceLayer::Connection::initiate_contact(), oasys::XMLMarshal::process(), dtn::StreamConvergenceLayer::Connection::send_next_segment(), and dtn::StreamConvergenceLayer::Connection::send_pending_acks().

size_t SDNV_FN() encoding_len ( u_int64_t  val  ) 

Definition at line 102 of file SDNV.cc.

References ASSERT, encode(), and SDNV_FN.

Referenced by dtn::CustodySignal::create_custody_signal(), dtn::BundleStatusReport::create_status_report(), dtn::PrimaryBlockProcessor::generate(), dtn::BlockProcessor::generate_preamble(), dtn::PrimaryBlockProcessor::get_primary_len(), dtn::StreamConvergenceLayer::Connection::initiate_contact(), dtn::StreamConvergenceLayer::Connection::send_next_segment(), and dtn::StreamConvergenceLayer::Connection::send_pending_acks().


Generated on Thu Jun 7 12:54:31 2007 for DTN Reference Implementation by  doxygen 1.5.1