From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 11 11:19:43 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC5B916A479 for ; Thu, 11 Oct 2007 11:19:43 +0000 (UTC) (envelope-from m.jakeman@lancaster.ac.uk) Received: from hedwig.lancs.ac.uk (hedwig.lancs.ac.uk [148.88.0.65]) by mx1.freebsd.org (Postfix) with ESMTP id CB68713C468 for ; Thu, 11 Oct 2007 11:19:43 +0000 (UTC) (envelope-from m.jakeman@lancaster.ac.uk) Received: from mail02.lancs.ac.uk ([148.88.1.54]) by hedwig.lancs.ac.uk with esmtp (Exim 4.60) (envelope-from ) id 1Ifvkp-0001Mm-9N for hackers@freebsd.org; Thu, 11 Oct 2007 11:58:59 +0100 Received: from ina044000004.lancs.ac.uk ([148.88.224.46]) by mail02.lancs.ac.uk with esmtp (Exim 4.66) (envelope-from ) id 1Ifvko-0000CR-4v for hackers@freebsd.org; Thu, 11 Oct 2007 11:58:58 +0100 From: Matthew Jakeman Organization: Lancaster University To: hackers@freebsd.org Date: Thu, 11 Oct 2007 11:56:38 +0100 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710111156.38525.m.jakeman@lancaster.ac.uk> Cc: Subject: Sysctl Naming X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: m.jakeman@lancaster.ac.uk List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Oct 2007 11:19:43 -0000 Hi All, I am wanting to create a number of sysctl variables at kernel boot time, 1 for each network interface. I have the code set up to loop through the interfaces using ifnet_byindex() already for other purposes so wanted to create them in this loop. The problem I'm having is naming them, using the SYSCTL_INT() macro as specified : SYSCTL_INT(parent, nbr, name, access, ptr, val, descr); The 'name' parameter is what I wish to manipulate in the loop to append the interface name on to the sysctl variable created however I can't think of a way to do this. If there is another way to accomplish this I would be grateful to hear any suggestions. Cheers Matt