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
6d4eab9a
Commit
6d4eab9a
authored
Jun 24, 2008
by
Eric Durbin
Committed by
Alexandre Julliard
Jun 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Implement getUDPStats on FreeBSD.
parent
9a974dea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
2 deletions
+55
-2
configure
configure
+10
-1
configure.ac
configure.ac
+8
-1
ipstats.c
dlls/iphlpapi/ipstats.c
+31
-0
config.h.in
include/config.h.in
+6
-0
No files found.
configure
View file @
6d4eab9a
...
...
@@ -7085,6 +7085,7 @@ done
for
ac_header
in
\
AudioUnit/AudioUnit.h
\
Carbon/Carbon.h
\
...
...
@@ -7136,6 +7137,7 @@ for ac_header in \
netinet/in_systm.h
\
netinet/tcp.h
\
netinet/tcp_fsm.h
\
netinet/udp.h
\
openssl/err.h
\
openssl/ssl.h
\
png.h
\
...
...
@@ -7551,7 +7553,8 @@ done
for
ac_header
in
netinet/tcp_var.h
for
ac_header
in
netinet/tcp_var.h netinet/udp_var.h
do
as_ac_Header
=
`
echo
"ac_cv_header_
$ac_header
"
|
$as_tr_sh
`
{
echo
"
$as_me
:
$LINENO
: checking for
$ac_header
"
>
&5
...
...
@@ -7575,6 +7578,12 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_IP_VAR_H
# include <netinet/ip_var.h>
#endif
#ifdef HAVE_NETINET_UDP_H
# include <netinet/udp.h>
#endif
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
...
...
configure.ac
View file @
6d4eab9a
...
...
@@ -276,6 +276,7 @@ AC_CHECK_HEADERS(\
netinet/in_systm.h \
netinet/tcp.h \
netinet/tcp_fsm.h \
netinet/udp.h \
openssl/err.h \
openssl/ssl.h \
png.h \
...
...
@@ -359,7 +360,7 @@ AC_CHECK_HEADERS([netinet/in_pcb.h netinet/ip_var.h net/if.h net/if_arp.h net/if
# include <netinet/in.h>
#endif])
AC_CHECK_HEADERS([netinet/tcp_var.h],,,
AC_CHECK_HEADERS([netinet/tcp_var.h
netinet/udp_var.h
],,,
[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
...
...
@@ -370,6 +371,12 @@ AC_CHECK_HEADERS([netinet/tcp_var.h],,,
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_IP_VAR_H
# include <netinet/ip_var.h>
#endif
#ifdef HAVE_NETINET_UDP_H
# include <netinet/udp.h>
#endif
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif])
...
...
dlls/iphlpapi/ipstats.c
View file @
6d4eab9a
...
...
@@ -68,6 +68,12 @@
#ifdef HAVE_NETINET_IP_VAR_H
#include <netinet/ip_var.h>
#endif
#ifdef HAVE_NETINET_UDP_H
#include <netinet/udp.h>
#endif
#ifdef HAVE_NETINET_UDP_VAR_H
#include <netinet/udp_var.h>
#endif
#ifdef HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
...
...
@@ -587,6 +593,30 @@ DWORD getTCPStats(MIB_TCPSTATS *stats)
DWORD
getUDPStats
(
MIB_UDPSTATS
*
stats
)
{
#if defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS)
int
mib
[]
=
{
CTL_NET
,
PF_INET
,
IPPROTO_UDP
,
UDPCTL_STATS
};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
struct
udpstat
udp_stat
;
size_t
needed
;
if
(
!
stats
)
return
ERROR_INVALID_PARAMETER
;
needed
=
sizeof
(
udp_stat
);
if
(
sysctl
(
mib
,
MIB_LEN
,
&
udp_stat
,
&
needed
,
NULL
,
0
)
==
-
1
)
{
ERR
(
"failed to get udpstat
\n
"
);
return
ERROR_NOT_SUPPORTED
;
}
stats
->
dwInDatagrams
=
udp_stat
.
udps_ipackets
;
stats
->
dwOutDatagrams
=
udp_stat
.
udps_opackets
;
stats
->
dwNoPorts
=
udp_stat
.
udps_noport
;
stats
->
dwInErrors
=
udp_stat
.
udps_hdrops
+
udp_stat
.
udps_badsum
+
udp_stat
.
udps_fullsock
+
udp_stat
.
udps_badlen
;
stats
->
dwNumAddrs
=
getNumUdpEntries
();
return
NO_ERROR
;
#else
FILE
*
fp
;
if
(
!
stats
)
...
...
@@ -642,6 +672,7 @@ DWORD getUDPStats(MIB_UDPSTATS *stats)
}
return
NO_ERROR
;
#endif
}
static
DWORD
getNumWithOneHeader
(
const
char
*
filename
)
...
...
include/config.h.in
View file @
6d4eab9a
...
...
@@ -456,6 +456,12 @@
/* Define to 1 if you have the <netinet/tcp_var.h> header file. */
#undef HAVE_NETINET_TCP_VAR_H
/* Define to 1 if you have the <netinet/udp.h> header file. */
#undef HAVE_NETINET_UDP_H
/* Define to 1 if you have the <netinet/udp_var.h> header file. */
#undef HAVE_NETINET_UDP_VAR_H
/* Define to 1 if you have the <netipx/ipx.h> header file. */
#undef HAVE_NETIPX_IPX_H
...
...
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