From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: Passive OS fingerprint xtables match. Date: Wed, 18 Feb 2009 16:00:27 +0100 Message-ID: <499C228B.5000802@trash.net> References: <20090212171245.GA15025@ioremap.net> <20090212185729.GA17896@ioremap.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Evgeniy Polyakov , netdev@vger.kernel.org, David Miller , "Paul E. McKenney" , Netfilter Development Mailinglist To: Jan Engelhardt Return-path: Received: from stinky.trash.net ([213.144.137.162]:54869 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbZBRPAa (ORCPT ); Wed, 18 Feb 2009 10:00:30 -0500 In-Reply-To: Sender: netfilter-devel-owner@vger.kernel.org List-ID: Jan Engelhardt wrote: > On Thursday 2009-02-12 19:57, Evgeniy Polyakov wrote: >>> Are you sure it is safe to use arch-dependent types like 'int'? >> I would be very surprised if Linux will ever run on weird arch where int >> is not 32 bits. > > If GCC had a switch to compile with I16 or I64, I could test, > but it does not. 'long', as used in the netfilter includes, > already bit people in pre-2.6.19, and nowadays we have that compat > crap thing in place.. Just don't take any chance, and go the safe > route with uint32_t. Tons of APIs will break when the size of int changes and differs between userspace and kernel, this is a non-realistic risk in my opinion. I do however prefer the fixed types myself since they make the size more visible.