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
f11d29e2
Commit
f11d29e2
authored
Nov 10, 1999
by
Patrik Stridvall
Committed by
Alexandre Julliard
Nov 10, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Solaris compile fixes.
parent
248c75e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
icmp_main.c
dlls/icmp/icmp_main.c
+25
-11
No files found.
dlls/icmp/icmp_main.c
View file @
f11d29e2
...
...
@@ -19,13 +19,17 @@
* - Using the winsock functions has not been tested.
*/
#include "config.h"
#define __USE_BSD
#include <sys/socket.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <netdb.h>
#include <netinet/in_systm.h>
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <sys/time.h>
...
...
@@ -33,7 +37,9 @@
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <arpa/inet.h>
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#endif
#include "windef.h"
#include "winbase.h"
...
...
@@ -221,19 +227,19 @@ DWORD WINAPI IcmpSendEcho(
int
len
;
/* Before we mess with the options, get the default values */
len
=
sizeof
(
val
);
ISOCK_getsockopt
(
icp
->
sid
,
SOL_IP
,
IP_TTL
,
&
val
,
&
len
);
ISOCK_getsockopt
(
icp
->
sid
,
IPPROTO_IP
,
IP_TTL
,(
char
*
)
&
val
,
&
len
);
icp
->
default_opts
.
Ttl
=
val
;
len
=
sizeof
(
val
);
ISOCK_getsockopt
(
icp
->
sid
,
SOL_IP
,
IP_TOS
,
&
val
,
&
len
);
ISOCK_getsockopt
(
icp
->
sid
,
IPPROTO_IP
,
IP_TOS
,(
char
*
)
&
val
,
&
len
);
icp
->
default_opts
.
Tos
=
val
;
/* FIXME: missing: handling of IP 'flags', and all the other options */
}
val
=
RequestOptions
->
Ttl
;
ISOCK_setsockopt
(
icp
->
sid
,
SOL_IP
,
IP_TTL
,
&
val
,
sizeof
(
val
));
ISOCK_setsockopt
(
icp
->
sid
,
IPPROTO_IP
,
IP_TTL
,(
char
*
)
&
val
,
sizeof
(
val
));
val
=
RequestOptions
->
Tos
;
ISOCK_setsockopt
(
icp
->
sid
,
SOL_IP
,
IP_TOS
,
&
val
,
sizeof
(
val
));
ISOCK_setsockopt
(
icp
->
sid
,
IPPROTO_IP
,
IP_TOS
,(
char
*
)
&
val
,
sizeof
(
val
));
/* FIXME: missing: handling of IP 'flags', and all the other options */
icp
->
default_opts
.
OptionsSize
=
IP_OPTS_CUSTOM
;
...
...
@@ -242,9 +248,9 @@ DWORD WINAPI IcmpSendEcho(
/* Restore the default options */
val
=
icp
->
default_opts
.
Ttl
;
ISOCK_setsockopt
(
icp
->
sid
,
SOL_IP
,
IP_TTL
,
&
val
,
sizeof
(
val
));
ISOCK_setsockopt
(
icp
->
sid
,
IPPROTO_IP
,
IP_TTL
,(
char
*
)
&
val
,
sizeof
(
val
));
val
=
icp
->
default_opts
.
Tos
;
ISOCK_setsockopt
(
icp
->
sid
,
SOL_IP
,
IP_TOS
,
&
val
,
sizeof
(
val
));
ISOCK_setsockopt
(
icp
->
sid
,
IPPROTO_IP
,
IP_TOS
,(
char
*
)
&
val
,
sizeof
(
val
));
/* FIXME: missing: handling of IP 'flags', and all the other options */
icp
->
default_opts
.
OptionsSize
=
IP_OPTS_DEFAULT
;
...
...
@@ -319,10 +325,18 @@ DWORD WINAPI IcmpSendEcho(
case
ICMP_UNREACH
:
switch
(
icmp_header
->
icmp_code
)
{
case
ICMP_UNREACH_HOST
:
#ifdef ICMP_UNREACH_HOST_UNKNOWN
case
ICMP_UNREACH_HOST_UNKNOWN
:
#endif
#ifdef ICMP_UNREACH_ISOLATED
case
ICMP_UNREACH_ISOLATED
:
#endif
#ifdef ICMP_UNREACH_HOST_PROHIB
case
ICMP_UNREACH_HOST_PROHIB
:
#endif
#ifdef ICMP_UNREACH_TOSHOST
case
ICMP_UNREACH_TOSHOST
:
#endif
ier
->
Status
=
IP_DEST_HOST_UNREACHABLE
;
break
;
case
ICMP_UNREACH_PORT
:
...
...
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