Re: [tcpdump-workers] net net/len (0.0.0.0)

2006-05-28 Thread Guy Harris
Felipe Kellermann wrote: > Thanks. I will look at the resulting assembly in the different toolchains > and processos and systems and eventually discuss this subject with the GCC > or binutils people. I.e., suggesting that they standardize on a particular behavior for shifts greater than the widt

Re: [tcpdump-workers] net net/len (0.0.0.0)

2006-05-28 Thread Felipe Kellermann
On Sun, 28 May 2006 1:14pm -0700, Guy Harris wrote: > Felipe Kellermann wrote: > > > This fixes the problem to me. Does anyone know why 0x << (32 - 0) > > is resulting in 0x in mcode? > > To quote the ANSI C89 standard, section 3.3.7 "Bitwise Shift Operators": > > If the va

Re: [tcpdump-workers] net net/len (0.0.0.0)

2006-05-28 Thread Guy Harris
Felipe Kellermann wrote: > This fixes the problem to me. Does anyone know why 0x << (32 - 0) > is resulting in 0x in mcode? To quote the ANSI C89 standard, section 3.3.7 "Bitwise Shift Operators": If the value of the right operand is negative or is greater than or equal to th

Re: [tcpdump-workers] net net/len (0.0.0.0)

2006-05-27 Thread Felipe Kellermann
On Sun, 28 May 2006 2:19am -0300, Felipe Kellermann wrote: > On Sun, 28 May 2006 12:26am -0300, Felipe Kellermann wrote: > > > I noticed 'net 0.0.0.0/0' filter compiles to a BPF code that differs from > > the alternative 'net mask' filter. All the others net filters I tried > > produced the s

Re: [tcpdump-workers] net net/len (0.0.0.0)

2006-05-27 Thread Felipe Kellermann
On Sun, 28 May 2006 12:26am -0300, Felipe Kellermann wrote: > I noticed 'net 0.0.0.0/0' filter compiles to a BPF code that differs from > the alternative 'net mask' filter. All the others net filters I tried > produced the same BPF code. Still haven't looked at the code -- is this > resulting

[tcpdump-workers] net net/len (0.0.0.0)

2006-05-27 Thread Felipe Kellermann
I noticed 'net 0.0.0.0/0' filter compiles to a BPF code that differs from the alternative 'net mask' filter. All the others net filters I tried produced the same BPF code. Still haven't looked at the code -- is this resulting code known/intentional? Using pcap 0.9.4, src net 0.0.0.0 mask 0.0.0.