agentx-0.2.0.0: AgentX protocol for write SNMP subagents

Safe HaskellNone
LanguageHaskell2010

Network.Protocol.Snmp.AgentX.Packet

Contents

Synopsis

Packet

data Packet Source

Packet type, describe agentx packet.

Instances

constructor

lenses for Packet

pdu :: forall cat. ArrowApply cat => Lens cat Packet PDU Source

flags :: forall cat. ArrowApply cat => Lens cat Packet Flags Source

tid :: forall cat. ArrowApply cat => Lens cat Packet TransactionID Source

pid :: forall cat. ArrowApply cat => Lens cat Packet PacketID Source

sid :: forall cat. ArrowApply cat => Lens cat Packet SessionID Source

types used in Packet

data PDU Source

rfc 2741, section 6.2

Constructors

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

Instances

data PacketID Source

packet id in header, rfc 2741, section 6.1

data SessionID Source

session id in header, rfc 2741, section 6.1

data TransactionID Source

transaction id in header, rfc 2741, section 6.1

Flags

data Flags Source

header flags, rfc 2741, section 6.1

Instances

constructor

lenses

newIndex :: forall cat. ArrowApply cat => Lens cat Flags NewIndex Source

anyIndex :: forall cat. ArrowApply cat => Lens cat Flags AnyIndex Source

bigEndian :: forall cat. ArrowApply cat => Lens cat Flags BigEndian 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

data VarBind Source

containt oid and value (rfc 2741, section 5.4)

Instances

constructor

mkVarBind :: OID -> Value -> VarBind Source

constructor for VarBind

lenses

vboid :: forall cat. ArrowApply cat => Lens cat VarBind OID Source

vbvalue :: forall cat. ArrowApply cat => Lens cat VarBind Value Source

other types

data Context Source

rfc 2571 section 3.3.1, rfc 2741 section 6.1.1 Context

types for errors

data UndoError Source

result for undoSetAIO (rfc 2741, section 7.2.4.3)

Constructors

NoUndoError 
UndoFailed 

data CommitError Source

result for commitSetAIO (rfc 2741, section 7.2.4.2)

data TaggedError Source

Error with Tag instance

Constructors

forall a . (Show a, Eq a, Tag a Word16) => Tagged a 

helpers

bodySizeFromHeader :: ByteString -> Int64 Source

get body size from header

econvert :: (Enum a, Enum b) => a -> b Source

helper for convert