]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_cmd.h
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / pimd / pim_cmd.h
index 64751d8682b12fc6da3752dcad735645acaab43e..b58da30bdd64847fb9d873d783d34c8e5db86da0 100644 (file)
 #define DEBUG_MSDP_EVENTS_STR                       "MSDP protocol events\n"
 #define DEBUG_MSDP_INTERNAL_STR                     "MSDP protocol internal\n"
 #define DEBUG_MSDP_PACKETS_STR                      "MSDP protocol packets\n"
+#define DEBUG_MTRACE_STR                            "Mtrace protocol activity\n"
 
 void pim_cmd_init(void);
 
+/*
+ * Special Macro to allow us to get the correct pim_instance;
+ */
+#define PIM_DECLVAR_CONTEXT(A, B)                                              \
+       struct vrf *A = VTY_GET_CONTEXT(vrf);                                  \
+       struct pim_instance *B =                                               \
+               (vrf) ? vrf->info : pim_get_pim_instance(VRF_DEFAULT);         \
+       vrf = (vrf) ? vrf : pim->vrf;
+
 #endif /* PIM_CMD_H */