]>
Commit | Line | Data |
---|---|---|
718e3744 | 1 | /* |
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 | * | |
896014f4 DL |
17 | * You should have received a copy of the GNU General Public License along |
18 | * with this program; see the file COPYING; if not, write to the Free Software | |
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
718e3744 | 20 | */ |
21 | ||
22 | #ifndef _ZEBRA_OSPF_ZEBRA_H | |
23 | #define _ZEBRA_OSPF_ZEBRA_H | |
24 | ||
31a5976b | 25 | #include "vty.h" |
3012671f | 26 | #include "hook.h" |
31a5976b | 27 | |
718e3744 | 28 | #define EXTERNAL_METRIC_TYPE_1 0 |
29 | #define EXTERNAL_METRIC_TYPE_2 1 | |
30 | ||
31 | #define DEFAULT_ROUTE ZEBRA_ROUTE_MAX | |
32 | #define DEFAULT_ROUTE_TYPE(T) ((T) == DEFAULT_ROUTE) | |
33 | ||
34 | /* OSPF distance. */ | |
35 | struct ospf_distance | |
36 | { | |
37 | /* Distance value for the IP source prefix. */ | |
38 | u_char distance; | |
39 | ||
40 | /* Name of the access-list to be matched. */ | |
41 | char *access_list; | |
42 | }; | |
43 | ||
44 | /* Prototypes */ | |
4dadc291 | 45 | extern void ospf_zebra_add (struct prefix_ipv4 *, struct ospf_route *); |
46 | extern void ospf_zebra_delete (struct prefix_ipv4 *, struct ospf_route *); | |
718e3744 | 47 | |
4dadc291 | 48 | extern void ospf_zebra_add_discard (struct prefix_ipv4 *); |
49 | extern void ospf_zebra_delete_discard (struct prefix_ipv4 *); | |
718e3744 | 50 | |
4dadc291 | 51 | extern int ospf_redistribute_check (struct ospf *, struct external_info *, |
52 | int *); | |
53 | extern int ospf_distribute_check_connected (struct ospf *, | |
54 | struct external_info *); | |
7c8ff89e | 55 | extern void ospf_distribute_list_update (struct ospf *, uintptr_t, u_short); |
718e3744 | 56 | |
7c8ff89e | 57 | extern int ospf_is_type_redistributed (int, u_short); |
4dadc291 | 58 | extern void ospf_distance_reset (struct ospf *); |
59 | extern u_char ospf_distance_apply (struct prefix_ipv4 *, struct ospf_route *); | |
7c8ff89e DS |
60 | extern struct ospf_external *ospf_external_lookup (u_char, u_short); |
61 | extern struct ospf_external *ospf_external_add (u_char, u_short); | |
62 | extern void ospf_external_del (u_char, u_short); | |
63 | extern struct ospf_redist *ospf_redist_lookup (struct ospf *, u_char, u_short); | |
64 | extern struct ospf_redist *ospf_redist_add (struct ospf *, u_char, u_short); | |
65 | extern void ospf_redist_del (struct ospf *, u_char, u_short); | |
718e3744 | 66 | |
7c8ff89e DS |
67 | |
68 | extern int ospf_redistribute_set (struct ospf *, int, u_short, int, int); | |
69 | extern int ospf_redistribute_unset (struct ospf *, int, u_short); | |
4dadc291 | 70 | extern int ospf_redistribute_default_set (struct ospf *, int, int, int); |
71 | extern int ospf_redistribute_default_unset (struct ospf *); | |
72 | extern int ospf_distribute_list_out_set (struct ospf *, int, const char *); | |
73 | extern int ospf_distribute_list_out_unset (struct ospf *, int, const char *); | |
7c8ff89e DS |
74 | extern void ospf_routemap_set (struct ospf_redist *, const char *); |
75 | extern void ospf_routemap_unset (struct ospf_redist *); | |
4dadc291 | 76 | extern int ospf_distance_set (struct vty *, struct ospf *, const char *, |
77 | const char *, const char *); | |
78 | extern int ospf_distance_unset (struct vty *, struct ospf *, const char *, | |
79 | const char *, const char *); | |
4140ca4d | 80 | extern void ospf_zebra_init(struct thread_master *, u_short); |
718e3744 | 81 | |
3012671f DL |
82 | DECLARE_HOOK(ospf_if_update, (struct interface *ifp), (ifp)) |
83 | DECLARE_HOOK(ospf_if_delete, (struct interface *ifp), (ifp)) | |
84 | ||
718e3744 | 85 | #endif /* _ZEBRA_OSPF_ZEBRA_H */ |
86 |