]>
Commit | Line | Data |
---|---|---|
54f642bf | 1 | /* -*- c++ -*- */ |
2 | #ifndef _SNMP_API_ERROR_H_ | |
3 | #define _SNMP_API_ERROR_H_ | |
4 | ||
5 | /*************************************************************************** | |
6 | * | |
7 | * Copyright 1997 by Carnegie Mellon University | |
8 | * | |
9 | * All Rights Reserved | |
10 | * | |
11 | * Permission to use, copy, modify, and distribute this software and its | |
12 | * documentation for any purpose and without fee is hereby granted, | |
13 | * provided that the above copyright notice appear in all copies and that | |
14 | * both that copyright notice and this permission notice appear in | |
15 | * supporting documentation, and that the name of CMU not be | |
16 | * used in advertising or publicity pertaining to distribution of the | |
17 | * software without specific, written prior permission. | |
18 | * | |
19 | * CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | |
20 | * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | |
21 | * CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | |
22 | * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
23 | * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
24 | * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
25 | * SOFTWARE. | |
26 | * | |
27 | * Author: Ryan Troll <ryan+@andrew.cmu.edu> | |
28 | * | |
43d4303e | 29 | * $Id: snmp_api_error.h,v 1.2 1998/04/04 01:43:43 kostas Exp $ |
54f642bf | 30 | * |
31 | ***************************************************************************/ | |
32 | ||
33 | /* Error return values */ | |
34 | #define SNMPERR_GENERR -1 | |
43d4303e | 35 | #define SNMPERR_BAD_LOCPORT -2 /* local port was already in use */ |
54f642bf | 36 | #define SNMPERR_BAD_ADDRESS -3 |
37 | #define SNMPERR_BAD_SESSION -4 | |
43d4303e | 38 | #define SNMPERR_TOO_LONG -5 /* data too long for provided buffer */ |
54f642bf | 39 | |
40 | #define SNMPERR_ASN_ENCODE -6 | |
41 | #define SNMPERR_ASN_DECODE -7 | |
42 | #define SNMPERR_PDU_TRANSLATION -8 | |
43 | #define SNMPERR_OS_ERR -9 | |
44 | #define SNMPERR_INVALID_TXTOID -10 | |
45 | ||
46 | #define SNMPERR_UNABLE_TO_FIX -11 | |
47 | #define SNMPERR_UNSUPPORTED_TYPE -12 | |
48 | #define SNMPERR_PDU_PARSE -13 | |
49 | #define SNMPERR_PACKET_ERR -14 | |
50 | #define SNMPERR_NO_RESPONSE -15 | |
51 | ||
43d4303e | 52 | #define SNMPERR_LAST -16 /* Last error message */ |
54f642bf | 53 | |
54 | #ifdef __cplusplus | |
55 | extern "C" { | |
56 | #endif | |
57 | ||
58 | /* extern int snmp_errno */ | |
59 | ||
43d4303e | 60 | char *snmp_api_error(int); |
61 | int snmp_api_errno(void); | |
54f642bf | 62 | |
43d4303e | 63 | char *api_errstring(int); /* Backwards compatibility */ |
64 | void snmp_set_api_error(int); | |
54f642bf | 65 | |
66 | #ifdef __cplusplus | |
67 | } | |
54f642bf | 68 | |
43d4303e | 69 | #endif |
70 | #endif /* _SNMP_API_ERROR_H_ */ |