#include <Prophet.h>
Definition at line 32 of file Prophet.h.
Public Types | |
enum | header_result_t { UnknownResult = 0x0, NoSuccessAck = 0x1, AckAll = 0x2, Success = 0x3, Failure = 0x4, ReturnReceipt = 0x5 } |
Legal values for ProphetHeader.result field p. More... | |
enum | prophet_tlv_t { UNKNOWN_TLV = 0x00, HELLO_TLV = 0x01, ERROR_TLV = 0x02, RIBD_TLV = 0xA0, RIB_TLV = 0xA1, BUNDLE_TLV = 0XA2 } |
enum | hello_hf_t { HF_UNKNOWN = 0x0, SYN = 0x1, SYNACK = 0x2, ACK = 0x3, RSTACK = 0x4 } |
Legal values for HelloTLVHeader.HF (hello function) p. More... | |
enum | rib_header_flag_t { RELAY_NODE = 1 << 0, CUSTODY_NODE = 1 << 1, INTERNET_GW_NODE = 1 << 2 } |
RIB Header Flags p. More... | |
enum | bundle_offer_flags_t { CUSTODY_OFFERED = 1 << 0, PROPHET_ACK = 1 << 7 } |
BundleOffer flag values p. More... | |
enum | bundle_response_flags_t { CUSTODY_ACCEPTED = 1 << 0, BUNDLE_ACCEPTED = 1 << 1 } |
BundleResponse flag values p. More... | |
enum | fwd_strategy_t { INVALID_FS = 0, GRTR, GTMX, GRTR_PLUS, GTMX_PLUS, GRTR_SORT, GRTR_MAX } |
Forwarding strategies p. More... | |
enum | q_policy_t { INVALID_QP = 0, FIFO, MOFO, MOPR, LINEAR_MOPR, SHLI, LEPR } |
Queuing policies p. More... | |
typedef struct BundleOfferTLVHeader | BundleResponseTLVHeader |
typedef struct BundleOfferEntry | BundleResponseEntry |
Static Public Member Functions | |
static const char * | tlv_to_str (Prophet::prophet_tlv_t tlv) |
static const char * | result_to_str (Prophet::header_result_t hr) |
static const char * | hf_to_str (Prophet::hello_hf_t hf) |
static const char * | fs_to_str (Prophet::fwd_strategy_t fs) |
static const char * | qp_to_str (Prophet::q_policy_t qp) |
static EndpointID | eid_to_routeid (const EndpointID &eid) |
Utility function to convert Bundle destination to router id. | |
static EndpointIDPattern | eid_to_route (const EndpointID &eid) |
Utility function to convert Bundle destination to implicit route. | |
Public Attributes | |
struct dtn::Prophet::ProphetHeader | packed |
Header Definition p. | |
struct dtn::Prophet::HelloTLVHeader | packed |
Hello TLV header p. | |
struct dtn::Prophet::ErrorTLVHeader | packed |
Error TLV header p. | |
struct dtn::Prophet::RIBDTLVHeader | packed |
Routing Information Base Dictionary TLV p. | |
struct dtn::Prophet::RoutingAddressString | packed |
Routing Address String (entry in RIBD above) p. | |
struct dtn::Prophet::RIBTLVHeader | packed |
Routing Information Base TLV p. | |
struct dtn::Prophet::RIBEntry | packed |
Routing Information Base entry p. | |
struct dtn::Prophet::BundleOfferTLVHeader | packed |
Bundle Offer/Response Header p. | |
struct dtn::Prophet::BundleOfferEntry | packed |
Bundle Offer/Response Entry p. | |
Static Public Attributes | |
static const double | DEFAULT_P_ENCOUNTER = 0.75 |
Default initialization values, p. | |
static const double | DEFAULT_BETA = 0.25 |
Default initialization values, p. | |
static const double | DEFAULT_GAMMA = 0.99 |
Default initialization values, p. | |
static const u_int | DEFAULT_KAPPA = 100 |
The kappa variable describes how many milliseconds-per-timeunit (for equation 2, p.9, section 2.1.1). | |
static const u_int8_t | HELLO_INTERVAL = 255 |
Time between HELLO beacons (in 100ms units). | |
static const u_int | HELLO_DEAD = 20 |
Max units of HELLO_INTERVAL before peer is considered unreachable. | |
static const u_int | DEFAULT_NUM_F_MAX = 5 |
Max times to forward a bundle for GTMX. | |
static const u_int | DEFAULT_NUM_F_MIN = 3 |
Min times to forward a bundle for LEPR. | |
static const u_int | AGE_PERIOD = 1800 |
Seconds between aging of nodes and Prophet ACKs. | |
static const u_int8_t | PROPHET_VERSION = 0x01 |
Current version of the protocol. | |
static const size_t | ProphetHeaderSize |
static const size_t | HelloTLVHeaderSize |
static const size_t | ErrorTLVHeaderSize |
static const size_t | RIBDTLVHeaderSize |
static const size_t | RoutingAddressStringSize |
static const size_t | RIBTLVHeaderSize |
static const size_t | RIBEntrySize |
static const size_t | BundleOfferTLVHeaderSize |
static const size_t | BundleResponseTLVHeaderSize |
static const size_t | BundleOfferEntrySize |
static const size_t | BundleReponseEntrySize |
Classes | |
struct | BundleOfferEntry |
Bundle Offer/Response Entry p. More... | |
struct | BundleOfferTLVHeader |
Bundle Offer/Response Header p. More... | |
struct | ErrorTLVHeader |
Error TLV header p. More... | |
struct | HelloTLVHeader |
Hello TLV header p. More... | |
struct | ProphetHeader |
Header Definition p. More... | |
struct | RIBDTLVHeader |
Routing Information Base Dictionary TLV p. More... | |
struct | RIBEntry |
Routing Information Base entry p. More... | |
struct | RIBTLVHeader |
Routing Information Base TLV p. More... | |
struct | RoutingAddressString |
Routing Address String (entry in RIBD above) p. More... | |
class | UniqueID |
Utility class to generate the transaction ID (tid) and instance numbers required by ProphetHeader. More... |
typedef struct BundleOfferTLVHeader dtn::Prophet::BundleResponseTLVHeader [read] |
typedef struct BundleOfferEntry dtn::Prophet::BundleResponseEntry [read] |
Legal values for ProphetHeader.result field p.
22, 4.2
Legal values for HelloTLVHeader.HF (hello function) p.
25, 4.4.1
BundleOffer flag values p.
31, 4.4.5
static const char* dtn::Prophet::tlv_to_str | ( | Prophet::prophet_tlv_t | tlv | ) | [inline, static] |
Definition at line 635 of file Prophet.h.
References BUNDLE_TLV, ERROR_TLV, HELLO_TLV, RIB_TLV, RIBD_TLV, and UNKNOWN_TLV.
Referenced by dtn::BaseTLV::dump().
static const char* dtn::Prophet::result_to_str | ( | Prophet::header_result_t | hr | ) | [inline, static] |
Definition at line 650 of file Prophet.h.
References AckAll, Failure, NoSuccessAck, ReturnReceipt, Success, and UnknownResult.
Referenced by dtn::ProphetTLV::dump(), dtn::ProphetEncounter::enqueue_hello(), dtn::ProphetEncounter::enqueue_ribd(), dtn::ProphetEncounter::handle_prophet_tlv(), and dtn::ProphetEncounter::outbound_tlv().
static const char* dtn::Prophet::hf_to_str | ( | Prophet::hello_hf_t | hf | ) | [inline, static] |
Definition at line 665 of file Prophet.h.
References ACK, HF_UNKNOWN, RSTACK, SYN, and SYNACK.
Referenced by dtn::HelloTLV::dump(), dtn::ProphetEncounter::enqueue_hello(), and dtn::ProphetEncounter::handle_hello_tlv().
static const char* dtn::Prophet::fs_to_str | ( | Prophet::fwd_strategy_t | fs | ) | [inline, static] |
static const char* dtn::Prophet::qp_to_str | ( | Prophet::q_policy_t | qp | ) | [inline, static] |
Definition at line 695 of file Prophet.h.
References CASE, FIFO, LEPR, LINEAR_MOPR, MOFO, MOPR, and SHLI.
Referenced by dtn::ProphetController::dump_state(), dtn::ProphetCommand::exec(), and dtn::ProphetController::handle_queue_policy_change().
static EndpointID dtn::Prophet::eid_to_routeid | ( | const EndpointID & | eid | ) | [inline, static] |
Utility function to convert Bundle destination to router id.
Definition at line 713 of file Prophet.h.
References dtn::EndpointID::assign(), dtn::EndpointID::scheme_str(), and dtn::EndpointID::str().
Referenced by eid_to_route(), dtn::ProphetTable::find(), dtn::ProphetEncounter::handle_bundle_received(), dtn::ProphetController::handle_bundle_received(), dtn::ProphetEncounter::handle_rib_tlv(), dtn::ProphetEncounter::handle_ribd_tlv(), dtn::ProphetAckList::insert(), dtn::ProphetAckList::is_ackd(), dtn::ProphetTable::p_value(), dtn::ProphetEncounter::send_bundle_offer(), and dtn::ProphetEncounter::send_dictionary().
static EndpointIDPattern dtn::Prophet::eid_to_route | ( | const EndpointID & | eid | ) | [inline, static] |
Utility function to convert Bundle destination to implicit route.
Definition at line 724 of file Prophet.h.
References dtn::EndpointID::assign(), eid_to_routeid(), and dtn::EndpointID::str().
Referenced by dtn::ProphetBundleList::find(), dtn::ProphetEncounter::handle_bundle_received(), and dtn::ProphetNode::route_to_me().
const double dtn::Prophet::DEFAULT_P_ENCOUNTER = 0.75 [static] |
const double dtn::Prophet::DEFAULT_BETA = 0.25 [static] |
const double dtn::Prophet::DEFAULT_GAMMA = 0.99 [static] |
const u_int dtn::Prophet::DEFAULT_KAPPA = 100 [static] |
const u_int8_t dtn::Prophet::HELLO_INTERVAL = 255 [static] |
const u_int dtn::Prophet::HELLO_DEAD = 20 [static] |
const u_int dtn::Prophet::DEFAULT_NUM_F_MAX = 5 [static] |
const u_int dtn::Prophet::DEFAULT_NUM_F_MIN = 3 [static] |
const u_int dtn::Prophet::AGE_PERIOD = 1800 [static] |
const u_int8_t dtn::Prophet::PROPHET_VERSION = 0x01 [static] |
Current version of the protocol.
Definition at line 85 of file Prophet.h.
Referenced by dtn::ProphetTLV::deserialize(), and dtn::ProphetTLV::serialize().
Header Definition p.
21, 4.2
Hello TLV header
p.
25, 4.4.1
The Hello TLV is used to set up and maintain a link between two PRoPHET nodes. Hello messages with the SYN function are transmitted periodically as beacons. The Hello TLV is the first TLV exchanged between two PRoPHET nodes when they encounter each other. No other TLVs can be exchanged until the first Hello sequenece is completed.
Once a communication link is established between two PRoPHET nodes, the Hello TLV will be sent once for each interval as defined in the interval timer. If a node experiences the lapse of HELLO_DEAD Hello intervals without receiving a Hello TLV on an ESTAB connection (as defined in the state machine in Section 5.2), the connection SHOULD be assumed broken.
Error TLV header p.
26, 4.4.2
Routing Information Base Dictionary TLV
p.
27, 4.4.3
The Routing Information Base Dictionary includes the list of addresses used in making routing decisions. The referents remain constant for the duration of a session over a link where the instance numbers remain the same and can be used by both the Routing Information Base messages and the bundle offer messages.
Routing Address String (entry in RIBD above) p.
27, 4.4.3
Routing Information Base TLV
p.
28, 4.4.4
The Routing Information Base lists the destinations a node knows of, and the delivery predictabilities it has associated with them. This information is needed by the PRoPHET algorithm to make decisions on routing and forwarding.
Routing Information Base entry p.
28, 4.4.4
Bundle Offer/Response Header
p.
30, 4.4.5
After the routing information has been passed, the node will ask the other node to review available bundles and determine which bundles it will accept for relay. The source relay will determine which bundles to offer based on relative delivery predictabilities as explained in Section 3.6. The Bundle Offer TLV also lists the bundles that a PRoPHET acknowledgement has been issued for. Those bundles have the PRoPHET ACK flag set in their entry in the list. When a node receives a PRoPHET ACK for a bundle, it MUST remove any copies of that bundle from its buffers, but SHOULD keep an entry of the acknowledged bundle to be able to further propagate the PRoPHET ACK.
The Response message is identical to the request message with the exception that the flag indicate acceptance of the bundle.
Bundle Offer/Response Entry p.
30, 4.4.5
const size_t dtn::Prophet::ProphetHeaderSize [static] |
Initial value:
sizeof(struct ProphetHeader)
Definition at line 601 of file Prophet.h.
Referenced by dtn::ProphetTLV::deserialize(), and dtn::ProphetTLV::serialize().
const size_t dtn::Prophet::HelloTLVHeaderSize [static] |
Initial value:
sizeof(struct HelloTLVHeader)
Definition at line 604 of file Prophet.h.
Referenced by dtn::HelloTLV::deserialize(), dtn::HelloTLV::HelloTLV(), and dtn::HelloTLV::serialize().
const size_t dtn::Prophet::ErrorTLVHeaderSize [static] |
const size_t dtn::Prophet::RIBDTLVHeaderSize [static] |
Initial value:
sizeof(struct RIBDTLVHeader)
Definition at line 610 of file Prophet.h.
Referenced by dtn::RIBDTLV::deserialize(), dtn::RIBDTLV::RIBDTLV(), and dtn::RIBDTLV::serialize().
const size_t dtn::Prophet::RoutingAddressStringSize [static] |
Initial value:
sizeof(struct RoutingAddressString)
Definition at line 613 of file Prophet.h.
Referenced by dtn::RIBDTLV::read_ras_entry(), dtn::ProphetDictionary::update_guess(), and dtn::RIBDTLV::write_ras_entry().
const size_t dtn::Prophet::RIBTLVHeaderSize [static] |
Initial value:
sizeof(struct RIBTLVHeader)
Definition at line 616 of file Prophet.h.
Referenced by dtn::RIBTLV::deserialize(), dtn::RIBTLV::RIBTLV(), and dtn::RIBTLV::serialize().
const size_t dtn::Prophet::RIBEntrySize [static] |
Initial value:
sizeof(struct RIBEntry)
Definition at line 619 of file Prophet.h.
Referenced by dtn::RIBTLV::deserialize(), dtn::RIBTLV::read_rib_entry(), dtn::RIBTLV::RIBTLV(), dtn::RIBTLV::serialize(), and dtn::RIBTLV::write_rib_entry().
const size_t dtn::Prophet::BundleOfferTLVHeaderSize [static] |
Initial value:
sizeof(struct BundleOfferTLVHeader)
Definition at line 622 of file Prophet.h.
Referenced by dtn::BundleTLV::BundleTLV(), dtn::BundleTLV::deserialize(), and dtn::BundleTLV::serialize().
const size_t dtn::Prophet::BundleResponseTLVHeaderSize [static] |
const size_t dtn::Prophet::BundleOfferEntrySize [static] |
Initial value:
sizeof(struct BundleOfferEntry)
Definition at line 628 of file Prophet.h.
Referenced by dtn::BundleTLV::BundleTLV(), dtn::BundleTLV::deserialize(), dtn::BundleOfferList::guess_size(), dtn::BundleTLV::read_bundle_offer(), and dtn::BundleTLV::write_bundle_offer().
const size_t dtn::Prophet::BundleReponseEntrySize [static] |