Table of Contents

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 ISnmpData

The data.

Header(Integer32?, Integer32, Levels)

Initializes a new instance of the Header class.

public Header(Integer32? messageId, Integer32 maxMessageSize, Levels securityLevel)

Parameters

messageId Integer32

The message id.

maxMessageSize Integer32

Size of the max message.

securityLevel Levels

The 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 int

The message identifier.

Fields

MaxMessageSize

Max message size used in #SNMP.

public const int MaxMessageSize = 65507

Field Value

int

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

Header

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

Levels

Methods

GetData(VersionCode)

Gets the data.

public ISnmpData? GetData(VersionCode version)

Parameters

version VersionCode

The version.

Returns

ISnmpData

ToSequence()

Converts to Sequence object.

public Sequence ToSequence()

Returns

Sequence

ToString()

Returns a string that represents this instance.

public override string ToString()

Returns

string

A string that represents this instance.