org.snmp4j.security
Interface SecurityParameters

All Superinterfaces:
BERSerializable
All Known Implementing Classes:
UsmSecurityParameters

public interface SecurityParameters
extends BERSerializable

The SecurityParameters interface represents the security parameters in a SNMPv3 message.

Version:
1.0
Author:
Frank Fock

Method Summary
 int getBERMaxLength(int securityLevel)
          Gets the maximum length of the BER encoded representation of this SecurityParameters instance.
 int getSecurityParametersPosition()
          Gets the byte position of the first byte (counted from zero) of the security parameters in the whole message.
 void setSecurityParametersPosition(int pos)
          Sets the position of the first byte (counted from zero) of the security parameters in the whole SNMP message.
 
Methods inherited from interface org.snmp4j.asn1.BERSerializable
decodeBER, encodeBER, getBERLength, getBERPayloadLength
 

Method Detail

getSecurityParametersPosition

int getSecurityParametersPosition()
Gets the byte position of the first byte (counted from zero) of the security parameters in the whole message.

Returns:
the position of the first byte (counted from zero) of the security parameters in the whole SNMP message. -1 is returned, when the position is unknown (not set).

setSecurityParametersPosition

void setSecurityParametersPosition(int pos)
Sets the position of the first byte (counted from zero) of the security parameters in the whole SNMP message.

Parameters:
pos - an integer value >= 0.

getBERMaxLength

int getBERMaxLength(int securityLevel)
Gets the maximum length of the BER encoded representation of this SecurityParameters instance.

Parameters:
securityLevel - the security level to be used.
Returns:
the maximum BER encoded length in bytes.

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.