awm@uunet.uu.net (Aled Morris) (01/21/89)
I have a short program which uses (successfully) nlist(3) to read the address of a kernel variable from /vmunix (the variable in question is _ipforwarding, but that's beside the point). Taking the value found in the field "n_value" of the nlist structure, I can seek into /dev/kmem and read the current value of the kernel variable. (are you still with me?) My problem is that I want to read the value of the variable from /vmunix itself (i.e. "What is the value given to this variable at boot time?"). How do I convert from the n_value number into a seek offset into /vmunix? Thanks in advance, Aled Morris systems programmer mail: awm@doc.ic.ac.uk | Department of Computing uucp: ..!ukc!icdoc!awm | Imperial College talk: 01-589-5111x5085 | 180 Queens Gate, London SW7 2BZ