sdnv-c.h File Reference

Go to the source code of this file.

Functions

__cplusplus size_t sdnv_encoding_len (u_int64_t val)
 Return the number of bytes needed to encode the given value.
int sdnv_encode (u_int64_t val, u_char *bp, size_t len)
 Convert the given 64-bit integer into an SDNV.
int sdnv_decode (const u_char *bp, size_t len, u_int64_t *val)
 Convert an SDNV pointed to by bp into a unsigned 64-bit integer.


Function Documentation

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

Convert an SDNV pointed to by bp into a unsigned 64-bit integer.

Returns:
The number of bytes of bp consumed, or -1 on error.

int sdnv_encode ( u_int64_t  val,
u_char *  bp,
size_t  len 
)

Convert the given 64-bit integer into an SDNV.

Returns:
The number of bytes used, or -1 on error.

__cplusplus size_t sdnv_encoding_len ( u_int64_t  val  ) 

Return the number of bytes needed to encode the given value.

Referenced by dtn::CustodySignal::create_custody_signal(), and dtn::BundleStatusReport::create_status_report().


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