/*
 * Zebra-specific error messages.
 * Copyright (C) 2018  Cumulus Networks, Inc.
 *                     Quentin Young
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; see the file COPYING; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 */

#ifndef __EC_ZEBRAORS_H__
#define __EC_ZEBRAORS_H__

#include "lib/ferr.h"

#ifdef __cplusplus
extern "C" {
#endif

enum zebra_log_refs {
	EC_ZEBRA_LM_RESPONSE = ZEBRA_FERR_START,
	EC_ZEBRA_LM_NO_SUCH_CLIENT,
	EC_ZEBRA_LM_RELAY_FAILED,
	EC_ZEBRA_LM_NO_SOCKET,
	EC_ZEBRA_LM_BAD_INSTANCE,
	EC_ZEBRA_LM_RELAY_REQUEST_FAILED,
	EC_ZEBRA_LM_CLIENT_CONNECTION_FAILED,
	EC_ZEBRA_LM_EXHAUSTED_LABELS,
	EC_ZEBRA_LM_DAEMON_MISMATCH,
	EC_ZEBRA_LM_UNRELEASED_CHUNK,
	EC_ZEBRA_DP_INVALID_RC,
	EC_ZEBRA_WQ_NONEXISTENT,
	EC_ZEBRA_FEC_ADD_FAILED,
	EC_ZEBRA_FEC_LABEL_INDEX_LABEL_CONFLICT,
	EC_ZEBRA_FEC_RM_FAILED,
	EC_ZEBRA_IRDP_LEN_MISMATCH,
	EC_ZEBRA_RNH_UNKNOWN_FAMILY,
	EC_ZEBRA_DP_INSTALL_FAIL,
	EC_ZEBRA_DP_DELETE_FAIL,
	EC_ZEBRA_TABLE_LOOKUP_FAILED,
	EC_ZEBRA_NETLINK_NOT_AVAILABLE,
	EC_ZEBRA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E_ADDR,
	EC_ZEBRA_RA_PARAM_MISMATCH,
	EC_ZEBRA_RTM_VERSION_MISMATCH,
	EC_ZEBRA_RTM_NO_GATEWAY,
	EC_ZEBRA_MAX_LABELS_PUSH,
	EC_ZEBRA_STICKY_MAC_ALREADY_LEARNT,
	EC_ZEBRA_UNSUPPORTED_V6_SRCDEST,
	EC_ZEBRA_DUP_MAC_DETECTED,
	EC_ZEBRA_DUP_IP_INHERIT_DETECTED,
	EC_ZEBRA_DUP_IP_DETECTED,
	EC_ZEBRA_BAD_NHG_MESSAGE,
	EC_ZEBRA_DUPLICATE_NHG_MESSAGE,
	EC_ZEBRA_VRF_MISCONFIGURED,
	EC_ZEBRA_ES_CREATE,
};

void zebra_error_init(void);

#ifdef __cplusplus
}
#endif

#endif /* __EC_ZEBRAORS_H__ */
