Hello Pawan,

Monday, May 24, 2004, 10:58:53 PM, you wrote:

PS> Return-Path: <[EMAIL PROTECTED]>
PS> Received: from mx6.rambler.ru ([81.19.66.150] verified)
PS>   by mail1.rambler.ru (CommuniGate Pro SMTP 4.1.6)
PS>   with ESMTP id 46345429 for [EMAIL PROTECTED]; Mon, 24 May 2004 23:00:14 +0400
PS> Received: from winpcap.polito.it (netgroup-serv.polito.it [130.192.16.36])
PS>         by mx6.rambler.ru (Postfix) with SMTP id C71E2483069
PS>         for <[EMAIL PROTECTED]>; Mon, 24 May 2004 23:00:12 +0400 (MSD)
PS>         (envelope-from [EMAIL PROTECTED])
PS> Received: from netgroup-serv ([127.0.0.1]) by winpcap.polito.it ; Mon, 24 May 2004 
21:04:53 +0200
PS> X-Return-Path: <[EMAIL PROTECTED]>
PS> X-Received: from pinger.org ([68.166.219.214]) by netgroup-serv.polito.it ; Mon, 
24 May 2004 21:03:52 +0200
PS> X-Received: from Spooler by pinger.org (Mercury/32 v4.01a) ID MO0001CC;
PS>     24 May 2004 12:02:13 -0700
PS> X-Received: from spooler by pinger.org (Mercury/32 v4.01a); 24 May 2004 12:02:01 
-0700
PS> X-Received: from cosmo2 (192.168.1.4) by pinger.org (Mercury/32 v4.01a) ID 
MG0001CB;
PS>    24 May 2004 12:01:57 -0700
PS> Message-ID: <[EMAIL PROTECTED]>
PS> From: "Pawan Singh" <[EMAIL PROTECTED]>
PS> To: <[EMAIL PROTECTED]>
PS> Subject: [WinPcap-users] Maximum length of Filter String
PS> Date: Mon, 24 May 2004 11:58:53 -0700
PS> MIME-Version: 1.0
PS> Content-Type: multipart/alternative;
PS>         boundary="----=_NextPart_000_00A5_01C44186.7BDE5D10"
PS> X-Priority: 3
PS> X-MSMail-Priority: Normal
PS> X-Mailer: Microsoft Outlook Express 6.00.2800.1409
PS> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
PS> X-Mailing-List: [EMAIL PROTECTED]
PS> Reply-To: [EMAIL PROTECTED]
PS> X-listMember: [EMAIL PROTECTED] [winpcap-users-request]

PS> Hi, 

PS> Does someone know what is the maximum length of the filter string I can pass to 
pcap_compile()? More importantly, does winpcap have limited sized datastructures to 
represent the filter in its
PS> internals?

PS> Thanks
PS> Pawan Singh
PS> [EMAIL PROTECTED]

Hi.
Maybe I've misunderstood the question, but of course wpcap has some
structures that represent filter, because filter string is a
high-level matter, on a lower level (packet.dll) there is no readable
string, you only have a list of instructions, that can be loaded
on the kernel level.

pcap_compile() in its internals transforms filter string
into a set of instructions.

So, it's on high level (wpcap.dll).

int pcap_compile  (
  pcap_t *    p,
  struct bpf_program *    fp,  
  char *    str,  
  int    optimize,  
  bpf_u_int32    netmask 
)

and low-level (packet.dll):

BOOLEAN PacketSetBpf  (
  LPADAPTER    AdapterObject,
  struct bpf_program *    fp 
)

Further details may be found in WinPcap Documentation (don't forget to
check "Packet.dll exported functions and variables" of winpcap
developer's manual).

Best regards,
Andrew Fedyashov



==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/[EMAIL PROTECTED]/

 To unsubscribe use 
 mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to