diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-03 13:00:43 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-03 13:00:43 +0100 |
| commit | d5ea492ef55c802f9c1f1930cd6413e1c366481f (patch) | |
| tree | eb8fa65ff86e6aef1dd1836e2db928d7bce6a249 /core/net/dns_windows.odin | |
| parent | 96ac40595281f5112aea41618901e0b70a324100 (diff) | |
Make more private.
Diffstat (limited to 'core/net/dns_windows.odin')
| -rw-r--r-- | core/net/dns_windows.odin | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/core/net/dns_windows.odin b/core/net/dns_windows.odin index d445c8816..72d67c54a 100644 --- a/core/net/dns_windows.odin +++ b/core/net/dns_windows.odin @@ -1,4 +1,11 @@ //+build windows +package net + +/* + Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures. + For other protocols and their features, see subdirectories of this package. +*/ + /* Copyright 2022 Tetralux <tetraluxonpc@gmail.com> Copyright 2022 Colin Davidson <colrdavidson@gmail.com> @@ -11,28 +18,13 @@ Jeroen van Rijn: Cross platform unification, code style, documentation */ -/* - Package net implements cross-platform Berkeley Sockets, DNS resolution and associated procedures. - For other protocols and their features, see subdirectories of this package. -*/ -package net - import "core:strings" import "core:mem" import win "core:sys/windows" -/* - Performs a recursive DNS query for records of a particular type for the hostname. - - NOTE: This procedure instructs the DNS resolver to recursively perform CNAME requests on our behalf, - meaning that DNS queries for a hostname will resolve through CNAME records until an - IP address is reached. - - WARNING: This procedure allocates memory for each record returned; deleting just the returned slice is not enough! - See `destroy_records`. -*/ -get_dns_records_windows :: proc(hostname: string, type: DNS_Record_Type, allocator := context.allocator) -> (records: []DNS_Record, err: DNS_Error) { +@(private) +_get_dns_records_os :: proc(hostname: string, type: DNS_Record_Type, allocator := context.allocator) -> (records: []DNS_Record, err: DNS_Error) { context.allocator = allocator host_cstr := strings.clone_to_cstring(hostname, context.temp_allocator) |