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
ac72b866
Commit
ac72b866
authored
Mar 05, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Implemented GetIpStatistics for Solaris.
parent
a82f443c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
ipstats.c
dlls/iphlpapi/ipstats.c
+35
-0
No files found.
dlls/iphlpapi/ipstats.c
View file @
ac72b866
...
...
@@ -495,6 +495,41 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats)
ret
=
NO_ERROR
;
}
}
#elif defined(HAVE_LIBKSTAT)
{
static
char
ip
[]
=
"ip"
;
kstat_ctl_t
*
kc
;
kstat_t
*
ksp
;
if
((
kc
=
kstat_open
())
&&
(
ksp
=
kstat_lookup
(
kc
,
ip
,
0
,
ip
))
&&
kstat_read
(
kc
,
ksp
,
NULL
)
!=
-
1
&&
ksp
->
ks_type
==
KSTAT_TYPE_NAMED
)
{
stats
->
dwForwarding
=
kstat_get_ui32
(
ksp
,
"forwarding"
);
stats
->
dwDefaultTTL
=
kstat_get_ui32
(
ksp
,
"defaultTTL"
);
stats
->
dwInReceives
=
kstat_get_ui32
(
ksp
,
"inReceives"
);
stats
->
dwInHdrErrors
=
kstat_get_ui32
(
ksp
,
"inHdrErrors"
);
stats
->
dwInAddrErrors
=
kstat_get_ui32
(
ksp
,
"inAddrErrors"
);
stats
->
dwForwDatagrams
=
kstat_get_ui32
(
ksp
,
"forwDatagrams"
);
stats
->
dwInUnknownProtos
=
kstat_get_ui32
(
ksp
,
"inUnknownProtos"
);
stats
->
dwInDiscards
=
kstat_get_ui32
(
ksp
,
"inDiscards"
);
stats
->
dwInDelivers
=
kstat_get_ui32
(
ksp
,
"inDelivers"
);
stats
->
dwOutRequests
=
kstat_get_ui32
(
ksp
,
"outRequests"
);
stats
->
dwRoutingDiscards
=
kstat_get_ui32
(
ksp
,
"routingDiscards"
);
stats
->
dwOutDiscards
=
kstat_get_ui32
(
ksp
,
"outDiscards"
);
stats
->
dwOutNoRoutes
=
kstat_get_ui32
(
ksp
,
"outNoRoutes"
);
stats
->
dwReasmTimeout
=
kstat_get_ui32
(
ksp
,
"reasmTimeout"
);
stats
->
dwReasmReqds
=
kstat_get_ui32
(
ksp
,
"reasmReqds"
);
stats
->
dwReasmOks
=
kstat_get_ui32
(
ksp
,
"reasmOKs"
);
stats
->
dwReasmFails
=
kstat_get_ui32
(
ksp
,
"reasmFails"
);
stats
->
dwFragOks
=
kstat_get_ui32
(
ksp
,
"fragOKs"
);
stats
->
dwFragFails
=
kstat_get_ui32
(
ksp
,
"fragFails"
);
stats
->
dwFragCreates
=
kstat_get_ui32
(
ksp
,
"fragCreates"
);
ret
=
NO_ERROR
;
}
if
(
kc
)
kstat_close
(
kc
);
}
#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS)
{
int
mib
[]
=
{
CTL_NET
,
PF_INET
,
IPPROTO_IP
,
IPCTL_STATS
};
...
...
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