Message ID | 20180310235321.1324-1-linus.luessing@c0d3.blue (mailing list archive) |
---|---|
Headers |
Return-Path: <b.a.t.m.a.n-bounces@lists.open-mesh.org> X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 155C380788; Sun, 11 Mar 2018 00:53:37 +0100 (CET) Received: from mail.aperture-lab.de (mail.aperture-lab.de [138.201.29.205]) by open-mesh.org (Postfix) with ESMTPS id 1D48080788 for <b.a.t.m.a.n@lists.open-mesh.org>; Sun, 11 Mar 2018 00:53:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.aperture-lab.de (Postfix) with ESMTP id AFAE5E8A5E for <b.a.t.m.a.n@lists.open-mesh.org>; Sun, 11 Mar 2018 00:53:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aperture-lab.de Received: from mail.aperture-lab.de ([127.0.0.1]) by localhost (mail.aperture-lab.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id ux-me9oQHKgm for <b.a.t.m.a.n@lists.open-mesh.org>; Sun, 11 Mar 2018 00:53:30 +0100 (CET) Received: from localhost (unknown [IPv6:2001:67c:2d50:0:bcd7:94ff:fefd:2ddd]) (Authenticated sender: linus.luessing@c0d3.blue) by mail.aperture-lab.de (Postfix) with ESMTPSA for <b.a.t.m.a.n@lists.open-mesh.org>; Sun, 11 Mar 2018 00:53:30 +0100 (CET) From: =?utf-8?q?Linus_L=C3=BCssing?= <linus.luessing@c0d3.blue> To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 11 Mar 2018 00:53:19 +0100 Message-Id: <20180310235321.1324-1-linus.luessing@c0d3.blue> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [B.A.T.M.A.N.] [PATCH v2 0/2] batman-adv: netlink support for DAT and MCAST X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" <b.a.t.m.a.n-bounces@lists.open-mesh.org> |
Series |
batman-adv: netlink support for DAT and MCAST
|
|
Message
Linus Lüssing
March 10, 2018, 11:53 p.m. UTC
This patchset adds netlink support for dumping DAT cache and multicast flags tables. Changes in v2: ============== - Added missing includes, "#include <linux/netlink.h>" and "#include <uapi/linux/batman_adv.h>", to distributed-arp-table.c - Added missing forward declaration for "struct netlink_callback" to distributed-arp-table.h - Changed nla_put_u32() to nla_put_in_addr() for BATADV_ATTR_DC_ADDRESS, removed the then obsolete ntohl() conversion - Added missing include, "#include <linux/netlink.h>", to multicast.c - Changed nla_put_u8() to nla_put_u32() for BATADV_ATTR_MCAST_FLAGS and BATADV_ATTR_MCAST_FLAGS_PRIV to enhance extensibility
Comments
On Sonntag, 11. März 2018 00:53:19 CET Linus Lüssing wrote: > This patchset adds netlink support for dumping DAT cache and multicast > flags tables. > > Changes in v2: > ============== > > - Added missing includes, "#include <linux/netlink.h>" and > "#include <uapi/linux/batman_adv.h>", to distributed-arp-table.c > - Added missing forward declaration for "struct netlink_callback" to > distributed-arp-table.h > - Changed nla_put_u32() to nla_put_in_addr() for BATADV_ATTR_DC_ADDRESS, > removed the then obsolete ntohl() conversion > - Added missing include, "#include <linux/netlink.h>", to multicast.c > - Changed nla_put_u8() to nla_put_u32() for BATADV_ATTR_MCAST_FLAGS and > BATADV_ATTR_MCAST_FLAGS_PRIV to enhance extensibility Thanks for the doing the requested changes. @Antonio: Can you please check whether you are ok with the new netlink names and types. > + [BATADV_ATTR_DC_ADDRESS] = { .type = NLA_U32 }, > + [BATADV_ATTR_DC_HWADDRESS] = { .len = ETH_ALEN }, > + [BATADV_ATTR_DC_VID] = { .type = NLA_U16 }, Kind regards, Sven
On 11/03/18 18:54, Sven Eckelmann wrote: > On Sonntag, 11. März 2018 00:53:19 CET Linus Lüssing wrote: >> This patchset adds netlink support for dumping DAT cache and multicast >> flags tables. >> >> Changes in v2: >> ============== >> >> - Added missing includes, "#include <linux/netlink.h>" and >> "#include <uapi/linux/batman_adv.h>", to distributed-arp-table.c >> - Added missing forward declaration for "struct netlink_callback" to >> distributed-arp-table.h >> - Changed nla_put_u32() to nla_put_in_addr() for BATADV_ATTR_DC_ADDRESS, >> removed the then obsolete ntohl() conversion >> - Added missing include, "#include <linux/netlink.h>", to multicast.c >> - Changed nla_put_u8() to nla_put_u32() for BATADV_ATTR_MCAST_FLAGS and >> BATADV_ATTR_MCAST_FLAGS_PRIV to enhance extensibility > > Thanks for the doing the requested changes. > > @Antonio: Can you please check whether you are ok with the new netlink names > and types. > >> + [BATADV_ATTR_DC_ADDRESS] = { .type = NLA_U32 }, >> + [BATADV_ATTR_DC_HWADDRESS] = { .len = ETH_ALEN }, >> + [BATADV_ATTR_DC_VID] = { .type = NLA_U16 }, > Personally I'd find "DAT_CACHE" easier to parse than "DC". I know we have the "batctl dc" command, but that's more to keep the CLI compact. This said, DAT was meant to be extended in the future and not store only IPv4 addresses. This said, shouldn't we use a more specific name for the address? Another observation: do these attributes need to be DAT specific? or can we just define (or reuse) a generic HWADDRESS attribute that we might already be using somewhere else (i.e. for TT)? Regards,
On Dienstag, 13. März 2018 16:02:34 CET Antonio Quartulli wrote: [...] > Another observation: do these attributes need to be DAT specific? or can > we just define (or reuse) a generic HWADDRESS attribute that we might > already be using somewhere else (i.e. for TT)? I've asked myself the same but we have BLA_- and TT_ADDRESS and these are named in a way which connects them to these specific subsystems. Using one of them for DAT seems to be a little bit odd. Kind regards, Sven
On 13/03/18 16:20, Sven Eckelmann wrote: > On Dienstag, 13. März 2018 16:02:34 CET Antonio Quartulli wrote: > [...] >> Another observation: do these attributes need to be DAT specific? or can >> we just define (or reuse) a generic HWADDRESS attribute that we might >> already be using somewhere else (i.e. for TT)? > > I've asked myself the same but we have BLA_- and TT_ADDRESS and these are > named in a way which connects them to these specific subsystems. Using one of > them for DAT seems to be a little bit odd. Oh ok. In this case it makes sense to have DAT specific attrs. (if we wanted to, we could still rename all the attrs pointing to the very same data type and unify them, but I don't have a strong opinion about it at this time). Cheers,
On Dienstag, 13. März 2018 16:22:24 CET Antonio Quartulli wrote: [...] > (if we wanted to, we could still rename all the attrs pointing to the > very same data type and unify them, but I don't have a strong opinion > about it at this time). This would break backwards compatibility. Kind regards, Sven
On 13/03/18 16:52, Sven Eckelmann wrote: > On Dienstag, 13. März 2018 16:22:24 CET Antonio Quartulli wrote: > [...] >> (if we wanted to, we could still rename all the attrs pointing to the >> very same data type and unify them, but I don't have a strong opinion >> about it at this time). > > This would break backwards compatibility. Ah right, those names are exported to user space too with the same header file. We'll live with that then. Cheers,