NetSNMP 0.3.2.3 → 0.3.2.4
raw patch · 3 files changed
+18/−7 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- NetSNMP.cabal +1/−1
- changes +12/−1
- src/Network/Protocol/NetSNMP.hsc +5/−5
NetSNMP.cabal view
@@ -1,5 +1,5 @@ name: NetSNMP-version: 0.3.2.3+version: 0.3.2.4 synopsis: Bindings for net-snmp's C API for clients description: Network.Protocol.NetSNMP is a partial binding to the library portion of the net-snmp package. It uses the
changes view
@@ -1,5 +1,16 @@+0.3.2.4 - 14. November 2016+ * Throw an error on duplicate OIDs in the bulkGet response++0.3.2.3 - 14. November 2016+ * Throw an error on duplicate OIDs in the bulkWalk response++0.3.2.2 - 26. April 2016+ * Export snmpBulkWalkN to be able to control the amount of repetiotions+ in the SNMP BulkWalk Command. Courtesy of Kyle McKean+ (https://github.com/mckeankylej)+ 0.3.2.1 - 11. April 2016- * Fix parsing IPs. Issue #4 (https://github.com/ptek/netsnmp/issues/4)+ * Fix parsing IPs. Issue #4 (https://github.com/ptek/netsnmp/issues/4) In the prevois code, "0.0.0.0" converts to "\NUL.\NUL.\NUL.\NUL" Thanks to lievenm (https://github.com/lievenm) for pointing it out. * Remove the dependency on utf8-string. Using ByteString.Char8 instead
src/Network/Protocol/NetSNMP.hsc view
@@ -394,16 +394,12 @@ bulkWalk :: RawOID -> RawOID -> Session -> Trouble [SnmpResult] bulkWalk rootoid startoid session = do res <- filter (onlySubIds rootoid) <$> mkSnmpBulkGet 0 maxReps startoid session- let resOids = map oid res- unless (nub(resOids) == resOids)- (throwT "OID does not increase. There is a loop somewhere.") case res of [] -> return [] rs -> (res ++) <$> bulkWalk rootoid (oid (last rs)) session onlySubIds :: RawOID -> SnmpResult -> Bool onlySubIds rootoid res = rootoid `isPrefixOf` oid res - -- getbulk, using session info from a 'data Session' and -- the supplied oid -- It is the caller's obligation to ensure the session's validity.@@ -414,7 +410,11 @@ pdu_req <- buildPDU snmp_msg_getbulk oid' oids version pokePDUNonRepeaters pdu_req non_repeaters pokePDUMaxRepetitions pdu_req max_repetitions- dispatchSnmpReq pdu_req session+ res <- dispatchSnmpReq pdu_req session+ let resOids = map oid res+ unless (nub(resOids) == resOids)+ (throwT "OID do not increase. The server responds in a loop.")+ return res -- get or getnext, using session info from a 'data Session' and -- the supplied oid