1 | /***************************************
2 | $Revision: 1.3 $
3 |
4 | Radix tree (rx). er_RX_errors.h - definition of errors for the radix module
5 |
6 | Status: NOT REVUED, TESTED,
7 |
8 | Design and implementation by: Marek Bukowy
9 |
10 | ******************/ /******************
11 | Copyright (c) 1999 RIPE NCC
12 |
13 | All Rights Reserved
14 |
15 | Permission to use, copy, modify, and distribute this software and its
16 | documentation for any purpose and without fee is hereby granted,
17 | provided that the above copyright notice appear in all copies and that
18 | both that copyright notice and this permission notice appear in
19 | supporting documentation, and that the name of the author not be
20 | used in advertising or publicity pertaining to distribution of the
21 | software without specific, written prior permission.
22 |
23 | THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
24 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL
25 | AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
26 | DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
27 | AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
28 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
29 | ***************************************/
30 |
31 | /* step 1 */
32 |
33 | typedef enum {
34 | LOW_IP_OK=0,
35 | LOW_IP_INVVER,
36 |
37 | LOW_IP_INVIP4,
38 | LOW_IP_NOSLAS,
39 | LOW_IP_ADTOLO,
40 | LOW_IP_PRTOLO,
41 | LOW_IP_INVPRF,
42 | LOW_IP_INVRAN,
43 |
44 | LOW_IP_NO6YET,
45 |
46 | LOW_IP_TOSHRT,
47 | LOW_IP_INVARG
48 |
49 | } IP_err_code_t;
50 |
51 | /* step 2 */
52 |
53 | #define IP_OK ER_SEV_I + (FAC_IP<<16) + LOW_IP_OK
54 |
55 | #define IP_INVVER ER_SEV_E + (FAC_IP<<16) + LOW_IP_INVVER
56 |
57 | #define IP_INVIP4 ER_SEV_E + (FAC_IP<<16) + LOW_IP_INVIP4
58 | #define IP_NOSLAS ER_SEV_E + (FAC_IP<<16) + LOW_IP_NOSLAS
59 | #define IP_ADTOLO ER_SEV_E + (FAC_IP<<16) + LOW_IP_ADTOLO
60 | #define IP_PRTOLO ER_SEV_E + (FAC_IP<<16) + LOW_IP_PRTOLO
61 | #define IP_INVPRF ER_SEV_E + (FAC_IP<<16) + LOW_IP_INVPRF
62 | #define IP_INVRAN ER_SEV_E + (FAC_IP<<16) + LOW_IP_INVRAN
63 |
64 | #define IP_NO6YET ER_SEV_E + (FAC_IP<<16) + LOW_IP_NO6YET
65 |
66 | #define IP_TOSHRT ER_SEV_E + (FAC_IP<<16) + LOW_IP_TOSHRT
67 | #define IP_INVARG ER_SEV_E + (FAC_IP<<16) + LOW_IP_INVARG
68 |
69 | /* step 3 */
70 |
71 | #ifdef ER_IMPL
72 | er_list_t IP_mod_err[]={
73 | { ERDUP(IP_OK), "OK" },
74 |
75 | { ERDUP(IP_INVVER), "invalid IP version code" },
76 |
77 | { ERDUP(IP_INVIP4), "e2b: incorrect IPv4 address" },
78 | { ERDUP(IP_NOSLAS), "e2b: missing slash in prefix" },
79 | { ERDUP(IP_ADTOLO), "e2b: address part too long" },
80 | { ERDUP(IP_PRTOLO), "e2b: prefix part too long" },
81 | { ERDUP(IP_INVPRF), "e2b: incorrect prefix value" },
82 | { ERDUP(IP_INVRAN), "e2b: invalid range specification" },
83 |
84 | { ERDUP(IP_NO6YET), "IPv6 is not yet implemented" },
85 |
86 | { ERDUP(IP_TOSHRT), "b2a: supplied string too short" },
87 |
88 | { ERDUP(IP_INVARG), "invalid argument" }, // very generic error
89 |
90 | ER_LASTTXT
91 | };
92 |
93 | #endif /* ER_IMPL */