[AGENT++] SNMP++ Session Create Fail, SNMP++: Resource unavailable
???
hfwu at seu.edu.cn
Wed Feb 2 07:16:04 CET 2005
Hi everybody!
Now I met a problem about snmp program development when using snmp++v3.2.15.
I use the SNMP Get operation to find the alive snmp agent devices.My program code framework is as follows:
#define MAX_PTHREAD_NUM 254
void* snmpPingPong(void* args)
//args contains the possible IPv4 address
{
if the specified device which is identified by the args can be reachable by snmp,
then add it to a global queue object(of cource using mutext when writing the specified IP address to queue).
}
void funcA(char* netaddress,char*netmask)
{
for(int i=0;i<MAX_PTHREAD_NUM;i++)
pthread_create();
for(int i=0;i<MAX_PTHREAD_NUM;i++)
pthread_join();
}
And now in main function,I execute funcA for several time,for examples,I gave the parameters <192.168.1.0 255.255.255.0>?
<192.168.2.0 255.255.255.0>?<192.168.3.0 255.255.255.0>?<192.168.4.0 255.255.255.0>?<192.168.5.0 255.255.255.0>?
<192.168.6.0 255.255.255.0> and even more.
During execution,it firstly shows snmpGet error(because of timeout and it is resulted by dead device,And it is right.No problem).
but later,if shows "SNMP++ Session Create Fail, SNMP++: Resource unavailable"
Any idea?
Can you show me a hand?
Regards!
hfwu at seu.edu.cn
More information about the AGENTPP
mailing list