]> git.proxmox.com Git - mirror_frr.git/blame - ospfd/ospf_vty.h
Merge pull request #13677 from LabNConsulting/chopps/bad-abstract
[mirror_frr.git] / ospfd / ospf_vty.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
718e3744 2/* OSPF VTY interface.
3 * Copyright (C) 2000 Toshiaki Takada
718e3744 4 */
5
4dadc291 6#ifndef _QUAGGA_OSPF_VTY_H
7#define _QUAGGA_OSPF_VTY_H
718e3744 8
4dadc291 9/* Macros. */
d62a17ae 10#define VTY_GET_OSPF_AREA_ID(V, F, STR) \
11 { \
12 int retv; \
13 retv = str2area_id((STR), &(V), &(F)); \
14 if (retv < 0) { \
15 vty_out(vty, "%% Invalid OSPF area ID\n"); \
16 return CMD_WARNING; \
17 } \
18 }
718e3744 19
d62a17ae 20#define VTY_GET_OSPF_AREA_ID_NO_BB(NAME, V, F, STR) \
21 { \
22 int retv; \
23 retv = str2area_id((STR), &(V), &(F)); \
24 if (retv < 0) { \
25 vty_out(vty, "%% Invalid OSPF area ID\n"); \
26 return CMD_WARNING; \
27 } \
28 if (OSPF_IS_AREA_ID_BACKBONE((V))) { \
29 vty_out(vty, \
30 "%% You can't configure %s to backbone\n", \
31 NAME); \
996c9314 32 return CMD_WARNING; \
d62a17ae 33 } \
34 }
718e3744 35
36/* Prototypes. */
d62a17ae 37extern void ospf_vty_init(void);
38extern void ospf_vty_show_init(void);
39extern void ospf_vty_clear_init(void);
40extern int str2area_id(const char *, struct in_addr *, int *);
4dadc291 41
7fd0729f
G
42/* unit tests */
43void show_ip_ospf_database_summary(struct vty *vty, struct ospf *ospf, int self,
44 json_object *json);
45
4dadc291 46#endif /* _QUAGGA_OSPF_VTY_H */