Re: [B.A.T.M.A.N.] Changing vis output ready for mainline...

Antoine van Gelder
2009-10-12T11:59:09Z

On 12 Oct 2009, at 10:11 , Andrew Lunn proposed:

> 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.

+1

/proc output formats should be unary and certainly be parse-able using
command line tools.

Moving the DOT & JSON formatting code to batctl should also ensure
that this change has minimal impact on users.

> 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.

Couple of questions:

* Would (<TQ_Value> / 255) be equivalent to the label value in the
current vis output?

* Does <Secondary> refer to a secondary interface reachable from
<Primary MAC> ?

Looks sane!

- antoine