On 18 Apr 2004 07:59:29 -0700, B. Gandhi <(E-Mail Removed)> wrote:
> Hi there,
>
> I'd greatly appreciate if someone could please
> help me with a problem. I am using a RH Linux
> system on which I want to find which ports are
> already in use. This I want to do in a program
> rather than using some command like lsof. Is
> there any API using which I can achieve this.
What kind of ports (i/o ports, network ports, etc.)?
You will likely find that info in /proc. For example network ports in use
can be found in tcp, tcp6, udp and udp6 files in /proc/net/
--
David Efflandt - All spam ignored
http://www.de-srv.com/