2 * pathd-specific error messages.
3 * Copyright (C) 2020 NetDEF, Inc.
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)
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
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
23 #include "path_errors.h"
25 /* clang-format off */
26 static struct log_ref ferr_path_err
[] = {
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"
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"
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"
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"
56 static struct log_ref ferr_path_warn
[] = {
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"
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"
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"
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"
82 .code
= EC_PATH_PCEP_UNSUPPORTED_PCEP_FEATURE
,
83 .title
= "Unsupported PCEP feature",
84 .description
= "Received an unsupported PCEP message",
85 .suggestion
= "The PCC and PCE are probably not compatible. Open an Issue with all relevant log files"
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"
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"
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"
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"
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"
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"
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"
134 /* clang-format on */
136 void path_error_init(void)
138 log_ref_add(ferr_path_err
);
139 log_ref_add(ferr_path_warn
);