-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Bindings for net-snmp's C API for clients -- -- Network.Protocol.NetSNMP is a partial binding to the library portion -- of the net-snmp package. It uses the 'single-session api', which is -- claimed to be thread-safe. Not all operations are supported yet; -- please contact the maintainer if you're in need of expanded -- functionality, and especially if you would like to contribute. @package NetSNMP @version 0.1.6 -- | Stability : provisional -- -- This is a binding to Net-SNMP version 5, -- http://www.net-snmp.org/. module Network.Protocol.NetSNMP -- | Typed representation of atomic ASN.1 data types. Some types are -- returned in more than one format for different uses. Some include a -- descriptive string built by the underlying C library. data ASNValue -- | ASN_OCTET_STR Returned as a character string, and as opaque -- data. OctetString :: String -> [Word8] -> ASNValue -- | ASN_OBJECT_ID Returned as the C library's description, a -- dotted-decimal string, and a numeric list OID :: String -> String -> [Word32] -> ASNValue -- | ASN_INTEGER 32bit signed Integer32 :: Int32 -> ASNValue -- | ASN_INTEGER64 64bit signed Integer64 :: Int64 -> ASNValue -- | ASN_COUNTER 32bit nondecreasing Counter32 :: Word32 -> ASNValue -- | ASN_COUNTER64 64bit nondecreasing Counter64 :: Word64 -> ASNValue -- | ASN_UNSIGNED 32bit unsigned Unsigned32 :: Word32 -> ASNValue -- | ASN_UNSIGNED64 64bit unsigned Unsigned64 :: Word64 -> ASNValue -- | ASN_GAUGE 32bit signed with min and max Gauge32 :: Word32 -> ASNValue -- | ASN_IPADDRESS IP address in string and numeric form. Example: -- (IpAddress "1.2.3.4" [1,2,3,4]) IpAddress :: String -> [Word8] -> ASNValue -- | ASN_OPAQUE (Deprecated) application specific data. Use -- OctetString instead. Opaque :: [Word8] -> ASNValue -- | ASN_TIMETICKS Time interval in 1/100 sec ticks. The C -- library's description is returned along with the raw value. TimeTicks :: String -> Word32 -> ASNValue -- | ASN_BOOLEAN Unimplemented. Boolean :: Bool -> ASNValue -- | ASN_FLOAT IEEE float. Unimplemented. IEEEFloat :: Float -> ASNValue -- | ASN_DOUBLE IEEE double. Unimplemented. IEEEDouble :: Double -> ASNValue -- | ASN_NULL Null value Null :: ASNValue -- | Unsupported type from an agent. Returns the numeric type and the C -- library's description of the value. Unsupported :: Int -> String -> ASNValue -- | An SNMP value together with its OID. Returned by the query routines -- snmpGet, snmpNext, and snmpWalk. data SnmpResult SnmpResult :: String -> ASNValue -> SnmpResult -- | Dotted-decimal ObjectId of the value oid :: SnmpResult -> String -- | Typed representation of the value value :: SnmpResult -> ASNValue -- | SNMP Protocol version. It is recommended to use the constants -- snmp_version_1, snmp_version_2c, and -- snmp_version_3. newtype SnmpVersion SnmpVersion :: CLong -> SnmpVersion -- | Numeric version. Generally unneeded. unSnmpVersion :: SnmpVersion -> CLong type Hostname = String type Community = String -- | SNMPv1. The first SNMP standard, using cleartext passwords -- ("communities") snmp_version_1 :: SnmpVersion -- | SNMPv2c. Updated SMI and wire protocol, but still uses communities. snmp_version_2c :: SnmpVersion -- | SNMPv3. Same SMI and protocol as SNMPv2c; stronger authentication. -- Unimplemented. snmp_version_3 :: SnmpVersion -- | Initialize the Net-SNMP library. This must be called before any other -- NetSNMP functions, and before starting extra threads, as the mib -- compiler is not thread-safe. initialize :: IO () -- | Simple community-authenticated SNMP get. Returns the object queried, -- or a descriptive error message. -- -- Examples: -- --