Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F195C43461 for ; Mon, 7 Sep 2020 21:28:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2CD98215A4 for ; Mon, 7 Sep 2020 21:28:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbgIGV2t (ORCPT ); Mon, 7 Sep 2020 17:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727033AbgIGV2Z (ORCPT ); Mon, 7 Sep 2020 17:28:25 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 088B9C061755 for ; Mon, 7 Sep 2020 14:28:24 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kFOgW-000IVo-Ak; Mon, 07 Sep 2020 23:28:20 +0200 Message-ID: Subject: Re: alternatives to screenscraping iw? From: Johannes Berg To: Krishna Chaitanya Cc: Paul Cercueil , linux-wireless , od@zcrc.me Date: Mon, 07 Sep 2020 23:28:19 +0200 In-Reply-To: (sfid-20200907_192534_842288_580BA171) References: <04HAGQ.ASDIWY4TQH8H3@crapouillou.net> <55e3de67208c2120857102d13a896553fbf223b4.camel@sipsolutions.net> (sfid-20200907_192534_842288_580BA171) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, 2020-09-07 at 22:55 +0530, Krishna Chaitanya wrote: > > > I wonder if the netlink policy export I wrote for the kernel could be > > used to generate attribute descriptions? Even if it means just running a > > tool in a latest kernel VM to do it. > Can you please point me to it? But yes, auto-generating those should be handy. > Probably can pick up the header file from sources in kernel.org > instead of booting > into a VM (depending on how your tools work)? No no, I meant at runtime from the *policy* export, not the header file. See net/netlink/policy.c and this patch in the userland code: https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=cc889b82412450dec762551ac867bd2896656ddc johannes