mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 02:46:26 +00:00
pimd: Move debugs into pim_router structure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
36417fcc20
commit
046b1aa7d4
@ -44,6 +44,8 @@ enum pim_spt_switchover {
|
||||
|
||||
struct pim_router {
|
||||
struct thread_master *master;
|
||||
|
||||
uint32_t debugs;
|
||||
};
|
||||
|
||||
/* Per VRF PIM DB */
|
||||
|
@ -51,7 +51,6 @@ DEFINE_MTYPE_STATIC(PIMD, ROUTER, "PIM Router information");
|
||||
|
||||
struct pim_router *router = NULL;
|
||||
|
||||
uint32_t qpim_debugs = 0;
|
||||
int qpim_t_periodic =
|
||||
PIM_DEFAULT_T_PERIODIC; /* Period between Join/Prune Messages */
|
||||
struct pim_assert_metric qpim_infinite_assert_metric;
|
||||
@ -89,6 +88,7 @@ void pim_router_init(void)
|
||||
{
|
||||
router = XCALLOC(MTYPE_ROUTER, sizeof(*router));
|
||||
|
||||
router->debugs = 0;
|
||||
router->master = frr_init();
|
||||
}
|
||||
|
||||
|
174
pimd/pimd.h
174
pimd/pimd.h
@ -134,7 +134,6 @@ const char *const PIM_ALL_IGMP_ROUTERS;
|
||||
|
||||
extern struct pim_router *router;
|
||||
extern struct zebra_privs_t pimd_privs;
|
||||
uint32_t qpim_debugs;
|
||||
struct in_addr qpim_all_pim_routers_addr;
|
||||
int qpim_t_periodic; /* Period between Join/Prune Messages */
|
||||
struct pim_assert_metric qpim_infinite_assert_metric;
|
||||
@ -156,86 +155,105 @@ extern int32_t qpim_register_probe_time;
|
||||
#define PIM_REGISTER_SUPPRESSION_TIME_DEFAULT (60)
|
||||
#define PIM_REGISTER_PROBE_TIME_DEFAULT (5)
|
||||
|
||||
#define PIM_DEBUG_PIM_EVENTS (qpim_debugs & PIM_MASK_PIM_EVENTS)
|
||||
#define PIM_DEBUG_PIM_EVENTS_DETAIL (qpim_debugs & PIM_MASK_PIM_EVENTS_DETAIL)
|
||||
#define PIM_DEBUG_PIM_PACKETS (qpim_debugs & PIM_MASK_PIM_PACKETS)
|
||||
#define PIM_DEBUG_PIM_PACKETDUMP_SEND (qpim_debugs & PIM_MASK_PIM_PACKETDUMP_SEND)
|
||||
#define PIM_DEBUG_PIM_PACKETDUMP_RECV (qpim_debugs & PIM_MASK_PIM_PACKETDUMP_RECV)
|
||||
#define PIM_DEBUG_PIM_TRACE (qpim_debugs & PIM_MASK_PIM_TRACE)
|
||||
#define PIM_DEBUG_PIM_TRACE_DETAIL (qpim_debugs & PIM_MASK_PIM_TRACE_DETAIL)
|
||||
#define PIM_DEBUG_IGMP_EVENTS (qpim_debugs & PIM_MASK_IGMP_EVENTS)
|
||||
#define PIM_DEBUG_IGMP_PACKETS (qpim_debugs & PIM_MASK_IGMP_PACKETS)
|
||||
#define PIM_DEBUG_IGMP_TRACE (qpim_debugs & PIM_MASK_IGMP_TRACE)
|
||||
#define PIM_DEBUG_IGMP_TRACE_DETAIL (qpim_debugs & PIM_MASK_IGMP_TRACE_DETAIL)
|
||||
#define PIM_DEBUG_ZEBRA (qpim_debugs & PIM_MASK_ZEBRA)
|
||||
#define PIM_DEBUG_SSMPINGD (qpim_debugs & PIM_MASK_SSMPINGD)
|
||||
#define PIM_DEBUG_MROUTE (qpim_debugs & PIM_MASK_MROUTE)
|
||||
#define PIM_DEBUG_MROUTE_DETAIL (qpim_debugs & PIM_MASK_MROUTE_DETAIL)
|
||||
#define PIM_DEBUG_PIM_HELLO (qpim_debugs & PIM_MASK_PIM_HELLO)
|
||||
#define PIM_DEBUG_PIM_J_P (qpim_debugs & PIM_MASK_PIM_J_P)
|
||||
#define PIM_DEBUG_PIM_REG (qpim_debugs & PIM_MASK_PIM_REG)
|
||||
#define PIM_DEBUG_STATIC (qpim_debugs & PIM_MASK_STATIC)
|
||||
#define PIM_DEBUG_MSDP_EVENTS (qpim_debugs & PIM_MASK_MSDP_EVENTS)
|
||||
#define PIM_DEBUG_MSDP_PACKETS (qpim_debugs & PIM_MASK_MSDP_PACKETS)
|
||||
#define PIM_DEBUG_MSDP_INTERNAL (qpim_debugs & PIM_MASK_MSDP_INTERNAL)
|
||||
#define PIM_DEBUG_PIM_NHT (qpim_debugs & PIM_MASK_PIM_NHT)
|
||||
#define PIM_DEBUG_PIM_NHT_DETAIL (qpim_debugs & PIM_MASK_PIM_NHT_DETAIL)
|
||||
#define PIM_DEBUG_PIM_NHT_RP (qpim_debugs & PIM_MASK_PIM_NHT_RP)
|
||||
#define PIM_DEBUG_MTRACE (qpim_debugs & PIM_MASK_MTRACE)
|
||||
#define PIM_DEBUG_PIM_EVENTS (router->debugs & PIM_MASK_PIM_EVENTS)
|
||||
#define PIM_DEBUG_PIM_EVENTS_DETAIL \
|
||||
(router->debugs & PIM_MASK_PIM_EVENTS_DETAIL)
|
||||
#define PIM_DEBUG_PIM_PACKETS (router->debugs & PIM_MASK_PIM_PACKETS)
|
||||
#define PIM_DEBUG_PIM_PACKETDUMP_SEND \
|
||||
(router->debugs & PIM_MASK_PIM_PACKETDUMP_SEND)
|
||||
#define PIM_DEBUG_PIM_PACKETDUMP_RECV \
|
||||
(router->debugs & PIM_MASK_PIM_PACKETDUMP_RECV)
|
||||
#define PIM_DEBUG_PIM_TRACE (router->debugs & PIM_MASK_PIM_TRACE)
|
||||
#define PIM_DEBUG_PIM_TRACE_DETAIL (router->debugs & PIM_MASK_PIM_TRACE_DETAIL)
|
||||
#define PIM_DEBUG_IGMP_EVENTS (router->debugs & PIM_MASK_IGMP_EVENTS)
|
||||
#define PIM_DEBUG_IGMP_PACKETS (router->debugs & PIM_MASK_IGMP_PACKETS)
|
||||
#define PIM_DEBUG_IGMP_TRACE (router->debugs & PIM_MASK_IGMP_TRACE)
|
||||
#define PIM_DEBUG_IGMP_TRACE_DETAIL \
|
||||
(router->debugs & PIM_MASK_IGMP_TRACE_DETAIL)
|
||||
#define PIM_DEBUG_ZEBRA (router->debugs & PIM_MASK_ZEBRA)
|
||||
#define PIM_DEBUG_SSMPINGD (router->debugs & PIM_MASK_SSMPINGD)
|
||||
#define PIM_DEBUG_MROUTE (router->debugs & PIM_MASK_MROUTE)
|
||||
#define PIM_DEBUG_MROUTE_DETAIL (router->debugs & PIM_MASK_MROUTE_DETAIL)
|
||||
#define PIM_DEBUG_PIM_HELLO (router->debugs & PIM_MASK_PIM_HELLO)
|
||||
#define PIM_DEBUG_PIM_J_P (router->debugs & PIM_MASK_PIM_J_P)
|
||||
#define PIM_DEBUG_PIM_REG (router->debugs & PIM_MASK_PIM_REG)
|
||||
#define PIM_DEBUG_STATIC (router->debugs & PIM_MASK_STATIC)
|
||||
#define PIM_DEBUG_MSDP_EVENTS (router->debugs & PIM_MASK_MSDP_EVENTS)
|
||||
#define PIM_DEBUG_MSDP_PACKETS (router->debugs & PIM_MASK_MSDP_PACKETS)
|
||||
#define PIM_DEBUG_MSDP_INTERNAL (router->debugs & PIM_MASK_MSDP_INTERNAL)
|
||||
#define PIM_DEBUG_PIM_NHT (router->debugs & PIM_MASK_PIM_NHT)
|
||||
#define PIM_DEBUG_PIM_NHT_DETAIL (router->debugs & PIM_MASK_PIM_NHT_DETAIL)
|
||||
#define PIM_DEBUG_PIM_NHT_RP (router->debugs & PIM_MASK_PIM_NHT_RP)
|
||||
#define PIM_DEBUG_MTRACE (router->debugs & PIM_MASK_MTRACE)
|
||||
|
||||
#define PIM_DEBUG_EVENTS (qpim_debugs & (PIM_MASK_PIM_EVENTS | PIM_MASK_IGMP_EVENTS | PIM_MASK_MSDP_EVENTS))
|
||||
#define PIM_DEBUG_PACKETS (qpim_debugs & (PIM_MASK_PIM_PACKETS | PIM_MASK_IGMP_PACKETS | PIM_MASK_MSDP_PACKETS))
|
||||
#define PIM_DEBUG_TRACE (qpim_debugs & (PIM_MASK_PIM_TRACE | PIM_MASK_IGMP_TRACE))
|
||||
#define PIM_DEBUG_EVENTS \
|
||||
(router->debugs \
|
||||
& (PIM_MASK_PIM_EVENTS | PIM_MASK_IGMP_EVENTS \
|
||||
| PIM_MASK_MSDP_EVENTS))
|
||||
#define PIM_DEBUG_PACKETS \
|
||||
(router->debugs \
|
||||
& (PIM_MASK_PIM_PACKETS | PIM_MASK_IGMP_PACKETS \
|
||||
| PIM_MASK_MSDP_PACKETS))
|
||||
#define PIM_DEBUG_TRACE \
|
||||
(router->debugs & (PIM_MASK_PIM_TRACE | PIM_MASK_IGMP_TRACE))
|
||||
|
||||
#define PIM_DO_DEBUG_PIM_EVENTS (qpim_debugs |= PIM_MASK_PIM_EVENTS)
|
||||
#define PIM_DO_DEBUG_PIM_PACKETS (qpim_debugs |= PIM_MASK_PIM_PACKETS)
|
||||
#define PIM_DO_DEBUG_PIM_PACKETDUMP_SEND (qpim_debugs |= PIM_MASK_PIM_PACKETDUMP_SEND)
|
||||
#define PIM_DO_DEBUG_PIM_PACKETDUMP_RECV (qpim_debugs |= PIM_MASK_PIM_PACKETDUMP_RECV)
|
||||
#define PIM_DO_DEBUG_PIM_TRACE (qpim_debugs |= PIM_MASK_PIM_TRACE)
|
||||
#define PIM_DO_DEBUG_PIM_TRACE_DETAIL (qpim_debugs |= PIM_MASK_PIM_TRACE_DETAIL)
|
||||
#define PIM_DO_DEBUG_IGMP_EVENTS (qpim_debugs |= PIM_MASK_IGMP_EVENTS)
|
||||
#define PIM_DO_DEBUG_IGMP_PACKETS (qpim_debugs |= PIM_MASK_IGMP_PACKETS)
|
||||
#define PIM_DO_DEBUG_IGMP_TRACE (qpim_debugs |= PIM_MASK_IGMP_TRACE)
|
||||
#define PIM_DO_DEBUG_IGMP_TRACE_DETAIL (qpim_debugs |= PIM_MASK_IGMP_TRACE_DETAIL)
|
||||
#define PIM_DO_DEBUG_ZEBRA (qpim_debugs |= PIM_MASK_ZEBRA)
|
||||
#define PIM_DO_DEBUG_SSMPINGD (qpim_debugs |= PIM_MASK_SSMPINGD)
|
||||
#define PIM_DO_DEBUG_MROUTE (qpim_debugs |= PIM_MASK_MROUTE)
|
||||
#define PIM_DO_DEBUG_MROUTE_DETAIL (qpim_debugs |= PIM_MASK_MROUTE_DETAIL)
|
||||
#define PIM_DO_DEBUG_PIM_HELLO (qpim_debugs |= PIM_MASK_PIM_HELLO)
|
||||
#define PIM_DO_DEBUG_PIM_J_P (qpim_debugs |= PIM_MASK_PIM_J_P)
|
||||
#define PIM_DO_DEBUG_PIM_REG (qpim_debugs |= PIM_MASK_PIM_REG)
|
||||
#define PIM_DO_DEBUG_STATIC (qpim_debugs |= PIM_MASK_STATIC)
|
||||
#define PIM_DO_DEBUG_MSDP_EVENTS (qpim_debugs |= PIM_MASK_MSDP_EVENTS)
|
||||
#define PIM_DO_DEBUG_MSDP_PACKETS (qpim_debugs |= PIM_MASK_MSDP_PACKETS)
|
||||
#define PIM_DO_DEBUG_MSDP_INTERNAL (qpim_debugs |= PIM_MASK_MSDP_INTERNAL)
|
||||
#define PIM_DO_DEBUG_PIM_NHT (qpim_debugs |= PIM_MASK_PIM_NHT)
|
||||
#define PIM_DO_DEBUG_PIM_NHT_RP (qpim_debugs |= PIM_MASK_PIM_NHT_RP)
|
||||
#define PIM_DO_DEBUG_MTRACE (qpim_debugs |= PIM_MASK_MTRACE)
|
||||
#define PIM_DO_DEBUG_PIM_EVENTS (router->debugs |= PIM_MASK_PIM_EVENTS)
|
||||
#define PIM_DO_DEBUG_PIM_PACKETS (router->debugs |= PIM_MASK_PIM_PACKETS)
|
||||
#define PIM_DO_DEBUG_PIM_PACKETDUMP_SEND \
|
||||
(router->debugs |= PIM_MASK_PIM_PACKETDUMP_SEND)
|
||||
#define PIM_DO_DEBUG_PIM_PACKETDUMP_RECV \
|
||||
(router->debugs |= PIM_MASK_PIM_PACKETDUMP_RECV)
|
||||
#define PIM_DO_DEBUG_PIM_TRACE (router->debugs |= PIM_MASK_PIM_TRACE)
|
||||
#define PIM_DO_DEBUG_PIM_TRACE_DETAIL \
|
||||
(router->debugs |= PIM_MASK_PIM_TRACE_DETAIL)
|
||||
#define PIM_DO_DEBUG_IGMP_EVENTS (router->debugs |= PIM_MASK_IGMP_EVENTS)
|
||||
#define PIM_DO_DEBUG_IGMP_PACKETS (router->debugs |= PIM_MASK_IGMP_PACKETS)
|
||||
#define PIM_DO_DEBUG_IGMP_TRACE (router->debugs |= PIM_MASK_IGMP_TRACE)
|
||||
#define PIM_DO_DEBUG_IGMP_TRACE_DETAIL \
|
||||
(router->debugs |= PIM_MASK_IGMP_TRACE_DETAIL)
|
||||
#define PIM_DO_DEBUG_ZEBRA (router->debugs |= PIM_MASK_ZEBRA)
|
||||
#define PIM_DO_DEBUG_SSMPINGD (router->debugs |= PIM_MASK_SSMPINGD)
|
||||
#define PIM_DO_DEBUG_MROUTE (router->debugs |= PIM_MASK_MROUTE)
|
||||
#define PIM_DO_DEBUG_MROUTE_DETAIL (router->debugs |= PIM_MASK_MROUTE_DETAIL)
|
||||
#define PIM_DO_DEBUG_PIM_HELLO (router->debugs |= PIM_MASK_PIM_HELLO)
|
||||
#define PIM_DO_DEBUG_PIM_J_P (router->debugs |= PIM_MASK_PIM_J_P)
|
||||
#define PIM_DO_DEBUG_PIM_REG (router->debugs |= PIM_MASK_PIM_REG)
|
||||
#define PIM_DO_DEBUG_STATIC (router->debugs |= PIM_MASK_STATIC)
|
||||
#define PIM_DO_DEBUG_MSDP_EVENTS (router->debugs |= PIM_MASK_MSDP_EVENTS)
|
||||
#define PIM_DO_DEBUG_MSDP_PACKETS (router->debugs |= PIM_MASK_MSDP_PACKETS)
|
||||
#define PIM_DO_DEBUG_MSDP_INTERNAL (router->debugs |= PIM_MASK_MSDP_INTERNAL)
|
||||
#define PIM_DO_DEBUG_PIM_NHT (router->debugs |= PIM_MASK_PIM_NHT)
|
||||
#define PIM_DO_DEBUG_PIM_NHT_RP (router->debugs |= PIM_MASK_PIM_NHT_RP)
|
||||
#define PIM_DO_DEBUG_MTRACE (router->debugs |= PIM_MASK_MTRACE)
|
||||
|
||||
#define PIM_DONT_DEBUG_PIM_EVENTS (qpim_debugs &= ~PIM_MASK_PIM_EVENTS)
|
||||
#define PIM_DONT_DEBUG_PIM_PACKETS (qpim_debugs &= ~PIM_MASK_PIM_PACKETS)
|
||||
#define PIM_DONT_DEBUG_PIM_PACKETDUMP_SEND (qpim_debugs &= ~PIM_MASK_PIM_PACKETDUMP_SEND)
|
||||
#define PIM_DONT_DEBUG_PIM_PACKETDUMP_RECV (qpim_debugs &= ~PIM_MASK_PIM_PACKETDUMP_RECV)
|
||||
#define PIM_DONT_DEBUG_PIM_TRACE (qpim_debugs &= ~PIM_MASK_PIM_TRACE)
|
||||
#define PIM_DONT_DEBUG_PIM_TRACE_DETAIL (qpim_debugs &= ~PIM_MASK_PIM_TRACE_DETAIL)
|
||||
#define PIM_DONT_DEBUG_IGMP_EVENTS (qpim_debugs &= ~PIM_MASK_IGMP_EVENTS)
|
||||
#define PIM_DONT_DEBUG_IGMP_PACKETS (qpim_debugs &= ~PIM_MASK_IGMP_PACKETS)
|
||||
#define PIM_DONT_DEBUG_IGMP_TRACE (qpim_debugs &= ~PIM_MASK_IGMP_TRACE)
|
||||
#define PIM_DONT_DEBUG_IGMP_TRACE_DETAIL (qpim_debugs &= ~PIM_MASK_IGMP_TRACE_DETAIL)
|
||||
#define PIM_DONT_DEBUG_ZEBRA (qpim_debugs &= ~PIM_MASK_ZEBRA)
|
||||
#define PIM_DONT_DEBUG_SSMPINGD (qpim_debugs &= ~PIM_MASK_SSMPINGD)
|
||||
#define PIM_DONT_DEBUG_MROUTE (qpim_debugs &= ~PIM_MASK_MROUTE)
|
||||
#define PIM_DONT_DEBUG_MROUTE_DETAIL (qpim_debugs &= ~PIM_MASK_MROUTE_DETAIL)
|
||||
#define PIM_DONT_DEBUG_PIM_HELLO (qpim_debugs &= ~PIM_MASK_PIM_HELLO)
|
||||
#define PIM_DONT_DEBUG_PIM_J_P (qpim_debugs &= ~PIM_MASK_PIM_J_P)
|
||||
#define PIM_DONT_DEBUG_PIM_REG (qpim_debugs &= ~PIM_MASK_PIM_REG)
|
||||
#define PIM_DONT_DEBUG_STATIC (qpim_debugs &= ~PIM_MASK_STATIC)
|
||||
#define PIM_DONT_DEBUG_MSDP_EVENTS (qpim_debugs &= ~PIM_MASK_MSDP_EVENTS)
|
||||
#define PIM_DONT_DEBUG_MSDP_PACKETS (qpim_debugs &= ~PIM_MASK_MSDP_PACKETS)
|
||||
#define PIM_DONT_DEBUG_MSDP_INTERNAL (qpim_debugs &= ~PIM_MASK_MSDP_INTERNAL)
|
||||
#define PIM_DONT_DEBUG_PIM_NHT (qpim_debugs &= ~PIM_MASK_PIM_NHT)
|
||||
#define PIM_DONT_DEBUG_PIM_NHT_RP (qpim_debugs &= ~PIM_MASK_PIM_NHT_RP)
|
||||
#define PIM_DONT_DEBUG_MTRACE (qpim_debugs &= ~PIM_MASK_MTRACE)
|
||||
#define PIM_DONT_DEBUG_PIM_EVENTS (router->debugs &= ~PIM_MASK_PIM_EVENTS)
|
||||
#define PIM_DONT_DEBUG_PIM_PACKETS (router->debugs &= ~PIM_MASK_PIM_PACKETS)
|
||||
#define PIM_DONT_DEBUG_PIM_PACKETDUMP_SEND \
|
||||
(router->debugs &= ~PIM_MASK_PIM_PACKETDUMP_SEND)
|
||||
#define PIM_DONT_DEBUG_PIM_PACKETDUMP_RECV \
|
||||
(router->debugs &= ~PIM_MASK_PIM_PACKETDUMP_RECV)
|
||||
#define PIM_DONT_DEBUG_PIM_TRACE (router->debugs &= ~PIM_MASK_PIM_TRACE)
|
||||
#define PIM_DONT_DEBUG_PIM_TRACE_DETAIL \
|
||||
(router->debugs &= ~PIM_MASK_PIM_TRACE_DETAIL)
|
||||
#define PIM_DONT_DEBUG_IGMP_EVENTS (router->debugs &= ~PIM_MASK_IGMP_EVENTS)
|
||||
#define PIM_DONT_DEBUG_IGMP_PACKETS (router->debugs &= ~PIM_MASK_IGMP_PACKETS)
|
||||
#define PIM_DONT_DEBUG_IGMP_TRACE (router->debugs &= ~PIM_MASK_IGMP_TRACE)
|
||||
#define PIM_DONT_DEBUG_IGMP_TRACE_DETAIL \
|
||||
(router->debugs &= ~PIM_MASK_IGMP_TRACE_DETAIL)
|
||||
#define PIM_DONT_DEBUG_ZEBRA (router->debugs &= ~PIM_MASK_ZEBRA)
|
||||
#define PIM_DONT_DEBUG_SSMPINGD (router->debugs &= ~PIM_MASK_SSMPINGD)
|
||||
#define PIM_DONT_DEBUG_MROUTE (router->debugs &= ~PIM_MASK_MROUTE)
|
||||
#define PIM_DONT_DEBUG_MROUTE_DETAIL (router->debugs &= ~PIM_MASK_MROUTE_DETAIL)
|
||||
#define PIM_DONT_DEBUG_PIM_HELLO (router->debugs &= ~PIM_MASK_PIM_HELLO)
|
||||
#define PIM_DONT_DEBUG_PIM_J_P (router->debugs &= ~PIM_MASK_PIM_J_P)
|
||||
#define PIM_DONT_DEBUG_PIM_REG (router->debugs &= ~PIM_MASK_PIM_REG)
|
||||
#define PIM_DONT_DEBUG_STATIC (router->debugs &= ~PIM_MASK_STATIC)
|
||||
#define PIM_DONT_DEBUG_MSDP_EVENTS (router->debugs &= ~PIM_MASK_MSDP_EVENTS)
|
||||
#define PIM_DONT_DEBUG_MSDP_PACKETS (router->debugs &= ~PIM_MASK_MSDP_PACKETS)
|
||||
#define PIM_DONT_DEBUG_MSDP_INTERNAL (router->debugs &= ~PIM_MASK_MSDP_INTERNAL)
|
||||
#define PIM_DONT_DEBUG_PIM_NHT (router->debugs &= ~PIM_MASK_PIM_NHT)
|
||||
#define PIM_DONT_DEBUG_PIM_NHT_RP (router->debugs &= ~PIM_MASK_PIM_NHT_RP)
|
||||
#define PIM_DONT_DEBUG_MTRACE (router->debugs &= ~PIM_MASK_MTRACE)
|
||||
|
||||
void pim_router_init(void);
|
||||
void pim_router_terminate(void);
|
||||
|
Loading…
Reference in New Issue
Block a user