From mboxrd@z Thu Jan 1 00:00:00 1970 From: DervishD Date: Mon, 19 Dec 2005 17:28:25 +0000 Subject: Re: [LARTC] match'ing packets by size Message-Id: <20051219172825.GC19196@DervishD> List-Id: References: <20051219104355.6034e25c@pulsar.inexo.com.br> In-Reply-To: <20051219104355.6034e25c@pulsar.inexo.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hi Ethy :) * Ethy H. Brito dixit: > > > Well, 0xffb0 translates to 1111 1111 1011 0000 (which is -80 BTW). > >=20 > > It is a mask, not a number (and certainly not a signed one), so > > there's no point in considering it -80. It is just a mask. >=20 > My point in considering it a number is explained by: >=20 > printf("%hx", -80);=20 OK, I just didn't think about that, sorry :) > So, if you intend to creat a mask for 256 bytes size, you printf it as -2= 56. Only if your C implementation treats negative numbers in 2's complement ;) Of course, I don't know of any C implementation where integers don't use 2's complement for negative numbers, anyway... Ra=FAl N=FA=F1ez de Arenas Coronado --=20 Linux Registered User 88736 | http://www.dervishd.net http://www.pleyades.net & http://www.gotesdelluna.net It's my PC and I'll cry if I want to... _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc