Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3478370pxk; Mon, 7 Sep 2020 14:29:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh066NHEd1vLE9b+4ArgF5GmvWsiz83cErk/NTgG6MAXc683wkBsnEeZaw2UMZeqP+jvc3 X-Received: by 2002:a17:906:8258:: with SMTP id f24mr8838980ejx.551.1599514172713; Mon, 07 Sep 2020 14:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599514172; cv=none; d=google.com; s=arc-20160816; b=PBk8hBixOhH0CmWCmUakKh96MVbDuQ5SAZ7czAM9JlcW2jiDkJ0kG7Kd9nf+UHGGk7 D/6jobmcBIaSiBCxdlOY+COUeaoBKloUl5cihOo7+Lc5dMABakhvKPkOxEAwzXU8Zmp7 XSXtdwRe1RKXZdjcF0yaRy1vBBT67EuWOJQ/Was8tx7RHIjgXkLwPoCL6GHz8WiEfTUS X2+YdkMCOqV3OTIlWGRGWD0bylrYuPQSk6euwqN6a1Z5KKJBw8bst08NlS2ZNjCpwzAE 4AFaw15v+WlzekS86yFtZAaCgrKMDYeUrOahyUyfztEcEUVCHOwUy7yNqfOvD4frKyt6 i1Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=COnAfba7QgMyXfpswix3R+SFsYHxAPxd+oq8DgDUfMw=; b=FGyYaljv4S867J9h+2gnJVlhu4c0A1ypxiWHRF/oGi09lHNaKXWcJsptaDsAVmrbqY rTDD3L/FG282K1LE+dlO0q4AoCaAvVehbaBxrYRFdLwGQKUpvu0O/jLetP/46sitnLjp lOVbPuie8Yajhq4iilnMhKplx4Pvh1jZzqCz6Z9EVgbz8Uvn6PZaUDs6q7kwJaKM8p60 M3Q+RZLTSN/XR1E7OQeI6DbYLFH+XN/RJWH/86RXYSBGljhC41EmBPZKJGXJmHFYNw0p PqhT1GxJaHE3JYAnngmjgbJJ0LjFzuu31HCMqvlXb5ScnJHuB3289yAsqONXDuJGiuT8 vN3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p21si11543896eds.379.2020.09.07.14.28.57; Mon, 07 Sep 2020 14:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbgIGV2t (ORCPT + 99 others); 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