]> git.proxmox.com Git - mirror_frr.git/blame - lib/lib_errors.c
lib, bgpd: Add code to make lib auto create the ferr infrastructure
[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",
28 .description = "FRR attempted to raise or lower it's privileges and was unable to do so",
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 {
38 .code = LIB_ERR_VRF_SOCKET,
39 .title = "VRF Socket Error",
40 .description = "When attempting to access a socket for the VRF specified, we\nwere unable to properly complete the request",
41 .suggestion = "Ensure that there is sufficient system resources available and\nensure that the frr user has sufficient permisions to work",
42 },
43 {
44 .code = END_FERR
45 }
46};
47
48void lib_error_init(void)
49{
50 ferr_ref_init();
51 ferr_ref_add(ferr_lib_err);
52}