chiark / gitweb /
sd-rtnl: message - allow checking for attributes without reading out their contents
[elogind.git] / src / udev / net / link-config.h
index a55c6f5f05d66ab37d73acf60ef47ab664f57cec..844ea9862943887b4015646d252b0bbe3a9f9ae1 100644 (file)
 #pragma once
 
 #include "ethtool-util.h"
-
-#include "libudev.h"
+#include "condition.h"
 #include "util.h"
 #include "list.h"
+#include "libudev.h"
 
 typedef struct link_config_ctx link_config_ctx;
 typedef struct link_config link_config;
@@ -38,6 +38,8 @@ typedef enum MACPolicy {
 } MACPolicy;
 
 typedef enum NamePolicy {
+        NAMEPOLICY_KERNEL,
+        NAMEPOLICY_DATABASE,
         NAMEPOLICY_ONBOARD,
         NAMEPOLICY_SLOT,
         NAMEPOLICY_PATH,
@@ -53,6 +55,10 @@ struct link_config {
         char *match_path;
         char *match_driver;
         char *match_type;
+        Condition *match_host;
+        Condition *match_virt;
+        Condition *match_kernel;
+        Condition *match_arch;
 
         char *description;
         struct ether_addr *mac;
@@ -77,6 +83,8 @@ bool link_config_should_reload(link_config_ctx *ctx);
 int link_config_get(link_config_ctx *ctx, struct udev_device *device, struct link_config **ret);
 int link_config_apply(link_config_ctx *ctx, struct link_config *config, struct udev_device *device, const char **name);
 
+int link_get_driver(link_config_ctx *ctx, struct udev_device *device, char **ret);
+
 const char *name_policy_to_string(NamePolicy p) _const_;
 NamePolicy name_policy_from_string(const char *p) _pure_;