Blame lib/error.c

Packit 022b05
/*
Packit 022b05
 * error.c --
Packit 022b05
 *
Packit 022b05
 *      Error handling routines.
Packit 022b05
 *
Packit 022b05
 * Copyright (c) 1999 Frank Strauss, Technical University of Braunschweig.
Packit 022b05
 *
Packit 022b05
 * See the file "COPYING" for information on usage and redistribution
Packit 022b05
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
Packit 022b05
 *
Packit 022b05
 * @(#) $Id: error.c 7734 2008-02-15 07:49:14Z schoenw $
Packit 022b05
 */
Packit 022b05
Packit 022b05
#include <config.h>
Packit 022b05
Packit 022b05
#include <string.h>
Packit 022b05
#include <stdio.h>
Packit 022b05
#include <stdarg.h>
Packit 022b05
#ifdef HAVE_UNISTD_H
Packit 022b05
#include <unistd.h>
Packit 022b05
#endif
Packit 022b05
Packit 022b05
#if defined(HAVE_WIN_H)
Packit 022b05
#include "win.h"
Packit 022b05
#endif
Packit 022b05
Packit 022b05
#include "smi.h"
Packit 022b05
#include "error.h"
Packit 022b05
#include "util.h"
Packit 022b05
Packit 022b05
#ifdef HAVE_DMALLOC_H
Packit 022b05
#include <dmalloc.h>
Packit 022b05
#endif
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 * Structure to hold error messages with their associated error level.
Packit 022b05
 * Note that it is possible to modify the error levels at run time.
Packit 022b05
 */
Packit 022b05
Packit 022b05
typedef struct Error {
Packit 022b05
    int level;			/* 0: fatal, no way to continue		     */
Packit 022b05
                 		/* 1: severe, changing semantics to continue */
Packit 022b05
				/*    must be corrected                      */
Packit 022b05
				/* 2: error, but able to continue,           */
Packit 022b05
				/*    should be corrected                    */
Packit 022b05
				/* 3: minor error, but should be corrected   */
Packit 022b05
				/* 4: change is recommended if possible      */
Packit 022b05
				/* 5: warning, but might totally correct     */
Packit 022b05
				/*    under some circumstances               */
Packit 022b05
				/* 6: just a notice                          */
Packit 022b05
                                /* 128+: flag to signal an ignored error msg */
Packit 022b05
    int id;			/* error id, used in error() invocation	     */
Packit 022b05
    char *tag;			/* tag for error identification on cmd line  */
Packit 022b05
    char *fmt;			/* the complete error format string	     */
Packit 022b05
    char *description;		/* text describing the error in more detail  */
Packit 022b05
} Error;
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 * Note: The Makefile produces a list of error macros for every `ERR...'
Packit 022b05
 * pattern in this file (error.c). This list is written to errormacros.h.
Packit 022b05
 */
Packit 022b05
Packit 022b05
static Error errors[] = {
Packit 022b05
    { 0, ERR_INTERNAL, "internal", 
Packit 022b05
      "internal error!",
Packit 022b05
      "An internal error occured in the libsmi core, which is not further\n"
Packit 022b05
      "specified. This is most likely not related to a bug in a MIB/PIB\n"
Packit 022b05
      "module or any unexpected circumstances of your system environment.\n"
Packit 022b05
      "Please submit a detailed bug report to the libsmi maintainer or the\n"
Packit 022b05
      "libsmi mailing list at <libsmi@ibr.cs.tu-bs.de>."},
Packit 022b05
    { 0, ERR_MAX_LEX_DEPTH, "import-depth", 
Packit 022b05
      "maximum IMPORTS nesting, probably a loop?",
Packit 022b05
      "A new parser instance is created whenever a module imports from\n"
Packit 022b05
      "another module that has not yet been parsed. This might lead to\n"
Packit 022b05
      "recursive creation of parser instances in case of recursive imports.\n"
Packit 022b05
      "The maximum depth of these recursive imports is limited (30).\n"
Packit 022b05
      "Usually this limit should never be reached. However, this error\n"
Packit 022b05
      "might occur when modules illegally import definitions in a loop."},
Packit 022b05
    { 0, ERR_OUT_OF_MEMORY, "internal-memory", 
Packit 022b05
      "out of memory",
Packit 022b05
      "Libsmi needs to allocate memory dynamically during runtime, but\n"
Packit 022b05
      "the system did run out of memory."},
Packit 022b05
    { 1, ERR_LEX_UNEXPECTED_CHAR, "lexical", 
Packit 022b05
      "lexically unexpected character, skipping to end of line", 
Packit 022b05
      "While parsing a MIB/PIB file a lexically unexpected character has\n"
Packit 022b05
      "been read, so that subsequent input is dropped up to the end of\n"
Packit 022b05
      "line. Note that MIBs and PIBs only allow 7-bit ASCII characters and\n"
Packit 022b05
      "no international characters at any place in the file (RFC 2578,\n"
Packit 022b05
      "Section 3.1.1)."},
Packit 022b05
    { 1, ERR_OTHER_ERROR, "internal-other", 
Packit 022b05
      "%s", 
Packit 022b05
      "An unspecified error occured. Please submit a detailed bug report\n"
Packit 022b05
      "to the libsmi maintainer or the libsmi mailing list at\n"
Packit 022b05
      "<libsmi@ibr.cs.tu-bs.de>."},
Packit 022b05
    { 1, ERR_ILLEGAL_KEYWORD, "keyword-illegal", 
Packit 022b05
      "illegal keyword `%s'", 
Packit 022b05
      "ASN.1 has some language keywords that are explicitly forbidden in\n"
Packit 022b05
      "MIB and PIB files. Such a keyword has been read from the current\n"
Packit 022b05
      "file (RFC 2578, Section 3.7)."},
Packit 022b05
    { 2, ERR_ID_ENDS_IN_HYPHEN, "hyphen-end",
Packit 022b05
      "identifier `%s' illegally ends in a hyphen", NULL},
Packit 022b05
    { 3, ERR_LEADING_ZEROS, "number-leading-zero",
Packit 022b05
      "leading zero(s) on a number",
Packit 022b05
      "A decimal number other than 0 must not start with a 0 digit. The\n"
Packit 022b05
      "value 0 must be represented as a single 0 digit."},
Packit 022b05
    { 2, ERR_NUMBER_TOO_LARGE, "number-range",
Packit 022b05
      "number `%s' too large",
Packit 022b05
      "The range of numerical values is restricted depending on the\n"
Packit 022b05
      "underlying base type and possibly further type refinements."},
Packit 022b05
    { 2, ERR_MODULENAME_64, "namelength-64-module",
Packit 022b05
      "module name `%s' must not be longer that 64 characters", NULL},
Packit 022b05
    { 128 + 4, ERR_MODULENAME_32, "namelength-32-module",
Packit 022b05
      "module name `%s' longer than 32 characters", NULL},
Packit 022b05
    { 2, ERR_TYPENAME_64, "namelength-64-type",
Packit 022b05
      "type name `%s' must not be longer that 64 characters", NULL},
Packit 022b05
    { 128 + 4, ERR_TYPENAME_32, "namelength-32-type",
Packit 022b05
      "type name `%s' longer than 32 characters", NULL},
Packit 022b05
    { 2, ERR_OIDNAME_64, "namelength-64-object",
Packit 022b05
      "object identifier name `%s' must not be longer that 64 characters", NULL},
Packit 022b05
    { 128 + 4, ERR_OIDNAME_32, "namelength-32-object",
Packit 022b05
      "object identifier name `%s' longer than 32 characters", NULL},
Packit 022b05
    { 2, ERR_ENUMNAME_64, "namelength-64-enumeration",
Packit 022b05
      "enumeration name `%s' must not be longer that 64 characters", NULL},
Packit 022b05
    { 128 + 4, ERR_ENUMNAME_32, "namelength-32-enumeration",
Packit 022b05
      "enumeration name `%s' longer than 32 characters", NULL},
Packit 022b05
    { 2, ERR_BITNAME_64, "namelength-64-bit",
Packit 022b05
      "bit name `%s' must not be longer than 64 characters", NULL},
Packit 022b05
    { 128 + 4, ERR_BITNAME_32, "namelength-32-bit",
Packit 022b05
      "bit name `%s' longer than 32 characters", NULL},
Packit 022b05
    { 2, ERR_UCIDENTIFIER_64, "namelength-64-uc-identifier",
Packit 022b05
      "uppercase identifier `%s' must not be longer than 64 characters", NULL},
Packit 022b05
    { 2, ERR_LCIDENTIFIER_64, "namelength-64-lc-identifier",
Packit 022b05
      "lowercase identifier `%s' must not be longer than 64 characters", NULL},
Packit 022b05
    { 2, ERR_TRAP_TYPE, "trap",
Packit 022b05
      "TRAP-TYPE macro is not allowed in SMIv2", NULL},
Packit 022b05
    { 2, ERR_TOO_MANY_MODULE_IDENTITIES, "module-identity-multiple",
Packit 022b05
      "more than one MODULE-IDENTITY clause in SMIv2 MIB", NULL},
Packit 022b05
    { 2, ERR_NO_MODULE_IDENTITY, "module-identity-missing",
Packit 022b05
      "missing MODULE-IDENTITY clause in SMIv2 MIB", NULL},
Packit 022b05
    { 2, ERR_OID_DEFVAL_TOO_LONG_SMIV2, "default-too-long-smiv2",
Packit 022b05
      "object identifier default values must be expressed as a single identifier", NULL},
Packit 022b05
    { 4, ERR_OID_DEFVAL_TOO_LONG_SMIV1, "default-too-long-smiv1",
Packit 022b05
      "object identifier default values in form of sub-identifier sequences are not implemented", NULL},
Packit 022b05
    { 2, ERR_INVALID_SMIV1_ACCESS, "access-invalid-smiv1", 
Packit 022b05
      "invalid access `%s' in SMIv1 MIB", NULL},
Packit 022b05
    { 2, ERR_INVALID_SMIV2_ACCESS, "access-invalid-smiv2",
Packit 022b05
      "invalid access `%s' in SMIv2 MIB", NULL},
Packit 022b05
    { 2, ERR_SMIV2_WRITE_ONLY, "access-write-only-smiv2", 
Packit 022b05
      "access `write-only' is no longer allowed in SMIv2", NULL},
Packit 022b05
    { 4, ERR_SMIV1_WRITE_ONLY, "access-write-only-smiv1", 
Packit 022b05
      "access `write-only' is not a good idea", NULL},
Packit 022b05
    { 2, ERR_INVALID_NOTIFICATION_VARIATION_ACCESS, "variation-access-notification", 
Packit 022b05
      "invalid access `%s' in a notification variation", NULL},
Packit 022b05
    { 2, ERR_INVALID_VARIATION_ACCESS, "variation-access", 
Packit 022b05
      "invalid access `%s' in a variation", NULL},
Packit 022b05
    { 2, ERR_NOTIFICATION_VARIATION_SYNTAX, "variation-syntax", 
Packit 022b05
      "SYNTAX is not allowed in a notification variation", NULL},
Packit 022b05
    { 2, ERR_NOTIFICATION_VARIATION_WRITESYNTAX, "variation-writesyntax", 
Packit 022b05
      "WRITE-SYNTAX is not allowed in a notification variation", NULL},
Packit 022b05
    { 2, ERR_DEFVAL_SYNTAX, "defval-syntax", 
Packit 022b05
      "default value syntax does not match object syntax", NULL},
Packit 022b05
    { 2, ERR_NOTIFICATION_VARIATION_DEFVAL, "variation-defval", 
Packit 022b05
      "default value is not allowed in a notification variation", NULL},
Packit 022b05
    { 2, ERR_NOTIFICATION_VARIATION_CREATION, "variation-creation", 
Packit 022b05
      "CREATION-REQUIRES is not allowed in a notification variation", NULL},
Packit 022b05
    { 3, ERR_MODULE_IDENTITY_NOT_FIRST, "module-identity-not-first", 
Packit 022b05
      "MODULE-IDENTITY clause must be the first declaration in a module", NULL},
Packit 022b05
    { 2, ERR_INVALID_SMIV1_STATUS, "status-invalid-smiv1", 
Packit 022b05
      "invalid status `%s' in SMIv1 MIB", NULL},
Packit 022b05
    { 2, ERR_INVALID_SMIV2_STATUS, "status-invalid-smiv2", 
Packit 022b05
      "invalid status `%s' in SMIv2 MIB", NULL},
Packit 022b05
    { 2, ERR_INVALID_CAPABILITIES_STATUS, "status-invalid-capabilities", 
Packit 022b05
      "invalid status `%s' in AGENT-CAPABILITIES macro", NULL},
Packit 022b05
    { 5, ERR_OIDNAME_INCLUDES_HYPHEN, "hyphen-in-object",
Packit 022b05
      "object identifier name `%s' should not include hyphens in SMIv2 MIB", NULL},
Packit 022b05
    { 2, ERR_ILLEGAL_CHAR_IN_STRING, "char-illegal-string", 
Packit 022b05
      "illegal character `%c' (0x%2x) in quoted string", NULL},
Packit 022b05
    { 2, ERR_BIN_STRING_MUL8, "stringlength-binary", 
Packit 022b05
      "length of binary string `%s' is not a multiple of 8", NULL},
Packit 022b05
    { 2, ERR_HEX_STRING_MUL2, "stringlength-hexadecimal", 
Packit 022b05
      "length of hexadecimal string `%s' is not a multiple of 2", NULL},
Packit 022b05
    { 5, ERR_FLUSH_DECLARATION, "internal-flushing", 
Packit 022b05
      "flushing recent incorrect declaration, see previous error(s)", NULL},
Packit 022b05
    { 2, ERR_MAX_ACCESS_IN_SMIV1, "maxaccess-in-smiv1", 
Packit 022b05
      "MAX-ACCESS is SMIv2 style, use ACCESS in SMIv1 MIBs instead", NULL},
Packit 022b05
    { 2, ERR_ACCESS_IN_SMIV2, "access-in-smiv2", 
Packit 022b05
      "ACCESS is SMIv1 style, use MAX-ACCESS in SMIv2 MIBs instead", NULL},
Packit 022b05
    { 1, ERR_MODULE_NOT_FOUND, "module-not-found", 
Packit 022b05
      "failed to locate MIB module `%s'", NULL},
Packit 022b05
    { 1, ERR_OPENING_INPUTFILE, "module-not-readable", 
Packit 022b05
      "%s: %s", NULL},
Packit 022b05
    { 1, ERR_ILLEGAL_INPUTFILE, "module-unknown-format", 
Packit 022b05
      "%s: unable to determine SMI version", NULL},
Packit 022b05
    { 1, ERR_UNKNOWN_OIDLABEL, "object-identifier-unknown", 
Packit 022b05
      "unknown object identifier label `%s'", NULL},
Packit 022b05
    { 5, ERR_OIDLABEL_CHANGED, "object-identifier-label-not-matching", 
Packit 022b05
      "label `%s' does not match previous label `%s' for same object identifier", NULL},
Packit 022b05
    { 5, ERR_IDENTIFIER_OID_CHANGED, "object-identifier-oid-not-matching", 
Packit 022b05
      "object identifier for label `%s' does not match previous label usage", NULL},
Packit 022b05
    { 2, ERR_EXISTENT_OBJECT, "object-identifier-redefined", 
Packit 022b05
      "an object named `%s' already exists", NULL},
Packit 022b05
    { 2, ERR_IDENTIFIER_NOT_IN_MODULE, "import-failed", 
Packit 022b05
      "identifier `%s' cannot be imported from module `%s'", NULL},
Packit 022b05
    { 1, ERR_MACRO, "macro-not-allowed", 
Packit 022b05
      "MACRO definitions are only allowed in SMI base modules", NULL},
Packit 022b05
    { 1, ERR_CHOICE, "choice-not-allowed", 
Packit 022b05
      "CHOICE type definitions are only allowed in SMI base modules", NULL},
Packit 022b05
    { 1, ERR_TYPE_SMI_OR_SPPI, "type-not-allowed", 
Packit 022b05
      "type `%s' may only be defined in SMI/SPPI base modules", NULL},
Packit 022b05
    { 1, ERR_TYPE_SPPI, "type-not-allowed-sppi", 
Packit 022b05
      "type `%s' may only be defined in SPPI base modules", NULL},
Packit 022b05
    { 1, ERR_TYPE_TAG, "tagged-type-not-allowed", 
Packit 022b05
      "tagged or IMPLICIT types may only be defined in SMI base modules", NULL},
Packit 022b05
    { 1, ERR_EXPORTS, "export-not-allowed", 
Packit 022b05
      "EXPORTS are only allowed in SMIv1 base modules", NULL},
Packit 022b05
    { 1, ERR_ILLEGALLY_QUALIFIED, "object-identifier-qualified", 
Packit 022b05
      "illegally qualified object identifier label `%s'", NULL},
Packit 022b05
    { 2, ERR_MISSING_DESCRIPTION, "description-missing", 
Packit 022b05
      "description missing in object definition", NULL},
Packit 022b05
    { 2, ERR_OIDLABEL_NOT_FIRST, "object-identifier-not-prefix", 
Packit 022b05
      "Object identifier element `%s' name only allowed as first element", NULL},
Packit 022b05
    { 2, ERR_UNKNOWN_TYPE, "type-unknown", 
Packit 022b05
      "unknown type `%s'", NULL},
Packit 022b05
    { 2, ERR_UNKNOWN_CLASS, "class-unknown", 
Packit 022b05
      "unknown class `%s'", NULL},
Packit 022b05
    { 2, ERR_UNKNOWN_TYPE_OR_CLASS, "type-or-class-unknown", 
Packit 022b05
      "unknown type or class `%s' in attribute statement", NULL},
Packit 022b05
    { 2, ERR_ATTRIBUTE_CLASS_ACCESS, "class-refference-access-statement", 
Packit 022b05
      "attribute `%s' refferences class and must not have access statement", NULL},
Packit 022b05
    { 2, ERR_ATTRIBUTE_MISSING_ACCESS, "type-refference-missing-access-statement", 
Packit 022b05
      "attribute `%s' refferences type and must have access statement", NULL},
Packit 022b05
    { 2, ERR_ATTRIBUTE_CLASS_DEFAULT, "class-refference-default-statement", 
Packit 022b05
      "attribute `%s' refferences class and must not have default statement", NULL},
Packit 022b05
    { 2, ERR_ATTRIBUTE_CLASS_FORMAT, "class-refference-format-statement", 
Packit 022b05
      "attribute `%s' refferences class and must not have format statement", NULL},
Packit 022b05
    { 2, ERR_ATTRIBUTE_CLASS_UNITS, "class-refference-unit-statement", 
Packit 022b05
      "attribute `%s' refferences class and must not have units statement", NULL},
Packit 022b05
    { 2, ERR_DUPLICATE_TYPE_NAME, "duplicate-type-name", 
Packit 022b05
      "type name `%s' already used in this module", NULL},
Packit 022b05
    { 2, ERR_ATTRIBUTE_NOT_FOUND, "unknown-attribute-name", 
Packit 022b05
      "attribute name `%s' is not defined in this class", NULL},
Packit 022b05
    { 2, ERR_DUPLICATE_ATTRIBUTE_NAME, "duplicate-attribute-name", 
Packit 022b05
      "attribute name `%s' already used in this class", NULL},
Packit 022b05
    { 2, ERR_DUPLICATE_CLASS_NAME, "duplicate-class-name", 
Packit 022b05
      "class name `%s' already used in this module", NULL},
Packit 022b05
    { 2, ERR_ILLEGAL_RANGE_FOR_COUNTER, "counter-range-illegal", 
Packit 022b05
      "illegal range restriction for counter type `%s'", NULL},
Packit 022b05
    { 2, ERR_ILLEGAL_RANGE_FOR_PARENT_TYPE, "range-illegal", 
Packit 022b05
      "illegal range restriction for non-numerical parent type `%s'", NULL},
Packit 022b05
    { 2, ERR_ILLEGAL_SIZE_FOR_PARENT_TYPE, "size-illegal", 
Packit 022b05
      "illegal size restriction for non-octet-string parent type `%s'", NULL},
Packit 022b05
    { 2, ERR_ILLEGAL_ENUM_FOR_PARENT_TYPE, "enum-illegal", 
Packit 022b05
      "illegal enumeration or bits restriction for non-enumeration-or-bits parent type `%s'", NULL},
Packit 022b05
    { 1, ERR_SMIV2_SIGNED_NUMBER_RANGE, "out-of-range-signed", 
Packit 022b05
      "number `%s' is out of SMIv1/SMIv2 signed number range", NULL},
Packit 022b05
    { 1, ERR_SMIV2_UNSIGNED_NUMBER_RANGE, "out-of-range-unsigned", 
Packit 022b05
      "number `%s' is out of SMIv1/SMIv2 unsigned number range", NULL},
Packit 022b05
    { 1, ERR_INTEGER32_TOO_LARGE, "out-of-range-integer32", 
Packit 022b05
      "Integer32 value `%u' is too large", NULL},
Packit 022b05
    { 1, ERR_UNEXPECTED_VALUETYPE, "type-not-matching", 
Packit 022b05
      "type of value does not match declaration", NULL},
Packit 022b05
    { 1, ERR_FLOAT_OVERFLOW, "under-or-overflow-float", 
Packit 022b05
      "float value `%s' cannot be stored as it causes over or underflow", NULL},
Packit 022b05
    { 1, ERR_SMI_NOT_SUPPORTED, "smi-not-supported", 
Packit 022b05
      "file `%s' seems to be SMIv1 or SMIv2 which is not supported", NULL},
Packit 022b05
    { 1, ERR_SMING_NOT_SUPPORTED, "sming-not-supported", 
Packit 022b05
      "file `%s' seems to be SMIng which is not supported", NULL},
Packit 022b05
    { 5, ERR_UNUSED_IMPORT, "import-unused", 
Packit 022b05
      "identifier `%s' imported from module `%s' is never used", NULL},
Packit 022b05
    { 2, ERR_MACRO_NOT_IMPORTED, "macro-not-imported", 
Packit 022b05
      "macro `%s' has not been imported from module `%s'", NULL},
Packit 022b05
    { 5, ERR_IMPLICIT_NODE, "node-implicit", 
Packit 022b05
      "implicit node definition", NULL},
Packit 022b05
    { 3, ERR_SCALAR_READCREATE, "scalar-not-creatable", 
Packit 022b05
      "scalar object must not have a `read-create' access value", NULL},
Packit 022b05
    { 4, ERR_NAMEDNUMBER_INCLUDES_HYPHEN, "hyphen-in-label", 
Packit 022b05
      "named number `%s' must not include a hyphen in SMIv2", NULL},
Packit 022b05
    { 4, ERR_NAMEDBIT_INCLUDES_HYPHEN, "hyphen-in-label", 
Packit 022b05
      "named bit `%s' must not include a hyphen in SMIv2", NULL},
Packit 022b05
    { 2, ERR_REDEFINITION, "identifier-redefined", 
Packit 022b05
      "redefinition of identifier `%s'", NULL},
Packit 022b05
    { 5, ERR_EXT_REDEFINITION, "identifier-external-redefined", 
Packit 022b05
      "redefinition of identifier `%s::%s'", NULL},
Packit 022b05
    { 5, ERR_CASE_REDEFINITION, "identifier-case-match", 
Packit 022b05
      "identifier `%s' differs from `%s' only in case", NULL},
Packit 022b05
    { 5, ERR_EXT_CASE_REDEFINITION, "identifier-external-case-match", 
Packit 022b05
      "identifier `%s' differs from `%s::%s' only in case", NULL},
Packit 022b05
    { 5, ERR_BASETYPE_REDEFINITION, "identifier-basetype-redefined", 
Packit 022b05
      "definition of identifier `%s' which is already a SMI or SPPI basetype", NULL},
Packit 022b05
    { 6, ERR_PREVIOUS_DEFINITION, "previous-definition",
Packit 022b05
      "previous definition of `%s'", NULL},
Packit 022b05
    { 2, ERR_INVALID_FORMAT, "invalid-format", 
Packit 022b05
      "invalid format specification `%s'", NULL},
Packit 022b05
    { 3, ERR_REFINEMENT_ALREADY_EXISTS, "refinement-exists", 
Packit 022b05
      "refinement for `%s' already exists in this compliance statement", NULL},
Packit 022b05
    { 3, ERR_OPTIONALGROUP_ALREADY_EXISTS, "optional-group-exists", 
Packit 022b05
      "optional group definition for `%s' already exists in this compliance statement", NULL},
Packit 022b05
    { 2, ERR_UNEXPECTED_TYPE_RESTRICTION, "subtype-illegal", 
Packit 022b05
      "subtyping not allowed",
Packit 022b05
      "The types OBJECT IDENTIFIER, IpAddress, Counter32, Counter64,\n"
Packit 022b05
      "and TimeTicks, and any types in a SEQUENCE clause must not be\n"
Packit 022b05
      "sub-typed (RFC 2578, Sections 7.1.12 and 9)."},
Packit 022b05
    { 1, ERR_UNKNOWN_CONFIG_CMD, "config-command-unknown", 
Packit 022b05
      "unknown configuration command `%s' in file `%s'", NULL},
Packit 022b05
    { 6, ERR_CACHE_CONFIG_NOT_SUPPORTED, "config-caching-not-supported", 
Packit 022b05
      "module caching is not supported though configured in file `%s'", NULL},
Packit 022b05
    { 4, ERR_SMIV2_OPAQUE_OBSOLETE, "opaque-smiv2", 
Packit 022b05
      "SMIv2 provides Opaque solely for backward-compatibility", NULL},
Packit 022b05
    { 4, ERR_SPPI_OPAQUE_OBSOLETE, "opaque-sppi", 
Packit 022b05
      "SPPI provides Opaque solely for backward-compatibility", NULL},
Packit 022b05
    { 2, ERR_DATE_CHARACTER, "date-character", 
Packit 022b05
      "date specification `%s' contains an illegal character", NULL},
Packit 022b05
    { 2, ERR_DATE_LENGTH, "date-length", 
Packit 022b05
      "date specification `%s' has an illegal length", NULL},
Packit 022b05
    { 2, ERR_DATE_VALUE, "date-value", 
Packit 022b05
      "date specification `%s' contains an illegal value", NULL},
Packit 022b05
    { 5, ERR_DATE_YEAR_2DIGITS, "date-year-2digits", 
Packit 022b05
      "date specification `%s' contains a two-digit year representing `%d'", NULL},
Packit 022b05
    { 2, ERR_DATE_YEAR, "date-year", 
Packit 022b05
      "date specification `%s' contains an illegal year", NULL},
Packit 022b05
    { 2, ERR_DATE_MONTH, "date-month", 
Packit 022b05
      "date specification `%s' contains an illegal month", NULL},
Packit 022b05
    { 2, ERR_DATE_DAY, "date-day", 
Packit 022b05
      "date specification `%s' contains an illegal day", NULL},
Packit 022b05
    { 2, ERR_DATE_HOUR, "date-hour", 
Packit 022b05
      "date specification `%s' contains an illegal hour", NULL},
Packit 022b05
    { 2, ERR_DATE_MINUTES, "date-minutes", 
Packit 022b05
      "date specification `%s' contains illegal minutes", NULL},
Packit 022b05
    { 4, ERR_DATE_IN_FUTURE, "date-in-future", 
Packit 022b05
      "date specification `%s' is in the future", NULL},
Packit 022b05
    { 4, ERR_DATE_IN_PAST, "date-in-past", 
Packit 022b05
      "date specification `%s' predates the SMI standard", NULL},
Packit 022b05
    { 3, ERR_REVISION_NOT_DESCENDING, "revision-not-descending", 
Packit 022b05
      "revision not in reverse chronological order", NULL},
Packit 022b05
    { 3, ERR_REVISION_MISSING, "revision-missing", 
Packit 022b05
      "revision for last update is missing", NULL},
Packit 022b05
    { 3, ERR_REVISION_AFTER_LAST_UPDATE, "revision-after-update", 
Packit 022b05
      "revision date after last update", NULL},
Packit 022b05
    { 5, ERR_INTEGER_IN_SMIV2, "integer-misuse", 
Packit 022b05
      "use Integer32 instead of INTEGER in SMIv2", NULL},
Packit 022b05
    { 5, ERR_MODULE_ALREADY_LOADED, "module-already-loaded", 
Packit 022b05
      "module `%s' is already loaded, aborting parser on this file", NULL},
Packit 022b05
    { 5, ERR_IDENTITY_PARENT_NOT_FOUND, "sming-identity-parent-not-found", 
Packit 022b05
      "sming identity parent `%s' could not be found, or is forward reference", NULL},
Packit 022b05
    { 2, ERR_SMIV2_BASETYPE_NOT_IMPORTED, "basetype-not-imported", 
Packit 022b05
      "SMIv2 base type `%s' must be imported from SNMPv2-SMI", NULL},
Packit 022b05
    { 2, ERR_BASETYPE_UNKNOWN, "basetype-unknown", 
Packit 022b05
      "type `%s' of node `%s' does not resolve to a known base type", NULL},
Packit 022b05
    { 2, ERR_ROW_SUBID_ONE, "row-node-subidentifier-one", 
Packit 022b05
      "subidentifier of row node `%s' must be 1", NULL},
Packit 022b05
    { 5, ERR_ROWNAME_ENTRY, "row-name-entry", 
Packit 022b05
      "row identifier `%s' should match `*Entry'", NULL},
Packit 022b05
    { 5, ERR_TABLENAME_TABLE, "table-name-table", 
Packit 022b05
      "table identifier `%s' should match `*Table'", NULL},
Packit 022b05
    { 5, ERR_ROWNAME_TABLENAME, "row-name-table-name",
Packit 022b05
      "row identifier `%s' should have the same prefix as table identifier `%s'", NULL},
Packit 022b05
    { 5, ERR_SMIV2_TYPE_ASSIGNEMENT, "type-assignement-smiv2", 
Packit 022b05
      "type assignement `%s' should be a textual convention in SMIv2", NULL},
Packit 022b05
    { 5, ERR_ILLEGAL_IMPORT, "import-illegal", 
Packit 022b05
      "identifier `%s' may not be imported from module `%s'", NULL},
Packit 022b05
    { 3, ERR_SMIV2_NESTED_TEXTUAL_CONVENTION, "textual-convention-nested", 
Packit 022b05
      "textual convention `%s' can not be derived from the textual convention `%s'", NULL},
Packit 022b05
    { 3, ERR_TABLE_ACCESS, "access-table-illegal", 
Packit 022b05
      "table node `%s' must be `not-accessible'", NULL},
Packit 022b05
    { 3, ERR_ROW_ACCESS, "access-row-illegal", 
Packit 022b05
      "row node `%s' must be `not-accessible'", NULL},
Packit 022b05
    { 4, ERR_COUNTER_ACCESS, "access-counter-illegal", 
Packit 022b05
      "counter object `%s' must be `read-only' or `accessible-for-notify'", NULL},
Packit 022b05
    { 2, ERR_ENUM_SUBTYPE_OF, "subtype-enumeration-illegal", 
Packit 022b05
      "named number `%s(%d)' illegal in sub-type of `%s'", NULL},
Packit 022b05
    { 2, ERR_BITS_SUBTYPE_OF, "subtype-bits-illegal", 
Packit 022b05
      "named number `%s' illegal in sub-type of `%s'", NULL},
Packit 022b05
    { 2, ERR_ENUM_SUBTYPE, "subtype-enumeration-illegal", 
Packit 022b05
      "named number `%s(%d)' illegal in sub-type", NULL},
Packit 022b05
    { 2, ERR_BITS_SUBTYPE, "subtype-bits-illegal", 
Packit 022b05
      "named number `%s' illegal in sub-type", NULL},
Packit 022b05
    { 2, ERR_ENUM_NAME_REDEFINITION, "enum-name-redefinition", 
Packit 022b05
      "redefinition of name `%s' in number enumeration", NULL},
Packit 022b05
    { 2, ERR_ENUM_NUMBER_REDEFINITION, "enum-number-redefinition", 
Packit 022b05
      "redefinition of number `%d' in number enumeration", NULL},
Packit 022b05
    { 2, ERR_ENUM_NAME_NOT_DEFINED, "enum-name-not-defined", 
Packit 022b05
      "enumeration name `%s' not defined in this scope ", NULL},
Packit 022b05
    { 2, ERR_ENUM_ZERO, "enum-zero", 
Packit 022b05
      "number enumeration contains zero value in SMIv1 MIB", NULL},
Packit 022b05
    { 2, ERR_BITS_NAME_REDEFINITION, "bits-name-redefinition", 
Packit 022b05
      "redefinition of name `%s' in named bits list", NULL},
Packit 022b05
    { 2, ERR_BITS_NUMBER_REDEFINITION, "bits-number-redefinition", 
Packit 022b05
      "redefinition of number `%u' in named bits list", NULL},
Packit 022b05
    { 2, ERR_BITS_NUMBER_NEGATIVE, "bits-number-negative", 
Packit 022b05
      "there is negative number in bits definition", NULL},
Packit 022b05
    { 2, ERR_BITS_NUMBER_TOO_LARGE, "bits-number-too-large", 
Packit 022b05
      "named bit `%s(%u)' exceeds maximum bit position", NULL},
Packit 022b05
    { 4, ERR_BITS_NUMBER_LARGE, "bits-number-large", 
Packit 022b05
      "named bit `%s(%u)' may cause interoperability or implementation problems", NULL},
Packit 022b05
    { 4, ERR_BITS_ZERO_NOT_NAMED, "bits-zero-not-used",
Packit 022b05
      "first bit (bit zero) has no name assigned",
Packit 022b05
      "Named bits should start at bit position zero (RFC 2578,\n"
Packit 022b05
      "Section 7.1.4)."},
Packit 022b05
    { 2, ERR_RANGE_OUT_OF_BASETYPE, "range-bounds",
Packit 022b05
      "range limit exceeds underlying basetype", NULL},
Packit 022b05
    { 2, ERR_RANGE_OVERLAP, "range-overlap",
Packit 022b05
      "overlapping range limits", NULL},
Packit 022b05
    { 5, ERR_RANGES_NOT_ASCENDING, "range-ascending",
Packit 022b05
      "ranges not in ascending order", NULL},
Packit 022b05
    { 5, ERR_NAMED_NUMBERS_NOT_ASCENDING, "named-numbers-ascending",
Packit 022b05
      "named numbers not in ascending order", NULL},
Packit 022b05
    { 2, ERR_EXCHANGED_RANGE_LIMITS, "range-exchanged",
Packit 022b05
      "range limits must be `lower-bound .. upper-bound'", NULL},
Packit 022b05
    { 1, ERR_INDEX_BASETYPE, "index-illegal-basetype", 
Packit 022b05
      "illegal base type `%s' in index element `%s' of row %s", NULL},
Packit 022b05
    { 5, ERR_INDEX_TOO_LARGE, "index-exceeds-too-large", 
Packit 022b05
      "index of row `%s' can exceed OID size limit by %d subidentifier(s)", NULL},
Packit 022b05
    { 2, ERR_INDEX_NO_RANGE, "index-element-no-range",
Packit 022b05
      "index element `%s' of row `%s' must have a range restriction", NULL},
Packit 022b05
    { 2, ERR_INDEX_NO_RANGE_MOD, "index-element-no-range",
Packit 022b05
      "index element `%s::%s' of row `%s' must have a range restriction", NULL},
Packit 022b05
    { 3, ERR_INDEX_STRING_NO_SIZE, "index-element-no-size",
Packit 022b05
      "index element `%s' of row `%s' must have a size restriction",
Packit 022b05
      "Object identifiers are restricted in size to have at most 128\n"
Packit 022b05
      "sub-identifiers. This implies that index elements used to form\n"
Packit 022b05
      "instance identifiers must have a size contraint which ensures\n"
Packit 022b05
      "that the 128 sub-identifier constraint is kept intact for any\n"
Packit 022b05
      "possible combination of the index elements' values (RFC 2578,\n"
Packit 022b05
      "Section 3.5)."},
Packit 022b05
    { 3, ERR_INDEX_STRING_NO_SIZE_MOD, "index-element-no-size",
Packit 022b05
      "index element `%s::%s' of row `%s' must have a size restriction",
Packit 022b05
      "Object identifiers are restricted in size to have at most 128\n"
Packit 022b05
      "sub-identifiers. This implies that index elements used to form\n"
Packit 022b05
      "instance identifiers must have a size contraint which ensures\n"
Packit 022b05
      "that the 128 sub-identifier constraint is kept intact for any\n"
Packit 022b05
      "possible combination of the index elements' values (RFC 2578,\n"
Packit 022b05
      "Section 3.5)."},
Packit 022b05
    { 3, ERR_INDEX_OID_NO_SIZE, "index-element-no-size",
Packit 022b05
      "index element `%s' of row `%s' should but cannot have a size restriction",
Packit 022b05
      "Object identifiers are restricted in size to have at most 128\n"
Packit 022b05
      "sub-identifiers. This implies that all index elements used to form\n"
Packit 022b05
      "instance identifiers should have a size contraint which ensures\n"
Packit 022b05
      "that the 128 sub-identifier constraint is kept intact for any\n"
Packit 022b05
      "possible combination of the index elements' values (RFC 2578,\n"
Packit 022b05
      "Section 3.5). However the type OBJECT IDENTIFIER cannot formally\n"
Packit 022b05
      "be restricted in size (Section 9) although it is legal to use\n"
Packit 022b05
      "objects of type OBJECT IDENTIFIER as index elements."},
Packit 022b05
    { 6, ERR_INDEX_OID_NO_SIZE_MOD, "index-element-no-size",
Packit 022b05
      "index element `%s::%s' of row `%s' should but cannot have a size restriction",
Packit 022b05
      "Object identifiers are restricted in size to have at most 128\n"
Packit 022b05
      "sub-identifiers. This implies that all index elements used to form\n"
Packit 022b05
      "instance identifiers should have a size contraint which ensures\n"
Packit 022b05
      "that the 128 sub-identifier constraint is kept intact for any\n"
Packit 022b05
      "possible combination of the index elements' values (RFC 2578,\n"
Packit 022b05
      "Section 3.5). However the type OBJECT IDENTIFIER cannot formally\n"
Packit 022b05
      "be restricted in size (Section 9) although it is legal to use\n"
Packit 022b05
      "objects of type OBJECT IDENTIFIER as index elements."},
Packit 022b05
    { 1, ERR_INDEX_RANGE_NEGATIVE, "index-element-range-negative",
Packit 022b05
      "range restriction of index element `%s' of row `%s' must be non-negative", NULL},
Packit 022b05
    { 1, ERR_INDEX_ENUM_NEGATIVE, "index-element-enum-negative",
Packit 022b05
      "enumerations of index element `%s' of row `%s' must be non-negative", NULL},
Packit 022b05
    { 5, ERR_INDEX_NOT_COLUMN, "index-element-not-column",
Packit 022b05
      "index element `%s' of row `%s' must be a column", NULL},
Packit 022b05
    { 2, ERR_AUGMENT_NESTED, "augment-nested",
Packit 022b05
      "row `%s' augments `%s' which is not a base table row", NULL},
Packit 022b05
    { 2, ERR_AUGMENT_NO_ROW, "augment-no-row",
Packit 022b05
      "row `%s' augments or extends `%s' which is not a row", NULL},
Packit 022b05
    { 4, ERR_NODE_NOT_IN_GROUP, "group-membership",
Packit 022b05
      "node `%s' must be contained in at least one conformance group", NULL},
Packit 022b05
    { 4, ERR_NOTIFICATION_NOT_IN_GROUP, "group-membership",
Packit 022b05
      "notification `%s' must be contained in at least one conformance group", NULL},
Packit 022b05
    { 3, ERR_INVALID_GROUP_MEMBER, "group-member-invalid",
Packit 022b05
      "node `%s' is an invalid member of group `%s'", NULL},
Packit 022b05
    { 3, ERR_MIXED_GROUP_MEMBERS, "group-member-mixed",
Packit 022b05
      "group `%s' contains scalars/columns and notifications", NULL},
Packit 022b05
    { 2, ERR_BAD_LOWER_IDENTIFIER_CASE, "bad-identifier-case",
Packit 022b05
      "`%s' should start with a lower case letter", NULL},
Packit 022b05
    { 2, ERR_UNDERSCORE_IN_IDENTIFIER, "underscore-in-identifier",
Packit 022b05
      "identifier `%s' must not contain an underscore", NULL},
Packit 022b05
    { 5, ERR_OID_REUSE, "oid-reuse",
Packit 022b05
      "identifier `%s' reuses object identifier assigned to identifier `%s'", NULL},
Packit 022b05
    { 1, ERR_OID_REGISTERED, "oid-registered",
Packit 022b05
      "identifier `%s' registers object identifier already registered by `%s'", NULL},
Packit 022b05
    { 1, ERR_OID_RECURSIVE, "oid-recursive",
Packit 022b05
      "object identifier `%s' defined recursively or too long", NULL},
Packit 022b05
    { 5, ERR_COMMENT_TERMINATES, "comment-terminates",
Packit 022b05
      "note, -- terminates a comment", NULL},
Packit 022b05
    { 5, ERR_OBSOLETE_IMPORT, "obsolete-import",
Packit 022b05
      "identifier `%s' should be imported from `%s' instead of `%s'", NULL},
Packit 022b05
    { 4, ERR_GROUP_OBJECT_STATUS, "group-object-status",
Packit 022b05
      "%s group `%s' includes %s object `%s'", NULL},
Packit 022b05
    { 4, ERR_COMPLIANCE_GROUP_STATUS, "compliance-group-status",
Packit 022b05
      "%s compliance statement `%s' includes %s group `%s'", NULL},
Packit 022b05
    { 4, ERR_COMPLIANCE_OBJECT_STATUS, "compliance-object-status",
Packit 022b05
      "%s compliance statement `%s' includes %s object `%s'", NULL},
Packit 022b05
    { 5, ERR_GROUP_UNREF, "group-unref",
Packit 022b05
      "%s group `%s' is not referenced in this module", NULL},
Packit 022b05
    { 5, ERR_TYPE_UNREF, "type-unref",
Packit 022b05
      "%s type `%s' is not referenced in this module", NULL},
Packit 022b05
    { 5, ERR_SEQUENCE_ORDER, "sequence-order", 
Packit 022b05
      "SEQUENCE element #%d `%s' does not match order of columnar objects under `%s'", NULL},
Packit 022b05
    { 3, ERR_SEQUENCE_NO_COLUMN, "sequence-no-column", 
Packit 022b05
      "SEQUENCE element #%d `%s' is not a child node under `%s'", NULL},
Packit 022b05
    { 3, ERR_SEQUENCE_MISSING_COLUMN, "sequence-missing-column", 
Packit 022b05
      "SEQUENCE of `%s' is missing columnar object `%s'", NULL},
Packit 022b05
    { 4, ERR_ILLEGAL_ROWSTATUS_DEFAULT, "rowstatus-default", 
Packit 022b05
      "illegal `RowStatus' default value `%s'", NULL},
Packit 022b05
    { 4, ERR_ILLEGAL_ROWSTATUS_ACCESS, "rowstatus-access", 
Packit 022b05
      "illegal `RowStatus' access value", NULL},
Packit 022b05
    { 4, ERR_ILLEGAL_STORAGETYPE_DEFAULT, "storagetype-default", 
Packit 022b05
      "illegal `StorageType' default value `%s'", NULL},
Packit 022b05
    { 2, ERR_DEFVAL_OUT_OF_BASETYPE, "defval-basetype", 
Packit 022b05
      "default value exceeds range of underlying basetype", NULL},
Packit 022b05
    { 2, ERR_DEFVAL_OUT_OF_RANGE, "defval-range", 
Packit 022b05
      "default value does not match range restriction of underlying type", NULL},
Packit 022b05
    { 2, ERR_DEFVAL_OUT_OF_ENUM, "defval-enum", 
Packit 022b05
      "default value does not match underlying enumeration type", NULL},
Packit 022b05
    { 5, ERR_TADDRESS_WITHOUT_TDOMAIN, "taddress-tdomain", 
Packit 022b05
      "`TAddress' object should have an accompanied `TDomain' object", NULL},
Packit 022b05
    { 5, ERR_INETADDRESS_WITHOUT_TYPE, "inetaddress-inetaddresstype", 
Packit 022b05
      "`InetAddress' object should have an accompanied preceding `InetAdressType' object", NULL},
Packit 022b05
    { 5, ERR_INETADDRESSTYPE_SUBTYPED, "inetaddresstype-subtyped", 
Packit 022b05
      "`InetAddressType' should not be subtyped", NULL},
Packit 022b05
    { 5, ERR_INETADDRESS_SPECIFIC, "inetaddress-specific", 
Packit 022b05
      "`InetAddress' should be used instead of `%s'", NULL},
Packit 022b05
    { 5, ERR_TRANSPORTADDRESS_WITHOUT_TYPE, "transportaddress-transportaddresstype", 
Packit 022b05
      "`TransportAddress' object should have an accompanied preceding `TransportAdressType' or `TransportDomain' object", NULL},
Packit 022b05
    { 5, ERR_TRANSPORTADDRESSTYPE_SUBTYPED, "transportaddresstype-subtyped", 
Packit 022b05
      "`TransportAddressType' should not be subtyped", NULL},
Packit 022b05
    { 5, ERR_TRANSPORTADDRESS_SPECIFIC, "transportaddress-specific", 
Packit 022b05
      "`TransportAddress' should be used instead of `%s'", NULL},
Packit 022b05
    { 3, ERR_NOTIFICATION_OBJECT_TYPE, "notification-object-type", 
Packit 022b05
      "object `%s' of notification `%s' must be a scalar or column", NULL},
Packit 022b05
    { 3, ERR_NOTIFICATION_OBJECT_ACCESS, "notification-object-access", 
Packit 022b05
      "object `%s' of notification `%s' must not be `not-accessible'", NULL},
Packit 022b05
    { 5, ERR_NOTIFICATION_OBJECT_MIX, "notification-object-mix", 
Packit 022b05
      "notification `%s' contains objects from multiple tables/groups", NULL},
Packit 022b05
    { 5, ERR_EMPTY_DESCRIPTION, "empty-description",
Packit 022b05
      "zero-length description string", NULL},
Packit 022b05
    { 5, ERR_EMPTY_REFERENCE, "empty-reference",
Packit 022b05
      "zero-length reference string", NULL},
Packit 022b05
    { 5, ERR_EMPTY_ORGANIZATION, "empty-organization",
Packit 022b05
      "zero-length organization string", NULL},
Packit 022b05
    { 5, ERR_EMPTY_CONTACT, "empty-contact",
Packit 022b05
      "zero-length contact string", NULL},
Packit 022b05
    { 5, ERR_EMPTY_FORMAT, "empty-format",
Packit 022b05
      "zero-length format string", NULL},
Packit 022b05
    { 5, ERR_EMPTY_UNITS, "empty-units",
Packit 022b05
      "zero-length units string", NULL},
Packit 022b05
    { 5, ERR_INDEX_DEFVAL, "index-element-has-default",
Packit 022b05
      "index element `%s' of row `%s' has a default value", NULL},
Packit 022b05
    { 2, ERR_SEQUENCE_TYPE_MISMATCH, "sequence-type-mismatch",
Packit 022b05
      "type of `%s' in sequence and object type definition do not match", NULL},
Packit 022b05
    { 5, ERR_INDEX_ACCESSIBLE, "index-element-accessible",
Packit 022b05
      "index element `%s' of row `%s' should be not-accessible in SMIv2 MIB", NULL},
Packit 022b05
    { 5, ERR_INDEX_NON_ACCESSIBLE, "index-element-not-accessible",
Packit 022b05
      "exactly one index element of row `%s' must be accessible", NULL},
Packit 022b05
    { 3, ERR_REFINEMENT_NOT_LISTED, "refinement-not-listed",
Packit 022b05
      "refined object `%s' not listed in a mandatory or optional group", NULL},
Packit 022b05
    { 5, ERR_NOTIFICATION_NOT_REVERSIBLE, "notification-not-reversible",
Packit 022b05
      "notification `%s' is not reverse mappable", NULL},
Packit 022b05
    { 5, ERR_NOTIFICATION_ID_TOO_LARGE, "notification-id-too-large",
Packit 022b05
      "last sub-identifier of notification `%s' too large", NULL},
Packit 022b05
    { 2, ERR_NODE_PARENT_TYPE, "parent-node",
Packit 022b05
      "node's parent node must be simple node", NULL},
Packit 022b05
    { 2, ERR_SCALAR_PARENT_TYPE, "parent-scalar",
Packit 022b05
      "scalar's parent node must be simple node", NULL},
Packit 022b05
    { 2, ERR_TABLE_PARENT_TYPE, "parent-table",
Packit 022b05
      "table's parent node must be simple node", NULL},
Packit 022b05
    { 2, ERR_TABLE_ROW_TYPE_MISMATCH, "table-type",
Packit 022b05
      "table's SEQUENCE OF type does not match row type", NULL},
Packit 022b05
    { 2, ERR_ROW_PARENT_TYPE, "parent-row",
Packit 022b05
      "row's parent node must be a table node", NULL},
Packit 022b05
    { 2, ERR_COLUMN_PARENT_TYPE, "parent-column",
Packit 022b05
      "columnar object's parent node must be a row", NULL},
Packit 022b05
    { 2, ERR_NOTIFICATION_PARENT_TYPE, "parent-notification",
Packit 022b05
      "notifications's parent node must be a simple node", NULL},
Packit 022b05
    { 2, ERR_GROUP_PARENT_TYPE, "parent-group",
Packit 022b05
      "group's parent node must be a simple node", NULL},
Packit 022b05
    { 2, ERR_COMPLIANCE_PARENT_TYPE, "parent-compliance",
Packit 022b05
      "compliance's parent node must be a simple node", NULL},
Packit 022b05
    { 2, ERR_CAPABILITIES_PARENT_TYPE, "parent-capabilities",
Packit 022b05
      "capabilities' parent node must be a simple node", NULL},
Packit 022b05
    { 1, ERR_SPPI_SIGNED64_NUMBER_RANGE, "out-of-range-signed64", 
Packit 022b05
      "number `%s' is out of range for SPPI 64bit signed numbers", NULL},
Packit 022b05
    { 1, ERR_SPPI_UNSIGNED64_NUMBER_RANGE, "out-of-range-unsigned64", 
Packit 022b05
      "number `%s' is out of range for SPPI 64bit unsigned numbers", NULL},
Packit 022b05
    { 1, ERR_SMI_CONSTRUCT_IN_PIB, "keyword-illegal-in-pib", 
Packit 022b05
      "the SMI construct/keyword `%s' may not be used in a PIB", NULL},
Packit 022b05
    { 5, ERR_SMI_TYPE_IN_PIB, "smi-type-in-pib", 
Packit 022b05
      "`%s' is a base type in SMI", NULL},
Packit 022b05
    { 1, ERR_SPPI_CONSTRUCT_IN_MIB, "keyword-illegal-in-mib", 
Packit 022b05
      "the SPPI construct/keyword `%s' may not be used in a MIB", NULL},
Packit 022b05
    { 5, ERR_SPPI_TYPE_IN_MIB, "sppi-type-in-mib", 
Packit 022b05
      "`%s' is a base type in SPPI", NULL},
Packit 022b05
    { 2, ERR_POLICY_ACCESS_IN_PIB, "policy-access",
Packit 022b05
      "the PIB uses POLICY-ACCESS where PIB-ACCESS is required", NULL},
Packit 022b05
    { 2, ERR_INVALID_SPPI_ACCESS, "access-invalid-sppi", 
Packit 022b05
      "invalid access `%s' in SPPI PIB", NULL},
Packit 022b05
    { 2, ERR_INVALID_SPPI_STATUS, "status-invalid-sppi", 
Packit 022b05
      "invalid status `%s' in SPPI PIB", NULL},
Packit 022b05
    { 1, ERR_SUBJECT_CATEGORIES_MISSING, "subject-categories-missing",
Packit 022b05
      "a MODULE-IDENTITY clause lacks SUBJECT-CATEGORIES", NULL},
Packit 022b05
    { 2, ERR_NOT_ACCESSIBLE_IN_PIB_ACCESS, "not-accessible-in-pib-access",
Packit 022b05
      "PIB-ACCESS must not be set to `not-accessible'", NULL},
Packit 022b05
    { 2, ERR_REPORT_ONLY_IN_PIB_MIN_ACCESS, "report-only-in-pib-min-access",
Packit 022b05
      "PIB-MIN-ACCESS must not be set to `report-only'", NULL},
Packit 022b05
    { 1, ERR_INDEX_AND_AUGMENTS_USED, "index-and-augments",
Packit 022b05
      "either INDEX or AUGMENTS may be used, but not both", NULL},
Packit 022b05
    { 1, ERR_INDEX_WITHOUT_PIB_INDEX, "index-without-pib-index",
Packit 022b05
      "INDEX may not be used without PIB-INDEX", NULL},
Packit 022b05
    { 3, ERR_ERROR_NUMBER_RANGE, "install-error-range",
Packit 022b05
      "the named-number for an INSTALL-ERROR is out of range: allowed 1..65535, current %d", NULL},
Packit 022b05
    { 2, ERR_SPPI_BASETYPE_NOT_IMPORTED, "sppi-basetype-not-imported",
Packit 022b05
      "SPPI basetype `%s' must be imported from COPS-PR-SPPI", NULL},
Packit 022b05
    { 2, ERR_ROW_LACKS_PIB_INDEX, "row-lacks-pib-index",
Packit 022b05
      "row definition lacks a PIB-INDEX/AUGMENTS/EXTENDS clause", NULL},
Packit 022b05
    { 2, ERR_PIB_INDEX_FOR_NON_ROW_TYPE, "pib-index-with-non-row-type",
Packit 022b05
      "non row type contains a PIB-INDEX/AUGMENTS/EXTENDS clause", NULL},
Packit 022b05
    { 2, ERR_OPAQUE_IN_SYNTAX, "opaque-in-syntax",
Packit 022b05
      "`Opaque' must not be used in SYNTAX clauses in PIB modules", NULL},
Packit 022b05
    { 2, ERR_IPADDRESS_IN_SYNTAX, "ipaddress-in-syntax",
Packit 022b05
      "`IpAddress' must not be used in SYNTAX clauses in PIB modules", NULL},
Packit 022b05
    { 2, ERR_TABLE_LACKS_PIB_ACCESS, "table-lacks-pib-access",
Packit 022b05
      "the table definition must contain a PIB-ACCESS clause", NULL},
Packit 022b05
    { 2, ERR_PIB_ACCESS_FOR_NON_TABLE, "pib-access-for-non-table",
Packit 022b05
      "type is not a table but contains a PIB-ACCESS clause", NULL},
Packit 022b05
    { 2, ERR_INSTALL_ERRORS_FOR_NON_TABLE, "install-errors-for-non-table",
Packit 022b05
      "type is not a table but contains a INSTALL-ERRORS clause", NULL},
Packit 022b05
    { 2, ERR_UNIQUENESS_FOR_NON_ROW, "uniqueness-for-non-row",
Packit 022b05
      "type is not a row but contains a UNIQUENESS clause", NULL},
Packit 022b05
    { 2, ERR_NOT_A_COLUMN, "not-a-column",
Packit 022b05
      "`%s', which is used in a UNIQUENESS clause, is not a column in this table", NULL},
Packit 022b05
    { 2, ERR_EXTENDS_WRONG_ROW_TYPE, "extend-row-type",
Packit 022b05
      "row `%s' extends `%s' which is neither a base table row nor a sparsely-augmented table row", NULL},
Packit 022b05
    { 2, ERR_PIB_INDEX_NOT_INSTANCEID, "pib-index-not-instanceid",
Packit 022b05
      "the PIB-INDEX `%s' must be of type `InstanceId'", NULL},
Packit 022b05
    { 2, ERR_LACKING_PIB_REFERENCES, "type-lacking-pib-references",
Packit 022b05
      "objects with SYNTAX `ReferenceId' must contain a PIB-REFERENCES clause", NULL},
Packit 022b05
    { 2, ERR_PIB_REFERENCES_WRONG_TYPE, "pib-references-with-wrong-type",
Packit 022b05
      "object contains a PIB-REFERENCES clause but is not of type `ReferenceId'", NULL},
Packit 022b05
    { 2, ERR_PIB_REFERENCES_NOT_ROW, "pib-references-not-row",
Packit 022b05
      "the PIB-REFERENCES does not point to a row", NULL},
Packit 022b05
    { 2, ERR_LACKING_PIB_TAG, "type-lacking-pib-tag",
Packit 022b05
      "objects with SYNTAX `TagReferenceId' must contain a PIB-TAG clause", NULL},
Packit 022b05
    { 2, ERR_PIB_TAG_WRONG_TYPE, "pib-tag-with-wrong-type",
Packit 022b05
      "object contains a PIB-TAG clause but is not of type `TagReferenceId'", NULL},
Packit 022b05
    { 2, ERR_SUBJECT_CATEGORIES_MISSING_SUBID, "subject-categories-missing-subid",
Packit 022b05
      "the SUBJECT-CATEGORIES are missing a sub-identifier", NULL},
Packit 022b05
    { 2, ERR_SUBJECT_CATEGORIES_ALL_WITH_SUBID, "subject-categories-all-with-subid",
Packit 022b05
      "the SUBJECT-CATEGORIES `all' must not have a sub-identifier", NULL},
Packit 022b05
    { 3, ERR_SUBJECT_CATEGORIES_ALL, "subject-categories-all",
Packit 022b05
      "SUBJECT-CATEGORIES contains several categories although `all' is used aswell", NULL},
Packit 022b05
    { 2, ERR_PIB_TAG_TYPE, "pib-tag-type",
Packit 022b05
      "a PIB-TAG must point to an object with a SYNTAX of `TagId'", NULL},
Packit 022b05
    { 3, ERR_ATTRIBUTE_NOT_IN_GROUP, "attribute-not-in-group",
Packit 022b05
      "attribute `%s' must be contained in at least one conformance group", NULL},
Packit 022b05
    { 0, ERR_OBJECTPTR_ELEMENT_IN_USE, "objectptr-element-in-use",
Packit 022b05
      "objectPtr->%s is already in use (%s)", NULL},
Packit 022b05
    { 1, ERR_OID_ADMIN_ZERO, "last-subid-zero",
Packit 022b05
      "last subidentifier assigned to `%s' may not be zero", NULL},
Packit 022b05
    { 5, ERR_TYPE_STATUS_DEPRECATED, "type-status-deprecated",
Packit 022b05
      "type `%s' used by `%s' is deprecated", NULL},
Packit 022b05
    { 5, ERR_TYPE_STATUS_OBSOLETE, "type-status-obsolete",
Packit 022b05
      "type `%s' used by `%s' is obsolete",
Packit 022b05
      "This warning is generated in cases where something with status\n"
Packit 022b05
      "`current' uses a type whose status has been changed to `obsolete'.\n"
Packit 022b05
      "Note that the status of imported types can change without the\n"
Packit 022b05
      "control of the modules using these types." },
Packit 022b05
    { 3, ERR_COMPLIANCE_MEMBER_NOT_LOCAL, "compliance-member-not-local",
Packit 022b05
      "OBJECTS or NOTIFICATIONS member `%s' is not defined in this module",
Packit 022b05
      "All elements of an OBJECTS statement within an OBJECT-GROUP clause\n"
Packit 022b05
      "and all elements of a NOTIFICATIONS statement within a\n"
Packit 022b05
      "NOTIFICATION-GROUP clause must be defined in the same module\n"
Packit 022b05
      "where this OBJECT-GROUP or NOTIFICATION-GROUP appears (RFC 2580,\n"
Packit 022b05
      "Sections 3.1 and 4.1)."},
Packit 022b05
    { 5, ERR_MIB_MODULENAME_SUFFIX, "module-name-suffix", 
Packit 022b05
      "module name `%s' should match `*-MIB'", NULL},
Packit 022b05
    { 5, ERR_PIB_MODULENAME_SUFFIX, "module-name-suffix", 
Packit 022b05
      "module name `%s' should match `*-PIB'", NULL},
Packit 022b05
    { 5, ERR_TYPE_WITHOUT_FORMAT, "type-without-format", 
Packit 022b05
      "type `%s' has no format specification", NULL},
Packit 022b05
    { 2, ERR_OBJECT_IN_NOTIFICATION_GROUP, "group-notifications-object",
Packit 022b05
      "notification group `%s' includes object `%s'", NULL},
Packit 022b05
    { 2, ERR_NOTIFICATION_IN_OBJECT_GROUP, "group-objects-notification",
Packit 022b05
      "object group `%s' includes notification `%s'", NULL},
Packit 022b05
    { 4, ERR_MODULE_IDENTITY_REGISTRATION, "module-identity-registration",
Packit 022b05
      "uncontrolled MODULE-IDENTITY registration",
Packit 022b05
      "The identities of IETF MIB modules should be registered below\n"
Packit 022b05
      "mib-2, transmission, or snmpModules so that the registration\n"
Packit 022b05
      "space can be controlled by IANA."},
Packit 022b05
    { 0, 0, NULL, NULL, NULL }
Packit 022b05
};
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiSetErrorSeverity --
Packit 022b05
 *
Packit 022b05
 *      Sets the severity of errors with tags matching pattern.
Packit 022b05
 *      0 <= severity <= 15 : sets severity to this value.
Packit 022b05
 *      severity == 128     : makes the parser to ignore the error.
Packit 022b05
 *      severity == -1      : makes the parser to allow the error.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      Changes the severity in the module internal error table.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
void
Packit 022b05
smiSetErrorSeverity(char *pattern, int severity)
Packit 022b05
{
Packit 022b05
    int i;
Packit 022b05
    
Packit 022b05
    for (i = 0; errors[i].fmt; i++) {
Packit 022b05
	if (strstr(errors[i].tag, pattern) == errors[i].tag) {
Packit 022b05
	    if (severity == 128) {
Packit 022b05
		errors[i].level |= 128;
Packit 022b05
	    } else if (severity == -1) {
Packit 022b05
		errors[i].level &= 127;
Packit 022b05
	    } else {
Packit 022b05
		errors[i].level = severity;
Packit 022b05
	    }
Packit 022b05
	}
Packit 022b05
    }
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiSetErrorHandler --
Packit 022b05
 *
Packit 022b05
 *      Set the function that is called to handle error messages.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      Changes the error handler used for subsequent error messages.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
void
Packit 022b05
smiSetErrorHandler(SmiErrorHandler smiErrorHandler)
Packit 022b05
{
Packit 022b05
    smiHandle->errorHandler = smiErrorHandler;
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiGetErrorSeverity --
Packit 022b05
 *
Packit 022b05
 *      Return the severity of the error identified by id.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      The error severity.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
int
Packit 022b05
smiGetErrorSeverity(int id)
Packit 022b05
{
Packit 022b05
    if (id < 0 || id >= (sizeof(errors) / sizeof(Error)) - 1) {
Packit 022b05
	return -1;
Packit 022b05
    }
Packit 022b05
    return errors[id].level;
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiGetErrorTag --
Packit 022b05
 *
Packit 022b05
 *      Return the tag of the error identified by id.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      The error tag or NULL.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
char*
Packit 022b05
smiGetErrorTag(int id)
Packit 022b05
{
Packit 022b05
    if (id < 0 || id >= sizeof(errors) / sizeof(Error)) {
Packit 022b05
	return NULL;
Packit 022b05
    }
Packit 022b05
    return errors[id].tag;
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiGetErrorMsg --
Packit 022b05
 *
Packit 022b05
 *      Return the message of the error identified by id.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      The error message or NULL.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
char*
Packit 022b05
smiGetErrorMsg(int id)
Packit 022b05
{
Packit 022b05
    if (id < 0 || id >= sizeof(errors) / sizeof(Error)) {
Packit 022b05
	return NULL;
Packit 022b05
    }
Packit 022b05
    return errors[id].fmt;
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiGetErrorDescription --
Packit 022b05
 *
Packit 022b05
 *      Return the description of the error identified by id.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      The error description or NULL.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
char*
Packit 022b05
smiGetErrorDescription(int id)
Packit 022b05
{
Packit 022b05
    if (id < 0 || id >= sizeof(errors) / sizeof(Error)) {
Packit 022b05
	return NULL;
Packit 022b05
    }
Packit 022b05
    return errors[id].description;
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiErrorHandler --
Packit 022b05
 *
Packit 022b05
 *      This is the default error printing function. This is the
Packit 022b05
 *	only place in the libsmi where any output is generated.
Packit 022b05
 *	This function may be replaced by an application specific
Packit 022b05
 *	error message handler.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      Prints error messages to the stderr output channel.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
void
Packit 022b05
smiErrorHandler(char *path, int line, int severity, char *msg, char *tag)
Packit 022b05
{
Packit 022b05
    if (path) {
Packit 022b05
	fprintf(stderr, "%s:%d: ", path, line);
Packit 022b05
    }
Packit 022b05
    switch (severity) {
Packit 022b05
    case 4:
Packit 022b05
    case 5:
Packit 022b05
	fprintf(stderr, "warning: ");
Packit 022b05
	break;
Packit 022b05
    case 6:	
Packit 022b05
	fprintf(stderr, "info: ");
Packit 022b05
	break;
Packit 022b05
    }
Packit 022b05
    fprintf(stderr, "%s\n", msg);
Packit 022b05
Packit 022b05
    /*
Packit 022b05
     * A severe error, no way to continue :-(
Packit 022b05
     */
Packit 022b05
    if (severity <= 0) {
Packit 022b05
	exit(1);
Packit 022b05
    }
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * printError --
Packit 022b05
 *
Packit 022b05
 *      Internal error printer which is called by the varargs
Packit 022b05
 *	entry points (see below). If formats the error message
Packit 022b05
 *	and calls the error handling function that is currently
Packit 022b05
 *	registered.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      Terminates the program if the error is severe and there
Packit 022b05
 *	is no way to continue.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
static void
Packit 022b05
printError(Parser *parser, int id, int line, va_list ap)
Packit 022b05
{
Packit 022b05
    char *buffer;
Packit 022b05
    int i;
Packit 022b05
    
Packit 022b05
    if (! smiHandle->errorHandler) {
Packit 022b05
	return;
Packit 022b05
    }
Packit 022b05
Packit 022b05
    /*
Packit 022b05
     * Search for the tag instead of just using the id as an index so
Packit 022b05
     * that we do not run into trouble if the id is bogus.
Packit 022b05
     */
Packit 022b05
Packit 022b05
    for (i = 0; errors[i].fmt; i++) {
Packit 022b05
	if (errors[i].id == id) break;
Packit 022b05
    }
Packit 022b05
    if (! errors[i].fmt) {
Packit 022b05
	i = 0;		/* assumes that 0 is the internal error */
Packit 022b05
    }
Packit 022b05
Packit 022b05
    if (parser) {
Packit 022b05
Packit 022b05
	if (parser->modulePtr) {
Packit 022b05
	    if ((parser->modulePtr->export.conformance > errors[i].level) ||
Packit 022b05
		(parser->modulePtr->export.conformance == 0)) {
Packit 022b05
		parser->modulePtr->export.conformance = errors[i].level;
Packit 022b05
	    }
Packit 022b05
	}
Packit 022b05
	
Packit 022b05
	if ((errors[i].level <= smiHandle->errorLevel) &&
Packit 022b05
	    (parser->flags & SMI_FLAG_ERRORS) &&
Packit 022b05
	    ((smiDepth == 1) || (parser->flags & SMI_FLAG_RECURSIVE))) {
Packit 022b05
	    smiVasprintf(&buffer, errors[i].fmt, ap);
Packit 022b05
	    (smiHandle->errorHandler) (parser->path, line,
Packit 022b05
				       errors[i].level, buffer, errors[i].tag);
Packit 022b05
	}
Packit 022b05
    } else {
Packit 022b05
	if (errors[i].level <= smiHandle->errorLevel) {
Packit 022b05
	    smiVasprintf(&buffer, errors[i].fmt, ap);
Packit 022b05
	    (smiHandle->errorHandler) (NULL, 0, errors[i].level,
Packit 022b05
				       buffer, errors[i].tag);
Packit 022b05
	}
Packit 022b05
    }
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiPrintErrorAtLine --
Packit 022b05
 *
Packit 022b05
 *      Like smiPrintError() but shows a specfic line no.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
void
Packit 022b05
smiPrintErrorAtLine(Parser *parser, int id, int line, ...)
Packit 022b05
{
Packit 022b05
    va_list ap;
Packit 022b05
Packit 022b05
    va_start(ap, line);
Packit 022b05
    printError(parser, id, line, ap);
Packit 022b05
    va_end(ap);
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
Packit 022b05
/*
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 *
Packit 022b05
 * smiPrintError --
Packit 022b05
 *
Packit 022b05
 *      Prints an error message. The line number is taken from
Packit 022b05
 *	the current parser position.
Packit 022b05
 *
Packit 022b05
 * Results:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 * Side effects:
Packit 022b05
 *      None.
Packit 022b05
 *
Packit 022b05
 *----------------------------------------------------------------------
Packit 022b05
 */
Packit 022b05
Packit 022b05
void
Packit 022b05
smiPrintError(Parser *parser, int id, ...)
Packit 022b05
{
Packit 022b05
    va_list ap;
Packit 022b05
Packit 022b05
    va_start(ap, id);
Packit 022b05
    printError(parser, id, parser ? parser->line : 0, ap);
Packit 022b05
    va_end(ap);
Packit 022b05
}