From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serhey Popovych Subject: [RFC][PATCH iproute2-next 0/6] ip: Use netlink to walk through network device list Date: Thu, 1 Feb 2018 21:40:52 +0200 Message-ID: <1517514058-23596-1-git-send-email-serhe.popovych@gmail.com> To: netdev@vger.kernel.org Return-path: Received: from mail-lf0-f54.google.com ([209.85.215.54]:46581 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754593AbeBATlU (ORCPT ); Thu, 1 Feb 2018 14:41:20 -0500 Received: by mail-lf0-f54.google.com with SMTP id q194so27953841lfe.13 for ; Thu, 01 Feb 2018 11:41:19 -0800 (PST) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id v197sm57571lfa.25.2018.02.01.11.41.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 11:41:17 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: In this seris I replace /proc/net/dev and /sys/class/net usage for walk through network device list in iptunnel/ip6tunnel and iptuntap by rtnl_dump_filter() functionality. This is an RFC, tested minimally tunnels, tuntap seems work as before. Note that some comments, especially for iptunnel/ip6tunnel commit are missing: will add this in final series, as well as update cover letter. Thanks, Serhii Serhey Popovych (6): ipaddress: Unify print_link_stats() and print_link_stats64() ip: Introduce get_rtnl_link_stats_rta() to get link statistics tunnel: Split statistic getting and printing iptunnel/ip6tunnel: Code cleanups iptunnel/ip6tunnel: Use netlink to walk through tunnels list tuntap: Use netlink to walk through tuntap list include/utils.h | 3 + ip/ip6tunnel.c | 117 +++++++++++----------------------- ip/ipaddress.c | 189 ++++--------------------------------------------------- ip/iptunnel.c | 95 ++++++++++------------------ ip/iptuntap.c | 121 ++++++++++++++++++++++++++--------- ip/tunnel.c | 114 ++++++++++++++++++++++++++------- ip/tunnel.h | 17 ++++- lib/utils.c | 68 ++++++++++++++++++++ 8 files changed, 351 insertions(+), 373 deletions(-) -- 1.7.10.4