summaryrefslogtreecommitdiff
path: root/src/network/networkd.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-02-08 13:29:35 +0100
committerTom Gundersen <teg@jklm.no>2015-02-08 20:15:37 +0100
commitdbffab87f1504abc9f189dd253111693c99fbd9a (patch)
tree6d9d7f01ef17379dd1eb3584fa074c4bfddfac86 /src/network/networkd.h
parent23cb977ac382931a0b5c1385cdbb7fe5c4c92b1a (diff)
networkd: add network_get_by_name
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r--src/network/networkd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h
index cd54e9bb06..d144c11edc 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -97,6 +97,7 @@ struct Network {
Manager *manager;
char *filename;
+ char *name;
struct ether_addr *match_mac;
char *match_path;
@@ -224,6 +225,7 @@ struct Manager {
Hashmap *links;
Hashmap *netdevs;
+ Hashmap *networks_by_name;
LIST_HEAD(Network, networks);
LIST_HEAD(AddressPool, address_pools);
@@ -265,6 +267,7 @@ void network_free(Network *network);
DEFINE_TRIVIAL_CLEANUP_FUNC(Network*, network_free);
#define _cleanup_network_free_ _cleanup_(network_freep)
+int network_get_by_name(Manager *manager, const char *name, Network **ret);
int network_get(Manager *manager, struct udev_device *device,
const char *ifname, const struct ether_addr *mac,
Network **ret);