"Guy Harris" <[EMAIL PROTECTED]> said:

> ...although I put the filter into a file on UNIX, so there were only LFs
> at the ends of lines, not CR/LFs.

Exactly. scanner.l doesn't understand '\'r' in line-endings. I tried to modify
scanner.l to say "[ \r\n\t] ;" instead of "[ \n\t] ;", but that didn't work. So
I modified read_infile() to strip all CR and LF from buffer and now it works.

PS. There should IMHO be a more detailed error when parser fails. A line +
column position perhaps? I'm no flex expert, but might contribute a patch.

> If I create the file with Notepad (good old Microsoft - they let me do
> 
> notepad e:\filterfile.txt
> 
> from the command line!), and then try
> 
> .\windump -r {capture file} -dF e:\filterfile.txt
> 
> I get
> 
> .\windump: short read e:\filterpoop.txt (156 != 162)

Something to do with _fmode or fstat() returning wrong size for DOS/Win
files perhaps. IMHO, would be better to use filelength() under Win32.

Gisle V.

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to