~ubuntu-branches/ubuntu/karmic/rsyslog/karmic-200908151517

« back to all changes in this revision

Viewing changes to plugins/omsnmp/omsnmp.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2008-04-23 16:46:39 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080423164639-5acmt8a4vpxjgnxw
Tags: 3.14.2-3
* debian/rsyslog-doc.install
  - Fix a typo in the install path of the dia files. Closes: #477489
    Thanks to Justin B Rye for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* omsnmp.h
 
2
 * These are the definitions for the build-in MySQL output module.
 
3
 *
 
4
 * File begun on 2007-07-13 by RGerhards (extracted from syslogd.c)
 
5
 *
 
6
 * Copyright 2007 Rainer Gerhards and Adiscon GmbH.
 
7
 *
 
8
 * This file is part of rsyslog.
 
9
 *
 
10
 * Rsyslog is free software: you can redistribute it and/or modify
 
11
 * it under the terms of the GNU General Public License as published by
 
12
 * the Free Software Foundation, either version 3 of the License, or
 
13
 * (at your option) any later version.
 
14
 *
 
15
 * Rsyslog is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 * GNU General Public License for more details.
 
19
 *
 
20
 * You should have received a copy of the GNU General Public License
 
21
 * along with Rsyslog.  If not, see <http://www.gnu.org/licenses/>.
 
22
 *
 
23
 * A copy of the GPL can be found in the file "COPYING" in this distribution.
 
24
 */
 
25
#ifndef OMSNMP_H_INCLUDED
 
26
#define OMSNMP_H_INCLUDED 1
 
27
 
 
28
#define OMSNMP_MAXTRANSPORLENGTH 10
 
29
#define OMSNMP_MAXPORTLENGHT 5
 
30
#define OMSNMP_MAXCOMMUNITYLENGHT 255
 
31
#define OMSNMP_MAXOIDLENGHT 255
 
32
 
 
33
 
 
34
#endif /* #ifndef OMMYSQL_H_INCLUDED */
 
35
/*
 
36
 * vi:set ai:
 
37
 */
 
38
 
 
39
#include <net-snmp/library/snmp_api.h>
 
40
 
 
41
static const char *api_errors[-SNMPERR_MAX + 1] = {
 
42
    "No error",                 /* SNMPERR_SUCCESS */
 
43
    "Generic error",            /* SNMPERR_GENERR */
 
44
    "Invalid local port",       /* SNMPERR_BAD_LOCPORT */
 
45
    "Unknown host",             /* SNMPERR_BAD_ADDRESS */
 
46
    "Unknown session",          /* SNMPERR_BAD_SESSION */
 
47
    "Too long",                 /* SNMPERR_TOO_LONG */
 
48
    "No socket",                /* SNMPERR_NO_SOCKET */
 
49
    "Cannot send V2 PDU on V1 session", /* SNMPERR_V2_IN_V1 */
 
50
    "Cannot send V1 PDU on V2 session", /* SNMPERR_V1_IN_V2 */
 
51
    "Bad value for non-repeaters",      /* SNMPERR_BAD_REPEATERS */
 
52
    "Bad value for max-repetitions",    /* SNMPERR_BAD_REPETITIONS */
 
53
    "Error building ASN.1 representation",      /* SNMPERR_BAD_ASN1_BUILD */
 
54
    "Failure in sendto",        /* SNMPERR_BAD_SENDTO */
 
55
    "Bad parse of ASN.1 type",  /* SNMPERR_BAD_PARSE */
 
56
    "Bad version specified",    /* SNMPERR_BAD_VERSION */
 
57
    "Bad source party specified",       /* SNMPERR_BAD_SRC_PARTY */
 
58
    "Bad destination party specified",  /* SNMPERR_BAD_DST_PARTY */
 
59
    "Bad context specified",    /* SNMPERR_BAD_CONTEXT */
 
60
    "Bad community specified",  /* SNMPERR_BAD_COMMUNITY */
 
61
    "Cannot send noAuth/Priv",       /* SNMPERR_NOAUTH_DESPRIV */
 
62
    "Bad ACL definition",       /* SNMPERR_BAD_ACL */
 
63
    "Bad Party definition",     /* SNMPERR_BAD_PARTY */
 
64
    "Session abort failure",    /* SNMPERR_ABORT */
 
65
    "Unknown PDU type",         /* SNMPERR_UNKNOWN_PDU */
 
66
    "Timeout",                  /* SNMPERR_TIMEOUT */
 
67
    "Failure in recvfrom",      /* SNMPERR_BAD_RECVFROM */
 
68
    "Unable to determine contextEngineID",      /* SNMPERR_BAD_ENG_ID */
 
69
    "No securityName specified",        /* SNMPERR_BAD_SEC_NAME */
 
70
    "Unable to determine securityLevel",        /* SNMPERR_BAD_SEC_LEVEL  */
 
71
    "ASN.1 parse error in message",     /* SNMPERR_ASN_PARSE_ERR */
 
72
    "Unknown security model in message",        /* SNMPERR_UNKNOWN_SEC_MODEL */
 
73
    "Invalid message (e.g. msgFlags)",  /* SNMPERR_INVALID_MSG */
 
74
    "Unknown engine ID",        /* SNMPERR_UNKNOWN_ENG_ID */
 
75
    "Unknown user name",        /* SNMPERR_UNKNOWN_USER_NAME */
 
76
    "Unsupported security level",       /* SNMPERR_UNSUPPORTED_SEC_LEVEL */
 
77
    "Authentication failure (incorrect password, community or key)",    /* SNMPERR_AUTHENTICATION_FAILURE */
 
78
    "Not in time window",       /* SNMPERR_NOT_IN_TIME_WINDOW */
 
79
    "Decryption error",         /* SNMPERR_DECRYPTION_ERR */
 
80
    "SCAPI general failure",    /* SNMPERR_SC_GENERAL_FAILURE */
 
81
    "SCAPI sub-system not configured",  /* SNMPERR_SC_NOT_CONFIGURED */
 
82
    "Key tools not available",  /* SNMPERR_KT_NOT_AVAILABLE */
 
83
    "Unknown Report message",   /* SNMPERR_UNKNOWN_REPORT */
 
84
    "USM generic error",        /* SNMPERR_USM_GENERICERROR */
 
85
    "USM unknown security name (no such user exists)",  /* SNMPERR_USM_UNKNOWNSECURITYNAME */
 
86
    "USM unsupported security level (this user has not been configured for that level of security)",    /* SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL */
 
87
    "USM encryption error",     /* SNMPERR_USM_ENCRYPTIONERROR */
 
88
    "USM authentication failure (incorrect password or key)",   /* SNMPERR_USM_AUTHENTICATIONFAILURE */
 
89
    "USM parse error",          /* SNMPERR_USM_PARSEERROR */
 
90
    "USM unknown engineID",     /* SNMPERR_USM_UNKNOWNENGINEID */
 
91
    "USM not in time window",   /* SNMPERR_USM_NOTINTIMEWINDOW */
 
92
    "USM decryption error",     /* SNMPERR_USM_DECRYPTIONERROR */
 
93
    "MIB not initialized",      /* SNMPERR_NOMIB */
 
94
    "Value out of range",       /* SNMPERR_RANGE */
 
95
    "Sub-id out of range",      /* SNMPERR_MAX_SUBID */
 
96
    "Bad sub-id in object identifier",  /* SNMPERR_BAD_SUBID */
 
97
    "Object identifier too long",       /* SNMPERR_LONG_OID */
 
98
    "Bad value name",           /* SNMPERR_BAD_NAME */
 
99
    "Bad value notation",       /* SNMPERR_VALUE */
 
100
    "Unknown Object Identifier",        /* SNMPERR_UNKNOWN_OBJID */
 
101
    "No PDU in snmp_send",      /* SNMPERR_NULL_PDU */
 
102
    "Missing variables in PDU", /* SNMPERR_NO_VARS */
 
103
    "Bad variable type",        /* SNMPERR_VAR_TYPE */
 
104
    "Out of memory (malloc failure)",   /* SNMPERR_MALLOC */
 
105
    "Kerberos related error",   /* SNMPERR_KRB5 */
 
106
};