|
|
|
|
SNMPStartSession (Function) In french: SNMPOuvreSession Starts an SNMP session. SessionID is int // Start a session SessionID = SNMPStartSession("TestDoc", "public") IF SessionID = -1 THEN Error("Error while opening the session " + ErrorInfo())
Syntax
<Result> = SNMPStartSession(<Agent address> , <SNMP community> [, <Timeout> [, <Port number>]])
<Result>: Integer - Identifier of SNMP session,
- -1 if an error occurred. ErrorInfo returns more information on the error.
<Agent address>: Character string Address of agent with which the communication via SNMP will be established. This address can be given in the following format:- IP address in XXX.XXX.XXX.XXX format (125.5.110.100 for example).
- URL containing the server name (www.windev.com for example). This syntax is recommended.
<SNMP community>: Character string Name of SNMP community used by the connection. This community indicates the rights associated with the SNMP session. In most cases, all the SNMP agents support the "public" community in read-only mode. Other communities can exist (private for example) for the access in read/write. <Timeout>: Optional integer or optional Duration Timeout (in milliseconds) of an SNMP request. This value must be included between 1000 and 10000. This parameter can correspond to: - an integer corresponding to the number of milliseconds,
- a Duration variable,
- the duration in a readable format (e.g., 1 s or 10 ms).
This parameter is set to 5000 by default (5 seconds). <Port number>: Optional integer Number of the port to which we must connect. This value is set to 161 by default (standard SNMP port). Remarks SNMP is using the UDP protocol that is a connectionless protocol. Therefore, SNMPStartSession does not allow you to find out whether the contacted agent can actually be joined. SNMPStartSession returns a session once the SNMP request was sent, even if the agent is not available. To check whether an agent is actually connected, you have the ability to use:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|