// SNMP error code enum.
// Copyright (C) 2008-2010 Malcolm Crowe, Lex Li, and other contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
namespace GSF.Net.Snmp
{
using System;
using System.Runtime.Serialization;
///
/// Error code for SNMP operations. (0-5 are first defined in SNMP v1, and others are added in v2)
///
[DataContract]
public enum ErrorCode
{
///
/// There was no problem performing the request.
///
NoError = 0,
///
/// The response to your request was too big to fit into one response.
///
TooBig = 1,
///
/// An agent was asked to get or set an OID that it can't find; i.e., the OID doesn't exist.
///
NoSuchName = 2,
///
/// A read-write or write-only object was set to an inconsistent value.
///
BadValue = 3,
///
/// This error is generally not used. The noSuchName error is equivalent to this one.
///
ReadOnly = 4,
///
/// This is a catch-all error. If an error occurs for which none of the previous messages is appropriate, a genError is issued.
///
GenError = 5,
///
/// A set to an inaccessible variable was attempted. This typically occurs when the variable has an ACCESS type of not-accessible.
///
NoAccess = 6,
///
/// An object was set to a type that is different from its definition. This error will occur if you try to set an object that is of type INTEGER to a string, for example.
///
WrongType = 7,
///
/// An object's value was set to something other than what it calls for. For instance, a string can be defined to have a maximum character size. This error occurs if you try to set a string object to a value that exceeds its maximum length.
///
WrongLength = 8,
///
/// A set operation was attempted using the wrong encoding for the object being set.
///
WrongEncoding = 9,
///
/// A variable was set to a value it doesn't understand. This can occur when a read-write is defined as an enumeration, and you try to set it to a value that is not one of the enumerated types.
///
WrongValue = 10,
///
/// You tried to set a nonexistent variable or create a variable that doesn't exist in the MIB.
///
NoCreation = 11,
///
/// A MIB variable is in an inconsistent state, and is not accepting any set requests.
///
InconsistentValue = 12,
///
/// No system resources are available to perform a set.
///
ResourceUnavailable = 13,
///
/// This is a catch-all error for set failures.
///
CommitFailed = 14,
///
/// A set failed and the agent was unable to roll back all the previous sets up until the point of failure.
///
UndoFailed = 15,
///
/// An SNMP command could not be authenticated; in other words, someone has supplied an incorrect community string.
///
AuthorizationError = 16,
///
/// A variable will not accept a set, even though it is supposed to.
///
NotWritable = 17,
///
/// You attempted to set a variable, but that attempt failed because the variable was in some kind of inconsistent state.
///
InconsistentName = 18
}
}