Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 2000 14:31:48 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        gcorcoran@lucent.com (Gary T. Corcoran)
Cc:        archie@whistle.com (Archie Cobbs), imp@village.org (Warner Losh), msmith@FreeBSD.ORG (Mike Smith), freebsd-hackers@FreeBSD.ORG (FreeBSD Hackers)
Subject:   Re: Module parameters?
Message-ID:  <200007112131.OAA39254@bubba.whistle.com>
In-Reply-To: <396B8BBB.4AA1867D@lucent.com> from "Gary T. Corcoran" at "Jul 11, 2000 05:03:55 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Gary T. Corcoran writes:
> > > : I was wondering if you (or anyone on this list) has had time
> > > : to add module parameters to kldload?  (and before anyone suggests
> > > : it, sorry, but I am barely able to squeeze out enough time to
> > > : even work on this unofficial driver, I can't work on kldload)
> > >
> > > You can use the hint mechanism that we've developed for other things.
> > 
> > Another possibility is the netgraph binary <-> ASCII conversion stuff:
> > 
> >   http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netgraph/ng_parse.h?rev=1.3
> 
> Are you suggesting that these routines could be used to
> easily add parameters to kldload?  (hint, hint)  <grin>

:-)

> No, I know it's not that easy.  We need to be able to do things
> like have "TransmissionMode=4" on the kldload command line, and
> have that parse the decimal value 4, and then go into the module
> and set the value of the TransmissionMode variable to actually be
> 4 immediately after loading the module into memory, before any of
> its subroutines are called.  This is what the Linux module loader
> allows, and it's extremely useful...

This is the kind of thing ng_parse.c can do.

In fact kldload could just pass the parameters as a single, opaque
ASCII string and the kernel (the KLD, actually) can decode it
back into a binary C structure using the ng_parse routines.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007112131.OAA39254>