-/* Obtains the current flags for the network device named 'netdev_name' and
- * stores them into '*flagsp'. Returns 0 if successful, otherwise a positive
- * errno value. On error, stores 0 into '*flagsp'.
- *
- * If only device flags are needed, this is more efficient than calling
- * netdev_open(), netdev_get_flags(), netdev_close(). */
-int
-netdev_nodev_get_flags(const char *netdev_name, enum netdev_flags *flagsp)
-{
- int error, flags;
-
- init_netdev();
-
- *flagsp = 0;
- error = get_flags(netdev_name, &flags);
- if (error) {
- return error;
- }
-
- if (flags & IFF_UP) {
- *flagsp |= NETDEV_UP;
- }
- if (flags & IFF_PROMISC) {
- *flagsp |= NETDEV_PROMISC;
- }
- return 0;
-}
-
-int
-netdev_nodev_get_etheraddr(const char *netdev_name, uint8_t mac[6])
-{
- init_netdev();
-
- return get_etheraddr(netdev_name, mac, NULL);
-}
-