]>
Commit | Line | Data |
---|---|---|
4d7b695d SM |
1 | /* |
2 | * pathd-specific error messages. | |
3 | * Copyright (C) 2020 NetDEF, Inc. | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU General Public License as published by the Free | |
7 | * Software Foundation; either version 2 of the License, or (at your option) | |
8 | * any later version. | |
9 | * | |
10 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
13 | * more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License along | |
16 | * with this program; see the file COPYING; if not, write to the Free Software | |
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | */ | |
19 | ||
20 | #include <zebra.h> | |
21 | ||
22 | #include "lib/ferr.h" | |
23 | #include "path_errors.h" | |
24 | ||
25 | /* clang-format off */ | |
26 | static struct log_ref ferr_path_err[] = { | |
efba0985 SM |
27 | { |
28 | .code = EC_PATH_SYSTEM_CALL, | |
29 | .title = "Thread setup error", | |
30 | .description = "A system call for creating, or setting up PCEP module's pthread failed", | |
31 | .suggestion = "Open an Issue with all relevant log files and restart FRR" | |
32 | }, | |
33 | { | |
34 | .code = EC_PATH_PCEP_PCC_INIT, | |
35 | .title = "PCC initialization error", | |
36 | .description = "pceplib PCC initialization call failed", | |
37 | .suggestion = "Open an Issue with all relevant log files and restart FRR" | |
38 | }, | |
39 | { | |
40 | .code = EC_PATH_PCEP_PCC_FINI, | |
41 | .title = "PCC finalization error", | |
42 | .description = "pceplib PCC finalization call failed", | |
43 | .suggestion = "Open an Issue with all relevant log files and restart FRR" | |
44 | }, | |
45 | { | |
46 | .code = EC_PATH_PCEP_PCC_CONF_UPDATE, | |
47 | .title = "PCC configuration update error", | |
48 | .description = "The update of the PCC configuration failed", | |
49 | .suggestion = "Open an Issue with all relevant log files and restart FRR" | |
50 | }, | |
4d7b695d SM |
51 | { |
52 | .code = END_FERR, | |
53 | } | |
54 | }; | |
55 | ||
56 | static struct log_ref ferr_path_warn[] = { | |
efba0985 SM |
57 | { |
58 | .code = EC_PATH_PCEP_LIB_CONNECT, | |
59 | .title = "PCC connection error", | |
60 | .description = "The PCEP module failed to connected to configured PCE", | |
61 | .suggestion = "Check the connectivity between the PCC and the PCE" | |
62 | }, | |
ab7fe289 JG |
63 | { |
64 | .code = EC_PATH_PCEP_PROTOCOL_ERROR, | |
65 | .title = "PCEP protocol error", | |
66 | .description = "The PCE did not respect the PCEP protocol", | |
67 | .suggestion = "Open an Issue with all relevant log files" | |
68 | }, | |
efba0985 SM |
69 | { |
70 | .code = EC_PATH_PCEP_MISSING_SOURCE_ADDRESS, | |
71 | .title = "PCC connection error", | |
72 | .description = "The PCEP module did not try to connect because it is missing a source address", | |
73 | .suggestion = "Wait for the router ID to be defined or set the PCC source address in the configuration" | |
74 | }, | |
75 | { | |
76 | .code = EC_PATH_PCEP_RECOVERABLE_INTERNAL_ERROR, | |
77 | .title = "Recoverable internal error", | |
78 | .description = "Some recoverable internal error", | |
79 | .suggestion = "Open an Issue with all relevant log files" | |
80 | }, | |
81 | { | |
82 | .code = EC_PATH_PCEP_UNSUPPORTED_PCEP_FEATURE, | |
83 | .title = "Unsupported PCEP feature", | |
1373ad76 | 84 | .description = "Received an unsupported PCEP message", |
efba0985 SM |
85 | .suggestion = "The PCC and PCE are probably not compatible. Open an Issue with all relevant log files" |
86 | }, | |
87 | { | |
88 | .code = EC_PATH_PCEP_UNEXPECTED_PCEP_MESSAGE, | |
89 | .title = "Unexpected PCEP message", | |
90 | .description = "The PCEP module received an unexpected PCEP message", | |
91 | .suggestion = "Open an Issue with all relevant log files" | |
92 | }, | |
93 | { | |
94 | .code = EC_PATH_PCEP_UNEXPECTED_PCEPLIB_EVENT, | |
95 | .title = "Unexpected pceplib event", | |
96 | .description = "The PCEP module received an unexpected event from pceplib", | |
97 | .suggestion = "Open an Issue with all relevant log files" | |
98 | }, | |
99 | { | |
100 | .code = EC_PATH_PCEP_UNEXPECTED_PCEP_OBJECT, | |
101 | .title = "Unexpected PCEP object", | |
102 | .description = "The PCEP module received an unexpected PCEP object from a PCE", | |
103 | .suggestion = "Open an Issue with all relevant log files" | |
104 | }, | |
105 | { | |
106 | .code = EC_PATH_PCEP_UNEXPECTED_PCEP_TLV, | |
107 | .title = "Unexpected PCEP TLV", | |
108 | .description = "The PCEP module received an unexpected PCEP TLV from a PCE", | |
109 | .suggestion = "Open an Issue with all relevant log files" | |
110 | }, | |
111 | { | |
112 | .code = EC_PATH_PCEP_UNEXPECTED_PCEP_ERO_SUBOBJ, | |
113 | .title = "Unexpected PCEP ERO sub-object", | |
114 | .description = "The PCEP module received an unexpected PCEP ERO sub-object from a PCE", | |
115 | .suggestion = "Open an Issue with all relevant log files" | |
116 | }, | |
117 | { | |
118 | .code = EC_PATH_PCEP_UNEXPECTED_SR_NAI, | |
119 | .title = "Unexpected PCEP SR segment NAI", | |
120 | .description = "The PCEP module received an SR segment with an unsupported NAI specification from the PCE", | |
121 | .suggestion = "Open an Issue with all relevant log files" | |
122 | }, | |
123 | { | |
124 | .code = EC_PATH_PCEP_COMPUTATION_REQUEST_TIMEOUT, | |
125 | .title = "Computation request timeout", | |
126 | .description = "The PCE did not respond in time to the PCC computation request", | |
127 | .suggestion = "The PCE is overloaded or incompatible with the PCC, try with a different PCE" | |
128 | }, | |
4d7b695d SM |
129 | { |
130 | .code = END_FERR, | |
131 | } | |
efba0985 | 132 | |
4d7b695d SM |
133 | }; |
134 | /* clang-format on */ | |
135 | ||
136 | void path_error_init(void) | |
137 | { | |
138 | log_ref_add(ferr_path_err); | |
139 | log_ref_add(ferr_path_warn); | |
140 | } |