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
79dcdd0a
Commit
79dcdd0a
authored
Sep 14, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Authors: Roderick Colenbrander <thunderbird2k@gmx.net>, Gerald Pfeifer <gerald@pfeifer.com>
Make WS2_send(), WS_getsockopt(), and WS_setsockopt() IPX support work on FreeBSD.
parent
9f53add8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
socket.c
dlls/winsock/socket.c
+23
-5
No files found.
dlls/winsock/socket.c
View file @
79dcdd0a
...
@@ -1109,6 +1109,7 @@ static int WS2_send ( int fd, struct iovec* iov, int count,
...
@@ -1109,6 +1109,7 @@ static int WS2_send ( int fd, struct iovec* iov, int count,
#ifdef HAVE_IPX
#ifdef HAVE_IPX
if
(
to
->
sa_family
==
WS_AF_IPX
)
if
(
to
->
sa_family
==
WS_AF_IPX
)
{
{
#ifdef SOL_IPX
struct
sockaddr_ipx
*
uipx
=
(
struct
sockaddr_ipx
*
)
hdr
.
msg_name
;
struct
sockaddr_ipx
*
uipx
=
(
struct
sockaddr_ipx
*
)
hdr
.
msg_name
;
int
val
=
0
;
int
val
=
0
;
int
len
=
sizeof
(
int
);
int
len
=
sizeof
(
int
);
...
@@ -1123,6 +1124,7 @@ static int WS2_send ( int fd, struct iovec* iov, int count,
...
@@ -1123,6 +1124,7 @@ static int WS2_send ( int fd, struct iovec* iov, int count,
TRACE
(
"ptype: %d (fd:%d)
\n
"
,
val
,
fd
);
TRACE
(
"ptype: %d (fd:%d)
\n
"
,
val
,
fd
);
uipx
->
sipx_type
=
val
;
uipx
->
sipx_type
=
val
;
}
}
#endif
}
}
#endif
#endif
...
@@ -1582,16 +1584,25 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
...
@@ -1582,16 +1584,25 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
{
{
case
IPX_PTYPE
:
case
IPX_PTYPE
:
fd
=
get_sock_fd
(
s
,
0
,
NULL
);
fd
=
get_sock_fd
(
s
,
0
,
NULL
);
#ifdef SOL_IPX
if
(
getsockopt
(
fd
,
SOL_IPX
,
IPX_TYPE
,
optval
,
optlen
)
==
-
1
)
if
(
getsockopt
(
fd
,
SOL_IPX
,
IPX_TYPE
,
optval
,
optlen
)
==
-
1
)
{
{
return
SOCKET_ERROR
;
return
SOCKET_ERROR
;
}
}
#else
{
struct
ipx
val
;
socklen_t
len
=
sizeof
(
struct
ipx
);
if
(
getsockopt
(
fd
,
0
,
SO_DEFAULT_HEADERS
,
&
val
,
&
len
)
==
-
1
)
return
SOCKET_ERROR
;
*
optval
=
(
int
)
val
.
ipx_pt
;
}
#endif
TRACE
(
"ptype: %d (fd: %d)
\n
"
,
*
(
int
*
)
optval
,
fd
);
TRACE
(
"ptype: %d (fd: %d)
\n
"
,
*
(
int
*
)
optval
,
fd
);
release_sock_fd
(
s
,
fd
);
release_sock_fd
(
s
,
fd
);
return
0
;
return
0
;
break
;
case
IPX_ADDRESS
:
case
IPX_ADDRESS
:
/*
/*
* On a Win2000 system with one network card there are useally three ipx devices one with a speed of 28.8kbps, 10Mbps and 100Mbps.
* On a Win2000 system with one network card there are useally three ipx devices one with a speed of 28.8kbps, 10Mbps and 100Mbps.
...
@@ -1612,13 +1623,11 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
...
@@ -1612,13 +1623,11 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
data
->
maxpkt
=
1467
;
/* This value is the default one on atleast Win2k/WinXP */
data
->
maxpkt
=
1467
;
/* This value is the default one on atleast Win2k/WinXP */
data
->
linkspeed
=
100000
;
/* Set the line speed in 100bit/s to 10 Mbit; note 1MB = 1000kB in this case */
data
->
linkspeed
=
100000
;
/* Set the line speed in 100bit/s to 10 Mbit; note 1MB = 1000kB in this case */
return
0
;
return
0
;
break
;
case
IPX_MAX_ADAPTER_NUM
:
case
IPX_MAX_ADAPTER_NUM
:
FIXME
(
"IPX_MAX_ADAPTER_NUM
\n
"
);
FIXME
(
"IPX_MAX_ADAPTER_NUM
\n
"
);
*
(
int
*
)
optval
=
1
;
/* As noted under IPX_ADDRESS we have just one card. */
*
(
int
*
)
optval
=
1
;
/* As noted under IPX_ADDRESS we have just one card. */
return
0
;
return
0
;
break
;
default:
default:
FIXME
(
"IPX optname:%x
\n
"
,
optname
);
FIXME
(
"IPX optname:%x
\n
"
,
optname
);
return
SOCKET_ERROR
;
return
SOCKET_ERROR
;
...
@@ -2329,14 +2338,23 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
...
@@ -2329,14 +2338,23 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
TRACE
(
"trying to set IPX_PTYPE: %d (fd: %d)
\n
"
,
*
(
int
*
)
optval
,
fd
);
TRACE
(
"trying to set IPX_PTYPE: %d (fd: %d)
\n
"
,
*
(
int
*
)
optval
,
fd
);
/* We try to set the ipx type on ipx socket level. */
/* We try to set the ipx type on ipx socket level. */
#ifdef SOL_IPX
if
(
setsockopt
(
fd
,
SOL_IPX
,
IPX_TYPE
,
optval
,
optlen
)
==
-
1
)
if
(
setsockopt
(
fd
,
SOL_IPX
,
IPX_TYPE
,
optval
,
optlen
)
==
-
1
)
{
{
ERR
(
"IPX: could not set ipx option type; expect weird behaviour
\n
"
);
ERR
(
"IPX: could not set ipx option type; expect weird behaviour
\n
"
);
return
SOCKET_ERROR
;
return
SOCKET_ERROR
;
}
}
#else
{
struct
ipx
val
;
/* Should we retrieve val using a getsockopt call and then
* set the modified one? */
val
.
ipx_pt
=
*
optval
;
setsockopt
(
fd
,
0
,
SO_DEFAULT_HEADERS
,
&
val
,
sizeof
(
struct
ipx
));
}
#endif
release_sock_fd
(
s
,
fd
);
release_sock_fd
(
s
,
fd
);
return
0
;
return
0
;
break
;
case
IPX_FILTERPTYPE
:
case
IPX_FILTERPTYPE
:
/* Sets the receive filter packet type, at the moment we don't support it */
/* Sets the receive filter packet type, at the moment we don't support it */
FIXME
(
"IPX_FILTERPTYPE: %x
\n
"
,
*
optval
);
FIXME
(
"IPX_FILTERPTYPE: %x
\n
"
,
*
optval
);
...
...
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