Source File include/er_UP_errors.h

    1    | #ifndef ER_UP_ERRORS_H
    2    | #define ER_UP_ERRORS_H
    3    |
    4    |
    5    | /***************************************
    6    |   $Revision: 1.5 $
    7    |
    8    |
    9    |   ******************/ /******************
    10   |   Copyright (c) 1999                              RIPE NCC
    11   |
    12   |   All Rights Reserved
    13   |
    14   |   Permission to use, copy, modify, and distribute this software and its
    15   |   documentation for any purpose and without fee is hereby granted,
    16   |   provided that the above copyright notice appear in all copies and that
    17   |   both that copyright notice and this permission notice appear in
    18   |   supporting documentation, and that the name of the author not be
    19   |   used in advertising or publicity pertaining to distribution of the
    20   |   software without specific, written prior permission.
    21   |
    22   |   THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
    23   |   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
    24   |   AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
    25   |   DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
    26   |   AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    27   |   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    28   |   ***************************************/
    29   |
    30   | /* step 1 */
    31   |
    32   | typedef enum {
    33   |   LOW_UP_AUTH_OK=0, /* Auth succeded */
    34   |   LOW_UP_MOR, /* got more than one object from the db, where extected only one */
    35   |   LOW_UP_NSO, /* no such object */
    36   |   LOW_UP_AUF, /* auth failed */
    37   |   LOW_UP_NIY, /* not implemented yet */
    38   |   LOW_UP_ABN, /* as-block does not exist */
    39   |   LOW_UP_HOF, /* hierarchical auth failed */
    40   |   LOW_UP_OVF, /* override failed */
    41   |   LOW_UP_OVS, /* override syntax error */
    42   |   LOW_UP_NOM, /* no match. the old & nw versions of the object are not the same */
    43   |   LOW_UP_ANE, /* AUTO NIC hdl error */
    44   |   LOW_UP_INT  /* internal error */
    45   |
    46   | } UP_err_code_t;
    47   |
    48   | /* step 2 */
    49   |
    50   | #define UP_AUTH_OK	ER_SEV_I + (FAC_UP<<16) + LOW_UP_AUTH_OK
    51   | #define UP_MOR		ER_SEV_E + (FAC_UP<<16) + LOW_UP_MOR
    52   | #define UP_NSO		ER_SEV_E + (FAC_UP<<16) + LOW_UP_NSO
    53   | #define	UP_AUF		ER_SEV_E + (FAC_UP<<16) + LOW_UP_AUF
    54   | #define UP_NIY		ER_SEV_E + (FAC_UP<<16) + LOW_UP_NIY
    55   | #define UP_ABN		ER_SEV_E + (FAC_UP<<16) + LOW_UP_ABN
    56   | #define UP_HOF		ER_SEV_E + (FAC_UP<<16) + LOW_UP_HOF
    57   | #define UP_OVF		ER_SEV_E + (FAC_UP<<16) + LOW_UP_OVF
    58   | #define UP_OVS		ER_SEV_E + (FAC_UP<<16) + LOW_UP_OVS
    59   | #define UP_NOM          ER_SEV_E + (FAC_UP<<16) + LOW_UP_NOM
    60   | #define UP_ANE          ER_SEV_E + (FAC_UP<<16) + LOW_UP_ANE
    61   | #define UP_INT		ER_SEV_E + (FAC_UP<<16) + LOW_UP_INT
    62   |
    63   | /* step 3 */
    64   |
    65   | #ifdef ER_IMPL
    66   | er_list_t UP_mod_err[]={
    67   |   { ERDUP(UP_AUTH_OK),  	"Auth OK" },
    68   |
    69   |   { ERDUP(UP_MOR),   "got more than one object from the db, where extected only one" },
    70   |
    71   |   { ERDUP(UP_NSO),   "no such object" },
    72   |   { ERDUP(UP_AUF),   "auth failed" },
    73   |   { ERDUP(UP_NIY),   "not implemented yet" },
    74   |   { ERDUP(UP_ABN),   "as-block does not exist" },
    75   |   { ERDUP(UP_HOF),   "hierarchical auth failed" },
    76   |   { ERDUP(UP_OVF),   "override failed" },
    77   |   { ERDUP(UP_OVS),   "override syntax error" },
    78   |   { ERDUP(UP_NOM),   "no match, the old & new versions are not the same" },
    79   |   { ERDUP(UP_ANE),   "AUTO NIC hdl error" },
    80   |
    81   |   { ERDUP(UP_INT),   "internal error" },
    82   |
    83   |  ER_LASTTXT
    84   | };
    85   |
    86   | #endif /* ER_IMPL */
    87   |
    88   | #endif