isisd: Add support of Traffic Engineering

These patches is an implementation of RFC5305 that enable the
support of Traffic Engineering in IS-IS

* isisd/Makefile.am: Add new files isis_te.c and isis_te.h

* isisd/isis_circuit.[c,h]: Add new mpls_te_circuit structure to
  isis_circuit structure to handle new Traffic Engineering TLVs
* isisd/isis_lsp.c: Update LSP handler to mux/demux Traffic Engineering TLVs
* isisd/isis_main.c: Add initialisation of ISIS TE
* isisd/isis_pdu.c: Update function process_p2p_hello() to retrieve remote
  IP address to populate Traffic Engineering TLV.
* isisd/isis_te.[c,]: Implementation of RFC5305
* isisd/isis_tlv.[c,h]: Update TLV definition and function to handle
  Traffic Engineering ones
* isisd/isis_zebra.c: Add new function isis_zebra_link_params() to retrieve
  the link parameters of interfaces from ZBus to populate the Traffic
  Engineering TLVs
* isisd/isisd.[c,h]: Add Traffic Engineering support with new debug command

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 202b040..d3bddc0 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -54,6 +54,7 @@
 #include "isisd/isis_route.h"
 #include "isisd/isis_zebra.h"
 #include "isisd/isis_events.h"
+#include "isisd/isis_te.h"
 
 #ifdef TOPOLOGY_GENERATE
 #include "spgrid.h"
@@ -98,6 +99,7 @@
    * uncomment the next line for full debugs
    */
   /* isis->debugs = 0xFFFF; */
+  isisMplsTE.status = disable;            /* Only support TE metric */
 }
 
 struct isis_area *
@@ -781,13 +783,15 @@
 }
 
 DEFUN (show_debugging,
-       show_debugging_cmd,
-       "show debugging",
+       show_debugging_isis_cmd,
+       "show debugging isis",
        SHOW_STR
        "State of each debugging option\n")
 {
-  vty_out (vty, "IS-IS:%s", VTY_NEWLINE);
-  print_debug (vty, isis->debugs, 1);
+  if (isis->debugs) {
+      vty_out (vty, "IS-IS:%s", VTY_NEWLINE);
+      print_debug (vty, isis->debugs, 1);
+  }
   return CMD_SUCCESS;
 }
 
@@ -3250,6 +3254,7 @@
 #endif /* TOPOLOGY_GENERATE */
 
       }
+    isis_mpls_te_config_write_router(vty);
     }
 
   return write;
@@ -3286,6 +3291,8 @@
   install_element (VIEW_NODE, &show_database_detail_cmd);
   install_element (VIEW_NODE, &show_database_detail_arg_cmd);
 
+  install_element (ENABLE_NODE, &show_debugging_isis_cmd);
+
   install_node (&debug_node, config_write_debug);
 
   install_element (ENABLE_NODE, &debug_isis_adj_cmd);