* [B.A.T.M.A.N.] batctl: feature to filter nodes/clients
@ 2015-02-01 13:15 Moritz Warning
2015-02-05 12:34 ` Simon Wunderlich
0 siblings, 1 reply; 4+ messages in thread
From: Moritz Warning @ 2015-02-01 13:15 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]
Hi,
I need to display the number of all nodes/clients as well as all neighbor nodes/clients.
This would be easy if batctl would be able to output the respective
list of mac addresses (batctl ... | wc -l).
I've started writing a patch as part of a feature request:
http://www.open-mesh.org/issues/203
But the problem is how to get the respective output form the debug tables.
I have been reading the docs, but have not been able
to understand the necessary information needed, no offense:
http://www.open-mesh.org/projects/batman-adv/wiki/Understand-your-batman-adv-network
Some explanation beforehand:
Clients are computers not running batman-adv,
represented by the MAC address of its network interface.
Nodes are computers running batman-adv,
represented by the MAC address of its primary interface.
List of all nodes:
Get all MACs from the 'Originator' column of the originator table
List of all neighbor nodes:
Get all MACs from the 'Nexthop' column of the originator table
and make it a unique list.
List of all clients:
Get all MACs of the 'Client' column of the transtable_local table
when it starts with a '*' character.
List of all neighbor clients:
Get all MACs of the 'Client' column of the transtable_global table
when it starts with a '*' character and when the nodes own originator
MAC (of the primary interface?) is also in the 'Originator' column.
I do not think this approach is correct, yet.
Maybe someone can drop some hints.
thanks,
mwarning
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] batctl: feature to filter nodes/clients
2015-02-01 13:15 [B.A.T.M.A.N.] batctl: feature to filter nodes/clients Moritz Warning
@ 2015-02-05 12:34 ` Simon Wunderlich
2015-02-05 18:11 ` Moritz Warning
0 siblings, 1 reply; 4+ messages in thread
From: Simon Wunderlich @ 2015-02-05 12:34 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 2425 bytes --]
Hi,
On Sunday 01 February 2015 14:15:16 Moritz Warning wrote:
> Hi,
>
> I need to display the number of all nodes/clients as well as all neighbor
> nodes/clients. This would be easy if batctl would be able to output the
> respective list of mac addresses (batctl ... | wc -l).
>
> I've started writing a patch as part of a feature request:
> http://www.open-mesh.org/issues/203
>
> But the problem is how to get the respective output form the debug tables.
> I have been reading the docs, but have not been able
> to understand the necessary information needed, no offense:
>
> http://www.open-mesh.org/projects/batman-adv/wiki/Understand-your-batman-adv
> -network
>
> Some explanation beforehand:
> Clients are computers not running batman-adv,
> represented by the MAC address of its network interface.
> Nodes are computers running batman-adv,
> represented by the MAC address of its primary interface.
>
> List of all nodes:
> Get all MACs from the 'Originator' column of the originator table
Note that this may also show secondary interfaces of your neighbors - you may
have to filter that against a list of primary interfaces you collect otherwise.
>
> List of all neighbor nodes:
> Get all MACs from the 'Nexthop' column of the originator table
> and make it a unique list.
That sounds about right, if you want to include all neighbors which are in
radio range (even if you are not currently sending to them). Alfred-vis for
example only considers neighbors which are actually chosen for some
connections. Again, you may include secondary interfaces.
>
> List of all clients:
> Get all MACs of the 'Client' column of the transtable_local table
> when it starts with a '*' character.
Yes, but you may want to filter out local mac addresses, which are configured on
top of VLANs on bridges.
>
> List of all neighbor clients:
> Get all MACs of the 'Client' column of the transtable_global table
> when it starts with a '*' character and when the nodes own originator
> MAC (of the primary interface?) is also in the 'Originator' column.
Yup, but in this case again you don't know what are clients and what are
bridges/vlans configured on top of your other nodes. That's going to be tricky
to filter.
How about you use alfred-vis or your own alfred-based service to do the
filtering properly? Some kind of distributed/centralized database would help on
the filtering job, IMHO.
Cheers,
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] batctl: feature to filter nodes/clients
2015-02-05 12:34 ` Simon Wunderlich
@ 2015-02-05 18:11 ` Moritz Warning
2015-02-05 18:24 ` Simon Wunderlich
0 siblings, 1 reply; 4+ messages in thread
From: Moritz Warning @ 2015-02-05 18:11 UTC (permalink / raw)
To: Simon Wunderlich, b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 3021 bytes --]
Thanks for the response!
On 02/05/2015 01:34 PM, Simon Wunderlich wrote:
> Hi,
>
> On Sunday 01 February 2015 14:15:16 Moritz Warning wrote:
>> Hi,
>>
>> I need to display the number of all nodes/clients as well as all neighbor
>> nodes/clients. This would be easy if batctl would be able to output the
>> respective list of mac addresses (batctl ... | wc -l).
>>
>> I've started writing a patch as part of a feature request:
>> http://www.open-mesh.org/issues/203
>>
>> But the problem is how to get the respective output form the debug tables.
>> I have been reading the docs, but have not been able
>> to understand the necessary information needed, no offense:
>>
>> http://www.open-mesh.org/projects/batman-adv/wiki/Understand-your-batman-adv
>> -network
>>
>> Some explanation beforehand:
>> Clients are computers not running batman-adv,
>> represented by the MAC address of its network interface.
>> Nodes are computers running batman-adv,
>> represented by the MAC address of its primary interface.
>>
>> List of all nodes:
>> Get all MACs from the 'Originator' column of the originator table
>
> Note that this may also show secondary interfaces of your neighbors - you may
> have to filter that against a list of primary interfaces you collect otherwise.
Ok, I wonder how I can filter out those secondary interface MAC addresses
of 1-hop neighbors.
Can those addresses be recognized by comparing it to the Nexthop column?
This seems to be the major problem for me right now.
>
>>
>> List of all neighbor nodes:
>> Get all MACs from the 'Nexthop' column of the originator table
>> and make it a unique list.
>
> That sounds about right, if you want to include all neighbors which are in
> radio range (even if you are not currently sending to them). Alfred-vis for
> example only considers neighbors which are actually chosen for some
> connections. Again, you may include secondary interfaces.
>>
>> List of all clients:
>> Get all MACs of the 'Client' column of the transtable_local table
>> when it starts with a '*' character.
>
> Yes, but you may want to filter out local mac addresses, which are configured on
> top of VLANs on bridges.
Are those the MAC-addresses of the bridge interface. Say, when I bridge bat0 into
br-lan, then the MAC of br-lan will show up as client?
>>
>> List of all neighbor clients:
>> Get all MACs of the 'Client' column of the transtable_global table
>> when it starts with a '*' character and when the nodes own originator
>> MAC (of the primary interface?) is also in the 'Originator' column.
>
> Yup, but in this case again you don't know what are clients and what are
> bridges/vlans configured on top of your other nodes. That's going to be tricky
> to filter.
>
> How about you use alfred-vis or your own alfred-based service to do the
> filtering properly? Some kind of distributed/centralized database would help on
> the filtering job, IMHO.
>
> Cheers,
> Simon
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] batctl: feature to filter nodes/clients
2015-02-05 18:11 ` Moritz Warning
@ 2015-02-05 18:24 ` Simon Wunderlich
0 siblings, 0 replies; 4+ messages in thread
From: Simon Wunderlich @ 2015-02-05 18:24 UTC (permalink / raw)
To: Moritz Warning; +Cc: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]
On Thursday 05 February 2015 19:11:15 Moritz Warning wrote:
> >>
> >> Some explanation beforehand:
> >> Clients are computers not running batman-adv,
> >> represented by the MAC address of its network interface.
> >> Nodes are computers running batman-adv,
> >> represented by the MAC address of its primary interface.
> >>
> >> List of all nodes:
> >> Get all MACs from the 'Originator' column of the originator table
> >
> > Note that this may also show secondary interfaces of your neighbors - you
> > may have to filter that against a list of primary interfaces you collect
> > otherwise.
> Ok, I wonder how I can filter out those secondary interface MAC addresses
> of 1-hop neighbors.
> Can those addresses be recognized by comparing it to the Nexthop column?
> This seems to be the major problem for me right now.
>
Hmm ... actually you can't find that out from the originator output, since
there is no distinction there.
Maybe one thing how to find out from a remote host without prior information
(e.g. centralized database) would be to look at the tt global table -
secondary interfaces won't show up there. But thats also more a hack than
anything else. ;)
> >> List of all clients:
> >> Get all MACs of the 'Client' column of the transtable_local table
> >> when it starts with a '*' character.
> >
> > Yes, but you may want to filter out local mac addresses, which are
> > configured on top of VLANs on bridges.
>
> Are those the MAC-addresses of the bridge interface. Say, when I bridge bat0
> into br-lan, then the MAC of br-lan will show up as client?
The mac address of br-lan will most likely show up in the local translation
table, yes - unless you never send a packet from that interface.
Cheers,
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-05 18:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-01 13:15 [B.A.T.M.A.N.] batctl: feature to filter nodes/clients Moritz Warning
2015-02-05 12:34 ` Simon Wunderlich
2015-02-05 18:11 ` Moritz Warning
2015-02-05 18:24 ` Simon Wunderlich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).