[Olsr-dev] adding config to txtinfo plugin?

Markus Kittenberger (spam-protected)
Fri May 4 08:46:24 CEST 2012


On Fri, May 4, 2012 at 1:25 AM, Hans-Christoph Steiner <
(spam-protected)> wrote:

>
> On May 3, 2012, at 6:52 PM, Ferry Huberts wrote:
>
> > On 03-05-12 23:55, Hans-Christoph Steiner wrote:
> >>
> >> On May 3, 2012, at 4:32 PM, Ferry Huberts wrote:
> >>
> >>> On 03-05-12 22:29, Hans-Christoph Steiner wrote:
> >>>>
> >>>> On May 3, 2012, at 2:21 AM, Markus Kittenberger wrote:
> >>>>
> >>>>> On Thu, May 3, 2012 at 3:28 AM, Hans-Christoph Steiner
> >>>>> <(spam-protected)<mailto:(spam-protected)>>
>  wrote:
> >>>>>
> >>>>>
> >>>>>    I have a complete Java wrapper for the txtinfo plugin, but I
> >>>>>    noticed that the httpinfo plugin provides the configuration while
> >>>>>    the txtinfo plugin does not.
> >>>>>
> >>>>> afair the txtinfo provides the config already!
> >>>>>
> >>>>> but its (for backward compatibility) not within the /all or default
> output
> >>>>> (/all == /neigh/link/route/hna/mid/topo)
> >>>>>
> >>>>> e.g.: wget -t 1 -O -
> >>>>> http://127.0.0.1:2006/all/gateway/config/interface/2hop
> >>>>> (which is infact currently really "all" the txtinfo can provide,..)
> >>>>>
> >>>>> btw you can use 3 letter abbreviations of commands e.g. /int for
> >>>>> /interfaces
> >>>>> and any combinations of commands. e.g. /link/interface/config
> >>>>> (but btw the output ordering is fixed)
> >>>>>
> >>>>>    why I shouldn't add /variables, /interfaces, and /plugins to
> >>>>>    txtinfo to get all of the info that httpinfo is providing?
> >>>>>
> >>>>> afair it already does exactly this,..
> >>>>>
> >>>>> if not add what is missing,..
> >>>>>
> >>>>>
> >>>>>    Or maybe I should just scrape the httpinfo output...
> >>>>>
> >>>>> not agood idea (especially as current httpinfo will not make into
> next
> >>>>> olsrd versions,..)
> >>>>
> >>>> So the output of /2hop provides data in a format that is quite
> difficult
> >>>> to reliably scrape:
> >>>>
> >>>> IP addressSYMMPRMPRSWill.
> >>>> 2hop interface adrress
> >>>> 172.29.174.189YESNONO3172.29.190.217
> >>>> 172.29.62.59
> >>>> 172.29.207.239
> >>>> 172.29.56.119
> >>>> 172.29.56.119YESYESNO7172.29.190.217
> >>>> 172.29.174.189
> >>>> 172.29.62.59
> >>>> 172.29.207.239
> >>>>
> >>>>
> >>>> And it gets worse when there are no 2hop interface addresses:
> >>>>
> >>>> 172.29.174.189YESNONO3172.29.56.119YESYESNO7172.29.190.217
> >>>> 172.29.174.189
> >>>> 172.29.62.59
> >>>> 172.29.207.239
> >>>>
> >>>>
> >>>> Anyone mind if I changed it to output the "2hop interface adrress"
> data
> >>>> as a comma separated list? Like:
> >>>
> >>> yes.
> >>> in general it is a big no-no to changes interfaces on stable...
> >>> (ask henning)
> >>
> >>
> >> Even if its buggy? Currently, if a node doesn't have any 2hop
> neighbors, then the next node will be appended to the current node's line.
>  I suppose I could live with the rest of the format.
> >>
> >> If this really can't be fixed, does anyone have any code that can
> reliably parse this?
> >>
> >
> >
> > you can always _add_ pages... :-)
> > that's not chaning the interface, just extending it.
> > so I propose you just add a page that gives you what you want
>
>
> OK, if that's how y'all think I should do it,

true, adding only new pages is the safest approach,..

but somewhat i doubt that there are many users of the pages "outside" of
/all (and /neighbours)

as afair all other additional pages where just added by me over time
without any documentation (except the source code) and nobody ever asked or
complained about till now,.. (which still does not mean nobody uses it,..
(-;)

so i would not regard them as an really established interface, especially
the /2hop layout, as despite i coded it, i never used it, ... (and maybe
truly nobody used it till now,..,)

I can do it that way.  Is there anything else missing from txtinfo while I
> am at it?
>
> .hc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120504/8344a4ee/attachment.html>


More information about the Olsr-dev mailing list