From owner-freebsd-arch@FreeBSD.ORG Tue Feb 6 13:13:04 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D79B716A400 for ; Tue, 6 Feb 2007 13:13:02 +0000 (UTC) (envelope-from antinvidia@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.237]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA9B13C428 for ; Tue, 6 Feb 2007 13:13:02 +0000 (UTC) (envelope-from antinvidia@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so1933822nzh for ; Tue, 06 Feb 2007 05:13:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=faAfCsasl4ohMZpwLlIDKBH5gXRBDdfMDqCpLwQM7mqXPQM2KbKy6sZ2JdAL55I+ZnmM7gZK0YtVbybmzdXqyiIxuVSvzppMI6bleCRbfD2eCirxV1L6KBNK40+cTH4Smc/pI3byhVWbRO16+Disj52Nmdn15aJ/YxPJk1Fg/g4= Received: by 10.35.111.17 with SMTP id o17mr16215835pym.1170765929243; Tue, 06 Feb 2007 04:45:29 -0800 (PST) Received: by 10.35.58.13 with HTTP; Tue, 6 Feb 2007 04:45:29 -0800 (PST) Message-ID: Date: Tue, 6 Feb 2007 12:45:29 +0000 From: MQ To: freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: a question about prison_ip X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2007 13:13:04 -0000 Hi everyone, I was reading jail(8) related codes in the file kern_jail.c recently. I found that prison_ip provided three parameters, the second of which is a flag that indicate whether the third argument ip is host byte order or network byte order. I skimmed the codes that invoke prison_ip function, all of them calls prison_ip with flag=0 to indicate that the ip argument is in network byte order. I'm considering if we can remove the flag parameter, and modify corresponding source codes, say, userland program jail.c and jls.c to keep consistent with the kernel. This can avoid some useless action taken by current kernel. But I don't know if current implementation of the prison_ip has some special reasons to act like this? Does anyone have opinions with this problem? Best regards. MQ