summaryrefslogtreecommitdiffstats
path: root/discover/network.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-07-21 15:51:58 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-07-21 17:20:08 +0800
commit0adfe11dc0738321cdd529f30773899cc8f79855 (patch)
treef456887c66a18679f27940d34082bde40e9c3857 /discover/network.h
parent20889c61bc0e6712c1cac5a0a6e9e8e9dff7cf84 (diff)
downloadtalos-petitboot-0adfe11dc0738321cdd529f30773899cc8f79855.tar.gz
talos-petitboot-0adfe11dc0738321cdd529f30773899cc8f79855.zip
discover: allow separate lifetimes for network interfaces and discover devices
We want the network code's network interfaces to (potentially) persist remove events. For example, discover devices may be removed by a user event (this happens during a udhcpc deconfig). In this case, we want the boot options to be removed, but the struct interface needs to stay present. This change adds network_(un)_register_device functions, to allow the device handler to detach from and attach to interfaces. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/network.h')
-rw-r--r--discover/network.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/discover/network.h b/discover/network.h
index 912174f..bfd1ab1 100644
--- a/discover/network.h
+++ b/discover/network.h
@@ -3,11 +3,17 @@
struct network;
struct device_handler;
+struct discover_device;
struct waitset;
struct network *network_init(struct device_handler *handler,
struct waitset *waitset, bool dry_run);
int network_shutdown(struct network *network);
+void network_register_device(struct network *network,
+ struct discover_device *dev);
+void network_unregister_device(struct network *network,
+ struct discover_device *dev);
+
#endif /* NETWORK_H */
OpenPOWER on IntegriCloud