lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150217102358.67b9d826@uryu.home.lan>
Date:	Tue, 17 Feb 2015 10:23:58 -0500
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Matthew Thode <mthode@...ode.org>
Cc:	netdev@...r.kernel.org
Subject: Re: getting a list of naked interface names from iproute2

On Mon, 16 Feb 2015 18:07:12 -0600
Matthew Thode <mthode@...ode.org> wrote:

> iproute2 seems to like to add @ and : info to it's output.  This makes
> parsing it hard for things like neutron (openstack).  I have a patch to
> slightly update it (still missing some things, I'll link it at the end
> if interested).  Is there a better way of getting interface names from
> iproute2 without having to strip out at characters like '@' and ':'?
> 
> changeset in neutron: https://review.openstack.org/#/c/154128/
> link to current code:
> https://github.com/openstack/neutron/blob/master/neutron/agent/linux/ip_lib.py#L110-L131
> 
> I'd appreciate your help, I'd rather not have to go through each link
> type to pull it's delimiter, but if needed I guess it's needed.
> 

Stop screenscraping, and use a real API.
All of the above would work better:
  1. Libc if_nameindex
  2. Legacy ioctl(SIOCGIFCONF)
  3. Netlink  NLMMSG_REQ (RTM_GETLINK)
  4. Sysfs /sys/class/net
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ