Newsgroups: comp.os.minix
References: <slrn9o24lv.ai1.stian@localhost.localdomain> <o8jr76q8mlgiuqc375a74ec3e2@stereo.pch.home.cs.vu.nl> <slrn9o4nr7.c87.stian@localhost.localdomain>
Organization: Minix
Subject: Re: /dev/kmem, ioctl, identd, etc
Message-ID: <7h02ib1pob8alj5cj31gnsgsr5@stereo.pch.home.cs.vu.nl>
From: philip@pch.home.cs.vu.nl (Philip Homburg)
Date: Tue, 21 Aug 2001 15:46:42 +0200
Lines: 28
NNTP-Posting-Host: 213.84.34.176
X-Trace: 998401613 newszilla.xs4all.nl 58578 213.84.34.176
Path: news.adfa.edu.au!clarion.carno.net.au!news0.optus.net.au!news1.optus.net.au!optus!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeeds.belnet.be!news.belnet.be!transit.news.xs4all.nl!newszilla.xs4all.nl!not-for-mail
Xref: news.adfa.edu.au comp.os.minix:38152

In article <slrn9o4nr7.c87.stian@localhost.localdomain>,
Stian Sletner <stian@sletner.com> wrote:
>* Philip Homburg wrote:
>: 
>| For Minix-vmd, there is already a tcpstat program that lists all open TCP
>| connections. From there you have to work your way backwards into FS by
>| finding the inode that is associated with the connection. This requires
>| exporting some more tables from inet and FS. Give the inode, you can try
>| to locate processes in FS that have an open file descriptor for that inode.
>| FS has up-to-date UID information, so there is no need to access MM or the
>| kernel.
>
>Well.  How does Minix-vmd do this, is it portable to Minix, or does it
>require kernel changes?

The tcpstat program uses an ioctl to get the TCP connection table from inet.

>If I am to do this it'd have to work on standard Minix without kernel
>patches.  Impossible?

Why are you afraid to change the kernel? You have to change inet and
possibly FS.





					Philip Homburg
