blob: f1bca8484acb533545bf162bec1d8908e627e63b [file] [log] [blame]
Yingdi Yu7b0e9cf2014-08-29 14:57:32 -07001.. _local-prefix-discovery:
2
3Discover local hub prefix
4=========================
5
6Some applications need to discover prefix(es) under which they can publish data
7/ which Interests local hub will be able to forward down to the application.
8In order to discover that, applications need to send an interest for
9``/localhop/ndn-autoconf/routable-prefixes`` prefix. Response data to the
10interest contains a list of prefixes and should be encoded as:
11
12::
13
14 Response ::= DATA-TYPE TLV-LENGTH
15 Name (= /localhop/ndn-autoconf/routable-prefixes/[version])
16 MetaInfo (= ResponseMetaInfo)
17 Content (= ResponseContent)
18 Signature
19
20 ResponseMetaInfo ::= META-INFO-TYPE TLV-LENGTH
21 ContentType (= DATA)
22 FreshnessPeriod (= 5000)
23
24 ResponseContent ::= Name+
25
26.. note::
27ResponseContent should contain at least one Name, which should be routable
28towards the face from which the request has been received. The requester may
29process list of the returned names and pick whichever it wants to use.
30
31For now, the ``/localhop/ndn-autoconf/routable-prefixes`` data is served by
32:ref:`ndn-autoconfig-server`.