summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_interface.h
diff options
context:
space:
mode:
authorVincent Bernat <bernat@luffy.cx>2012-10-24 14:45:53 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2014-03-21 06:28:47 +0100
commitc19543b223d3b8463c048f346b8044589e0cce39 (patch)
tree7da71baef36e7c7b4e628c645580f8cc18c1aabe /ospf6d/ospf6_interface.h
parent1db65fadf627637621c342b789b9a3604ca5fab5 (diff)
downloadquagga-c19543b223d3b8463c048f346b8044589e0cce39.tar.bz2
quagga-c19543b223d3b8463c048f346b8044589e0cce39.tar.xz
ospf6d: compute interface cost from its bandwidth
Previously, the interface cost was a fixed default value that a user was allowed to change with "ipv6 ospf6 cost XX". As what is done with OSPFv2, we change this behaviour to compute the default interface cost from the interface bandwidth. The user can still force a cost with "ipv6 ospf6 cost XX". He can get the default value with "no ipv6 ospf6 cost". Moreover, the default cost value was 1. The cost is now computed from the bandwidth and a default reference bandwidth of 100 MBps (as for OSPFv2). Since the default bandwidth for an interface is 10 MBps, the "default" cost becomes 10 instead of 1. [DL: resolved conflict in ospf6d/ospf6_interface.c] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_interface.h')
-rw-r--r--ospf6d/ospf6_interface.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h
index 808f0968..34f75233 100644
--- a/ospf6d/ospf6_interface.h
+++ b/ospf6d/ospf6_interface.h
@@ -128,6 +128,7 @@ extern const char *ospf6_interface_state_str[];
/* flags */
#define OSPF6_INTERFACE_DISABLE 0x01
#define OSPF6_INTERFACE_PASSIVE 0x02
+#define OSPF6_INTERFACE_NOAUTOCOST 0x04
/* default values */
#define OSPF6_INTERFACE_HELLO_INTERVAL 10
@@ -137,6 +138,9 @@ extern const char *ospf6_interface_state_str[];
#define OSPF6_INTERFACE_PRIORITY 1
#define OSPF6_INTERFACE_TRANSDELAY 1
#define OSPF6_INTERFACE_INSTANCE_ID 0
+#define OSPF6_INTERFACE_BANDWIDTH 10000 /* Kbps */
+#define OSPF6_REFERENCE_BANDWIDTH 100000 /* Kbps */
+
/* Function Prototypes */