Operating System - HP-UX
1836272 Members
1713 Online
110097 Solutions
New Discussion

program about network state

 
SOLVED
Go to solution
kaijile
Frequent Advisor

program about network state

I am using hpux11.23,and want to write a program
to get the all tcp listening ports(such as "netstat -an").

Is there any relevant information about that?

where can i get the netstat's source code?
5 REPLIES 5
Laurent Menase
Honored Contributor
Solution

Re: program about network state

no there is no way to get the netstat source code.

You need to either popen netstat or ndd -get /dev/tcp tcp_status or ndd -get /dev/ip ip_tcp_status

or use raw sockets API. Depending of what you are trying to get.

If you are an ISV, contact your HP contact.
kaijile
Frequent Advisor

Re: program about network state

where can i get the open_mib() man pages?

bash-4.0# uname -a
HP-UX rx2600 B.11.23 U ia64 1538416536 unlimited-user license
bash-4.0# man open_mib
No manual entry for open_mib.
Laurent Menase
Honored Contributor

Re: program about network state

no manpage for open_mib()
looking at the include file you can guess how it can be used, but it is not supported.
Laurent Menase
Honored Contributor

Re: program about network state

I see an other supported way using snmp protocol.
Tim Nelson
Honored Contributor

Re: program about network state

will using snmpget or snmpwalk on the .1.3.6.1.2.1.6.4 MIB get you what you are looking for ?

lists all current connections including listening ports...