Getting information on open TCP sockets.

Getting information on open TCP sockets.

Post by Jake Roersm » Sun, 15 Jun 2003 00:13:45



Programmers,

        I'm writting a program that requires me to check information on all of
the currect TCP connections open and the user assosiated with that
connection.  I am looking for information similar to the output of
netstat but I don't want to rely on it.  In linux I can find the
information in /proc/net/tcp but I am having trouble finding where to get
the information within Solaris.  Is there a standard way to get this in
UNIX?  Thanks in advance.

- Jake

 
 
 

Getting information on open TCP sockets.

Post by Barry Margoli » Sun, 15 Jun 2003 00:39:48




Quote:>    I'm writting a program that requires me to check information on all of
>the currect TCP connections open and the user assosiated with that
>connection.  I am looking for information similar to the output of
>netstat but I don't want to rely on it.  In linux I can find the
>information in /proc/net/tcp but I am having trouble finding where to get
>the information within Solaris.  Is there a standard way to get this in
>UNIX?  Thanks in advance.

No there isn't.  I suggest you look at the source for lsof to see how it
handles all the different implementations.

--

Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. Can I handle some information of a TCP socket?

What I want to do is making a new TCP socket and take over existing
connection
when the active client crashes. By sniffing I can monitor on going
information of the connection like SYN, ACK and so on. But I haven't
found the way to set these information to the newly created socket. I
don't want to recompile the kernel.

some suggestion?

2. Riva TNT Drivers?

3. open TCP socket?

4. a small soundserver for sabre flight simulator

5. Getting the broadcast address from an open socket

6. SPARCstation -> diskless X11R6.3 X terms?

7. open tcp sockets

8. memory + harddisk

9. getting the network interface information and default gateway information ??

10. Denver TCP/IP Socket opening

11. closing then re-opening socket and getting "Address already in use"?

12. Socket problems with SCO Open server 5 TCP/IP

13. Information of the RAW socket interface for Berkely sockets