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
5cab2b35
Commit
5cab2b35
authored
Sep 02, 2003
by
Juan Lang
Committed by
Alexandre Julliard
Sep 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug parsing /proc/net/arp for arp table.
parent
b9ed79c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
ipstats.c
dlls/iphlpapi/ipstats.c
+23
-8
No files found.
dlls/iphlpapi/ipstats.c
View file @
5cab2b35
...
...
@@ -25,11 +25,20 @@
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#if HAVE_NET_IF_H
#include <net/if.h>
#endif
#if HAVE_NET_IF_ARP_H
#include <net/if_arp.h>
#endif
#if HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
...
...
@@ -664,20 +673,26 @@ PMIB_IPNETTABLE getArpTable(void)
if
(
ptr
)
{
char
*
endPtr
;
if
(
ptr
&&
*
ptr
)
{
ret
->
table
[
ret
->
dwNumEntries
].
dwAddr
=
strtoul
(
ptr
,
&
endPtr
,
16
);
ptr
=
endPtr
;
}
ret
->
table
[
ret
->
dwNumEntries
].
dwAddr
=
inet_addr
(
ptr
);
while
(
ptr
&&
*
ptr
&&
!
isspace
(
*
ptr
))
ptr
++
;
if
(
ptr
&&
*
ptr
)
{
strtoul
(
ptr
,
&
endPtr
,
16
);
/* hw type (skip) */
ptr
=
endPtr
;
}
if
(
ptr
&&
*
ptr
)
{
strtoul
(
ptr
,
&
endPtr
,
16
);
/* flags (skip) */
DWORD
flags
=
strtoul
(
ptr
,
&
endPtr
,
16
);
if
(
flags
&
ATF_COM
)
ret
->
table
[
ret
->
dwNumEntries
].
dwType
=
MIB_IPNET_TYPE_DYNAMIC
;
else
if
(
flags
&
ATF_PERM
)
ret
->
table
[
ret
->
dwNumEntries
].
dwType
=
MIB_IPNET_TYPE_STATIC
;
else
ret
->
table
[
ret
->
dwNumEntries
].
dwType
=
MIB_IPNET_TYPE_OTHER
;
ptr
=
endPtr
;
}
/* FIXME: maybe this comes from flags? */
ret
->
table
[
ret
->
dwNumEntries
].
dwType
=
MIB_IPNET_TYPE_DYNAMIC
;
while
(
ptr
&&
*
ptr
&&
isspace
(
*
ptr
))
ptr
++
;
while
(
ptr
&&
*
ptr
&&
!
isspace
(
*
ptr
))
{
...
...
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