chiark / gitweb /
log: add an "error" parameter to all low-level logging calls and intrdouce log_error_...
[elogind.git] / src / network / networkd.h
index 90e798dbf5cf1825a09cd368ed02271b8fe67997..9acf31cd1d556917072e6682e2b46880934acaae 100644 (file)
@@ -37,7 +37,7 @@
 #include "hashmap.h"
 #include "list.h"
 #include "set.h"
-#include "condition-util.h"
+#include "condition.h"
 #include "in-addr-util.h"
 
 #define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU
@@ -100,6 +100,7 @@ struct Network {
         bool dhcp_broadcast;
         bool dhcp_critical;
         bool dhcp_routes;
+        unsigned dhcp_route_metric;
         bool ipv4ll;
         bool ipv4ll_route;
 
@@ -111,7 +112,8 @@ struct Network {
         Hashmap *addresses_by_section;
         Hashmap *routes_by_section;
 
-        char **dns, **ntp;
+        bool wildcard_domain;
+        char **domains, **dns, **ntp;
 
         LLMNRSupport llmnr;
 
@@ -125,6 +127,7 @@ struct Address {
         int family;
         unsigned char prefixlen;
         unsigned char scope;
+        unsigned char flags;
         char *label;
 
         struct in_addr broadcast;
@@ -148,6 +151,7 @@ struct Route {
 
         union in_addr_union in_addr;
         union in_addr_union dst_addr;
+        union in_addr_union prefsrc_addr;
 
         LIST_FIELDS(Route, routes);
 };
@@ -170,8 +174,6 @@ 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;
 
         char *state_file;
 
@@ -224,6 +226,17 @@ int config_parse_netdev(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);
 
+int config_parse_domains(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);
+
 int config_parse_tunnel(const char *unit,
                         const char *filename,
                         unsigned line,
@@ -323,7 +336,7 @@ int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union
 
 /* Macros which append INTERFACE= to the message */
 
-#define log_full_link(level, link, fmt, ...) log_meta_object(level, __FILE__, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ, link->ifname, ##__VA_ARGS__)
+#define log_full_link(level, link, fmt, ...) log_meta_object(level, 0, __FILE__, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ, link->ifname, ##__VA_ARGS__)
 #define log_debug_link(link, ...)       log_full_link(LOG_DEBUG, link, ##__VA_ARGS__)
 #define log_info_link(link, ...)        log_full_link(LOG_INFO, link, ##__VA_ARGS__)
 #define log_notice_link(link, ...)      log_full_link(LOG_NOTICE, link, ##__VA_ARGS__)