NetJson Info Plugin

From OLSR.org Wiki
Jump to: navigation, search

The NetJSON Info Plugin returns a JSON output that describes the routing table and the known network topology (called graph) via telnet on port 2009.

The NetJSON specification is available at netjson.org.

subcommands of netjsoninfo

The plugin implements the command netjsoninfo with a list of subcommands:

  • route
  • graph
  • domain
  • filter

route

netjsoninfo route returns a NetworkCollection object with a list of NetworkRoutes objects inside, one for each Domain defined for olsrd2.

graph

netjsoninfo graph returns a NetworkCollection object with a list of NetworkGraph objects inside, one for each Domain defined for olsrd2.

domain

netjsoninfo domain returns a custom NetworkDomain object, which contains an domain object for each domain defined for olsrd.

The domain objects contain an unique identifier for each domain (to be used with the filter subcommand) which has the form ipv4_<domain_number> or ipv6_<domain_number>, the number of the domain (typically 0 for the first domain), its router id, the name of the metric and the name or the MPR algorithm.

filter

filter is a prefix for the route and graph command to get only a single NetworkRoutes/NetworkGraph object instead of a NetworkCollection object with one or multiple of them inside.

It is used in the form filter route <domain_id> or filter graph <domain_id>

Retrieving data via HTTP

To retrieve the output via HTTP you need to use http2telnet.

Configuration

This plugin has no configuration options.