Davide Pesavento | 4d82692 | 2018-02-11 23:05:48 -0500 | [diff] [blame] | 1 | .. _local-prefix-discovery: |
| 2 | |
| 3 | Local hub prefix discovery |
| 4 | ========================== |
| 5 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 6 | Some applications need to discover the prefix(es) under which they can publish |
| 7 | data / which Interests the local hub will be able to forward down to the |
| 8 | application. 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 |
| 10 | will contain a list of prefixes and should be encoded as follows: |
Davide Pesavento | 4d82692 | 2018-02-11 23:05:48 -0500 | [diff] [blame] | 11 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 12 | .. code-block:: abnf |
Davide Pesavento | 4d82692 | 2018-02-11 23:05:48 -0500 | [diff] [blame] | 13 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 14 | 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 Pesavento | 4d82692 | 2018-02-11 23:05:48 -0500 | [diff] [blame] | 19 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 20 | ResponseContent = 1*Name |
Davide Pesavento | 4d82692 | 2018-02-11 23:05:48 -0500 | [diff] [blame] | 21 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 22 | ``ResponseContent`` should contain at least one ``Name``, which should be routable |
| 23 | towards the face from which the request was received. The requester may process |
| 24 | the list of returned names and pick whichever it wants to use. |
Davide Pesavento | 4d82692 | 2018-02-11 23:05:48 -0500 | [diff] [blame] | 25 | |
| 26 | For now, the ``/localhop/nfd/rib/routable-prefixes`` data is served by |
| 27 | :ref:`ndn-autoconfig-server`. |