]> git.proxmox.com Git - mirror_frr.git/blame - lib/lib_errors.c
lib, zebra: Add LIB_ERR_INTERFACE
[mirror_frr.git] / lib / lib_errors.c
CommitLineData
b66d022e
DS
1/*
2 * Library-specific error messages.
3 * Copyright (C) 2018 Cumulus Networks, Inc.
4 * Donald Sharp
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <zebra.h>
22#include <lib_errors.h>
23
24static struct ferr_ref ferr_lib_err[] = {
25 {
26 .code = LIB_ERR_PRIVILEGES,
27 .title = "Failure to raise or lower privileges",
174482ef 28 .description = "FRR attempted to raise or lower its privileges and was unable to do so",
b66d022e
DS
29 .suggestion = "Ensure that you are running FRR as the frr user and that the user has\nSufficient privileges to properly access root privileges"
30 },
31 {
32 .code = LIB_ERR_VRF_START,
33 .title = "VRF Failure on Start",
34 .description = "Upon startup FRR failed to properly initialize and startup the VRF subsystem",
35 .suggestion = "Ensure that there is sufficient memory to start processes and restart FRR",
36 },
37 {
481bc15f
DS
38 .code = LIB_ERR_SOCKET,
39 .title = "Socket Error",
40 .description = "When attempting to access a socket a system error has occured\nand we were unable to properly complete the request",
174482ef 41 .suggestion = "Ensure that there are sufficient system resources available and\nensure that the frr user has sufficient permisions to work",
b66d022e 42 },
1ca3850c
DS
43 {
44 .code = LIB_ERR_ZAPI_MISSMATCH,
174482ef 45 .title = "ZAPI Error",
1ca3850c 46 .description = "A version miss-match has been detected between zebra and client protocol",
174482ef 47 .suggestion = "Two different versions of FRR have been installed and the install is\nnot properly setup. Completely stop FRR, remove it from the system and\nreinstall. Typically only developers should see this issue."
1ca3850c
DS
48 },
49 {
50 .code = LIB_ERR_ZAPI_ENCODE,
174482ef
DS
51 .title = "ZAPI Error",
52 .description = "The ZAPI subsystem has detected an encoding issue, between zebra and a client protocol",
1ca3850c
DS
53 .suggestion = "Restart FRR"
54 },
55 {
56 .code = LIB_ERR_ZAPI_SOCKET,
174482ef
DS
57 .title = "ZAPI Error",
58 .description = "The ZAPI subsystem has detected a socket error between zebra and a client",
1ca3850c
DS
59 .suggestion = "Restart FRR"
60 },
b66d022e 61 {
481bc15f
DS
62 .code = LIB_ERR_SYSTEM_CALL,
63 .title = "System Call Error",
64 .description = "FRR has detected a error from using a vital system call and has probably\nalready exited",
174482ef 65 .suggestion = "Ensure permissions are correct for FRR files, users and groups are correct.\nAdditionally check that sufficient system resources are available."
481bc15f 66 },
ab99c8e2
DS
67 {
68 .code = LIB_ERR_VTY,
174482ef 69 .title = "VTY Subsystem Error",
ab99c8e2
DS
70 .description = "FRR has detected a problem with the specified configuration file",
71 .suggestion = "Ensure configuration file exists and has correct permissions for operations\nAdditionally ensure that all config lines are correct as well",
72 },
220d7368
DS
73 {
74 .code = LIB_ERR_SNMP,
174482ef 75 .title = "SNMP Subsystem Error",
220d7368
DS
76 .description = "FRR has detected a problem with the snmp library it uses\nA callback from this subsystem has indicated some error",
77 .suggestion = "Examine callback message and ensure snmp is properly setup and working"
78 },
4d43f68a
DS
79 {
80 .code = LIB_ERR_INTERFACE,
81 .title = "Interface Subsystem Error",
82 .description = "FRR has detected a problem with interface data from the kernel as it deviates\nfrom what we would expect to happen via normal netlink messaging",
83 .suggestion = "Open an Issue with all relevant log files and restart FRR"
84 },
481bc15f
DS
85 {
86 .code = END_FERR,
b66d022e
DS
87 }
88};
89
90void lib_error_init(void)
91{
92 ferr_ref_init();
93 ferr_ref_add(ferr_lib_err);
94}