AIX 5.1 - Getting the 'netstat -s' info from a C programs

AIX 5.1 - Getting the 'netstat -s' info from a C programs

Post by Ram » Sun, 20 Jan 2002 00:57:08


I would like to get the netstat -s info from a C program on the AIX 5.1.
I am able to do this on AIX 4.3.3 by reading the "tcpstat", "ipstat",
"icmpstat" and "udpstat" kernel structure.
But in AIX 5.1, the data is not available in this kernel symbols, instead
the kernel is maintaining a stream or a socket address. Could anyone please
let me know how to get the protocols information in AIX 5.1.

Thanks in advance.



1. Getting 'pstat -s' and 'swap -s' info programatically

Does anyone know how to get the same information as the following commands
via C system calls for both Solaris 1 and Solaris 2?

        SOLARIS 1> pstat -s
        31136k allocated + 5996k reserved = 37132k used, 96924k available

        SOLARIS 2> swap -s
        total: 20448k bytes allocated + 5248k reserved = 25696k used, 60848k available



2. cut off the connection?

3. The 'nice' program - getting more time for my program ?

4. How to go back to OpenWin?

5. AIX 5.1.B and 5.1.C and AIX 5.1.D

6. capture screen output during booting

7. 'netstat' and '-f inet' option

8. Evil Gnome

9. 'info' displays hyphens in man pages as '^i' instead of '-'

10. can't resolve symbol '_IO_putc' - SUSE 5.0/5.1

11. 'ksh' Programming Info

12. 'ps' info in program?

13. Shouldn't 'netstat -ain' show my eth0?