Re: [B.A.T.M.A.N.] [PATCHv3 next 3/3] batctl: add sys framework for VLAN support

Marek Lindner
2014-01-06T08:43:09Z

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

On Sunday 05 January 2014 23:25:36 Antonio Quartulli wrote:
> From: Marco Dalla Torre <marco.dallato@gmail.com>
>
> Allow the batctl tool to take advantage of changes from commit
> e4ff5c153dab054a6cd1c4132f87bc5e77127456 "add sys framework for VLAN"
> recently added to batman-adv, so that users can execute commands in
> a per VLAN fashion.
>
> If no directory entry corresponding to the user-selected device is found
> at the standard location for non VLAN interfaces
> (/sys/class/net/${device}/mesh/), 'batctl' now looks into directory:
> /sys/class/net/${base_device}/mesh/vlan${vid}
> Information on VLAN devices (base device, vid) necessary to construct the
> directory path is acquired by querying the netlink kernel module.
> Where:
> -${base_device}: the batman device on top of which the VLAN is sitting
> -${device}: the device interface for the VLAN,
> -${vid}: the identifier assigned to the VLAN.
>
> If the user-selected command is not supported by the VLAN, an appropriate
> error is shown.
>
> Signed-off-by: Marco Dalla Torre <marco.dallato@gmail.com>
> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
> ---
> main.c | 2 +-
> man/batctl.8 | 4 ++--
> sys.c | 15 +++++++++++++--
> sys.h | 22 ++++++++++++----------
> 4 files changed, 28 insertions(+), 15 deletions(-)

Applied in revision 03eaa85.