Finding file structure from tcp_t address

Finding file structure from tcp_t address

Post by Nick McKeo » Sat, 13 Aug 1994 14:05:40

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).



1. Finding the address of a proc structure under BSD

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

2. DHCP on Solaris 8

3. finding pointer offset from FILE structure

4. ATI 3D Pro Turbo / Rage II + Xfree86 ???

5. how do I find out how many files in a nested directory structure?

6. ldap

7. Finding the phsical address for a virtual address

8. Sendmail broken ?

9. deleting a line in a file, where file is in directory structure

10. Finding the ip address and hardware (ethernet) address of client behind a gateway

11. Copy file structure but not files?

12. Finding all e-mail addresses in files on server.

13. from known MAC address to find IP address