From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 11 12:09:07 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3332C16A41B for ; Thu, 11 Oct 2007 12:09:07 +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 0265113C448 for ; Thu, 11 Oct 2007 12:09:06 +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 1IfwU7-0007oQ-Il for freebsd-hackers@freebsd.org; Thu, 11 Oct 2007 12:45:47 +0100 Received: from ina044000004.lancs.ac.uk ([148.88.224.46]) by mail02.lancs.ac.uk with esmtp (Exim 4.66) (envelope-from ) id 1IfwU6-0000LV-Nf for freebsd-hackers@freebsd.org; Thu, 11 Oct 2007 12:45:46 +0100 From: Matthew Jakeman Organization: Lancaster University To: freebsd-hackers@freebsd.org Date: Thu, 11 Oct 2007 12:43:27 +0100 User-Agent: KMail/1.9.1 References: <200710111156.38525.m.jakeman@lancaster.ac.uk> In-Reply-To: <200710111156.38525.m.jakeman@lancaster.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710111243.27149.m.jakeman@lancaster.ac.uk> Subject: Re: 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 12:09:07 -0000 Please ignore this, stupid question as I have now realised. Cheers Matt On Thursday 11 October 2007 11:56, Matthew Jakeman wrote: > 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 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"