Guessing home router based on the default identity name. More...
#include <tools/ndn-autoconfig/guess-from-identity-name.hpp>
Public Member Functions | |
GuessFromIdentityName (KeyChain &keyChain) | |
const std::string & | getName () const override |
get stage name More... | |
void | start () |
start running this stage More... | |
Public Attributes | |
util::Signal< Stage, std::string > | onFailure |
signal when discovery fails More... | |
util::Signal< Stage, FaceUri > | onSuccess |
signal when a HUB FaceUri is found More... | |
Protected Member Functions | |
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 the default identity name.
This stage assumes that user has configured default certificate using http://ndncert.named-data.net/
Request
The end host loads the default user identity (eg. /ndn/edu/ucla/cs/afanasev), and converts it to DNS format.
The end host sends a DNS query for an SRV record of name _ndn._udp. + user identity in DNS format + _homehub._auto-conf.named-data.net. For example:
_ndn._udp.afanasev.cs.ucla.edu.ndn._homehub._autoconf.named-data.net
Response
The DNS server should answer with an SRV record that contains the hostname and UDP port number of the home NDN router of this user's site.
Definition at line 57 of file guess-from-identity-name.hpp.
|
explicit |
Definition at line 38 of file guess-from-identity-name.cpp.
|
protectedinherited |
|
inlineoverridevirtual |
get stage name
Implements ndn::tools::autoconfig::Stage.
Definition at line 64 of file guess-from-identity-name.hpp.
|
protectedinherited |
|
inherited |
|
protectedinherited |
|
inherited |