Class Header
- Namespace
- Lextm.SharpSnmpLib
- Assembly
- SharpSnmpLib.dll
Header segment.
public sealed class Header : ISegment
- Inheritance
-
Header
- Implements
- Inherited Members
Constructors
Header(ISnmpData)
Initializes a new instance of the Header class.
public Header(ISnmpData data)
Parameters
data
ISnmpDataThe data.
Header(Integer32?, Integer32, Levels)
Initializes a new instance of the Header class.
public Header(Integer32? messageId, Integer32 maxMessageSize, Levels securityLevel)
Parameters
messageId
Integer32The message id.
maxMessageSize
Integer32Size of the max message.
securityLevel
LevelsThe security level.
Remarks
If you want an empty header, please use Empty.
Header(int)
Initializes a new instance of the Header class.
public Header(int messageId)
Parameters
messageId
intThe message identifier.
Fields
MaxMessageSize
Max message size used in #SNMP.
public const int MaxMessageSize = 65507
Field Value
Remarks
You can use any value for your own application. Also this value may be changed in #SNMP in future releases.
Properties
Empty
Empty header.
public static Header Empty { get; }
Property Value
MaxSize
Gets or sets the size of the max.
public int MaxSize { get; }
Property Value
- int
The size of the max.
MessageId
Gets the message ID.
public int MessageId { get; }
Property Value
- int
The message ID.
SecurityLevel
Security flags.
public Levels SecurityLevel { get; }
Property Value
Methods
GetData(VersionCode)
Gets the data.
public ISnmpData? GetData(VersionCode version)
Parameters
version
VersionCodeThe version.
Returns
ToSequence()
Converts to Sequence object.
public Sequence ToSequence()
Returns
ToString()
Returns a string that represents this instance.
public override string ToString()