ospf6_top.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * Copyright (C) 2003 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. #ifndef OSPF6_TOP_H
  22. #define OSPF6_TOP_H
  23. #include "routemap.h"
  24. /* OSPFv3 top level data structure */
  25. struct ospf6
  26. {
  27. /* my router id */
  28. u_int32_t router_id;
  29. /* static router id */
  30. u_int32_t router_id_static;
  31. /* start time */
  32. struct timeval starttime;
  33. /* list of areas */
  34. struct list *area_list;
  35. struct ospf6_area *backbone;
  36. /* AS scope link state database */
  37. struct ospf6_lsdb *lsdb;
  38. struct ospf6_lsdb *lsdb_self;
  39. struct ospf6_route_table *route_table;
  40. struct ospf6_route_table *brouter_table;
  41. struct ospf6_route_table *external_table;
  42. struct route_table *external_id_table;
  43. u_int32_t external_id;
  44. /* redistribute route-map */
  45. struct
  46. {
  47. char *name;
  48. struct route_map *map;
  49. } rmap[ZEBRA_ROUTE_MAX];
  50. u_char flag;
  51. /* Configured flags */
  52. u_char config_flags;
  53. #define OSPF6_LOG_ADJACENCY_CHANGES (1 << 0)
  54. #define OSPF6_LOG_ADJACENCY_DETAIL (1 << 1)
  55. /* SPF parameters */
  56. unsigned int spf_delay; /* SPF delay time. */
  57. unsigned int spf_holdtime; /* SPF hold time. */
  58. unsigned int spf_max_holdtime; /* SPF maximum-holdtime */
  59. unsigned int spf_hold_multiplier; /* Adaptive multiplier for hold time */
  60. unsigned int spf_reason; /* reason bits while scheduling SPF */
  61. struct timeval ts_spf; /* SPF calculation time stamp. */
  62. struct timeval ts_spf_duration; /* Execution time of last SPF */
  63. unsigned int last_spf_reason; /* Last SPF reason */
  64. /* Threads */
  65. struct thread *t_spf_calc; /* SPF calculation timer. */
  66. struct thread *t_ase_calc; /* ASE calculation timer. */
  67. struct thread *maxage_remover;
  68. u_int32_t ref_bandwidth;
  69. /* Distance parameters */
  70. u_char distance_all;
  71. u_char distance_intra;
  72. u_char distance_inter;
  73. u_char distance_external;
  74. struct route_table *distance_table;
  75. };
  76. #define OSPF6_DISABLED 0x01
  77. #define OSPF6_STUB_ROUTER 0x02
  78. /* global pointer for OSPF top data structure */
  79. extern struct ospf6 *ospf6;
  80. /* prototypes */
  81. extern void ospf6_top_init (void);
  82. extern void ospf6_delete (struct ospf6 *o);
  83. extern void ospf6_maxage_remove (struct ospf6 *o);
  84. #endif /* OSPF6_TOP_H */