Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
00526954
Commit
00526954
authored
Jan 07, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement Win32_NetworkAdapterConfiguration.DNSHostName.
parent
3986a6cd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
Makefile.in
dlls/wbemprox/Makefile.in
+1
-1
builtin.c
dlls/wbemprox/builtin.c
+17
-0
No files found.
dlls/wbemprox/Makefile.in
View file @
00526954
MODULE
=
wbemprox.dll
IMPORTS
=
version iphlpapi dxgi oleaut32 ole32 advapi32 user32 gdi32
IMPORTS
=
version iphlpapi dxgi oleaut32 ole32 advapi32 user32 gdi32
ws2_32
C_SRCS
=
\
builtin.c
\
...
...
dlls/wbemprox/builtin.c
View file @
00526954
...
...
@@ -28,6 +28,7 @@
#include "windef.h"
#include "winbase.h"
#include "winsock2.h"
#include "ws2tcpip.h"
#include "initguid.h"
#include "wbemcli.h"
#include "wbemprov.h"
...
...
@@ -149,6 +150,8 @@ static const WCHAR prop_displaynameW[] =
{
'D'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
prop_diskindexW
[]
=
{
'D'
,
'i'
,
's'
,
'k'
,
'I'
,
'n'
,
'd'
,
'e'
,
'x'
,
0
};
static
const
WCHAR
prop_dnshostnameW
[]
=
{
'D'
,
'N'
,
'S'
,
'H'
,
'o'
,
's'
,
't'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
prop_domainW
[]
=
{
'D'
,
'o'
,
'm'
,
'a'
,
'i'
,
'n'
,
0
};
static
const
WCHAR
prop_domainroleW
[]
=
...
...
@@ -389,6 +392,7 @@ static const struct column col_networkadapter[] =
};
static
const
struct
column
col_networkadapterconfig
[]
=
{
{
prop_dnshostnameW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_indexW
,
CIM_UINT32
|
COL_FLAG_KEY
,
VT_I4
},
{
prop_ipconnectionmetricW
,
CIM_UINT32
,
VT_I4
},
{
prop_ipenabledW
,
CIM_BOOLEAN
},
...
...
@@ -705,6 +709,7 @@ struct record_networkadapter
};
struct
record_networkadapterconfig
{
const
WCHAR
*
dnshostname
;
UINT32
index
;
UINT32
ipconnectionmetric
;
int
ipenabled
;
...
...
@@ -1829,6 +1834,17 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
return
status
;
}
static
WCHAR
*
get_dnshostname
(
IP_ADAPTER_UNICAST_ADDRESS
*
addr
)
{
const
SOCKET_ADDRESS
*
sa
=
&
addr
->
Address
;
WCHAR
buf
[
NI_MAXHOST
];
if
(
!
addr
)
return
NULL
;
if
(
GetNameInfoW
(
sa
->
lpSockaddr
,
sa
->
iSockaddrLength
,
buf
,
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]),
NULL
,
0
,
NI_NAMEREQD
))
return
NULL
;
return
heap_strdupW
(
buf
);
}
static
enum
fill_status
fill_networkadapterconfig
(
struct
table
*
table
,
const
struct
expr
*
cond
)
{
struct
record_networkadapterconfig
*
rec
;
...
...
@@ -1860,6 +1876,7 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
if
(
aa
->
IfType
==
IF_TYPE_SOFTWARE_LOOPBACK
)
continue
;
rec
=
(
struct
record_networkadapterconfig
*
)(
table
->
data
+
offset
);
rec
->
dnshostname
=
get_dnshostname
(
aa
->
FirstUnicastAddress
);
rec
->
index
=
aa
->
u
.
s
.
IfIndex
;
rec
->
ipconnectionmetric
=
20
;
rec
->
ipenabled
=
-
1
;
...
...
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