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
02ba712a
Commit
02ba712a
authored
Jun 14, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wbemprox: Implement Win32_NetworkAdapter.PhysicalAdapter.
parent
861f7450
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
builtin.c
dlls/wbemprox/builtin.c
+13
-8
No files found.
dlls/wbemprox/builtin.c
View file @
02ba712a
...
...
@@ -192,6 +192,8 @@ static const WCHAR prop_ostypeW[] =
{
'O'
,
'S'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
prop_parameterW
[]
=
{
'P'
,
'a'
,
'r'
,
'a'
,
'm'
,
'e'
,
't'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
prop_physicaladapterW
[]
=
{
'P'
,
'h'
,
'y'
,
's'
,
'i'
,
'c'
,
'a'
,
'l'
,
'A'
,
'd'
,
'a'
,
'p'
,
't'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
prop_pnpdeviceidW
[]
=
{
'P'
,
'N'
,
'P'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
prop_pprocessidW
[]
=
...
...
@@ -326,6 +328,7 @@ static const struct column col_networkadapter[] =
{
prop_macaddressW
,
CIM_STRING
|
COL_FLAG_DYNAMIC
},
{
prop_manufacturerW
,
CIM_STRING
},
{
prop_netconnectionstatusW
,
CIM_UINT16
,
VT_I4
},
{
prop_physicaladapterW
,
CIM_BOOLEAN
},
{
prop_pnpdeviceidW
,
CIM_STRING
},
{
prop_speedW
,
CIM_UINT64
}
};
...
...
@@ -576,6 +579,7 @@ struct record_networkadapter
const
WCHAR
*
mac_address
;
const
WCHAR
*
manufacturer
;
UINT16
netconnection_status
;
int
physicaladapter
;
const
WCHAR
*
pnpdevice_id
;
UINT64
speed
;
};
...
...
@@ -1499,7 +1503,7 @@ static WCHAR *get_mac_address( const BYTE *addr, DWORD len )
sprintfW
(
ret
,
fmtW
,
addr
[
0
],
addr
[
1
],
addr
[
2
],
addr
[
3
],
addr
[
4
],
addr
[
5
]
);
return
ret
;
}
static
const
WCHAR
*
get_adaptertype
(
DWORD
type
)
static
const
WCHAR
*
get_adaptertype
(
DWORD
type
,
int
*
physical
)
{
static
const
WCHAR
ethernetW
[]
=
{
'E'
,
't'
,
'h'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'8'
,
'0'
,
'2'
,
'.'
,
'3'
,
0
};
static
const
WCHAR
wirelessW
[]
=
{
'W'
,
'i'
,
'r'
,
'e'
,
'l'
,
'e'
,
's'
,
's'
,
0
};
...
...
@@ -1508,13 +1512,12 @@ static const WCHAR *get_adaptertype( DWORD type )
switch
(
type
)
{
case
IF_TYPE_ETHERNET_CSMACD
:
return
ethernetW
;
case
IF_TYPE_IEEE80211
:
return
wirelessW
;
case
IF_TYPE_IEEE1394
:
return
firewireW
;
case
IF_TYPE_TUNNEL
:
return
tunnelW
;
default:
break
;
case
IF_TYPE_ETHERNET_CSMACD
:
*
physical
=
-
1
;
return
ethernetW
;
case
IF_TYPE_IEEE80211
:
*
physical
=
-
1
;
return
wirelessW
;
case
IF_TYPE_IEEE1394
:
*
physical
=
-
1
;
return
firewireW
;
case
IF_TYPE_TUNNEL
:
*
physical
=
0
;
return
tunnelW
;
default:
*
physical
=
0
;
return
NULL
;
}
return
NULL
;
}
static
enum
fill_status
fill_networkadapter
(
struct
table
*
table
,
const
struct
expr
*
cond
)
...
...
@@ -1525,6 +1528,7 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
IP_ADAPTER_ADDRESSES
*
aa
,
*
buffer
;
UINT
row
=
0
,
offset
=
0
,
count
=
0
;
DWORD
size
=
0
,
ret
;
int
physical
;
enum
fill_status
status
=
FILL_STATUS_UNFILTERED
;
ret
=
GetAdaptersAddresses
(
AF_UNSPEC
,
0
,
NULL
,
NULL
,
&
size
);
...
...
@@ -1546,12 +1550,13 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
{
rec
=
(
struct
record_networkadapter
*
)(
table
->
data
+
offset
);
sprintfW
(
device_id
,
fmtW
,
aa
->
u
.
s
.
IfIndex
);
rec
->
adaptertype
=
get_adaptertype
(
aa
->
IfType
);
rec
->
adaptertype
=
get_adaptertype
(
aa
->
IfType
,
&
physical
);
rec
->
device_id
=
heap_strdupW
(
device_id
);
rec
->
interface_index
=
aa
->
u
.
s
.
IfIndex
;
rec
->
mac_address
=
get_mac_address
(
aa
->
PhysicalAddress
,
aa
->
PhysicalAddressLength
);
rec
->
manufacturer
=
compsys_manufacturerW
;
rec
->
netconnection_status
=
get_connection_status
(
aa
->
OperStatus
);
rec
->
physicaladapter
=
physical
;
rec
->
pnpdevice_id
=
networkadapter_pnpdeviceidW
;
rec
->
speed
=
1000000
;
if
(
!
match_row
(
table
,
row
,
cond
,
&
status
))
...
...
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