469,626 Members | 877 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Snmp

Hi,

I'am using the SnmpMgrOpen() api function.

################################################## #####################

LPSNMP_MGR_SESSION SnmpMgrOpen(
LPSTR lpAgentAddress, // name and address of target SNMP agent
LPSTR lpAgentCommunity, // community for target SNMP agent
INT nTimeOut, // communication time-out in milliseconds
INT nRetries // communication time-out or retry count
);

Parameters :

lpAgentAddress
[in] Pointer to a null-terminated string specifying either a dotted-decimal
IP address or a host name that can be resolved to an IP address, an IPX
address (in 8.12 notation), or an ethernet address.
lpAgentCommunity
[in] Pointer to a null-terminated string specifying the SNMP community name
used when communicating with the agent specified in the lpAgentAddress
parameter.
nTimeOut
[in] Specifies the communications time-out in milliseconds.
nRetries
[in] Specifies the communications retry count. The time-out specified in the
nTimeOut parameter is doubled each time a retry attempt is transmitted.

Return Values :

If the function succeeds, the return value is a pointer to an
LPSNMP_MGR_SESSION structure. This structure is used internally and the
programmer should not alter it. For more information, see the following
Remarks section.
If the function fails, the return value is NULL. To get extended error
information, call GetLastError. GetLastError may return the
SNMP_MEM_ALLOC_ERROR error code, which indicates a memory allocation error.
This function may also return Windows Sockets error codes.

The name and address of the SNMP target, or the string pointed to by the
lpAgentAddress parameter, should conform to one of the following forms.

Name/Address Form (example)
IP Address 157.57.8.160
IP Hostname merlin.microsoft.com
Ethernet Address 00aa00bbccdd
IPX Address 00006112.00aa00bbccdd

################################################## #####################
I have set lpAgentAddress="192.168.0.1", and it works.
Now, I would set the Ethernet Address that is 00:2f:0b:5e:f2 (for example)
Then i set lpAgentAddress="002f0b5ef2".
The function return NULL pointer and a GetLasterror return 11001 (not found)
What'wrong ?

Thank you.
Jul 22 '05 #1
2 3011
TiToine wrote:
I'am using the SnmpMgrOpen() api function.

################################################## #####################
[...]
################################################## #####################
I have set lpAgentAddress="192.168.0.1", and it works.
Now, I would set the Ethernet Address that is 00:2f:0b:5e:f2 (for example)
Then i set lpAgentAddress="002f0b5ef2".
The function return NULL pointer and a GetLasterror return 11001 (not found)
What'wrong ?


What's your C++ _language_ question?
Jul 22 '05 #2
Ok ok...i see
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Matthew Bell | last post: by
3 posts views Thread by Kevin Ingram | last post: by
1 post views Thread by ZacBowling | last post: by
reply views Thread by ramgce2003 | last post: by
1 post views Thread by Schroeder, AJ | last post: by
1 post views Thread by idoha | last post: by
1 post views Thread by Dirk Van de moortel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.