Class TSNMPRec

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSNMPRec = class(TObject)

Description

Data object abstracts SNMP data packet

Hierarchy

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function DecodeBuf(Buffer: AnsiString): Boolean;
Public function EncodeBuf: AnsiString;
Public procedure Clear;
Public procedure MIBAdd(const MIB, Value: AnsiString; ValueType: Integer);
Public procedure MIBDelete(Index: Integer);
Public function MIBGet(const MIB: AnsiString): AnsiString;
Public function MIBCount: integer;
Public function MIBByIndex(Index: Integer): TSNMPMib;

Properties

Public property SNMPMibList: TList read FSNMPMibList;
Published property Version: Integer read FVersion write FVersion;
Published property Community: AnsiString read FCommunity write FCommunity;
Published property PDUType: Integer read FPDUType write FPDUType;
Published property ID: Integer read FID write FID;
Published property ErrorStatus: Integer read FErrorStatus write FErrorStatus;
Published property ErrorIndex: Integer read FErrorIndex write FErrorIndex;
Published property NonRepeaters: Integer read FErrorStatus write FErrorStatus;
Published property MaxRepetitions: Integer read FErrorIndex write FErrorIndex;
Published property MaxSize: Integer read FMaxSize write FMaxSize;
Published property Flags: TV3Flags read FFlags write FFlags;
Published property FlagReportable: Boolean read FFlagReportable write FFlagReportable;
Published property ContextEngineID: AnsiString read FContextEngineID write FContextEngineID;
Published property ContextName: AnsiString read FContextName write FContextName;
Published property AuthMode: TV3Auth read FAuthMode write FAuthMode;
Published property PrivMode: TV3Priv read FPrivMode write FPrivMode;
Published property AuthEngineID: AnsiString read FAuthEngineID write FAuthEngineID;
Published property AuthEngineBoots: Integer read FAuthEngineBoots write FAuthEngineBoots;
Published property AuthEngineTime: Integer read FAuthEngineTime write FAuthEngineTime;
Published property AuthEngineTimeStamp: Cardinal read FAuthEngineTimeStamp Write FAuthEngineTimeStamp;
Published property UserName: AnsiString read FUserName write FUserName;
Published property Password: AnsiString read FPassword write FPassword;
Published property AuthKey: AnsiString read FAuthKey write FAuthKey;
Published property PrivPassword: AnsiString read FPrivPassword write FPrivPassword;
Published property PrivKey: AnsiString read FPrivKey write FPrivKey;
Published property OldTrapEnterprise: AnsiString read FOldTrapEnterprise write FOldTrapEnterprise;
Published property OldTrapHost: AnsiString read FOldTrapHost write FOldTrapHost;
Published property OldTrapGen: Integer read FOldTrapGen write FOldTrapGen;
Published property OldTrapSpec: Integer read FOldTrapSpec write FOldTrapSpec;
Published property OldTrapTimeTicks: Integer read FOldTrapTimeTicks write FOldTrapTimeTicks;

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public function DecodeBuf(Buffer: AnsiString): Boolean;

Decode SNMP packet in buffer to object properties.

Public function EncodeBuf: AnsiString;

Encode obeject properties to SNMP packet.

Public procedure Clear;

Clears all object properties to default values.

Public procedure MIBAdd(const MIB, Value: AnsiString; ValueType: Integer);

Add entry to SNMPMibList. For queries use value as empty string, and ValueType as ASN1_NULL.

Public procedure MIBDelete(Index: Integer);

Delete entry from SNMPMibList.

Public function MIBGet(const MIB: AnsiString): AnsiString;

Search SNMPMibList list for MIB and return correspond value.

Public function MIBCount: integer;

return number of entries in MIB array.

Public function MIBByIndex(Index: Integer): TSNMPMib;

Return MIB information from given row of MIB array.

Properties

Public property SNMPMibList: TList read FSNMPMibList;

List of TSNMPMib objects.

Published property Version: Integer read FVersion write FVersion;

Version of SNMP packet. Default value is 0 (SNMP ver. 1). You can use value 1 for SNMPv2c or value 3 for SNMPv3.

Published property Community: AnsiString read FCommunity write FCommunity;

Community string for autorize access to SNMP server. (Case sensitive!) Community string is not used in SNMPv3! Use UserName and Password instead!

Published property PDUType: Integer read FPDUType write FPDUType;

Define type of SNMP operation.

Published property ID: Integer read FID write FID;

Contains ID number. Not need to use.

Published property ErrorStatus: Integer read FErrorStatus write FErrorStatus;

When packet is reply, contains error code. Supported values are defined by E* constants.

Published property ErrorIndex: Integer read FErrorIndex write FErrorIndex;

Point to error position in reply packet. Not usefull for users. It only good for debugging!

Published property NonRepeaters: Integer read FErrorStatus write FErrorStatus;

special value for GetBulkRequest of SNMPv2 and v3.

Published property MaxRepetitions: Integer read FErrorIndex write FErrorIndex;

special value for GetBulkRequest of SNMPv2 and v3.

Published property MaxSize: Integer read FMaxSize write FMaxSize;

Maximum message size in bytes for SNMPv3. For sending is default 1472 bytes.

Published property Flags: TV3Flags read FFlags write FFlags;

Specify if message is authorised or encrypted. Used only in SNMPv3.

Published property FlagReportable: Boolean read FFlagReportable write FFlagReportable;

For SNMPv3.... If is True, SNMP agent must send reply (at least with some error).

Published property ContextEngineID: AnsiString read FContextEngineID write FContextEngineID;

For SNMPv3. If not specified, is used value from AuthEngineID

Published property ContextName: AnsiString read FContextName write FContextName;

For SNMPv3.

Published property AuthMode: TV3Auth read FAuthMode write FAuthMode;

For SNMPv3. Specify Authorization mode. (specify used hash for authorization)

Published property PrivMode: TV3Priv read FPrivMode write FPrivMode;

For SNMPv3. Specify Privacy mode.

Published property AuthEngineID: AnsiString read FAuthEngineID write FAuthEngineID;

value used by SNMPv3 authorisation for synchronization with SNMP agent.

Published property AuthEngineBoots: Integer read FAuthEngineBoots write FAuthEngineBoots;

value used by SNMPv3 authorisation for synchronization with SNMP agent.

Published property AuthEngineTime: Integer read FAuthEngineTime write FAuthEngineTime;

value used by SNMPv3 authorisation for synchronization with SNMP agent.

Published property AuthEngineTimeStamp: Cardinal read FAuthEngineTimeStamp Write FAuthEngineTimeStamp;

value used by SNMPv3 authorisation for synchronization with SNMP agent.

Published property UserName: AnsiString read FUserName write FUserName;

SNMPv3 authorization username

Published property Password: AnsiString read FPassword write FPassword;

SNMPv3 authorization password

Published property AuthKey: AnsiString read FAuthKey write FAuthKey;

For SNMPv3. Computed Athorization key from Password.

Published property PrivPassword: AnsiString read FPrivPassword write FPrivPassword;

SNMPv3 privacy password

Published property PrivKey: AnsiString read FPrivKey write FPrivKey;

For SNMPv3. Computed Privacy key from PrivPassword.

Published property OldTrapEnterprise: AnsiString read FOldTrapEnterprise write FOldTrapEnterprise;

MIB value to identify the object that sent the TRAPv1.

Published property OldTrapHost: AnsiString read FOldTrapHost write FOldTrapHost;

Address of TRAPv1 sender (IP address).

Published property OldTrapGen: Integer read FOldTrapGen write FOldTrapGen;

Generic TRAPv1 identification.

Published property OldTrapSpec: Integer read FOldTrapSpec write FOldTrapSpec;

Specific TRAPv1 identification.

Published property OldTrapTimeTicks: Integer read FOldTrapTimeTicks write FOldTrapTimeTicks;

Number of 1/100th of seconds since last reboot or power up. (for TRAPv1)


Generated by PasDoc 0.9.0 on 2012-04-23 21:38:58