Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Packet
- mkPacket :: Version -> PDU -> Flags -> SessionID -> TransactionID -> PacketID -> Packet
- pdu :: forall cat. ArrowApply cat => Lens cat Packet PDU
- flags :: forall cat. ArrowApply cat => Lens cat Packet Flags
- tid :: forall cat. ArrowApply cat => Lens cat Packet TransactionID
- pid :: forall cat. ArrowApply cat => Lens cat Packet PacketID
- sid :: forall cat. ArrowApply cat => Lens cat Packet SessionID
- data PDU
- = Open Timeout OID Description
- | Close Reason
- | Register MContext Timeout Priority RangeSubid OID UpperBound
- | Unregister MContext Priority RangeSubid OID UpperBound
- | Get MContext [OID]
- | GetNext MContext [SearchRange]
- | GetBulk MContext NonRepeaters MaxRepeaters [SearchRange]
- | TestSet MContext [VarBind]
- | CommitSet
- | UndoSet
- | CleanupSet
- | Notify MContext [VarBind]
- | Ping MContext
- | IndexAllocate MContext [VarBind]
- | IndexDeallocate MContext [VarBind]
- | AddAgentCaps MContext OID Description
- | RemoveAgentCaps MContext OID
- | Response SysUptime TaggedError Index [VarBind]
- data PacketID
- data SessionID
- data TransactionID
- data Flags
- type InstanceRegistration = Bool
- type NewIndex = Bool
- type AnyIndex = Bool
- type NonDefaultContext = Bool
- type BigEndian = Bool
- mkFlags :: InstanceRegistration -> NewIndex -> AnyIndex -> NonDefaultContext -> BigEndian -> Flags
- instanceRegistration :: forall cat. ArrowApply cat => Lens cat Flags InstanceRegistration
- newIndex :: forall cat. ArrowApply cat => Lens cat Flags NewIndex
- anyIndex :: forall cat. ArrowApply cat => Lens cat Flags AnyIndex
- nonDefaultContext :: forall cat. ArrowApply cat => Lens cat Flags NonDefaultContext
- bigEndian :: forall cat. ArrowApply cat => Lens cat Flags BigEndian
- data SearchRange
- mkSearchRange :: OID -> OID -> Bool -> SearchRange
- startOID :: forall cat. ArrowApply cat => Lens cat SearchRange OID
- endOID :: forall cat. ArrowApply cat => Lens cat SearchRange OID
- include :: forall cat. ArrowApply cat => Lens cat SearchRange Bool
- data VarBind
- mkVarBind :: OID -> Value -> VarBind
- vboid :: forall cat. ArrowApply cat => Lens cat VarBind OID
- vbvalue :: forall cat. ArrowApply cat => Lens cat VarBind Value
- data Context
- type SysUptime = Word32
- type Index = Word16
- type NonRepeaters = Word16
- type MaxRepeaters = Word16
- data RError
- data UndoError
- data TestError
- data CommitError
- data TaggedError = forall a . (Show a, Eq a, Tag a Word16) => Tagged a
- bodySizeFromHeader :: ByteString -> Int64
- econvert :: (Enum a, Enum b) => a -> b
Packet
constructor
lenses for Packet
tid :: forall cat. ArrowApply cat => Lens cat Packet TransactionID Source
types used in Packet
rfc 2741, section 6.2
Open Timeout OID Description | section 6.2.1 |
Close Reason | section 6.2.2 |
Register MContext Timeout Priority RangeSubid OID UpperBound | section 6.2.3 |
Unregister MContext Priority RangeSubid OID UpperBound | section 6.2.4 |
Get MContext [OID] | section 6.2.5 |
GetNext MContext [SearchRange] | section 6.2.6 |
GetBulk MContext NonRepeaters MaxRepeaters [SearchRange] | section 6.2.7 |
TestSet MContext [VarBind] | section 6.2.8 |
CommitSet | section 6.2.9 |
UndoSet | section 6.2.9 |
CleanupSet | section 6.2.9 |
Notify MContext [VarBind] | section 6.2.10 |
Ping MContext | section 6.2.11 |
IndexAllocate MContext [VarBind] | section 6.2.12 |
IndexDeallocate MContext [VarBind] | section 6.2.13 |
AddAgentCaps MContext OID Description | section 6.2.14 |
RemoveAgentCaps MContext OID | section 6.2.15 |
Response SysUptime TaggedError Index [VarBind] | section 6.2.16 |
packet id in header, rfc 2741, section 6.1
session id in header, rfc 2741, section 6.1
data TransactionID Source
transaction id in header, rfc 2741, section 6.1
Flags
type InstanceRegistration = Bool Source
type NonDefaultContext = Bool Source
constructor
mkFlags :: InstanceRegistration -> NewIndex -> AnyIndex -> NonDefaultContext -> BigEndian -> Flags Source
lenses
instanceRegistration :: forall cat. ArrowApply cat => Lens cat Flags InstanceRegistration Source
nonDefaultContext :: forall cat. ArrowApply cat => Lens cat Flags NonDefaultContext Source
SearchRange
data SearchRange Source
used for getnext and other requests (rfc 2741, section5.2 )
constructor
mkSearchRange :: OID -> OID -> Bool -> SearchRange Source
create SearchRange
lenses
startOID :: forall cat. ArrowApply cat => Lens cat SearchRange OID Source
endOID :: forall cat. ArrowApply cat => Lens cat SearchRange OID Source
include :: forall cat. ArrowApply cat => Lens cat SearchRange Bool Source
VarBind
constructor
lenses
other types
rfc 2571 section 3.3.1, rfc 2741 section 6.1.1 Context
type NonRepeaters = Word16 Source
type MaxRepeaters = Word16 Source
types for errors
rfc 2741, 6.2.16, Error status in agentx-response-pdu
result for undoSetAIO (rfc 2741, section 7.2.4.3)
result for testSetAIO (rfc 2741, section 7.2.4.1)
data CommitError Source
result for commitSetAIO (rfc 2741, section 7.2.4.2)
data TaggedError Source
Error with Tag instance
helpers
bodySizeFromHeader :: ByteString -> Int64 Source
get body size from header