Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
f11d29e2
Commit
f11d29e2
authored
25 years ago
by
Patrik Stridvall
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Solaris compile fixes.
parent
248c75e6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/icmp/icmp_main.c
+25
-11
25 additions, 11 deletions
dlls/icmp/icmp_main.c
with
25 additions
and
11 deletions
dlls/icmp/icmp_main.c
+
25
−
11
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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment