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
cdffa876
Commit
cdffa876
authored
Aug 12, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Aug 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Implement getsockopt(SOL_IRLMP, IRLMP_ENUMDEVICES).
parent
c3f2ecea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
0 deletions
+67
-0
socket.c
dlls/ws2_32/socket.c
+67
-0
No files found.
dlls/ws2_32/socket.c
View file @
cdffa876
...
...
@@ -2007,6 +2007,73 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
}
/* end switch(optname) */
}
/* end case NSPROTO_IPX */
#endif
#ifdef HAVE_IRDA
case
WS_SOL_IRLMP
:
switch
(
optname
)
{
case
WS_IRLMP_ENUMDEVICES
:
{
static
const
int
MAX_IRDA_DEVICES
=
10
;
char
buf
[
sizeof
(
struct
irda_device_list
)
+
(
MAX_IRDA_DEVICES
-
1
)
*
sizeof
(
struct
irda_device_info
)];
int
fd
,
res
;
socklen_t
len
=
sizeof
(
buf
);
if
(
(
fd
=
get_sock_fd
(
s
,
0
,
NULL
))
==
-
1
)
return
SOCKET_ERROR
;
res
=
getsockopt
(
fd
,
SOL_IRLMP
,
IRLMP_ENUMDEVICES
,
buf
,
&
len
);
if
(
res
<
0
)
{
SetLastError
(
wsaErrno
());
return
SOCKET_ERROR
;
}
else
{
struct
irda_device_list
*
src
=
(
struct
irda_device_list
*
)
buf
;
DEVICELIST
*
dst
=
(
DEVICELIST
*
)
optval
;
INT
needed
=
sizeof
(
DEVICELIST
),
i
;
if
(
src
->
len
>
0
)
needed
+=
(
src
->
len
-
1
)
*
sizeof
(
IRDA_DEVICE_INFO
);
if
(
*
optlen
<
needed
)
{
SetLastError
(
WSAEFAULT
);
return
SOCKET_ERROR
;
}
*
optlen
=
needed
;
TRACE
(
"IRLMP_ENUMDEVICES: %d devices found:
\n
"
,
src
->
len
);
dst
->
numDevice
=
src
->
len
;
for
(
i
=
0
;
i
<
src
->
len
;
i
++
)
{
TRACE
(
"saddr = %08x, daddr = %08x, info = %s, hints = %02x%02x
\n
"
,
src
->
dev
[
i
].
saddr
,
src
->
dev
[
i
].
daddr
,
src
->
dev
[
i
].
info
,
src
->
dev
[
i
].
hints
[
0
],
src
->
dev
[
i
].
hints
[
1
]);
memcpy
(
dst
->
Device
[
i
].
irdaDeviceID
,
&
src
->
dev
[
i
].
daddr
,
sizeof
(
dst
->
Device
[
i
].
irdaDeviceID
)
)
;
memcpy
(
dst
->
Device
[
i
].
irdaDeviceName
,
&
src
->
dev
[
i
].
info
,
sizeof
(
dst
->
Device
[
i
].
irdaDeviceName
)
)
;
memcpy
(
&
dst
->
Device
[
i
].
irdaDeviceHints1
,
&
src
->
dev
[
i
].
hints
[
0
],
sizeof
(
dst
->
Device
[
i
].
irdaDeviceHints1
)
)
;
memcpy
(
&
dst
->
Device
[
i
].
irdaDeviceHints2
,
&
src
->
dev
[
i
].
hints
[
1
],
sizeof
(
dst
->
Device
[
i
].
irdaDeviceHints2
)
)
;
dst
->
Device
[
i
].
irdaCharSet
=
src
->
dev
[
i
].
charset
;
}
return
0
;
}
}
default:
FIXME
(
"IrDA optname:0x%x
\n
"
,
optname
);
return
SOCKET_ERROR
;
}
break
;
/* case WS_SOL_IRLMP */
#endif
/* Levels WS_IPPROTO_TCP and WS_IPPROTO_IP convert directly */
case
WS_IPPROTO_TCP
:
switch
(
optname
)
...
...
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