Guessing home router based on DNS query with default suffix.
More...
#include <tools/ndn-autoconfig/guess-from-search-domains.hpp>
|
void | fail (const std::string &msg) |
|
void | provideHubFaceUri (const std::string &s) |
| parse HUB FaceUri from string and declare success More...
|
|
void | succeed (const FaceUri &hubFaceUri) |
|
Guessing home router based on DNS query with default suffix.
Request
The end host sends a DNS query that is equivalent to this command:
dig +search +short +cmd +tries=2 +ndots=10 _ndn._udp srv
Response
The DNS server should answer with an SRV record that contains the hostname and UDP port number of the NDN router.
Definition at line 49 of file guess-from-search-domains.hpp.
◆ fail()
void ndn::tools::autoconfig::Stage::fail |
( |
const std::string & |
msg | ) |
|
|
protectedinherited |
◆ getName()
const std::string& ndn::tools::autoconfig::GuessFromSearchDomains::getName |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ provideHubFaceUri()
void ndn::tools::autoconfig::Stage::provideHubFaceUri |
( |
const std::string & |
s | ) |
|
|
protectedinherited |
parse HUB FaceUri from string and declare success
Definition at line 45 of file stage.cpp.
◆ start()
void ndn::tools::autoconfig::Stage::start |
( |
| ) |
|
|
inherited |
start running this stage
- Exceptions
-
Error | stage is already running |
Definition at line 33 of file stage.cpp.
◆ succeed()
void ndn::tools::autoconfig::Stage::succeed |
( |
const FaceUri & |
hubFaceUri | ) |
|
|
protectedinherited |
◆ onFailure
util::Signal<Stage, std::string> ndn::tools::autoconfig::Stage::onFailure |
|
inherited |
signal when discovery fails
Argument is error message.
Definition at line 96 of file stage.hpp.
◆ onSuccess
util::Signal<Stage, FaceUri> ndn::tools::autoconfig::Stage::onSuccess |
|
inherited |
signal when a HUB FaceUri is found
Argument is HUB FaceUri, may not be canonical.
Definition at line 90 of file stage.hpp.