mirror of
https://github.com/D-Modem/app.git
synced 2026-11-29 01:48:05 -08:00
The UI tests, Gradle's script, the iOS app and the native test hosts (batch 6 of 8, comment lines only) and the checker's own. Every function in the app is now documented; android.yml's docs job runs tools/doc_check.py first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
14 lines
509 B
Swift
14 lines
509 B
Swift
// SPDX-License-Identifier: AGPL-3.0-only
|
|
// Copyright (C) 2026 Neo-Desktop
|
|
import Foundation
|
|
|
|
/// The phone's network's DNS servers (SystemDNS.c), for the engine's SIP.
|
|
enum SystemDNS {
|
|
/// the network's IPv4 DNS servers, as addresses ([] for none)
|
|
static func servers() -> [String] {
|
|
var buf = [CChar](repeating: 0, count: 512)
|
|
guard dmodem_dns_servers(&buf, Int32(buf.count)) > 0 else { return [] }
|
|
return String(cString: buf).split(separator: ",").map(String.init)
|
|
}
|
|
}
|