[bgpd] Use defines for default weight
2007-04-22 Sebastien Tandel <sebastien@tandel.be>
* bgp_attr.h : Definition of BGP_ATTR_DEFAULT_WEIGHT.
* bgp_attr.c : (bgp_attr_default_intern) now uses
bgp_attr_default_set instead of duplicating the same code.
(general) Use of BGP_ATTR_DEFAULT_WEIGHT. Replace two 16 by
IPV6_MAX_BYTELEN.
diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h
index 124c450..0734bc2 100644
--- a/bgpd/bgp_attr.h
+++ b/bgpd/bgp_attr.h
@@ -32,6 +32,7 @@
#define BGP_MED_MAX UINT32_MAX
+
/* BGP Attribute type range. */
#define BGP_ATTR_TYPE_RANGE 256
#define BGP_ATTR_BITMAP_SIZE (BGP_ATTR_TYPE_RANGE / BITMAP_NBBY)
@@ -45,6 +46,8 @@
/* BGP attribute header must bigger than 2. */
#define BGP_ATTR_MIN_LEN 2 /* Attribute flag and type. */
+#define BGP_ATTR_DEFAULT_WEIGHT 32768
+
/* BGP attribute structure. */
struct attr
{