Annotation of embedaddon/quagga/ospf6d/ospf6_asbr.h, revision 1.1
1.1 ! misho 1: /*
! 2: * Copyright (C) 2001 Yasuhiro Ohara
! 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: *
! 16: * You should have received a copy of the GNU General Public License
! 17: * along with GNU Zebra; see the file COPYING. If not, write to the
! 18: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
! 19: * Boston, MA 02111-1307, USA.
! 20: */
! 21:
! 22: #ifndef OSPF6_ASBR_H
! 23: #define OSPF6_ASBR_H
! 24:
! 25: /* for struct ospf6_prefix */
! 26: #include "ospf6_proto.h"
! 27: /* for struct ospf6_lsa */
! 28: #include "ospf6_lsa.h"
! 29: /* for struct ospf6_route */
! 30: #include "ospf6_route.h"
! 31:
! 32: /* Debug option */
! 33: extern unsigned char conf_debug_ospf6_asbr;
! 34: #define OSPF6_DEBUG_ASBR_ON() \
! 35: (conf_debug_ospf6_asbr = 1)
! 36: #define OSPF6_DEBUG_ASBR_OFF() \
! 37: (conf_debug_ospf6_asbr = 0)
! 38: #define IS_OSPF6_DEBUG_ASBR \
! 39: (conf_debug_ospf6_asbr)
! 40:
! 41: struct ospf6_external_info
! 42: {
! 43: /* External route type */
! 44: int type;
! 45:
! 46: /* Originating Link State ID */
! 47: u_int32_t id;
! 48:
! 49: struct in6_addr forwarding;
! 50: /* u_int32_t tag; */
! 51: };
! 52:
! 53: /* AS-External-LSA */
! 54: #define OSPF6_AS_EXTERNAL_LSA_MIN_SIZE 4U /* w/o IPv6 prefix */
! 55: struct ospf6_as_external_lsa
! 56: {
! 57: u_int32_t bits_metric;
! 58:
! 59: struct ospf6_prefix prefix;
! 60: /* followed by none or one forwarding address */
! 61: /* followed by none or one external route tag */
! 62: /* followed by none or one referenced LS-ID */
! 63: };
! 64:
! 65: #define OSPF6_ASBR_BIT_T ntohl (0x01000000)
! 66: #define OSPF6_ASBR_BIT_F ntohl (0x02000000)
! 67: #define OSPF6_ASBR_BIT_E ntohl (0x04000000)
! 68:
! 69: #define OSPF6_ASBR_METRIC(E) (ntohl ((E)->bits_metric & htonl (0x00ffffff)))
! 70: #define OSPF6_ASBR_METRIC_SET(E,C) \
! 71: { (E)->bits_metric &= htonl (0xff000000); \
! 72: (E)->bits_metric |= htonl (0x00ffffff) & htonl (C); }
! 73:
! 74: extern void ospf6_asbr_lsa_add (struct ospf6_lsa *lsa);
! 75: extern void ospf6_asbr_lsa_remove (struct ospf6_lsa *lsa);
! 76: extern void ospf6_asbr_lsentry_add (struct ospf6_route *asbr_entry);
! 77: extern void ospf6_asbr_lsentry_remove (struct ospf6_route *asbr_entry);
! 78:
! 79: extern int ospf6_asbr_is_asbr (struct ospf6 *o);
! 80: extern void ospf6_asbr_redistribute_add (int type, int ifindex,
! 81: struct prefix *prefix,
! 82: u_int nexthop_num,
! 83: struct in6_addr *nexthop);
! 84: extern void ospf6_asbr_redistribute_remove (int type, int ifindex,
! 85: struct prefix *prefix);
! 86:
! 87: extern int ospf6_redistribute_config_write (struct vty *vty);
! 88:
! 89: extern void ospf6_asbr_init (void);
! 90: extern void ospf6_asbr_terminate (void);
! 91:
! 92: extern int config_write_ospf6_debug_asbr (struct vty *vty);
! 93: extern void install_element_ospf6_debug_asbr (void);
! 94:
! 95: #endif /* OSPF6_ASBR_H */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>