From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carl-Daniel Hailfinger Subject: struct nf_sockopt_ops Date: Sat, 16 Apr 2005 16:31:24 +0200 Message-ID: <426121BC.2040808@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: To: Netfilter Development Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Forgive me if that has already been discussed. I'm wondering why the get and set members of the struct take some form of int as last parameter. Wouldn't be a long be the more logical choice? I can see changing the type here wouldn't help because nf_sockopt also accepting only an int for len. struct nf_sockopt_ops { /* snip */ int (*set)(struct sock *sk, int optval, void __user *user, unsigned int len); /* snip */ int (*get)(struct sock *sk, int optval, void __user *user, int *len); /* snip */ }; Or at least the last parameter of the set member being a signed int to match the parameter to nf_sockopt. Any insight into why the parameters were chosen that way would be truly appreciated. Regards, Carl-Daniel