]> git.proxmox.com Git - mirror_frr.git/blame - ospfd/ospf_vty.h
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / ospfd / ospf_vty.h
CommitLineData
718e3744 1/* OSPF VTY interface.
2 * Copyright (C) 2000 Toshiaki Takada
3 *
4 * This file is part of GNU Zebra.
5 *
6 * GNU Zebra is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
9 * later version.
10 *
11 * GNU Zebra is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
896014f4
DL
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
718e3744 19 */
20
4dadc291 21#ifndef _QUAGGA_OSPF_VTY_H
22#define _QUAGGA_OSPF_VTY_H
718e3744 23
4dadc291 24/* Macros. */
d62a17ae 25#define VTY_GET_OSPF_AREA_ID(V, F, STR) \
26 { \
27 int retv; \
28 retv = str2area_id((STR), &(V), &(F)); \
29 if (retv < 0) { \
30 vty_out(vty, "%% Invalid OSPF area ID\n"); \
31 return CMD_WARNING; \
32 } \
33 }
718e3744 34
d62a17ae 35#define VTY_GET_OSPF_AREA_ID_NO_BB(NAME, V, F, STR) \
36 { \
37 int retv; \
38 retv = str2area_id((STR), &(V), &(F)); \
39 if (retv < 0) { \
40 vty_out(vty, "%% Invalid OSPF area ID\n"); \
41 return CMD_WARNING; \
42 } \
43 if (OSPF_IS_AREA_ID_BACKBONE((V))) { \
44 vty_out(vty, \
45 "%% You can't configure %s to backbone\n", \
46 NAME); \
996c9314 47 return CMD_WARNING; \
d62a17ae 48 } \
49 }
718e3744 50
51/* Prototypes. */
d62a17ae 52extern void ospf_vty_init(void);
53extern void ospf_vty_show_init(void);
54extern void ospf_vty_clear_init(void);
55extern int str2area_id(const char *, struct in_addr *, int *);
4dadc291 56
57#endif /* _QUAGGA_OSPF_VTY_H */