Operating System - HP-UX
1754942 Members
3233 Online
108827 Solutions
New Discussion юеВ

Re: How to use the API get_mib_info() or anything in sys/mib.h

 
Akshay44
Frequent Advisor

How to use the API get_mib_info() or anything in sys/mib.h

Hi,

I wanted to use get_mib_info() API to get TCP connection details. So I wanted to know it's interface, data it returns etc. [Same for open_mib() etc. ]

Does anyone know how to use these functions?

HP-UX 11.31
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of HP.
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution, If you are satisfied with anyoneтАЩs response please remember to give them a KUDOS and show your appreciation
4 REPLIES 4
Laurent Menase
Honored Contributor

Re: How to use the API get_mib_info() or anything in sys/mib.h

yes but it is private functions not supported and which may change anytime, but quite easy to use when reading the mib.h

#include
#include
main()
{
int i;
struct nmparms parms;
unsigned int len;
int buf[256];;
i=open_mib("/dev/ip",O_RDWR,0,0);
parms.objid= ID_icmpInEchos;
parms.buffer=&buf;
parms.len=&len;
len=sizeof(buf);
get_mib_info(i,&parms);
printf("icmp in echo %ld \n",buf[0]);
close_mib(i);
}


Akshay44
Frequent Advisor

Re: How to use the API get_mib_info() or anything in sys/mib.h

Any documentation that exists on this?
So that I can know all the possible options and data available?

Is there a more supported approach to get these networking data from the HP UX OS?
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of HP.
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution, If you are satisfied with anyoneтАЩs response please remember to give them a KUDOS and show your appreciation
Laurent Menase
Honored Contributor

Re: How to use the API get_mib_info() or anything in sys/mib.h

>>Any documentation that exists on this?
No it is a private unsupported API - outside of internal use-
>>So that I can know all the possible options and data available?
mib.h is the only doc, but the content is quite clear.

>>Is there a more supported approach to get these networking data from the HP UX OS?
-> popen("netstat -s")?
-> snmp

Akshay44
Frequent Advisor

Re: How to use the API get_mib_info() or anything in sys/mib.h

Thank You Laurent! Looks like I will have to use mib.h for now.
The views expressed in my contributions are my own and do not necessarily reflect the views and strategy of HP.
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution, If you are satisfied with anyoneтАЩs response please remember to give them a KUDOS and show your appreciation