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
a410984a
Commit
a410984a
authored
Feb 06, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wpcap: Implement pcap_init().
parent
c589e978
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
1 deletion
+29
-1
unixlib.c
dlls/wpcap/unixlib.c
+7
-0
unixlib.h
dlls/wpcap/unixlib.h
+7
-0
wpcap.c
dlls/wpcap/wpcap.c
+14
-0
wpcap.spec
dlls/wpcap/wpcap.spec
+1
-1
No files found.
dlls/wpcap/unixlib.c
View file @
a410984a
...
...
@@ -230,6 +230,12 @@ static NTSTATUS wrap_getnonblock( void *args )
return
pcap_getnonblock
(
(
pcap_t
*
)(
ULONG_PTR
)
params
->
handle
,
params
->
errbuf
);
}
static
NTSTATUS
wrap_init
(
void
*
args
)
{
const
struct
init_params
*
params
=
args
;
return
pcap_init
(
params
->
opt
,
params
->
errbuf
);
}
static
NTSTATUS
wrap_lib_version
(
void
*
args
)
{
const
struct
lib_version_params
*
params
=
args
;
...
...
@@ -465,6 +471,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
wrap_get_tstamp_precision
,
wrap_geterr
,
wrap_getnonblock
,
wrap_init
,
wrap_lib_version
,
wrap_list_datalinks
,
wrap_list_tstamp_types
,
...
...
dlls/wpcap/unixlib.h
View file @
a410984a
...
...
@@ -174,6 +174,12 @@ struct get_tstamp_precision_params
UINT64
handle
;
};
struct
init_params
{
int
opt
;
char
*
errbuf
;
};
struct
lib_version_params
{
char
*
version
;
...
...
@@ -348,6 +354,7 @@ enum pcap_funcs
unix_get_tstamp_precision
,
unix_geterr
,
unix_getnonblock
,
unix_init
,
unix_lib_version
,
unix_list_datalinks
,
unix_list_tstamp_types
,
...
...
dlls/wpcap/wpcap.c
View file @
a410984a
...
...
@@ -1399,6 +1399,20 @@ int CDECL pcap_wsockinit( void )
return
0
;
}
#define PCAP_CHAR_ENC_LOCAL 0
int
CDECL
pcap_init
(
unsigned
int
opt
,
char
*
errbuf
)
{
struct
init_params
params
;
TRACE
(
"%u, %p
\n
"
,
opt
,
errbuf
);
if
(
opt
==
PCAP_CHAR_ENC_LOCAL
)
FIXME
(
"need to convert to/from local encoding
\n
"
);
params
.
opt
=
opt
;
params
.
errbuf
=
errbuf
;
return
PCAP_CALL
(
init
,
&
params
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
void
*
reserved
)
{
switch
(
reason
)
...
...
dlls/wpcap/wpcap.spec
View file @
a410984a
...
...
@@ -45,7 +45,7 @@
@ cdecl pcap_getnonblock(ptr ptr)
@ stub pcap_hopen_offline
@ stub pcap_hopen_offline_with_tstamp_precision
@
stub pcap_init
@
cdecl pcap_init(long ptr)
@ stub pcap_inject
@ stub pcap_is_swapped
@ cdecl pcap_lib_version()
...
...
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