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
04d72a3e
Commit
04d72a3e
authored
Aug 31, 2015
by
André Hentschel
Committed by
Alexandre Julliard
Sep 02, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wpcap: Partially implement pcap_parsesrcstr.
parent
2b42ddf6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
1 deletion
+52
-1
wpcap.c
dlls/wpcap/wpcap.c
+51
-0
wpcap.spec
dlls/wpcap/wpcap.spec
+1
-1
No files found.
dlls/wpcap/wpcap.c
View file @
04d72a3e
...
...
@@ -27,6 +27,19 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wpcap
);
WINE_DECLARE_DEBUG_CHANNEL
(
winediag
);
#ifndef PCAP_SRC_FILE_STRING
#define PCAP_SRC_FILE_STRING "file://"
#endif
#ifndef PCAP_SRC_FILE
#define PCAP_SRC_FILE 2
#endif
#ifndef PCAP_SRC_IF_STRING
#define PCAP_SRC_IF_STRING "rpcap://"
#endif
#ifndef PCAP_SRC_IFLOCAL
#define PCAP_SRC_IFLOCAL 3
#endif
void
CDECL
wine_pcap_breakloop
(
pcap_t
*
p
)
{
TRACE
(
"(%p)
\n
"
,
p
);
...
...
@@ -239,6 +252,44 @@ pcap_t* CDECL wine_pcap_open_live(const char *source, int snaplen, int promisc,
return
pcap_open_live
(
source
,
snaplen
,
promisc
,
to_ms
,
errbuf
);
}
int
CDECL
wine_pcap_parsesrcstr
(
const
char
*
source
,
int
*
type
,
char
*
host
,
char
*
port
,
char
*
name
,
char
*
errbuf
)
{
int
t
=
PCAP_SRC_IFLOCAL
;
const
char
*
p
=
source
;
FIXME
(
"(%s %p %p %p %p %p): partial stub
\n
"
,
debugstr_a
(
source
),
type
,
host
,
port
,
name
,
errbuf
);
if
(
host
)
*
host
=
'\0'
;
if
(
port
)
*
port
=
'\0'
;
if
(
name
)
*
name
=
'\0'
;
if
(
!
strncmp
(
p
,
PCAP_SRC_IF_STRING
,
strlen
(
PCAP_SRC_IF_STRING
)))
p
+=
strlen
(
PCAP_SRC_IF_STRING
);
else
if
(
!
strncmp
(
p
,
PCAP_SRC_FILE_STRING
,
strlen
(
PCAP_SRC_FILE_STRING
)))
{
p
+=
strlen
(
PCAP_SRC_FILE_STRING
);
t
=
PCAP_SRC_FILE
;
}
if
(
type
)
*
type
=
t
;
if
(
!*
p
)
{
if
(
errbuf
)
sprintf
(
errbuf
,
"The name has not been specified in the source string."
);
return
-
1
;
}
if
(
name
)
strcpy
(
name
,
p
);
return
0
;
}
int
CDECL
wine_pcap_sendpacket
(
pcap_t
*
p
,
const
unsigned
char
*
buf
,
int
size
)
{
TRACE
(
"(%p %p %i)
\n
"
,
p
,
buf
,
size
);
...
...
dlls/wpcap/wpcap.spec
View file @
04d72a3e
...
...
@@ -51,7 +51,7 @@
@ stub pcap_open_dead
@ cdecl pcap_open_live(str long long long ptr) wine_pcap_open_live
@ stub pcap_open_offline
@
stub
pcap_parsesrcstr
@
cdecl pcap_parsesrcstr(str ptr ptr ptr ptr ptr) wine_
pcap_parsesrcstr
@ stub pcap_perror
@ stub pcap_read
@ stub pcap_remoteact_accept
...
...
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