From owner-freebsd-net Thu Jul 11 7:59:47 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9407F37B4B6 for ; Thu, 11 Jul 2002 07:59:41 -0700 (PDT) Received: from smtp.uc3m.es (smtp02.uc3m.es [163.117.136.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id B306143E42 for ; Thu, 11 Jul 2002 07:59:40 -0700 (PDT) (envelope-from jrh@it.uc3m.es) Received: from smtp02.uc3m.es (localhost [127.0.0.1]) by smtp.uc3m.es (Postfix) with ESMTP id C45034313E for ; Thu, 11 Jul 2002 16:59:39 +0200 (CEST) Received: from it.uc3m.es (alacran.it.uc3m.es [163.117.140.44]) by smtp02.uc3m.es (Postfix) with ESMTP id B849199EF8 for ; Thu, 11 Jul 2002 16:59:39 +0200 (CEST) Message-ID: <3D2D9D4E.74A1B6F4@it.uc3m.es> Date: Thu, 11 Jul 2002 16:59:26 +0200 From: Juan Francisco Rodriguez Hervella X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: sysctl inferface question Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello: I'm very confused with the sysctl internals. For example, looking at the kernel source code of FreeBSD, I've realized of the following: netinet/in_proco.c: SYSCTL_NODE(_net_inet6, IPPROTO_DIVERT, divert, CTLFLAG_RW, 0, "DIVERT"); netinet/ip_divert.c: SYSCTL_DECL(_net_inet_divert); netinet/ip_divert.c: SYSCTL_PROC(_net_inet_divert, OID_AUTO, pcblist, CTLFLAG_RD, 0, 0, div_pcblist, "S,xinpcb", "List of active divert sockets"); Isn't this redundant ? I mean, if there is a "SYSCTL_NODE", there is *no* need for having "SYSCTL_DECL" in "ip_divert.c"... I am wrong ? Also, I don't undertand the meaning of the "fmt" field....what is it for ? What's the meaning of "S,xinpcb" in the above example ? Thanks. -- JFRH. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message