blob: 5dbf5739b351678f8ed0f1b255a8bc9ceaef9964 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001/*
2 * Zebra connect library for OSPFd
3 * Copyright (C) 1997, 98, 99, 2000 Kunihiro Ishiguro, Toshiaki Takada
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Zebra; see the file COPYING. If not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23#ifndef _ZEBRA_OSPF_ZEBRA_H
24#define _ZEBRA_OSPF_ZEBRA_H
25
26#define EXTERNAL_METRIC_TYPE_1 0
27#define EXTERNAL_METRIC_TYPE_2 1
28
29#define DEFAULT_ROUTE ZEBRA_ROUTE_MAX
30#define DEFAULT_ROUTE_TYPE(T) ((T) == DEFAULT_ROUTE)
31
32/* OSPF distance. */
33struct ospf_distance
34{
35 /* Distance value for the IP source prefix. */
36 u_char distance;
37
38 /* Name of the access-list to be matched. */
39 char *access_list;
40};
41
42/* Prototypes */
43void ospf_zclient_start ();
44
45void ospf_zebra_add (struct prefix_ipv4 *, struct ospf_route *);
46void ospf_zebra_delete (struct prefix_ipv4 *, struct ospf_route *);
47
48void ospf_zebra_add_discard (struct prefix_ipv4 *);
49void ospf_zebra_delete_discard (struct prefix_ipv4 *);
50
51int ospf_default_originate_timer (struct thread *);
52
53int ospf_redistribute_check (struct external_info *, int *);
54int ospf_distribute_check_connected (struct external_info *);
55void ospf_distribute_list_update (int);
56
57int ospf_is_type_redistributed (int);
58int ospf_redistribute_unset (int);
59
60void ospf_distance_reset ();
61u_char ospf_distance_apply (struct prefix_ipv4 *, struct ospf_route *);
62
63struct vty;
64
65int ospf_redistribute_set (int, int, int);
66int ospf_redistribute_unset (int);
67int ospf_redistribute_default_set (int, int, int);
68int ospf_redistribute_default_unset ();
69int ospf_distribute_list_out_set (int, char *);
70int ospf_distribute_list_out_unset (int, char *);
71void ospf_routemap_set (int, char *);
72void ospf_routemap_unset (int);
73int ospf_distance_set (struct vty *, char *, char *, char *);
74int ospf_distance_unset (struct vty *, char *, char *, char *);
75void ospf_zebra_init ();
76
77#endif /* _ZEBRA_OSPF_ZEBRA_H */
78