[Winpcap-users] pcap_fopen_offline not exported?

Okraszewski, Marcin Marcin.Okraszewski at pl.compuware.com
Tue Jul 29 08:19:24 GMT 2008


The idea behind it is that macro in fact overrides invocation from
pcap_fopen_offline() to pcap_hopen_offline() with appropriate
parameters. This allows compiling the same code on both Windows and
Linux/UNIX without modification. 

Marcin



The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. 

 
Compuware sp. z o.o. (registration number KRS 595) is a company registered in Poland whose registered office is at Ul. Dmowskiego 12,80-264 Gdansk Rejestr handlowy KRS 0000000595 Sadu Rejonowego Gdansk-Polnoc w Gdansku VII Wydzial Gospodarczy Kapital zakladowy 1.140.000 zl oplacony gotowka; NIP: 584-20-88-050; REGON: 191352920 
 

From: winpcap-users-bounces at winpcap.org
[mailto:winpcap-users-bounces at winpcap.org] On Behalf Of Guy Harris
Sent: Tuesday, July 29, 2008 1:41 AM
To: winpcap-users at winpcap.org
Subject: Re: [Winpcap-users] pcap_fopen_offline not exported?


On Jul 28, 2008, at 6:45 AM, Okraszewski, Marcin wrote:

> So I have it working now. I have slightly modified WinPcap to make the
> API expose the pcap_fopen_offline():
>
> In pcap.h I have added:
> -------------------------------------------------------
> #ifndef LIBPCAP_EXPORTS
> #define pcap_fopen_offline(f,b) \
>        pcap_hopen_offline(_get_osfhandle(_fileno(f)), b)
> #endif

Should this be a macro or a function?  It's a function in UN*X, and if  
anybody writes code that expects it to be a function (e.g., passes  
around a pointer to it), that code won't work on Windows if it's not a  
function.
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users



More information about the Winpcap-users mailing list