Table of Contents

Class ResponseMessage

Namespace
Lextm.SharpSnmpLib.Messaging
Assembly
SharpSnmpLib.dll

Response message.

public sealed class ResponseMessage : ISnmpMessage
Inheritance
ResponseMessage
Implements
Inherited Members
Extension Methods

Constructors

ResponseMessage(VersionCode, Header, SecurityParameters, Scope, IPrivacyProvider, bool, byte[]?)

Initializes a new instance of the ResponseMessage class.

public ResponseMessage(VersionCode version, Header header, SecurityParameters parameters, Scope scope, IPrivacyProvider privacy, bool needAuthentication, byte[]? length)

Parameters

version VersionCode

The version.

header Header

The header.

parameters SecurityParameters

The parameters.

scope Scope

The scope.

privacy IPrivacyProvider

The privacy provider.

needAuthentication bool

if set to true, authentication is needed.

length byte[]

The length bytes.

ResponseMessage(int, VersionCode, OctetString, ErrorCode, int, IList<Variable>)

Creates a ResponseMessage with all contents.

public ResponseMessage(int requestId, VersionCode version, OctetString community, ErrorCode error, int index, IList<Variable> variables)

Parameters

requestId int

Request ID.

version VersionCode

Protocol version.

community OctetString

Community name.

error ErrorCode

Error code.

index int

Error index.

variables IList<Variable>

Variables.

Properties

ErrorIndex

Error index.

public int ErrorIndex { get; }

Property Value

int

ErrorStatus

Error status.

public ErrorCode ErrorStatus { get; }

Property Value

ErrorCode

Header

Gets the header.

public Header Header { get; }

Property Value

Header

Parameters

Gets the parameters.

public SecurityParameters Parameters { get; }

Property Value

SecurityParameters

The parameters.

Privacy

Gets the privacy provider.

public IPrivacyProvider Privacy { get; }

Property Value

IPrivacyProvider

The privacy provider.

Scope

Gets the scope.

public Scope Scope { get; }

Property Value

Scope

The scope.

Version

Gets the version.

public VersionCode Version { get; }

Property Value

VersionCode

The version.

Methods

ToBytes()

Converts to byte format.

public byte[] ToBytes()

Returns

byte[]

ToString()

Returns a string that represents this ResponseMessage.

public override string ToString()

Returns

string