Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c78fce9e
Commit
c78fce9e
authored
Nov 08, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnsapi: Implement Wow64 entry points in the Unix library.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fc67bbf2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
14 deletions
+80
-14
dnsapi.h
dlls/dnsapi/dnsapi.h
+0
-5
libresolv.c
dlls/dnsapi/libresolv.c
+79
-7
query.c
dlls/dnsapi/query.c
+1
-2
No files found.
dlls/dnsapi/dnsapi.h
View file @
c78fce9e
...
...
@@ -139,11 +139,6 @@ struct get_serverlist_params
DWORD
*
len
;
};
struct
set_serverlist_params
{
const
IP4_ARRAY
*
addrs
;
};
struct
query_params
{
const
char
*
name
;
...
...
dlls/dnsapi/libresolv.c
View file @
c78fce9e
...
...
@@ -124,7 +124,7 @@ static DNS_STATUS map_h_errno( int error )
static
NTSTATUS
resolv_get_searchlist
(
void
*
args
)
{
struct
get_searchlist_params
*
params
=
args
;
const
struct
get_searchlist_params
*
params
=
args
;
DNS_TXT_DATAW
*
list
=
params
->
list
;
DWORD
i
,
needed
,
str_needed
=
0
;
char
*
ptr
,
*
end
;
...
...
@@ -170,7 +170,7 @@ static inline int filter( unsigned short sin_family, USHORT family )
static
NTSTATUS
resolv_get_serverlist
(
void
*
args
)
{
struct
get_serverlist_params
*
params
=
args
;
const
struct
get_serverlist_params
*
params
=
args
;
DNS_ADDR_ARRAY
*
addrs
=
params
->
addrs
;
struct
__res_state
*
state
=
&
_res
;
DWORD
i
,
found
,
total
,
needed
;
...
...
@@ -238,7 +238,7 @@ static NTSTATUS resolv_get_serverlist( void *args )
static
NTSTATUS
resolv_get_serverlist
(
void
*
args
)
{
struct
get_serverlist_params
*
params
=
args
;
const
struct
get_serverlist_params
*
params
=
args
;
DNS_ADDR_ARRAY
*
addrs
=
params
->
addrs
;
DWORD
needed
,
found
,
i
;
...
...
@@ -305,8 +305,7 @@ static NTSTATUS resolv_get_serverlist( void *args )
static
NTSTATUS
resolv_set_serverlist
(
void
*
args
)
{
struct
set_serverlist_params
*
params
=
args
;
const
IP4_ARRAY
*
addrs
=
params
->
addrs
;
const
IP4_ARRAY
*
addrs
=
args
;
int
i
;
init_resolver
();
...
...
@@ -328,7 +327,7 @@ static NTSTATUS resolv_set_serverlist( void *args )
static
NTSTATUS
resolv_query
(
void
*
args
)
{
struct
query_params
*
params
=
args
;
const
struct
query_params
*
params
=
args
;
DNS_STATUS
ret
=
ERROR_SUCCESS
;
int
len
;
...
...
@@ -342,7 +341,7 @@ static NTSTATUS resolv_query( void *args )
return
ret
;
}
unixlib_entry_t
__wine_unix_call_funcs
[]
=
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
resolv_get_searchlist
,
resolv_get_serverlist
,
...
...
@@ -350,4 +349,77 @@ unixlib_entry_t __wine_unix_call_funcs[] =
resolv_query
,
};
#ifdef _WIN64
typedef
ULONG
PTR32
;
static
NTSTATUS
wow64_resolv_get_searchlist
(
void
*
args
)
{
struct
{
PTR32
list
;
PTR32
len
;
}
const
*
params32
=
args
;
struct
get_searchlist_params
params
=
{
ULongToPtr
(
params32
->
list
),
ULongToPtr
(
params32
->
len
)
};
return
resolv_get_searchlist
(
&
params
);
}
static
NTSTATUS
wow64_resolv_get_serverlist
(
void
*
args
)
{
struct
{
USHORT
family
;
PTR32
addrs
;
PTR32
len
;
}
const
*
params32
=
args
;
struct
get_serverlist_params
params
=
{
params32
->
family
,
ULongToPtr
(
params32
->
addrs
),
ULongToPtr
(
params32
->
len
)
};
return
resolv_get_serverlist
(
&
params
);
}
static
NTSTATUS
wow64_resolv_query
(
void
*
args
)
{
struct
{
PTR32
name
;
WORD
type
;
DWORD
options
;
PTR32
buf
;
PTR32
len
;
}
const
*
params32
=
args
;
struct
query_params
params
=
{
ULongToPtr
(
params32
->
name
),
params32
->
type
,
params32
->
options
,
ULongToPtr
(
params32
->
buf
),
ULongToPtr
(
params32
->
len
)
};
return
resolv_query
(
&
params
);
}
const
unixlib_entry_t
__wine_unix_call_wow64_funcs
[]
=
{
wow64_resolv_get_searchlist
,
wow64_resolv_get_serverlist
,
resolv_set_serverlist
,
wow64_resolv_query
,
};
#endif
/* _WIN64 */
#endif
/* HAVE_RESOLV */
dlls/dnsapi/query.c
View file @
c78fce9e
...
...
@@ -170,7 +170,6 @@ DNS_STATUS WINAPI DnsQuery_UTF8( PCSTR name, WORD type, DWORD options, PVOID ser
DNS_STATUS
ret
=
DNS_ERROR_RCODE_NOT_IMPLEMENTED
;
unsigned
char
answer
[
4096
];
DWORD
len
=
sizeof
(
answer
);
struct
set_serverlist_params
servlist_params
=
{
servers
};
struct
query_params
query_params
=
{
name
,
type
,
options
,
answer
,
&
len
};
TRACE
(
"(%s,%s,0x%08x,%p,%p,%p)
\n
"
,
debugstr_a
(
name
),
debugstr_type
(
type
),
...
...
@@ -179,7 +178,7 @@ DNS_STATUS WINAPI DnsQuery_UTF8( PCSTR name, WORD type, DWORD options, PVOID ser
if
(
!
name
||
!
result
)
return
ERROR_INVALID_PARAMETER
;
if
((
ret
=
RESOLV_CALL
(
set_serverlist
,
&
servlist_param
s
)))
return
ret
;
if
((
ret
=
RESOLV_CALL
(
set_serverlist
,
server
s
)))
return
ret
;
ret
=
RESOLV_CALL
(
query
,
&
query_params
);
if
(
!
ret
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment