C# 클래스 SnmpSharpNet.UserSecurityModel

User security model implementation class.
상속: AsnType, ICloneable
파일 보기 프로젝트 열기: griffina/SnmpSharpNet 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_authentication AuthenticationDigests
_authenticationSecret MutableByte
_engineBoots Integer32
_engineId OctetString
_engineTime Integer32
_privacy PrivacyProtocols
_privacyParameters OctetString
_privacySecret MutableByte
_securityName OctetString

공개 메소드들

메소드 설명
Authenticate ( MutableByte &wholePacket ) : void

Authenticate SNMP version 3 message. Before calling this member, entire SNMP version 3 packet needs to be encoded. After authentication process is completed, authenticationParameters value in the USM header is updated and SNMPv3 packet needs to be re-encoded to include it in the BER encoded stream prior to transmission.

Authenticate ( byte authKey, MutableByte &wholePacket ) : void

Authenticate SNMP version 3 message. Before calling this member, entire SNMP version 3 packet needs to be encoded. After authentication process is completed, authenticationParameters value in the USM header is updated and SNMPv3 packet needs to be re-encoded to include it in the BER encoded stream prior to transmission.

Clone ( ) : object

Clone object

IsAuthentic ( MutableByte wholePacket ) : bool

Authenticate incoming packet

IsAuthentic ( byte authKey, MutableByte wholePacket ) : bool

Authenticate incoming packet

Reset ( ) : void

Reset USM object to default values. All OctetString and MutableByte members are reset to 0 length and privacy and authentication protocols are set to none.

SetEngineTime ( Int32 engineTime, Int32 engineBoots ) : void

Set SNMP version 3 agent engine time related values.

UserSecurityModel ( ) : System

Standard constructor.

UserSecurityModel ( UserSecurityModel value ) : System

Copy constructor.

Valid ( ) : bool

Checks for validity and completeness of information in this class. This method doesn't "know" what you are trying to do so it tests for minimal information required.

decode ( byte buffer, int offset ) : int

Decode USM portion of the SNMP version 3 packet.

encode ( MutableByte buffer ) : void

BER encode security model field.

USM security model is a SEQUENCE encoded inside a OCTETSTRING. To encode it, first encode the sequence of class values then "wrap" it inside a OCTETSTRING field

메소드 상세

Authenticate() 공개 메소드

Authenticate SNMP version 3 message. Before calling this member, entire SNMP version 3 packet needs to be encoded. After authentication process is completed, authenticationParameters value in the USM header is updated and SNMPv3 packet needs to be re-encoded to include it in the BER encoded stream prior to transmission.
public Authenticate ( MutableByte &wholePacket ) : void
wholePacket MutableByte SNMP version 3 BER encoded packet.
리턴 void

Authenticate() 공개 메소드

Authenticate SNMP version 3 message. Before calling this member, entire SNMP version 3 packet needs to be encoded. After authentication process is completed, authenticationParameters value in the USM header is updated and SNMPv3 packet needs to be re-encoded to include it in the BER encoded stream prior to transmission.
public Authenticate ( byte authKey, MutableByte &wholePacket ) : void
authKey byte Authentication key (not password)
wholePacket MutableByte SNMP version 3 BER encoded packet.
리턴 void

Clone() 공개 메소드

Clone object
public Clone ( ) : object
리턴 object

IsAuthentic() 공개 메소드

Authenticate incoming packet
public IsAuthentic ( MutableByte wholePacket ) : bool
wholePacket MutableByte Received BER encoded SNMP version 3 packet
리턴 bool

IsAuthentic() 공개 메소드

Authenticate incoming packet
public IsAuthentic ( byte authKey, MutableByte wholePacket ) : bool
authKey byte Authentication key (not password)
wholePacket MutableByte Received BER encoded SNMP version 3 packet
리턴 bool

Reset() 공개 메소드

Reset USM object to default values. All OctetString and MutableByte members are reset to 0 length and privacy and authentication protocols are set to none.
public Reset ( ) : void
리턴 void

SetEngineTime() 공개 메소드

Set SNMP version 3 agent engine time related values.
public SetEngineTime ( Int32 engineTime, Int32 engineBoots ) : void
engineTime System.Int32 SNMP version 3 agent engine time value
engineBoots System.Int32 SNMP version 3 agent engine boot value
리턴 void

UserSecurityModel() 공개 메소드

Standard constructor.
public UserSecurityModel ( ) : System
리턴 System

UserSecurityModel() 공개 메소드

Copy constructor.
public UserSecurityModel ( UserSecurityModel value ) : System
value UserSecurityModel Class to copy values from
리턴 System

Valid() 공개 메소드

Checks for validity and completeness of information in this class. This method doesn't "know" what you are trying to do so it tests for minimal information required.
public Valid ( ) : bool
리턴 bool

decode() 공개 메소드

Decode USM portion of the SNMP version 3 packet.
Thrown when decoding enountered invalid data type in USM information Thrown when packet is too small to contain information length specified in header
public decode ( byte buffer, int offset ) : int
buffer byte Received SNMP packet BER encoded
offset int Offset within the buffer to start decoding USM information
리턴 int

encode() 공개 메소드

BER encode security model field.
USM security model is a SEQUENCE encoded inside a OCTETSTRING. To encode it, first encode the sequence of class values then "wrap" it inside a OCTETSTRING field
public encode ( MutableByte buffer ) : void
buffer MutableByte Buffer to store encoded USM security model header
리턴 void

프로퍼티 상세

_authentication 보호되어 있는 프로퍼티

Authentication digest enumeration value. For acceptable values see AuthenticationDigests
protected AuthenticationDigests _authentication
리턴 AuthenticationDigests

_authenticationSecret 보호되어 있는 프로퍼티

Authentication secret
protected MutableByte _authenticationSecret
리턴 MutableByte

_engineBoots 보호되어 있는 프로퍼티

Authoritative engine boots value
protected Integer32 _engineBoots
리턴 Integer32

_engineId 보호되어 있는 프로퍼티

Authoritative engine id
protected OctetString _engineId
리턴 OctetString

_engineTime 보호되어 있는 프로퍼티

Authoritative engine time value
protected Integer32 _engineTime
리턴 Integer32

_privacy 보호되어 있는 프로퍼티

Privacy protocol. For valid values see PrivacyProtocols
protected PrivacyProtocols _privacy
리턴 PrivacyProtocols

_privacyParameters 보호되어 있는 프로퍼티

Privacy parameters in authPriv requests
protected OctetString _privacyParameters
리턴 OctetString

_privacySecret 보호되어 있는 프로퍼티

Privacy secret
protected MutableByte _privacySecret
리턴 MutableByte

_securityName 보호되어 있는 프로퍼티

SNMP version 3 security name (or user name)
protected OctetString _securityName
리턴 OctetString