[Olsr-dev] NetJSON Update for OLSRv2
Henning Rogge
(spam-protected)
Tue Jul 26 11:17:13 CEST 2016
Hi,
I just pushed an update to the OLSRv2 NetJSON implementation, bringing
it to the newest spec and adding quite a bit of optional data.
The new implementation does NOT use IP addresses as IDs anymore (it
prefix them with a string to make the distinction clear), which might
lead to trouble by NetJSON consumers that expect this.
I also added a "properties" section to a few NetJSON objects, I think
we should talk about updating the spec there.
The new properties were added for the "NetworkRoutes" object, the
"Route" object and the "NetworkGraph" object.
Because current NetJSON does not support a "link" between a router and
a normal prefix anymore, the new implementation adds "pseudo nodes"
for each (locally) attached network and links from their routers to
these nodes.
Optional (Properties) keys for NetworkRoutes objects:
- router_addr: the IP address of the (destination) router responsible
for a routing entry
Optional (Properties) keys for Route objects:
- destination_id: the router_id of the (destination) router
responsible for a routing entry
- next_router_id: the router_id of the next hop router for a routing entry
- next_router_addr: the IP address of the next hop router for a routing entry
- hops: the number of IP hops for the route (including +1 hop for
attached prefixes)
- last_router_id: the router_id for the last router before the
destination router
- last_router_addr: the IP address of the last router before the
destination router
Optional (Properties) keys for NetworkGraph objects:
- router_addr: the IP address of the router generating the Network Graph
Optional (Properties) keys for Node objects:
- router_id: the route_id of the router responsible for the node (node
might be an attached prefix)
- router_addr: the IP address of the router responsible for the node
(node might be an attached prefix)
- type: might be "local" (the local router), "lan" (locally attached
prefix), "node" (remote router) or "attached" (prefix attached to
remote router)
Optional (Properties) keys for Link objects:
- in: incoming link cost (numeric)
- in_text: text representation of incoming link cost
- outgoing_tree: true if link is part of "least cost" dijkstra tree
- source_addr: the IP address of the source router of the link
- target_addr: the IP address of the destination router of the link
- type: might be "local" (outgoing link from local router), "lan"
(link from local router to attached prefix), "node" (node from or
between remote routers) or "attached" (link from remote router to
attached prefix)
- links: an array of "links" elements described below
"links" elements represent the local knowledge about (multiple)
interfaces connecting to the direct neighbors:
- interface: the outgoing interface of the link on the local router
- source_addr: the (linklocal) source IP address of the link between
the two routers
- target_addr: the (linklocal) destination IP address of the link
between the two routers
- cost: outgoing link cost (numeric)
- cost_text: text representation of outgoing link cost
- in: incoming link cost (numeric)
- in_text: text representation of incoming link cost
- outgoing_tree: true if link is part of the "least cost" dijkstra tree.
I have attached two example files with for NetworkGraph and NetworkRoute.
Henning Rogge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netjson_graph.json
Type: application/json
Size: 9704 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20160726/64131666/attachment.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netjson_route.json
Type: application/json
Size: 2933 bytes
Desc: not available
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20160726/64131666/attachment-0001.json>
More information about the Olsr-dev
mailing list