Finding the address of a proc structure under BSD

Finding the address of a proc structure under BSD

Post by Paul Clo » Sun, 10 Jan 1993 04:58:43

I want to access some elements of the proc structure (in /usr/include/sys/proc.h
) in BSD. I think you do this by using nlist(3) to find one process and then
step through a linked list (p_link or p_rlink) until you find the one you want.
I'm not sure firstly whether this the correct method, and if it is which is the
nlist symbol to look at from the kernel?

Any help or pointers to online references would be appreciated.

Paul Cloke


1. Finding file structure from tcp_t address

I am hunting around in kmem using kvm_read....

I wish to find the (struct file *) corresponding to a
particular (struct tcp *).

I find the address to the (struct tcp) using "ndd /dev/tcp tcp_status".
I then search into the file table to find the vnode. This will tell
me where the stream is. But I don't understand streams! How can I follow
the stream structures to find the (struct tcp)?

Any ideas/solutions? (Please email me direct).


2. Multithread programming on Read/Write Lock

3. "/usr/include/bsd/bsd.h" not found in redhat linux 5.1

4. Error - INIT: Id "1" respawing too fast: disabled for 5 minutes

5. Debugging using structured proc implementation

6. Adding NT to a Linux Computer

7. Parse /proc/xxx or are there direct kernel structures?

8. Can't Reboot Consistently

9. Shared Memory using the proc/ structure.

10. Where is the proc structure of the Linux?

11. ?: argv not in the proc structure

12. proc structure

13. OS5: Change to 'proc' structure breaks u386mon