Date: Wed, 04 Nov 1998 21:32:47 +0800 From: Peter Wemm <peter@netplex.com.au> To: Martti Kuparinen <martti.kuparinen@lmf.ericsson.se> Cc: hackers@FreeBSD.ORG Subject: Re: Pseudo-device as a LKM Message-ID: <199811041332.VAA00168@spinner.netplex.com.au> In-Reply-To: Your message of "Mon, 02 Nov 1998 12:44:53 %2B0200." <3.0.6.32.19981102124453.02ce8b30@openmail.lmf.ericsson.se>
next in thread | previous in thread | raw e-mail | index | archive | help
Martti Kuparinen wrote: > I want to implement a pseudo-device as LKM. But the question is where > to find a working example? I've looked at e.g. the if_tun device, > but the unload is not successful: > > # modload /lkm/if_tun_mod.o > # modunload -n if_tun_mod > modunload: LMUNLOAD: Device busy > > So please give any pointers. I'm using 2.2.7-R but I could jump into 3.0 > if that's what needed. A couple of things.. There are several classes of LKMs.. With some, the glue is in macros, with others it is generated. The if_tun example you mention is a case of a 'PSEUDO_SET()' module. These do not allow unloading.. Not necessarily because it cannot be done, just because nobody has bothered. A more complete example would be to look at one that has got explicit LKM interface code, and compare that to what is in /usr/include/sys/*. However, if you are thinking longer term, look at 3.0's modules instead. The days of LKM's are numbered in 3.x (for many reasons, which I won't go into here). > Martti Cheers, -Peter 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?199811041332.VAA00168>