packages feed

NetSNMP 0.3.2.0 → 0.3.2.1

raw patch · 3 files changed

+27/−12 lines, 3 filesdep −utf8-stringPVP ok

version bump matches the API change (PVP)

Dependencies removed: utf8-string

API changes (from Hackage documentation)

Files

NetSNMP.cabal view
@@ -1,5 +1,5 @@ name:                 NetSNMP-version:              0.3.2.0+version:              0.3.2.1 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@@ -33,7 +33,6 @@   ghc-options:        -Wall -static -fno-warn-missing-signatures -fno-warn-unused-binds   build-depends:      base >=4.5 && <5                      ,bytestring >= 0.9 && < 0.11-                     ,utf8-string  test-suite tests   hs-source-dirs:     tests@@ -43,7 +42,6 @@   main-is:            RunTests.hs   build-depends:      base >= 4.5 && <5                      ,bytestring >= 0.9 && < 0.11-                     ,utf8-string                      ,HUnit                      ,NetSNMP                      ,process
changes view
@@ -1,19 +1,36 @@+0.3.2.1 - 11. April 2016+        * 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+	  since the oids we were decoding as utf8 before, are number after all+	  and should not be in UTF8 range anyway++0.3.2.0 - 19. June 2015+        * Make the library compile with GHC 7.10.1+ 0.3.1.0 - 19. April 2014         * Make the library work on Debian 7 with ByteString 0.9 -0.3.0.6 * OIDpart type is hacked to work correctly on OS X+0.3.0.6+        * OIDpart type is hacked to work correctly on OS X -0.3.0.5 * Tied the OIDPart to the correct C Type of the oid.+0.3.0.5+        * Tied the OIDPart to the correct C Type of the oid.           NOTE: This breaks the code on the OS X and we don't know why                 The oid of the SNMP Result can not be read correctly -0.3.0.4 * Reduced the default number of max-repetitions in Bulk PDUs to 30.+0.3.0.4+        * Reduced the default number of max-repetitions in Bulk PDUs to 30.           The previous value caused oversized responses on Extreme Network           switches. -0.3.0.3 * Fixed a bug, where instead of 32 bit, the OID part was set to CLong,+0.3.0.3+        * Fixed a bug, where instead of 32 bit, the OID part was set to CLong,           which became 64 bit in base 4.5 -0.3.*   * Switch from Strings to ByteStrings+0.3.*+        * Switch from Strings to ByteStrings -0.2.*   * Implementation includes snmpBulkWalk+0.2.*+        * Implementation includes snmpBulkWalk
src/Network/Protocol/NetSNMP.hsc view
@@ -32,7 +32,7 @@ import           Data.ByteString (ByteString) import qualified Data.ByteString as B import           Data.ByteString.Char8 ()-import qualified Data.ByteString.UTF8 as Utf8+import qualified Data.ByteString.Char8 as BC import           Data.List import           Foreign hiding (void) import           Foreign.C.String@@ -82,7 +82,7 @@ showOid = concatMap (('.':) . show)  oidToByteString :: RawOID -> ByteString-oidToByteString = Utf8.fromString . showOid+oidToByteString = BC.pack . showOid  -- I don't know whether (or which of) net-snmp's library functions -- account for bytesex; there may be endian bugs lurking here.@@ -502,7 +502,7 @@ extractIpAddress rv = do   ptr <- peekVariableValInt rv   octets <- peekArrayT 4 (castPtr ptr) :: Trouble [Word8]-  let str = B.intercalate "." (map (B.pack . (:[])) octets)+  let str = B.intercalate "." (map (BC.pack . show) octets)   return (IpAddress str octets)  extractOID :: Ptr CVarList -> Trouble ASNValue