Commit c589e978 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wpcap: Implement pcap_dump_close().

parent 82ed15f9
......@@ -155,6 +155,13 @@ static NTSTATUS wrap_dump( void *args )
return STATUS_SUCCESS;
}
static NTSTATUS wrap_dump_close( void *args )
{
const struct dump_close_params *params = args;
pcap_dump_close( (pcap_dumper_t *)(ULONG_PTR)params->handle );
return STATUS_SUCCESS;
}
static NTSTATUS wrap_dump_open( void *args )
{
const struct dump_open_params *params = args;
......@@ -452,6 +459,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
wrap_datalink_val_to_description,
wrap_datalink_val_to_name,
wrap_dump,
wrap_dump_close,
wrap_dump_open,
wrap_findalldevs,
wrap_get_tstamp_precision,
......
......@@ -138,6 +138,11 @@ struct dump_params
const unsigned char *packet;
};
struct dump_close_params
{
UINT64 handle;
};
struct dump_open_params
{
UINT64 handle;
......@@ -337,6 +342,7 @@ enum pcap_funcs
unix_datalink_val_to_description,
unix_datalink_val_to_name,
unix_dump,
unix_dump_close,
unix_dump_open,
unix_findalldevs,
unix_get_tstamp_precision,
......
......@@ -301,6 +301,18 @@ struct dumper
UINT64 handle;
};
void CDECL pcap_dump_close( struct dumper *dumper )
{
struct dump_close_params params;
TRACE( "%p\n", dumper );
if (!dumper) return;
params.handle = dumper->handle;
PCAP_CALL( dump, &params );
free( dumper );
}
static inline WCHAR *strdup_from_utf8( const char *str )
{
WCHAR *ret = NULL;
......
......@@ -20,7 +20,7 @@
@ cdecl pcap_datalink_val_to_name(long)
@ cdecl pcap_dispatch(ptr long ptr ptr)
@ cdecl pcap_dump(ptr ptr str)
@ stub pcap_dump_close
@ cdecl pcap_dump_close(ptr)
@ stub pcap_dump_file
@ stub pcap_dump_flush
@ stub pcap_dump_ftell
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment