public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] Changing vis output ready for mainline...
@ 2009-10-12  8:11 Andrew Lunn
  2009-10-12 11:59 ` Antoine van Gelder
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andrew Lunn @ 2009-10-12  8:11 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi Folks

We need to discuss the changes which are needed to the VIS output for
inclusion of batman into mainline.

At the moment the vis output can be read from /proc/net/batman-adv/vis. It
supports two formats, graphviz dot and JSON. This can be selected
using the file /proc/net/batman-adv/vis_format.

I see a few problems here. 

1) No other /proc file in mainline does any special formatting. Either
comma separated value or space separated value is used. User space
reads this and then performs any formatting needed.

2) No other /proc file supports two userspace switchable formats!

3) We have problems when multiple applications wants different formats
at the same time. One wants dot the other wants JSON. Currently there
is no locking, so something bad is going to happen.

There are a number of ways to solve this. We should discuss different
proposals.

I would suggest changing /proc/net/batman-adv/vis to space separated
value and moving the current formatting code into batctl. I don't yet
have a 100% defined format in mind.

A current vis output would be:

        "fe:fe:00:00:04:01" -> "fe:fe:00:00:05:01" [label="1.0"]
        "fe:fe:00:00:04:01" -> "fe:fe:00:00:03:01" [label="1.0"]
        "fe:fe:00:00:04:01" -> "00:ff:7c:3c:ec:e0" [label="HNA"]
        subgraph "cluster_fe:fe:00:00:04:01" {
                "fe:fe:00:00:04:01" [peripheries=2]
                "fe:fe:00:00:04:02"
        }

I suggest something like:

fe:fe:00:00:04:01 fe:fe:00:00:05:01 255 fe:fe:00:00:03:01 255 00:ff:7c:3c:ec:e0 HNA fe:fe:00:00:04:02 S

In BNF something like

<Primary MAC> <Doublets>
<Doublets>   ::= {<Doublet> }
<Doublet>    ::= <MAC> <Flag/Value>
<Flag/Value> ::= <TQ_Value>|<HNA>|<Secondary>
<TQ_Value>   ::= uint8_t
<HNA>        ::= "HNA"
<Secondary>  ::= "S"

We then have a list of these, one line per mesh node which has
provided VIS information.

What do others thing of this? Does anybody have a different proposal?

     Thanks
        Andrew

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-10-13  8:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12  8:11 [B.A.T.M.A.N.] Changing vis output ready for mainline Andrew Lunn
2009-10-12 11:59 ` Antoine van Gelder
2009-10-12 15:22   ` Andrew Lunn
2009-10-13  8:00   ` Andrew Lunn
2009-10-12 16:48 ` Marek Lindner
2009-10-12 21:36   ` elektra
2009-10-13  7:48   ` Andrew Lunn
2009-10-13  7:54 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox