summaryrefslogtreecommitdiff
path: root/src/network/networkd.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-01-05 23:01:10 +0100
committerTom Gundersen <teg@jklm.no>2014-01-12 15:37:21 +0100
commit3bef724f7e7f7eaca69881548b06e221b77d7031 (patch)
tree0b17e5a43d7e5c5d07dc696d23d4c829f9ab7200 /src/network/networkd.h
parent924fe4304af981ffd849346b4a1d415f11e9dd79 (diff)
networkd: generate resolv.conf
This adds support to generate a basic resolv.conf in /run/systemd/network. This file will not take any effect unless a symlink is created from /etc/resolv.conf. Nameservers received over DHCP takes precedence over statically configured ones. Note: /etc/resolv.conf is severely limited, so in the future we will likely rather provide a much more powerfull nss plugin (or something to that effect), but this should allow current users to function without any loss of functionality.
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r--src/network/networkd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 55181f2bbc..607feba0e7 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -88,6 +88,7 @@ struct Network {
LIST_HEAD(Address, static_addresses);
LIST_HEAD(Route, static_routes);
+ Address *dns;
Hashmap *addresses_by_section;
Hashmap *routes_by_section;
@@ -157,6 +158,7 @@ struct Link {
Route *dhcp_route;
Address *dhcp_address;
+ Address *dns;
LinkState state;
@@ -195,6 +197,8 @@ int manager_udev_listen(Manager *m);
int manager_rtnl_listen(Manager *m);
+int manager_update_resolv_conf(Manager *m);
+
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
#define _cleanup_manager_free_ _cleanup_(manager_freep)
@@ -258,6 +262,10 @@ int address_drop(Address *address, Link *link, sd_rtnl_message_handler_t callbac
DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free);
#define _cleanup_address_free_ _cleanup_(address_freep)
+int config_parse_dns(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_address(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);