]> git.ipfire.org Git - thirdparty/squid.git/blame - include/snmp_api_error.h
SourceFormat Enforcement
[thirdparty/squid.git] / include / snmp_api_error.h
CommitLineData
5c193dec 1/*
bde978a6 2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
5c193dec
AJ
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
b5638623 9#ifndef SQUID_SNMP_API_ERROR_H
10#define SQUID_SNMP_API_ERROR_H
54f642bf 11
12/***************************************************************************
13 *
14 * Copyright 1997 by Carnegie Mellon University
c5dd4956 15 *
54f642bf 16 * All Rights Reserved
c5dd4956 17 *
54f642bf 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.
c5dd4956 25 *
54f642bf 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.
c5dd4956 33 *
54f642bf 34 * Author: Ryan Troll <ryan+@andrew.cmu.edu>
c5dd4956 35 *
54f642bf 36 ***************************************************************************/
37
38/* Error return values */
f53969cc
SM
39#define SNMPERR_GENERR -1
40#define SNMPERR_BAD_LOCPORT -2 /* local port was already in use */
41#define SNMPERR_BAD_ADDRESS -3
42#define SNMPERR_BAD_SESSION -4
43#define SNMPERR_TOO_LONG -5 /* data too long for provided buffer */
54f642bf 44
45#define SNMPERR_ASN_ENCODE -6
46#define SNMPERR_ASN_DECODE -7
47#define SNMPERR_PDU_TRANSLATION -8
48#define SNMPERR_OS_ERR -9
49#define SNMPERR_INVALID_TXTOID -10
50
51#define SNMPERR_UNABLE_TO_FIX -11
52#define SNMPERR_UNSUPPORTED_TYPE -12
53#define SNMPERR_PDU_PARSE -13
54#define SNMPERR_PACKET_ERR -14
55#define SNMPERR_NO_RESPONSE -15
56
f53969cc 57#define SNMPERR_LAST -16 /* Last error message */
54f642bf 58
59#ifdef __cplusplus
e1381638 60extern "C" {
54f642bf 61#endif
62
f53969cc 63/* extern int snmp_errno */
54f642bf 64
f53969cc
SM
65const char *snmp_api_error(int);
66int snmp_api_errno(void);
54f642bf 67
f53969cc
SM
68const char *api_errstring(int); /* Backwards compatibility */
69void snmp_set_api_error(int);
54f642bf 70
71#ifdef __cplusplus
72}
54f642bf 73
43d4303e 74#endif
b5638623 75
f53969cc
SM
76#endif /* SQUID_SNMP_API_ERROR_H */
77