package netsnmp
An interface to the Net-SNMP client library
Install
Dune Dependency
Authors
Maintainers
Sources
netsnmp-v0.14.0.tar.gz
sha256=91a33e407dd1f5dc42ce5aaa5a65e0d65e19b454a129603a89c31d1461abe68f
md5=ae0c0a55bf466f9eca96543f4f2578e4
doc/netsnmp.raw/Netsnmp_raw/Session/index.html
Module Netsnmp_raw.Session
Source
Session handling including sending and receiving PDUs from remote peers. See the snmp_sess_open(3) manual page for details
Supported SNMP versions
Supported SNMP authentication protocols for V3
snmp_sess_init
- create a netsnmp session ready to open. This function is not thread safe as it loads and parses mibs especially on the first call. The value returned can be discarded once used to open the session with snmp_sess_open.
Source
val snmp_sess_open :
netsnmp_session:netsnmp_session ->
version:Snmp_version.t ->
retries:int ->
timeout:int ->
peername:string ->
localname:string ->
local_port:int ->
community:string ->
securityName:string ->
securityAuthProto:Snmp_sec_auth_proto.t ->
securityAuthPassword:string ->
unit ->
t
snmp_sess_open
creates a session between the client and host and returns a handle. Raises Failure
if the C API fails. The parameters are as follows:
netsnmp_session - the value returned from snmp_sess_init - [version - snmp version - [retries] - Number of retries before timeout. - [timeout] - Number of uS until first timeout, then exponential backoff - [peername] - name or address of default peer (may include transport specifier and/or port number) - [localname] - My Domain name or dotted IP address, "" for default - [local_port] - My UDP port number, 0 for default, picked randomly - [community] - V1/V2c community for outgoing requests - ignore by v3. - [securityName] - V3 user name - [securityAuthProto] - V3 auth protocol, this will be converted to the correct oid - [securityAuthPassword] - V3 password, will be converted to securityAuthKey
snmp_sess_synch_response t pdu] sends a pdu and returns the response. Note that this is completely synchronous. Raises the following exceptions
Netsnmp_exceptions.Response_error (err, msg)
for general connection issues,err
is the error (Netsnmp_pdu_error.t
) andmsg
the associated error stringNetsnmp_exceptions.Request_timeout
Netsnmp_exceptions.General_error (syserr, snmperr, errmsg)
for general errors.syserr
is the system error,snmperr
is the SNMP error (Netsnmp_error.t
) anderrmsg
is the error message based on the error codes. Note that the PDU will be freed in all cases
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>