libospf.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Defines and structures common to OSPFv2 and OSPFv3
  3. * Copyright (C) 1998, 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. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with GNU Zebra; see the file COPYING. If not, write to the Free
  19. * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  20. * 02111-1307, USA.
  21. */
  22. #ifndef _LIBOSPFD_H
  23. #define _LIBOSPFD_H
  24. /* IP precedence. */
  25. #ifndef IPTOS_PREC_INTERNETCONTROL
  26. #define IPTOS_PREC_INTERNETCONTROL 0xC0
  27. #endif /* IPTOS_PREC_INTERNETCONTROL */
  28. /* Default protocol, port number. */
  29. #ifndef IPPROTO_OSPFIGP
  30. #define IPPROTO_OSPFIGP 89
  31. #endif /* IPPROTO_OSPFIGP */
  32. /* Architectual Constants */
  33. #ifdef DEBUG
  34. #define OSPF_LS_REFRESH_TIME 60
  35. #else
  36. #define OSPF_LS_REFRESH_TIME 1800
  37. #endif
  38. #define OSPF_MIN_LS_INTERVAL 5000 /* msec */
  39. #define OSPF_MIN_LS_ARRIVAL 1000 /* msec */
  40. #define OSPF_LSA_INITIAL_AGE 0 /* useful for debug */
  41. #define OSPF_LSA_MAXAGE 3600
  42. #define OSPF_CHECK_AGE 300
  43. #define OSPF_LSA_MAXAGE_DIFF 900
  44. #define OSPF_LS_INFINITY 0xffffff
  45. #define OSPF_DEFAULT_DESTINATION 0x00000000 /* 0.0.0.0 */
  46. #define OSPF_INITIAL_SEQUENCE_NUMBER 0x80000001U
  47. #define OSPF_MAX_SEQUENCE_NUMBER 0x7fffffffU
  48. /* OSPF Interface Types */
  49. #define OSPF_IFTYPE_NONE 0
  50. #define OSPF_IFTYPE_POINTOPOINT 1
  51. #define OSPF_IFTYPE_BROADCAST 2
  52. #define OSPF_IFTYPE_NBMA 3
  53. #define OSPF_IFTYPE_POINTOMULTIPOINT 4
  54. #define OSPF_IFTYPE_VIRTUALLINK 5
  55. #define OSPF_IFTYPE_LOOPBACK 6
  56. #define OSPF_IFTYPE_MAX 7
  57. /* OSPF interface default values. */
  58. #define OSPF_OUTPUT_COST_DEFAULT 10
  59. #define OSPF_OUTPUT_COST_INFINITE UINT16_MAX
  60. #define OSPF_ROUTER_DEAD_INTERVAL_DEFAULT 40
  61. #define OSPF_ROUTER_DEAD_INTERVAL_MINIMAL 1
  62. #define OSPF_HELLO_INTERVAL_DEFAULT 10
  63. #define OSPF_ROUTER_PRIORITY_DEFAULT 1
  64. #define OSPF_RETRANSMIT_INTERVAL_DEFAULT 5
  65. #define OSPF_TRANSMIT_DELAY_DEFAULT 1
  66. #define OSPF_DEFAULT_BANDWIDTH 10000 /* Kbps */
  67. #define OSPF_DEFAULT_REF_BANDWIDTH 100000 /* Kbps */
  68. #define OSPF_POLL_INTERVAL_DEFAULT 60
  69. #define OSPF_NEIGHBOR_PRIORITY_DEFAULT 0
  70. #define OSPF_MTU_IGNORE_DEFAULT 0
  71. #define OSPF_FAST_HELLO_DEFAULT 0
  72. #define OSPF_AREA_BACKBONE 0x00000000 /* 0.0.0.0 */
  73. /* SPF Throttling timer values. */
  74. #define OSPF_SPF_DELAY_DEFAULT 0
  75. #define OSPF_SPF_HOLDTIME_DEFAULT 50
  76. #define OSPF_SPF_MAX_HOLDTIME_DEFAULT 5000
  77. #define OSPF_LSA_MAXAGE_CHECK_INTERVAL 30
  78. #define OSPF_LSA_MAXAGE_REMOVE_DELAY_DEFAULT 60
  79. #endif /* _LIBOSPFD_H */