From: Ben Pfaff Date: Mon, 2 Mar 2009 18:49:40 +0000 (-0800) Subject: netdev: New function netdev_nodev_get_etheraddr(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66295ac40745993355460c4cdb4125a2a9812274;p=openvswitch netdev: New function netdev_nodev_get_etheraddr(). --- diff --git a/lib/netdev.c b/lib/netdev.c index d46ab2d9..230ed947 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -1116,6 +1116,14 @@ netdev_nodev_get_flags(const char *netdev_name, enum netdev_flags *flagsp) } return 0; } + +int +netdev_nodev_get_etheraddr(const char *netdev_name, uint8_t mac[6]) +{ + init_netdev(); + + return get_etheraddr(netdev_name, mac, NULL); +} struct netdev_monitor { struct nl_sock *sock; diff --git a/lib/netdev.h b/lib/netdev.h index dd6174e2..0081a600 100644 --- a/lib/netdev.h +++ b/lib/netdev.h @@ -121,6 +121,7 @@ int netdev_get_stats(const struct netdev *, struct netdev_stats *); void netdev_enumerate(struct svec *); int netdev_nodev_get_flags(const char *netdev_name, enum netdev_flags *); +int netdev_nodev_get_etheraddr(const char *netdev_name, uint8_t mac[6]); /* Generic interface for monitoring network devices. *