On Sun, 6 Nov 2005 19:57:16 +1100 Amos Shapira <[EMAIL PROTECTED]> wrote:
> On 11/6/05, David Harel > <[EMAIL PROTECTED]> wrote: > > Hello Amos, > > > > I guess you know the answer, I will be very happy with a reference to an > > elaborate example then please. > > I gave you one - get the sources of the insmod program. > > > No I didn't look into the resources you mentioned simply because I am > > not familiar with them. I googled, straced, looked into man pages saw > > init_module(2) and create_module(2). Eventually I figured out I do not > > have enough to go with code. For example, in create_module there should > > be a size but I don't know of what. > IIRC rmmod doesn't do much and lsmod does even less (it just pretty prints the output /proc/modules). insmod on 2.4 kernels does quite a bit of pre-linking (sort of a dynamic linker). It is not just a system call. With 2.6 kernel, a lot more of the work is done in the kernel so it may be easier. If you insist on doing it in your program instead of fork/exec, I would say your better of just copying the sources of insmod (and insmod.modutils), although I'm not sure what license they are under. > As both Muli and me tried to tell you before - "Use the source, Luke". > Just google for the sources of insmod and see how it uses the system call. > > --Amos > > -- > "We wanted proper outback: a place where men were men > and sheep were nervous." - Bill Bryson, "Down Under" > > ================================================================To > unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] > > > +++++++++++++++++++++++++++++++++++++++++++ > This Mail Was Scanned By Mail-seCure System > at the Tel-Aviv University CC. > +++++++++++++++++++++++++++++++++++++++++++ This Mail Was Scanned By Mail-seCure System at the Tel-Aviv University CC. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]