blob: 083134bce9448e7c655f26460e83948a2e308fe9 [file] [log] [blame]
Davide Pesavento4d826922018-02-11 23:05:48 -05001.. _local-prefix-discovery:
2
3Local hub prefix discovery
4==========================
5
Davide Pesavento9f6a7d92020-10-06 15:21:48 -04006Some applications need to discover the prefix(es) under which they can publish
7data / which Interests the local hub will be able to forward down to the
8application. In order to discover that, an application can send an Interest for
9``/localhop/nfd/rib/routable-prefixes``. The data in response to this Interest
10will contain a list of prefixes and should be encoded as follows:
Davide Pesavento4d826922018-02-11 23:05:48 -050011
Davide Pesavento9f6a7d92020-10-06 15:21:48 -040012.. code-block:: abnf
Davide Pesavento4d826922018-02-11 23:05:48 -050013
Davide Pesavento9f6a7d92020-10-06 15:21:48 -040014 Response = DATA-TYPE TLV-LENGTH
15 Name ; /localhop/nfd/rib/routable-prefixes/[version]/[segment]
16 MetaInfo ; ContentType == BLOB, FreshnessPeriod == 5000
17 ResponseContent
18 DataSignature
Davide Pesavento4d826922018-02-11 23:05:48 -050019
Davide Pesavento9f6a7d92020-10-06 15:21:48 -040020 ResponseContent = 1*Name
Davide Pesavento4d826922018-02-11 23:05:48 -050021
Davide Pesavento9f6a7d92020-10-06 15:21:48 -040022``ResponseContent`` should contain at least one ``Name``, which should be routable
23towards the face from which the request was received. The requester may process
24the list of returned names and pick whichever it wants to use.
Davide Pesavento4d826922018-02-11 23:05:48 -050025
26For now, the ``/localhop/nfd/rib/routable-prefixes`` data is served by
27:ref:`ndn-autoconfig-server`.