daemon/fw/algorithm.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_DAEMON_FW_PIT_ALGORITHM_HPP
27 #define NFD_DAEMON_FW_PIT_ALGORITHM_HPP
28 
29 #include "table/pit-entry.hpp"
30 
35 namespace nfd {
36 
40 namespace scope_prefix {
41 
50 extern const Name LOCALHOST;
51 
64 extern const Name LOCALHOP;
65 
66 } // namespace scope_prefix
67 
68 namespace fw {
69 
73 bool
74 wouldViolateScope(const Face& inFace, const Interest& interest, const Face& outFace);
75 
86 bool
87 canForwardToLegacy(const pit::Entry& pitEntry, const Face& face);
88 
97 };
98 
102 int
103 findDuplicateNonce(const pit::Entry& pitEntry, uint32_t nonce, const Face& face);
104 
108 bool
109 hasPendingOutRecords(const pit::Entry& pitEntry);
110 
111 } // namespace fw
112 } // namespace nfd
113 
114 #endif // NFD_DAEMON_FW_PIT_ALGORITHM_HPP
bool canForwardToLegacy(const pit::Entry &pitEntry, const Face &face)
decide whether Interest can be forwarded to face
Definition: algorithm.cpp:59
an Interest table entry
Definition: pit-entry.hpp:57
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
const Name LOCALHOP
ndn:/localhop
bool hasPendingOutRecords(const pit::Entry &pitEntry)
determine whether pitEntry has any pending out-records
Definition: algorithm.cpp:113
const Name LOCALHOST
ndn:/localhost
no duplicate Nonce is found
int findDuplicateNonce(const pit::Entry &pitEntry, uint32_t nonce, const Face &face)
determine whether pitEntry has duplicate Nonce nonce
Definition: algorithm.cpp:83
DuplicateNonceWhere
indicates where duplicate Nonces are found
bool wouldViolateScope(const Face &inFace, const Interest &interest, const Face &outFace)
determine whether forwarding the Interest in pitEntry to outFace would violate scope ...
Definition: algorithm.cpp:37