]>
git.proxmox.com Git - mirror_frr.git/blob - ospf6d/ospf6_asbr.h
2 * Copyright (C) 2001 Yasuhiro Ohara
4 * This file is part of GNU Zebra.
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
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.
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
24 /* for struct ospf6_prefix */
25 #include "ospf6_proto.h"
26 /* for struct ospf6_lsa */
27 #include "ospf6_lsa.h"
28 /* for struct ospf6_route */
29 #include "ospf6_route.h"
32 extern unsigned char conf_debug_ospf6_asbr
;
33 #define OSPF6_DEBUG_ASBR_ON() \
34 (conf_debug_ospf6_asbr = 1)
35 #define OSPF6_DEBUG_ASBR_OFF() \
36 (conf_debug_ospf6_asbr = 0)
37 #define IS_OSPF6_DEBUG_ASBR \
38 (conf_debug_ospf6_asbr)
40 struct ospf6_external_info
42 /* External route type */
45 /* Originating Link State ID */
48 struct in6_addr forwarding
;
56 #define OSPF6_AS_EXTERNAL_LSA_MIN_SIZE 4U /* w/o IPv6 prefix */
57 struct ospf6_as_external_lsa
59 u_int32_t bits_metric
;
61 struct ospf6_prefix prefix
;
62 /* followed by none or one forwarding address */
63 /* followed by none or one external route tag */
64 /* followed by none or one referenced LS-ID */
67 #define OSPF6_ASBR_BIT_T ntohl (0x01000000)
68 #define OSPF6_ASBR_BIT_F ntohl (0x02000000)
69 #define OSPF6_ASBR_BIT_E ntohl (0x04000000)
71 #define OSPF6_ASBR_METRIC(E) (ntohl ((E)->bits_metric & htonl (0x00ffffff)))
72 #define OSPF6_ASBR_METRIC_SET(E,C) \
73 { (E)->bits_metric &= htonl (0xff000000); \
74 (E)->bits_metric |= htonl (0x00ffffff) & htonl (C); }
76 extern void ospf6_asbr_lsa_add (struct ospf6_lsa
*lsa
);
77 extern void ospf6_asbr_lsa_remove (struct ospf6_lsa
*lsa
);
78 extern void ospf6_asbr_lsentry_add (struct ospf6_route
*asbr_entry
);
79 extern void ospf6_asbr_lsentry_remove (struct ospf6_route
*asbr_entry
);
81 extern int ospf6_asbr_is_asbr (struct ospf6
*o
);
82 extern void ospf6_asbr_redistribute_add (int type
, ifindex_t ifindex
,
83 struct prefix
*prefix
,
85 struct in6_addr
*nexthop
,
87 extern void ospf6_asbr_redistribute_remove (int type
, ifindex_t ifindex
,
88 struct prefix
*prefix
);
90 extern int ospf6_redistribute_config_write (struct vty
*vty
);
92 extern void ospf6_asbr_init (void);
93 extern void ospf6_asbr_redistribute_reset (void);
94 extern void ospf6_asbr_terminate (void);
95 extern void ospf6_asbr_send_externals_to_area (struct ospf6_area
*);
97 extern int config_write_ospf6_debug_asbr (struct vty
*vty
);
98 extern void install_element_ospf6_debug_asbr (void);
100 #endif /* OSPF6_ASBR_H */