chiark / gitweb /
networkd: handle SIGINT and SIGTERM
[elogind.git] / src / network / networkd.h
index 5a1bf1a4cac8aba722e462d7f0e54fadd02018d4..8307bb5b13c2fddc42f90157adecb0c03e2f0923 100644 (file)
@@ -32,6 +32,7 @@
 #include "rtnl-util.h"
 #include "hashmap.h"
 #include "list.h"
+#include "condition-util.h"
 
 typedef struct NetDev NetDev;
 typedef struct Network Network;
@@ -70,6 +71,11 @@ struct NetDev {
 
         char *filename;
 
+        Condition *match_host;
+        Condition *match_virt;
+        Condition *match_kernel;
+        Condition *match_arch;
+
         char *description;
         char *name;
         NetDevKind kind;
@@ -92,6 +98,10 @@ struct Network {
         char *match_driver;
         char *match_type;
         char *match_name;
+        Condition *match_host;
+        Condition *match_virt;
+        Condition *match_kernel;
+        Condition *match_arch;
 
         char *description;
         NetDev *bridge;
@@ -191,6 +201,8 @@ struct Manager {
         struct udev *udev;
         struct udev_monitor *udev_monitor;
         sd_event_source *udev_event_source;
+        sd_event_source *sigterm_event_source;
+        sd_event_source *sigint_event_source;
 
         Hashmap *links;
         Hashmap *netdevs;
@@ -238,6 +250,9 @@ NetDevKind netdev_kind_from_string(const char *d) _pure_;
 
 int config_parse_netdev_kind(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
 
+/* gperf */
+const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, unsigned length);
+
 /* Network */
 
 int network_load(Manager *manager);
@@ -263,8 +278,7 @@ int config_parse_vlan(const char *unit, const char *filename, unsigned line,
                       int ltype, const char *rvalue, void *data, void *userdata);
 
 /* gperf */
-
-const struct ConfigPerfItem* network_gperf_lookup(const char *key, unsigned length);
+const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, unsigned length);
 
 /* Route */
 int route_new_static(Network *network, unsigned section, Route **ret);