Skip to main content

hickory_resolver/system_conf/
mod.rs

1// Copyright 2015-2017 Benjamin Fry <benjaminfry@me.com>
2//
3// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4// https://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5// https://opensource.org/licenses/MIT>, at your option. This file may not be
6// copied, modified, or distributed except according to those terms.
7
8//! System configuration loading
9//!
10//! This module is responsible for parsing and returning the configuration from
11//!  the host system. It will read from the default location on each operating
12//!  system, e.g. most Unixes have this written to `/etc/resolv.conf`
13#![allow(missing_docs)]
14
15#[cfg(all(unix, not(any(target_os = "android", target_vendor = "apple"))))]
16#[cfg(feature = "system-config")]
17mod unix;
18
19#[cfg(all(unix, not(any(target_os = "android", target_vendor = "apple"))))]
20#[cfg(feature = "system-config")]
21pub use self::unix::{parse_resolv_conf, read_system_conf};
22
23#[cfg(windows)]
24#[cfg(feature = "system-config")]
25mod windows;
26
27#[cfg(target_os = "windows")]
28#[cfg(feature = "system-config")]
29pub use self::windows::read_system_conf;
30
31#[cfg(target_os = "android")]
32#[cfg(feature = "system-config")]
33mod android;
34
35#[cfg(target_os = "android")]
36#[cfg(feature = "system-config")]
37pub use self::android::read_system_conf;
38
39#[cfg(target_vendor = "apple")]
40#[cfg(feature = "system-config")]
41mod apple;
42
43#[cfg(target_vendor = "apple")]
44#[cfg(feature = "system-config")]
45pub use self::apple::read_system_conf;