diff options
author | Simon Horman <horms@verge.net.au> | 2011-09-22 21:24:14 +0900 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-09-22 09:03:03 -0700 |
commit | ee9bed06cd2794ced29190b6c6539993159d76f5 (patch) | |
tree | 6a9110087081dd13869d3e175dc56b62824ef344 /lib/netdev-linux.c | |
parent | 00fa9d37c2b2166358d9967a5fa03dc1ae45b2ca (diff) | |
download | openvswitch-ee9bed06cd2794ced29190b6c6539993159d76f5.tar.gz |
Remove netdev_find_dev_by_in4
netdev_find_dev_by_in4() appears to no longer be used and thus
can be removed. This also allows netdev_enumerate(), the
enumerate member of struct netdev_class and netdev_linux_enumerate()
to be removed.
I noticed this as netdev_linux_enumerate() makes use of if_nameindex()
and if_freenameindex() which are not available when compiling using
the Android NDK r6b (Android API level 13).
Diffstat (limited to 'lib/netdev-linux.c')
-rw-r--r-- | lib/netdev-linux.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 85fcdf964..5bdb9639e 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -694,28 +694,6 @@ netdev_linux_close(struct netdev *netdev_) free(netdev); } -/* Initializes 'sset' with a list of the names of all known network devices. */ -static int -netdev_linux_enumerate(struct sset *sset) -{ - struct if_nameindex *names; - - names = if_nameindex(); - if (names) { - size_t i; - - for (i = 0; names[i].if_name != NULL; i++) { - sset_add(sset, names[i].if_name); - } - if_freenameindex(names); - return 0; - } else { - VLOG_WARN("could not obtain list of network device names: %s", - strerror(errno)); - return errno; - } -} - static int netdev_linux_listen(struct netdev *netdev_) { @@ -2340,7 +2318,7 @@ netdev_linux_change_seq(const struct netdev *netdev) return netdev_dev_linux_cast(netdev_get_dev(netdev))->change_seq; } -#define NETDEV_LINUX_CLASS(NAME, CREATE, ENUMERATE, GET_STATS, SET_STATS) \ +#define NETDEV_LINUX_CLASS(NAME, CREATE, GET_STATS, SET_STATS) \ { \ NAME, \ \ @@ -2356,8 +2334,6 @@ netdev_linux_change_seq(const struct netdev *netdev) netdev_linux_open, \ netdev_linux_close, \ \ - ENUMERATE, \ - \ netdev_linux_listen, \ netdev_linux_recv, \ netdev_linux_recv_wait, \ @@ -2409,7 +2385,6 @@ const struct netdev_class netdev_linux_class = NETDEV_LINUX_CLASS( "system", netdev_linux_create, - netdev_linux_enumerate, netdev_linux_get_stats, NULL); /* set_stats */ @@ -2417,7 +2392,6 @@ const struct netdev_class netdev_tap_class = NETDEV_LINUX_CLASS( "tap", netdev_linux_create_tap, - NULL, /* enumerate */ netdev_pseudo_get_stats, NULL); /* set_stats */ @@ -2425,7 +2399,6 @@ const struct netdev_class netdev_internal_class = NETDEV_LINUX_CLASS( "internal", netdev_linux_create, - NULL, /* enumerate */ netdev_pseudo_get_stats, netdev_vport_set_stats); |