Yingdi Yu | 7b0e9cf | 2014-08-29 14:57:32 -0700 | [diff] [blame] | 1 | .. _local-prefix-discovery: |
| 2 | |
| 3 | Discover local hub prefix |
| 4 | ========================= |
| 5 | |
| 6 | Some 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. |
| 8 | In order to discover that, applications need to send an interest for |
Junxiao Shi | 0d6d036 | 2015-02-14 10:02:47 -0700 | [diff] [blame^] | 9 | ``/localhop/nfd/rib/routable-prefixes`` prefix. Response data to the |
Yingdi Yu | 7b0e9cf | 2014-08-29 14:57:32 -0700 | [diff] [blame] | 10 | interest contains a list of prefixes and should be encoded as: |
| 11 | |
| 12 | :: |
| 13 | |
| 14 | Response ::= DATA-TYPE TLV-LENGTH |
Junxiao Shi | 0d6d036 | 2015-02-14 10:02:47 -0700 | [diff] [blame^] | 15 | Name (= /localhop/nfd/rib/routable-prefixes/[version]/[segment]) |
Yingdi Yu | 7b0e9cf | 2014-08-29 14:57:32 -0700 | [diff] [blame] | 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:: |
Alexander Afanasyev | 7c10b3b | 2015-01-20 12:24:27 -0800 | [diff] [blame] | 27 | ResponseContent should contain at least one Name, which should be routable |
| 28 | towards the face from which the request has been received. The requester may |
| 29 | process list of the returned names and pick whichever it wants to use. |
Yingdi Yu | 7b0e9cf | 2014-08-29 14:57:32 -0700 | [diff] [blame] | 30 | |
Junxiao Shi | 0d6d036 | 2015-02-14 10:02:47 -0700 | [diff] [blame^] | 31 | For now, the ``/localhop/nfd/rib/routable-prefixes`` data is served by |
Yingdi Yu | 7b0e9cf | 2014-08-29 14:57:32 -0700 | [diff] [blame] | 32 | :ref:`ndn-autoconfig-server`. |