File: ospf_zebra.h

package info (click to toggle)
quagga 0.98.3-7.5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 11,424 kB
  • ctags: 11,439
  • sloc: ansic: 164,201; sh: 9,243; perl: 638; makefile: 413; lisp: 62
file content (76 lines) | stat: -rw-r--r-- 2,729 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
 * Zebra connect library for OSPFd
 * Copyright (C) 1997, 98, 99, 2000 Kunihiro Ishiguro, Toshiaki Takada
 *
 * This file is part of GNU Zebra.
 *
 * GNU Zebra is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2, or (at your option) any
 * later version.
 *
 * GNU Zebra is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GNU Zebra; see the file COPYING.  If not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA. 
 */

#ifndef _ZEBRA_OSPF_ZEBRA_H
#define _ZEBRA_OSPF_ZEBRA_H

#define EXTERNAL_METRIC_TYPE_1      0
#define EXTERNAL_METRIC_TYPE_2      1

#define DEFAULT_ROUTE		    ZEBRA_ROUTE_MAX
#define DEFAULT_ROUTE_TYPE(T) ((T) == DEFAULT_ROUTE)

/* OSPF distance. */
struct ospf_distance
{
  /* Distance value for the IP source prefix. */
  u_char distance;

  /* Name of the access-list to be matched. */
  char *access_list;
};

/* Prototypes */
void ospf_zclient_start ();

void ospf_zebra_add (struct prefix_ipv4 *, struct ospf_route *);
void ospf_zebra_delete (struct prefix_ipv4 *, struct ospf_route *);

void ospf_zebra_add_discard (struct prefix_ipv4 *);
void ospf_zebra_delete_discard (struct prefix_ipv4 *);

int ospf_default_originate_timer (struct thread *);

int ospf_redistribute_check (struct ospf *, struct external_info *, int *);
int ospf_distribute_check_connected (struct ospf *, struct external_info *);
void ospf_distribute_list_update (struct ospf *, int);

int ospf_is_type_redistributed (int);
void ospf_distance_reset (struct ospf *);
u_char ospf_distance_apply (struct prefix_ipv4 *, struct ospf_route *);

struct vty;

int ospf_redistribute_set (struct ospf *, int, int, int);
int ospf_redistribute_unset (struct ospf *, int);
int ospf_redistribute_default_set (struct ospf *, int, int, int);
int ospf_redistribute_default_unset (struct ospf *);
int ospf_distribute_list_out_set (struct ospf *, int, const char *);
int ospf_distribute_list_out_unset (struct ospf *, int, const char *);
void ospf_routemap_set (struct ospf *, int, const char *);
void ospf_routemap_unset (struct ospf *, int);
int ospf_distance_set (struct vty *, struct ospf *, const char *, const char *, const char *);
int ospf_distance_unset (struct vty *, struct ospf *, const char *, const char *, const char *);
void ospf_zebra_init ();

#endif /* _ZEBRA_OSPF_ZEBRA_H */