Expand description
Service record publisher and browser.
Implements the /ndn/local/sd/services/ naming convention for browsable
prefix advertisement. Any producer can publish a thin TLV record at a
well-known name; any consumer discovers available prefixes by expressing a
prefix Interest for /ndn/local/sd/services/.
§Naming convention
/ndn/local/sd/services/<prefix-hash>/<node-name>/v=<timestamp-ms><prefix-hash>— first 8 hex bytes of the FNV-1a hash of the announced prefix in canonical URI form. Allows O(1) FIB lookup when many records are present.<node-name>— the producer’s NDN name components (flattened into the hierarchical name).v=<timestamp-ms>— version component using NDN naming conventions. Consumers expressCanBePrefix=trueto fetch the latest version.
§Content TLV
ServiceRecord ::= ANNOUNCED-PREFIX TLV
NODE-NAME TLV
FRESHNESS-MS TLV?
CAPABILITIES TLV?TLV type assignments (within the 0xC0–0xFF experimental range):
| Type | Name |
|---|---|
| 0xD0 | ANNOUNCED-PREFIX |
| 0xD1 | SD-NODE-NAME |
| 0xD2 | FRESHNESS-MS |
| 0xD3 | SD-CAPABILITIES |
The FRESHNESS-MS field is advisory: consumers that cache service records
should re-fetch after this many milliseconds even if the CS has not expired
the entry. It is separate from the NDN FreshnessPeriod in MetaInfo (which
controls CS behaviour at the forwarder level).
Structs§
- Service
Record - A service advertisement record.
Functions§
- build_
browse_ interest - Build a prefix Interest for browsing.
- make_
record_ name - Construct the full Data name for a service record.