* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _ZEBRA_EIGRP_CONST_H_
#define EIGRP_VARIANCE_DEFAULT 1
#define EIGRP_MAX_PATHS_DEFAULT 4
-
/* Return values of functions involved in packet verification */
#define MSG_OK 0
#define MSG_NG 1
#define EIGRP_AUTH_MD5_TLV_SIZE 40
#define EIGRP_AUTH_SHA256_TLV_SIZE 56
-/*Cisco routers use only first 44 bytes of basic hello for their MD5 calculations*/
+/*Cisco routers use only first 44 bytes of basic hello for their MD5
+ * calculations*/
#define EIGRP_MD5_BASIC_COMPUTE 44
#define EIGRP_MD5_UPDATE_INIT_COMPUTE 40
-
-
#define EIGRP_AUTH_BASIC_HELLO_FLAG 0x01
#define EIGRP_AUTH_TID_HELLO_FLAG 0x02
#define EIGRP_AUTH_UPDATE_INIT_FLAG 0x04
#define EIGRP_IP_TTL 1
/* VTY port number. */
-#define EIGRP_VTY_PORT 2609
+#define EIGRP_VTY_PORT 2613
/* Default configuration file name for eigrp. */
#define EIGRP_DEFAULT_CONFIG "eigrpd.conf"
#define EIGRP_HELLO_INTERVAL_DEFAULT 5
#define EIGRP_HOLD_INTERVAL_DEFAULT 15
-#define EIGRP_BANDWIDTH_DEFAULT 10000000
-#define EIGRP_DELAY_DEFAULT 1000
+#define EIGRP_BANDWIDTH_DEFAULT 100000
+#define EIGRP_DELAY_DEFAULT 10
#define EIGRP_RELIABILITY_DEFAULT 255
#define EIGRP_LOAD_DEFAULT 1
#define EIGRP_MULTICAST_ADDRESS 0xe000000A /*224.0.0.10*/
#define EIGRP_MAX_METRIC 0xffffffffU /*4294967295*/
+enum metric_change { METRIC_DECREASE, METRIC_SAME, METRIC_INCREASE };
#define DEFAULT_ROUTE ZEBRA_ROUTE_MAX
#define DEFAULT_ROUTE_TYPE(T) ((T) == DEFAULT_ROUTE)
#define INTERFACE_DOWN_BY_ZEBRA 1
#define INTERFACE_DOWN_BY_VTY 2
+#define INTERFACE_DOWN_BY_FINAL 3
#define EIGRP_HELLO_NORMAL 0x00
#define EIGRP_HELLO_GRACEFUL_SHUTDOWN 0x01
#define EIGRP_HELLO_ADD_SEQUENCE 0x02
#define EIGRP_HELLO_GRACEFUL_SHUTDOWN_NBR 0x04
- /* EIGRP Network Type. */
- #define EIGRP_IFTYPE_NONE 0
- #define EIGRP_IFTYPE_POINTOPOINT 1
- #define EIGRP_IFTYPE_BROADCAST 2
- #define EIGRP_IFTYPE_NBMA 3
- #define EIGRP_IFTYPE_POINTOMULTIPOINT 4
- #define EIGRP_IFTYPE_LOOPBACK 5
- #define EIGRP_IFTYPE_MAX 6
+/* EIGRP Network Type. */
+#define EIGRP_IFTYPE_NONE 0
+#define EIGRP_IFTYPE_POINTOPOINT 1
+#define EIGRP_IFTYPE_BROADCAST 2
+#define EIGRP_IFTYPE_NBMA 3
+#define EIGRP_IFTYPE_POINTOMULTIPOINT 4
+#define EIGRP_IFTYPE_LOOPBACK 5
+#define EIGRP_IFTYPE_MAX 6
#define EIGRP_IF_ACTIVE 0
#define EIGRP_IF_PASSIVE 1
#define EIGRP_TOPOLOGY_TYPE_REMOTE_EXTERNAL 2 // Remote external network
/*EIGRP TT entry flags*/
-#define EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG (1 << 0)
-#define EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG (1 << 1)
-#define EIGRP_NEIGHBOR_ENTRY_INTABLE_FLAG (1 << 2)
-#define EIGRP_NEIGHBOR_ENTRY_EXTERNAL_FLAG (1 << 3)
+#define EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG (1 << 0)
+#define EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG (1 << 1)
+#define EIGRP_NEXTHOP_ENTRY_INTABLE_FLAG (1 << 2)
+#define EIGRP_NEXTHOP_ENTRY_EXTERNAL_FLAG (1 << 3)
/*EIGRP FSM state count, event count*/
#define EIGRP_FSM_STATE_MAX 5
/*EEGRP FSM states*/
enum eigrp_fsm_states {
- EIGRP_FSM_STATE_PASSIVE,
- EIGRP_FSM_STATE_ACTIVE_0,
- EIGRP_FSM_STATE_ACTIVE_1,
- EIGRP_FSM_STATE_ACTIVE_2,
- EIGRP_FSM_STATE_ACTIVE_3,
+ EIGRP_FSM_STATE_PASSIVE,
+ EIGRP_FSM_STATE_ACTIVE_0,
+ EIGRP_FSM_STATE_ACTIVE_1,
+ EIGRP_FSM_STATE_ACTIVE_2,
+ EIGRP_FSM_STATE_ACTIVE_3,
};
/*EIGRP FSM events return values*/
#define EIGRP_FSM_NEED_QUERY 2
/*EIGRP FSM events*/
-#define EIGRP_FSM_EVENT_NQ_FCN 0 /*input event other than query from succ, FC not satisfied*/
-#define EIGRP_FSM_EVENT_LR 1 /*last reply, FD is reset*/
-#define EIGRP_FSM_EVENT_Q_FCN 2 /*query from succ, FC not satisfied*/
-#define EIGRP_FSM_EVENT_LR_FCS 3 /*last reply, FC satisfied with current value of FDij*/
-#define EIGRP_FSM_EVENT_DINC 4 /*distance increase while in active state*/
-#define EIGRP_FSM_EVENT_QACT 5 /*query from succ while in active state*/
-#define EIGRP_FSM_EVENT_LR_FCN 6 /*last reply, FC not satisfied with current value of FDij*/
-#define EIGRP_FSM_KEEP_STATE 7 /*state not changed, usually by receiving not last reply */
+enum eigrp_fsm_events {
+ /*
+ * Input event other than query from succ,
+ * FC is not satisified
+ */
+ EIGRP_FSM_EVENT_NQ_FCN,
+
+ /* last reply, FD is reset */
+ EIGRP_FSM_EVENT_LR,
+
+ /* Query from succ, FC not satisfied */
+ EIGRP_FSM_EVENT_Q_FCN,
+
+ /* last reply, FC satisifed with current value of FDij */
+ EIGRP_FSM_EVENT_LR_FCS,
+
+ /* distance increase while in a active state */
+ EIGRP_FSM_EVENT_DINC,
+
+ /* Query from succ while in active state */
+ EIGRP_FSM_EVENT_QACT,
+
+ /* last reply, FC not satisified */
+ EIGRP_FSM_EVENT_LR_FCN,
+
+ /*
+ * state not changed
+ * usually by receiving not last reply
+ */
+ EIGRP_FSM_KEEP_STATE,
+};
/**
* External routes originate from some other protocol - these are them
#define IDRP_PROTID 10 /*!< InterDomain Routing Protocol */
#define CONN_PROTID 11 /*!< Connected source */
-/*
+/*
* metric k-value defaults
*/
#define EIGRP_K1_DEFAULT 1 //!< unweighed inverse bandwidth
#define EIGRP_K5_DEFAULT 0 //!< no reliability term
#define EIGRP_K6_DEFAULT 0 //!< do not add in extended metrics
-
/*
* EIGRP Fixed header
*/
#define EIGRP_HEADER_LEN 20U
#define EIGRP_PACKET_MAX_LEN 65535U /* includes IP Header size. */
-
#define EIGRP_TLV_HDR_LENGTH 4
/**
#define EIGRP_TLV_PEER_TERMINATION_LEN (9U)
#define EIGRP_TLV_PEER_TIDLIST (EIGRP_TLV_GENERAL | 0x0008) /*!< peer sub-topology list */
-/* Older cisco routers send TIDLIST value wrong, adding for backwards compatabily */
+/* Older cisco routers send TIDLIST value wrong, adding for backwards
+ * compatabily */
#define EIGRP_TLV_PEER_MTRLIST (EIGRP_TLV_GENERAL | 0x00f5)
/**
#define EIGRP_TLV_IPv4_EXT (EIGRP_TLV_IPv4 | EIGRP_TLV_EXTERNAL)
#define EIGRP_TLV_IPv4_COM (EIGRP_TLV_IPv4 | EIGRP_TLV_COMMUNITY)
+#define EIGRP_TLV_IPV4_SIZE_GRT_24_BIT 0x001D
+#define EIGRP_TLV_IPV4_SIZE_GRT_16_BIT 0x001C
+#define EIGRP_TLV_IPV4_SIZE_GRT_8_BIT 0x001B
+#define EIGRP_TLV_IPV4_SIZE_GRT_0_BIT 0x001A
+#define EIGRP_TLV_MAX_IPV4_BYTE EIGRP_TLV_IPV4_SIZE_GRT_24_BIT
+
/* max number of TLV IPv4 prefixes in packet */
#define EIGRP_TLV_MAX_IPv4 25
#define EIGRP_EXTCOMM_RPM 0x8805 /* EIGRP Remote: Protocol + Metric */
#define EIGRP_EXTCOMM_VRR 0x8806 /* EIGRP Vecmet: Rsvd + (internal) Routerid */
-
/*
* EIGRP Filter constants
*/