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
VersionCodeThe version.
header
HeaderThe header.
parameters
SecurityParametersThe parameters.
scope
ScopeThe scope.
privacy
IPrivacyProviderThe privacy provider.
needAuthentication
boolif 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
intRequest ID.
version
VersionCodeProtocol version.
community
OctetStringCommunity name.
error
ErrorCodeError code.
index
intError index.
variables
IList<Variable>Variables.
Properties
ErrorIndex
Error index.
public int ErrorIndex { get; }
Property Value
ErrorStatus
Error status.
public ErrorCode ErrorStatus { get; }
Property Value
Header
Gets the header.
public Header Header { get; }
Property Value
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()