diff options
| -rw-r--r-- | babeld/babel_errors.c | 4 | ||||
| -rw-r--r-- | babeld/babel_errors.h | 2 | ||||
| -rw-r--r-- | bgpd/bgp_errors.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_errors.h | 2 | ||||
| -rw-r--r-- | eigrpd/eigrp_errors.c | 4 | ||||
| -rw-r--r-- | eigrpd/eigrp_errors.h | 2 | ||||
| -rw-r--r-- | isisd/isis_errors.c | 4 | ||||
| -rw-r--r-- | isisd/isis_errors.h | 2 | ||||
| -rw-r--r-- | lib/ferr.c | 26 | ||||
| -rw-r--r-- | lib/ferr.h | 12 | ||||
| -rw-r--r-- | lib/lib_errors.c | 4 | ||||
| -rw-r--r-- | lib/lib_errors.h | 2 | ||||
| -rw-r--r-- | lib/libfrr.c | 4 | ||||
| -rw-r--r-- | nhrpd/nhrp_errors.c | 4 | ||||
| -rw-r--r-- | nhrpd/nhrp_errors.h | 2 | ||||
| -rw-r--r-- | ospfd/ospf_errors.c | 4 | ||||
| -rw-r--r-- | ospfd/ospf_errors.h | 2 | ||||
| -rw-r--r-- | pimd/pim_errors.c | 4 | ||||
| -rw-r--r-- | pimd/pim_errors.h | 2 | ||||
| -rw-r--r-- | ripd/rip_errors.c | 4 | ||||
| -rw-r--r-- | ripd/rip_errors.h | 2 | ||||
| -rw-r--r-- | watchfrr/watchfrr_errors.c | 4 | ||||
| -rw-r--r-- | watchfrr/watchfrr_errors.h | 2 | ||||
| -rw-r--r-- | zebra/zebra_errors.c | 4 | ||||
| -rw-r--r-- | zebra/zebra_errors.h | 2 | 
25 files changed, 54 insertions, 54 deletions
diff --git a/babeld/babel_errors.c b/babeld/babel_errors.c index 9fabdf28b5..e03cace379 100644 --- a/babeld/babel_errors.c +++ b/babeld/babel_errors.c @@ -24,7 +24,7 @@  #include "babel_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_babel_err[] = { +static struct log_ref ferr_babel_err[] = {  	{  		.code = BABEL_ERR_MEMORY,  		.title = "BABEL Memory Errors", @@ -57,5 +57,5 @@ static struct ferr_ref ferr_babel_err[] = {  void babel_error_init(void)  { -	ferr_ref_add(ferr_babel_err); +	log_ref_add(ferr_babel_err);  } diff --git a/babeld/babel_errors.h b/babeld/babel_errors.h index f03801272b..19adc63f04 100644 --- a/babeld/babel_errors.h +++ b/babeld/babel_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum babel_ferr_refs { +enum babel_log_refs {  	BABEL_ERR_MEMORY = BABEL_FERR_START,  	BABEL_ERR_PACKET,  	BABEL_ERR_CONFIG, diff --git a/bgpd/bgp_errors.c b/bgpd/bgp_errors.c index 3674c33722..50dd001b8b 100644 --- a/bgpd/bgp_errors.c +++ b/bgpd/bgp_errors.c @@ -24,7 +24,7 @@  #include "bgp_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_bgp_err[] = { +static struct log_ref ferr_bgp_err[] = {  	{  		.code = BGP_ERR_ATTR_FLAG,  		.title = "BGP attribute flag is incorrect", @@ -302,5 +302,5 @@ static struct ferr_ref ferr_bgp_err[] = {  void bgp_error_init(void)  { -	ferr_ref_add(ferr_bgp_err); +	log_ref_add(ferr_bgp_err);  } diff --git a/bgpd/bgp_errors.h b/bgpd/bgp_errors.h index 83b834688e..be718d99e7 100644 --- a/bgpd/bgp_errors.h +++ b/bgpd/bgp_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum bgp_ferr_refs { +enum bgp_log_refs {  	BGP_ERR_ATTR_FLAG = BGP_FERR_START,  	BGP_ERR_ATTR_LEN, diff --git a/eigrpd/eigrp_errors.c b/eigrpd/eigrp_errors.c index 4e6337a7ba..3db0ec8545 100644 --- a/eigrpd/eigrp_errors.c +++ b/eigrpd/eigrp_errors.c @@ -24,7 +24,7 @@  #include "eigrp_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_eigrp_err[] = { +static struct log_ref ferr_eigrp_err[] = {  	{  		.code = EIGRP_ERR_PACKET,  		.title = "EIGRP Packet Error", @@ -45,5 +45,5 @@ static struct ferr_ref ferr_eigrp_err[] = {  void eigrp_error_init(void)  { -	ferr_ref_add(ferr_eigrp_err); +	log_ref_add(ferr_eigrp_err);  } diff --git a/eigrpd/eigrp_errors.h b/eigrpd/eigrp_errors.h index e59a5d1e6e..e1ace8ab49 100644 --- a/eigrpd/eigrp_errors.h +++ b/eigrpd/eigrp_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum eigrp_ferr_refs { +enum eigrp_log_refs {  	EIGRP_ERR_PACKET = EIGRP_FERR_START,  	EIGRP_ERR_CONFIG,  }; diff --git a/isisd/isis_errors.c b/isisd/isis_errors.c index 3f69a10cab..ecff65da1f 100644 --- a/isisd/isis_errors.c +++ b/isisd/isis_errors.c @@ -24,7 +24,7 @@  #include "isis_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_isis_err[] = { +static struct log_ref ferr_isis_err[] = {  	{  		.code = ISIS_ERR_PACKET,  		.title = "ISIS Packet Error", @@ -45,5 +45,5 @@ static struct ferr_ref ferr_isis_err[] = {  void isis_error_init(void)  { -	ferr_ref_add(ferr_isis_err); +	log_ref_add(ferr_isis_err);  } diff --git a/isisd/isis_errors.h b/isisd/isis_errors.h index ffb000f9c9..f738254a30 100644 --- a/isisd/isis_errors.h +++ b/isisd/isis_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum isis_ferr_refs { +enum isis_log_refs {  	ISIS_ERR_PACKET = ISIS_FERR_START,  	ISIS_ERR_CONFIG,  }; diff --git a/lib/ferr.c b/lib/ferr.c index b0a22d822e..2fa5db6f34 100644 --- a/lib/ferr.c +++ b/lib/ferr.c @@ -62,20 +62,20 @@ struct hash *refs;  static int ferr_hash_cmp(const void *a, const void *b)  { -	const struct ferr_ref *f_a = a; -	const struct ferr_ref *f_b = b; +	const struct log_ref *f_a = a; +	const struct log_ref *f_b = b;  	return f_a->code == f_b->code;  }  static inline unsigned int ferr_hash_key(void *a)  { -	struct ferr_ref *f = a; +	struct log_ref *f = a;  	return f->code;  } -void ferr_ref_add(struct ferr_ref *ref) +void log_ref_add(struct log_ref *ref)  {  	uint32_t i = 0; @@ -89,10 +89,10 @@ void ferr_ref_add(struct ferr_ref *ref)  	pthread_mutex_unlock(&refs_mtx);  } -struct ferr_ref *ferr_ref_get(uint32_t code) +struct log_ref *log_ref_get(uint32_t code)  { -	struct ferr_ref holder; -	struct ferr_ref *ref; +	struct log_ref holder; +	struct log_ref *ref;  	holder.code = code;  	pthread_mutex_lock(&refs_mtx); @@ -104,9 +104,9 @@ struct ferr_ref *ferr_ref_get(uint32_t code)  	return ref;  } -void ferr_ref_display(struct vty *vty, uint32_t code, bool json) +void log_ref_display(struct vty *vty, uint32_t code, bool json)  { -	struct ferr_ref *ref; +	struct log_ref *ref;  	struct json_object *top, *obj;  	struct list *errlist;  	struct listnode *ln; @@ -121,7 +121,7 @@ void ferr_ref_display(struct vty *vty, uint32_t code, bool json)  	pthread_mutex_unlock(&refs_mtx);  	if (code) { -		ref = ferr_ref_get(code); +		ref = log_ref_get(code);  		if (!ref) {  			vty_out(vty, "Code %"PRIu32" - Unknown\n", code);  			return; @@ -181,11 +181,11 @@ DEFUN_NOSH(show_error_code,  	if (!strmatch(argv[2]->text, "all"))  		arg = strtoul(argv[2]->arg, NULL, 10); -	ferr_ref_display(vty, arg, json); +	log_ref_display(vty, arg, json);  	return CMD_SUCCESS;  } -void ferr_ref_init(void) +void log_ref_init(void)  {  	pthread_mutex_lock(&refs_mtx);  	{ @@ -197,7 +197,7 @@ void ferr_ref_init(void)  	install_element(VIEW_NODE, &show_error_code_cmd);  } -void ferr_ref_fini(void) +void log_ref_fini(void)  {  	pthread_mutex_lock(&refs_mtx);  	{ diff --git a/lib/ferr.h b/lib/ferr.h index 9e31c9a0a4..335875c166 100644 --- a/lib/ferr.h +++ b/lib/ferr.h @@ -132,7 +132,7 @@ struct ferr {  #define ZEBRA_FERR_END      0xF1FFFFFF  #define END_FERR            0xFFFFFFFF -struct ferr_ref { +struct log_ref {  	/* Unique error code displayed to end user as a reference. -1 means  	 * this is an uncoded error that does not have reference material. */  	uint32_t code; @@ -144,16 +144,16 @@ struct ferr_ref {  	const char *suggestion;  }; -void ferr_ref_add(struct ferr_ref *ref); -struct ferr_ref *ferr_ref_get(uint32_t code); -void ferr_ref_display(struct vty *vty, uint32_t code, bool json); +void log_ref_add(struct log_ref *ref); +struct log_ref *log_ref_get(uint32_t code); +void log_ref_display(struct vty *vty, uint32_t code, bool json);  /*   * This function should be called by the   * code in libfrr.c   */ -void ferr_ref_init(void); -void ferr_ref_fini(void); +void log_ref_init(void); +void log_ref_fini(void);  /* get error details.   * diff --git a/lib/lib_errors.c b/lib/lib_errors.c index dcda9955df..332a5b1d45 100644 --- a/lib/lib_errors.c +++ b/lib/lib_errors.c @@ -21,7 +21,7 @@  #include "lib_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_lib_err[] = { +static struct log_ref ferr_lib_err[] = {  	{  		.code = LIB_ERR_PRIVILEGES,  		.title = "Failure to raise or lower privileges", @@ -114,5 +114,5 @@ static struct ferr_ref ferr_lib_err[] = {  void lib_error_init(void)  { -	ferr_ref_add(ferr_lib_err); +	log_ref_add(ferr_lib_err);  } diff --git a/lib/lib_errors.h b/lib/lib_errors.h index 8be33ae254..84f5b8dc10 100644 --- a/lib/lib_errors.h +++ b/lib/lib_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum lib_ferr_refs { +enum lib_log_refs {  	LIB_ERR_PRIVILEGES = LIB_FERR_START,  	LIB_ERR_VRF_START,  	LIB_ERR_SOCKET, diff --git a/lib/libfrr.c b/lib/libfrr.c index a49372675a..b7d4b192d5 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -599,7 +599,7 @@ struct thread_master *frr_init(void)  	vty_init(master);  	memory_init(); -	ferr_ref_init(); +	log_ref_init();  	lib_error_init();  	return master; @@ -941,7 +941,7 @@ void frr_fini(void)  	/* memory_init -> nothing needed */  	vty_terminate();  	cmd_terminate(); -	ferr_ref_fini(); +	log_ref_fini();  	zprivs_terminate(di->privs);  	/* signal_init -> nothing needed */  	thread_master_free(master); diff --git a/nhrpd/nhrp_errors.c b/nhrpd/nhrp_errors.c index 3c0d4c3e5e..c557ba8a66 100644 --- a/nhrpd/nhrp_errors.c +++ b/nhrpd/nhrp_errors.c @@ -24,7 +24,7 @@  #include "nhrp_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_nhrp_err[] = { +static struct log_ref ferr_nhrp_err[] = {  	{  		.code = NHRP_ERR_SWAN,  		.title = "NHRP Strong Swan Error", @@ -45,5 +45,5 @@ static struct ferr_ref ferr_nhrp_err[] = {  void nhrp_error_init(void)  { -	ferr_ref_add(ferr_nhrp_err); +	log_ref_add(ferr_nhrp_err);  } diff --git a/nhrpd/nhrp_errors.h b/nhrpd/nhrp_errors.h index 842af82012..c9e947eb2a 100644 --- a/nhrpd/nhrp_errors.h +++ b/nhrpd/nhrp_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum nhrp_ferr_refs { +enum nhrp_log_refs {  	NHRP_ERR_SWAN = NHRP_FERR_START,  	NHRP_ERR_RESOLVER,  }; diff --git a/ospfd/ospf_errors.c b/ospfd/ospf_errors.c index 60eb3d5657..2927f7cb14 100644 --- a/ospfd/ospf_errors.c +++ b/ospfd/ospf_errors.c @@ -23,7 +23,7 @@  #include "lib/ferr.h"  #include "ospf_errors.h" -static struct ferr_ref ferr_ospf_err[] = { +static struct log_ref ferr_ospf_err[] = {  	{  		.code = OSPF_ERR_PKT_PROCESS,  		.title = "Failure to process a packet", @@ -80,5 +80,5 @@ static struct ferr_ref ferr_ospf_err[] = {  void ospf_error_init(void)  { -	ferr_ref_add(ferr_ospf_err); +	log_ref_add(ferr_ospf_err);  } diff --git a/ospfd/ospf_errors.h b/ospfd/ospf_errors.h index 0ba2d45e49..c3f1018550 100644 --- a/ospfd/ospf_errors.h +++ b/ospfd/ospf_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum ospf_ferr_refs { +enum ospf_log_refs {  	OSPF_ERR_PKT_PROCESS = OSPF_FERR_START,  	OSPF_ERR_ROUTER_LSA_MISMATCH,  	OSPF_ERR_DOMAIN_CORRUPT, diff --git a/pimd/pim_errors.c b/pimd/pim_errors.c index 11451d5abd..d154752bdc 100644 --- a/pimd/pim_errors.c +++ b/pimd/pim_errors.c @@ -24,7 +24,7 @@  #include "pim_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_pim_err[] = { +static struct log_ref ferr_pim_err[] = {  	{  		.code = PIM_ERR_MSDP_PACKET,  		.title = "PIM MSDP Packet Error", @@ -45,5 +45,5 @@ static struct ferr_ref ferr_pim_err[] = {  void pim_error_init(void)  { -	ferr_ref_add(ferr_pim_err); +	log_ref_add(ferr_pim_err);  } diff --git a/pimd/pim_errors.h b/pimd/pim_errors.h index 86d2687feb..ad9c95a93d 100644 --- a/pimd/pim_errors.h +++ b/pimd/pim_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum pim_ferr_refs { +enum pim_log_refs {  	PIM_ERR_MSDP_PACKET = PIM_FERR_START,  	PIM_ERR_CONFIG,  }; diff --git a/ripd/rip_errors.c b/ripd/rip_errors.c index 133d808524..363b1b7fb5 100644 --- a/ripd/rip_errors.c +++ b/ripd/rip_errors.c @@ -23,7 +23,7 @@  #include "lib/ferr.h"  #include "rip_errors.h" -static struct ferr_ref ferr_rip_err[] = { +static struct log_ref ferr_rip_err[] = {  	{  		.code = RIP_ERR_PACKET,  		.title = "RIP Packet Error", @@ -37,5 +37,5 @@ static struct ferr_ref ferr_rip_err[] = {  void rip_error_init(void)  { -	ferr_ref_add(ferr_rip_err); +	log_ref_add(ferr_rip_err);  } diff --git a/ripd/rip_errors.h b/ripd/rip_errors.h index ff5851d095..6b5f5c0169 100644 --- a/ripd/rip_errors.h +++ b/ripd/rip_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum rip_ferr_refs { +enum rip_log_refs {  	RIP_ERR_PACKET = RIP_FERR_START,  	RIP_ERR_CONFIG,  }; diff --git a/watchfrr/watchfrr_errors.c b/watchfrr/watchfrr_errors.c index 494132e52f..662e7f654d 100644 --- a/watchfrr/watchfrr_errors.c +++ b/watchfrr/watchfrr_errors.c @@ -24,7 +24,7 @@  #include "watchfrr_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_watchfrr_err[] = { +static struct log_ref ferr_watchfrr_err[] = {  	{  		.code = WATCHFRR_ERR_CONNECTION,  		.title = "WATCHFRR Connection Error", @@ -39,5 +39,5 @@ static struct ferr_ref ferr_watchfrr_err[] = {  void watchfrr_error_init(void)  { -	ferr_ref_add(ferr_watchfrr_err); +	log_ref_add(ferr_watchfrr_err);  } diff --git a/watchfrr/watchfrr_errors.h b/watchfrr/watchfrr_errors.h index 9d2912da46..4652f950f4 100644 --- a/watchfrr/watchfrr_errors.h +++ b/watchfrr/watchfrr_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum watchfrr_ferr_refs { +enum watchfrr_log_refs {  	WATCHFRR_ERR_CONNECTION = WATCHFRR_FERR_START,  }; diff --git a/zebra/zebra_errors.c b/zebra/zebra_errors.c index 39e3939bb2..198e1cce23 100644 --- a/zebra/zebra_errors.c +++ b/zebra/zebra_errors.c @@ -24,7 +24,7 @@  #include "zebra_errors.h"  /* clang-format off */ -static struct ferr_ref ferr_zebra_err[] = { +static struct log_ref ferr_zebra_err[] = {  	{  		.code = ZEBRA_ERR_LM_RESPONSE,  		.title = "Error reading response from label manager", @@ -274,5 +274,5 @@ static struct ferr_ref ferr_zebra_err[] = {  void zebra_error_init(void)  { -	ferr_ref_add(ferr_zebra_err); +	log_ref_add(ferr_zebra_err);  } diff --git a/zebra/zebra_errors.h b/zebra/zebra_errors.h index f5f4894ece..f8a00bce0d 100644 --- a/zebra/zebra_errors.h +++ b/zebra/zebra_errors.h @@ -23,7 +23,7 @@  #include "lib/ferr.h" -enum zebra_ferr_refs { +enum zebra_log_refs {  	ZEBRA_ERR_LM_RESPONSE = ZEBRA_FERR_START,  	ZEBRA_ERR_LM_NO_SUCH_CLIENT,  	ZEBRA_ERR_LM_RELAY_FAILED,  | 
