ndn::autoconfig Namespace Reference

Classes

class  DnsSrvError
 
class  GuessFromIdentityName
 Guessing home router based on the default identity name. More...
 
class  GuessFromSearchDomains
 Guessing home router based on DNS query with default suffix. More...
 
class  MulticastDiscovery
 Multicast discovery stage. More...
 
class  NdnFchDiscovery
 Discover NDN hub using NDN-FCH protocol. More...
 
struct  Options
 
class  Procedure
 
class  Stage
 A discovery stage. More...
 

Functions

static int main (int argc, char **argv)
 
static std::string parseSrvRr (const QueryAnswer &queryAnswer, int answerSize)
 Parse SRV record. More...
 
std::string querySrvRr (const std::string &fqdn)
 Send DNS SRV request for fqdn. More...
 
std::string querySrvRrSearch ()
 Send DNS SRV request using search domain list. More...
 
static void runDaemon (Procedure &proc)
 
static void usage (std::ostream &os, const po::options_description &opts, const char *programName)
 

Variables

constexpr time::nanoseconds DAEMON_INITIAL_DELAY = 100_ms
 
constexpr time::nanoseconds DAEMON_UNCONDITIONAL_INTERVAL = 1_h
 
constexpr time::nanoseconds FACEURI_CANONIZE_TIMEOUT = 4_s
 
constexpr time::milliseconds HUB_DISCOVERY_INTEREST_LIFETIME = 4_s
 
const Name HUB_DISCOVERY_PREFIX {"/localhop/ndn-autoconf/hub"}
 
constexpr uint64_t HUB_DISCOVERY_ROUTE_COST = 1
 
constexpr time::milliseconds HUB_DISCOVERY_ROUTE_EXPIRATION = 30_s
 
const std::vector< Name > HUB_PREFIXES {"/", "/localhop/nfd"}
 
constexpr uint64_t HUB_ROUTE_COST = 100
 
constexpr nfd::RouteOrigin HUB_ROUTE_ORIGIN = nfd::ROUTE_ORIGIN_AUTOCONF
 
constexpr time::nanoseconds NETMON_DAMPEN_PERIOD = 5_s
 

Function Documentation

◆ main()

static int ndn::autoconfig::main ( int  argc,
char **  argv 
)
static

Definition at line 100 of file main.cpp.

◆ parseSrvRr()

static std::string ndn::autoconfig::parseSrvRr ( const QueryAnswer &  queryAnswer,
int  answerSize 
)
static

Parse SRV record.

Returns
FaceUri of the hub from the SRV record
Exceptions
DnsSrvErrorif SRV record cannot be parsed

Definition at line 59 of file dns-srv.cpp.

◆ querySrvRr()

std::string ndn::autoconfig::querySrvRr ( const std::string &  fqdn)

Send DNS SRV request for fqdn.

Parameters
fqdna fully qualified domain name
Returns
FaceUri of the hub from the requested SRV record
Exceptions
DnsSrvErrorquery returns nothing or SRV record cannot be parsed

Definition at line 117 of file dns-srv.cpp.

◆ querySrvRrSearch()

std::string ndn::autoconfig::querySrvRrSearch ( )

Send DNS SRV request using search domain list.

Returns
FaceUri of the hub from the requested SRV record
Exceptions
DnsSrvErrorif query returns nothing or SRV record cannot be parsed

Definition at line 144 of file dns-srv.cpp.

◆ runDaemon()

static void ndn::autoconfig::runDaemon ( Procedure proc)
static

Definition at line 61 of file main.cpp.

◆ usage()

static void ndn::autoconfig::usage ( std::ostream &  os,
const po::options_description &  opts,
const char *  programName 
)
static

Definition at line 51 of file main.cpp.

Variable Documentation

◆ DAEMON_INITIAL_DELAY

constexpr time::nanoseconds ndn::autoconfig::DAEMON_INITIAL_DELAY = 100_ms
constexpr

Definition at line 46 of file main.cpp.

◆ DAEMON_UNCONDITIONAL_INTERVAL

constexpr time::nanoseconds ndn::autoconfig::DAEMON_UNCONDITIONAL_INTERVAL = 1_h
constexpr

Definition at line 47 of file main.cpp.

◆ FACEURI_CANONIZE_TIMEOUT

constexpr time::nanoseconds ndn::autoconfig::FACEURI_CANONIZE_TIMEOUT = 4_s
constexpr

Definition at line 37 of file procedure.cpp.

◆ HUB_DISCOVERY_INTEREST_LIFETIME

constexpr time::milliseconds ndn::autoconfig::HUB_DISCOVERY_INTEREST_LIFETIME = 4_s
constexpr

Definition at line 39 of file multicast-discovery.cpp.

◆ HUB_DISCOVERY_PREFIX

const Name ndn::autoconfig::HUB_DISCOVERY_PREFIX {"/localhop/ndn-autoconf/hub"}

Definition at line 36 of file multicast-discovery.cpp.

◆ HUB_DISCOVERY_ROUTE_COST

constexpr uint64_t ndn::autoconfig::HUB_DISCOVERY_ROUTE_COST = 1
constexpr

Definition at line 37 of file multicast-discovery.cpp.

◆ HUB_DISCOVERY_ROUTE_EXPIRATION

constexpr time::milliseconds ndn::autoconfig::HUB_DISCOVERY_ROUTE_EXPIRATION = 30_s
constexpr

Definition at line 38 of file multicast-discovery.cpp.

◆ HUB_PREFIXES

const std::vector<Name> ndn::autoconfig::HUB_PREFIXES {"/", "/localhop/nfd"}

Definition at line 38 of file procedure.cpp.

◆ HUB_ROUTE_COST

constexpr uint64_t ndn::autoconfig::HUB_ROUTE_COST = 100
constexpr

Definition at line 40 of file procedure.cpp.

◆ HUB_ROUTE_ORIGIN

constexpr nfd::RouteOrigin ndn::autoconfig::HUB_ROUTE_ORIGIN = nfd::ROUTE_ORIGIN_AUTOCONF
constexpr

Definition at line 39 of file procedure.cpp.

◆ NETMON_DAMPEN_PERIOD

constexpr time::nanoseconds ndn::autoconfig::NETMON_DAMPEN_PERIOD = 5_s
constexpr

Definition at line 48 of file main.cpp.