public static void checkSecurityLevel(byte msgFlags)
throws SnmpBadSecurityLevelException {
int secLevel = msgFlags & SnmpDefinitions.authPriv;
if((secLevel & SnmpDefinitions.privMask) != 0)
if((secLevel & SnmpDefinitions.authMask) == 0) {
throw new SnmpBadSecurityLevelException("Security level:"+
" noAuthPriv!!!");
}
}