1 /*
2  * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_SNMP_ERROR_H
10 #define SQUID_SNMP_ERROR_H
11 
12 /**********************************************************************
13  *
14  *           Copyright 1997 by Carnegie Mellon University
15  *
16  *                       All Rights Reserved
17  *
18  * Permission to use, copy, modify, and distribute this software and its
19  * documentation for any purpose and without fee is hereby granted,
20  * provided that the above copyright notice appear in all copies and that
21  * both that copyright notice and this permission notice appear in
22  * supporting documentation, and that the name of CMU not be
23  * used in advertising or publicity pertaining to distribution of the
24  * software without specific, written prior permission.
25  *
26  * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
27  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
28  * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
29  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
30  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
31  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
32  * SOFTWARE.
33  *
34  **********************************************************************/
35 
36 /*
37  * RFC 1905: Protocol Operations for SNMPv2
38  *
39  * PDU : Error Status Values
40  */
41 
42 #define SNMP_ERR_NOERROR             (0x0)
43 #define SNMP_ERR_TOOBIG              (0x1)
44 #define SNMP_ERR_NOSUCHNAME          (0x2)
45 #define SNMP_ERR_BADVALUE            (0x3)
46 #define SNMP_ERR_READONLY            (0x4)
47 #define SNMP_ERR_GENERR              (0x5)
48 #define SNMP_ERR_NOACCESS            (0x6)
49 #define SNMP_ERR_WRONGTYPE           (0x7)
50 #define SNMP_ERR_WRONGLENGTH         (0x8)
51 #define SNMP_ERR_WRONGENCODING       (0x9)
52 /* 0x0A - 0x0F undefined */
53 #define SNMP_ERR_WRONGVALUE          (0x10)
54 #define SNMP_ERR_NOCREATION          (0x11)
55 #define SNMP_ERR_INCONSISTENTVALUE   (0x12)
56 #define SNMP_ERR_RESOURCEUNAVAILABLE (0x13)
57 #define SNMP_ERR_COMMITFAILED        (0x14)
58 #define SNMP_ERR_UNDOFAILED          (0x15)
59 #define SNMP_ERR_AUTHORIZATIONERROR  (0x16)
60 #define SNMP_ERR_NOTWRITABLE         (0x17)
61 #define SNMP_ERR_INCONSISTENTNAME    (0x18)
62 
63 #ifdef __cplusplus
64 
65 extern "C" {
66 #endif
67 
68 const char *snmp_errstring(int);
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif              /* SQUID_SNMP_ERROR_H */
75 
76