2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-15 14:17:18 +00:00

netdev: Make netdev_find_dev_by_in4() use netdevs, not device names.

The netdev_nodev_*() functions have always been a bit of a kluge.  It's
better to keep a network device open than to open it every time that it is
needed.

Also updates the only user of netdev_find_dev_by_in4().
This commit is contained in:
Ben Pfaff
2009-07-23 17:09:43 -07:00
parent 96b9b7a9ef
commit c752217a1e
3 changed files with 36 additions and 38 deletions

View File

@@ -107,7 +107,8 @@ int netdev_set_policing(struct netdev *, uint32_t kbits_rate,
uint32_t kbits_burst);
void netdev_enumerate(struct svec *);
bool netdev_find_dev_by_in4(const struct in_addr *in4, char **netdev_name);
struct netdev *netdev_find_dev_by_in4(const struct in_addr *);
bool netdev_nodev_find_dev_by_in4(const struct in_addr *in4, char **netdev_name);
int netdev_nodev_get_flags(const char *netdev_name, enum netdev_flags *);
int netdev_nodev_get_in4(const char *netdev_name, struct in_addr *);
int netdev_nodev_set_etheraddr(const char *name, const uint8_t mac[6]);