IBR-DTNSuite  0.8
dtn Namespace Reference

Namespaces

namespace  api
namespace  core
namespace  daemon
namespace  data
namespace  dht
namespace  net
namespace  routing
namespace  security
namespace  storage
namespace  streams
namespace  utils

Classes

class  InvalidDataException
class  InvalidProtocolException
class  SerializationFailedException
class  PayloadReceptionInterrupted
class  MissingObjectException
class  ConnectionInterruptedException

Detailed Description

Class to handle parsing and formatting of self describing numeric values (SDNVs).

The basic idea is to enable a compact byte representation of numeric values that may widely vary in size. This encoding is based on the ASN.1 specification for encoding Object Identifier Arcs.

Conceptually, the integer value to be encoded is split into 7-bit segments. These are encoded into the output byte stream, such that the high order bit in each byte is set to one for all bytes except the last one.

Note that this implementation only handles values up to 64-bits in length (since the conversion is between a u_int64_t and the encoded byte sequence).