diff options
| author | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-03-02 06:40:19 -0800 |
|---|---|---|
| committer | Sai Gomathi N <nsaigomathi@vmware.com> | 2022-04-05 00:00:10 -0700 |
| commit | 25e1db42467de370d4b720fba0a10aee256230c9 (patch) | |
| tree | a8607406ef4036245d934e736b51bfb637cb5642 /pimd/pim_cmd_common.h | |
| parent | e7ec758dff23efcd34917d51228af8c36911b745 (diff) | |
pimd: Moving the common function from pim_cmd.h file
Moving the PIM_DECLVAR_CONTEXT function to the
common file pim_cmd_common.h file
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd/pim_cmd_common.h')
| -rw-r--r-- | pimd/pim_cmd_common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pimd/pim_cmd_common.h b/pimd/pim_cmd_common.h index 1ea2ef58ed..3bcd0d5d6d 100644 --- a/pimd/pim_cmd_common.h +++ b/pimd/pim_cmd_common.h @@ -111,4 +111,12 @@ int gm_process_no_last_member_query_interval_cmd(struct vty *vty); (vrf) ? vrf->info : pim_get_pim_instance(VRF_DEFAULT); \ vrf = (vrf) ? vrf : pim->vrf +/* + * 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_COMMON_H */ |
