diff options
| author | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-18 19:11:11 +0100 |
|---|---|---|
| committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-18 19:11:11 +0100 |
| commit | cf9b9f77f638923f5a44fdd14ce2725631ffa526 (patch) | |
| tree | 70b0b5c8181c23a4fd8faf5750e80083a422c728 /ospfd/ospf_dump.c | |
| parent | b782607f7f2125dd0e5789d5744cc97baf03b0e6 (diff) | |
OSPFD: Add Experimental Segment Routing support
This is an implementation of draft-ietf-ospf-segment-routing-extensions-24
and RFC7684 for Extended Link & Prefix Opaque LSA.
Look to doc/OSPF_SR.rst for implementation details & known limitations.
New files:
- ospfd/ospf_sr.h: Segment Routing structure definition (SubTLVs + SRDB)
- ospfd/ospf_sr.c: Main functions for Segment Routing support
- ospfd/ospf_ext.h: TLVs and SubTLVs definition for RFC7684
- ospfd/ospf_ext.c: RFC7684 Extended Link / Prefix implementation
- doc/OSPF-SRr.rst: Documentation
Modified Files:
- doc/ospfd.texi: Add new Segment Routing CLI command definition
- lib/command.h: Add new string command for Segment Routing CLI
- lib/mpls.h: Add default value for SRGB
- lib/route_types.txt: Add new OSPF Segment Routing route type
- ospfd/ospf_dump.[c,h]: Add OSPF SR debug
- ospfd/ospf_memory.[c,h]: Add new Segment Routing memory type
- ospfd/ospf_opaque.[c,h]: Add ospf_sr_init() starting function
- ospfd/ospf_ri.c: Add new functions to Set/Get Segment Routing TLVs
Add new ospf_router_info_lsa_upadte() to send Opaque LSA to ospf_sr.c()
- ospfd/ospf_ri.h: Add new Router Information SR SubTLVs
- ospfd/ospf_spf.c: Add new scheduler when running SPF to trigger
update of NHLFE
- ospfd/ospfd.h: Add new thread for Segment Routing scheduler
- ospfd/subdir.am: Add new files
- vtysh/Makefile.am: Add new ospf_sr.c file for vtysh
- zebra/kernel_netlink.c: Add new OSPF_SR route type
- zebra/rt_netlink.[c,h]: Add new OSPF_SR route type
- zebra/zebra_mpls.h: Add new OSPF_SR route type
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_dump.c')
| -rw-r--r-- | ospfd/ospf_dump.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 6a410f4ed3..a167220765 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -51,6 +51,8 @@ unsigned long conf_debug_ospf_lsa = 0; unsigned long conf_debug_ospf_zebra = 0; unsigned long conf_debug_ospf_nssa = 0; unsigned long conf_debug_ospf_te = 0; +unsigned long conf_debug_ospf_ext = 0; +unsigned long conf_debug_ospf_sr = 0; /* Enable debug option variables -- valid only session. */ unsigned long term_debug_ospf_packet[5] = {0, 0, 0, 0, 0}; @@ -61,7 +63,8 @@ unsigned long term_debug_ospf_lsa = 0; unsigned long term_debug_ospf_zebra = 0; unsigned long term_debug_ospf_nssa = 0; unsigned long term_debug_ospf_te = 0; - +unsigned long term_debug_ospf_ext = 0; +unsigned long term_debug_ospf_sr = 0; const char *ospf_redist_string(u_int route_type) { @@ -1441,6 +1444,33 @@ DEFUN (no_debug_ospf_te, return CMD_SUCCESS; } +DEFUN (debug_ospf_sr, + debug_ospf_sr_cmd, + "debug ospf sr", + DEBUG_STR + OSPF_STR + "OSPF-SR information\n") +{ + if (vty->node == CONFIG_NODE) + CONF_DEBUG_ON(sr, SR); + TERM_DEBUG_ON(sr, SR); + return CMD_SUCCESS; +} + +DEFUN (no_debug_ospf_sr, + no_debug_ospf_sr_cmd, + "no debug ospf sr", + NO_STR + DEBUG_STR + OSPF_STR + "OSPF-SR information\n") +{ + if (vty->node == CONFIG_NODE) + CONF_DEBUG_OFF(sr, SR); + TERM_DEBUG_OFF(sr, SR); + return CMD_SUCCESS; +} + DEFUN (no_debug_ospf, no_debug_ospf_cmd, "no debug ospf", @@ -1774,6 +1804,7 @@ void debug_init() install_element(ENABLE_NODE, &debug_ospf_event_cmd); install_element(ENABLE_NODE, &debug_ospf_nssa_cmd); install_element(ENABLE_NODE, &debug_ospf_te_cmd); + install_element(ENABLE_NODE, &debug_ospf_sr_cmd); install_element(ENABLE_NODE, &no_debug_ospf_ism_cmd); install_element(ENABLE_NODE, &no_debug_ospf_nsm_cmd); install_element(ENABLE_NODE, &no_debug_ospf_lsa_cmd); @@ -1781,6 +1812,7 @@ void debug_init() install_element(ENABLE_NODE, &no_debug_ospf_event_cmd); install_element(ENABLE_NODE, &no_debug_ospf_nssa_cmd); install_element(ENABLE_NODE, &no_debug_ospf_te_cmd); + install_element(ENABLE_NODE, &no_debug_ospf_sr_cmd); install_element(ENABLE_NODE, &show_debugging_ospf_instance_cmd); install_element(ENABLE_NODE, &debug_ospf_packet_cmd); @@ -1809,12 +1841,14 @@ void debug_init() install_element(CONFIG_NODE, &debug_ospf_event_cmd); install_element(CONFIG_NODE, &debug_ospf_nssa_cmd); install_element(CONFIG_NODE, &debug_ospf_te_cmd); + install_element(CONFIG_NODE, &debug_ospf_sr_cmd); install_element(CONFIG_NODE, &no_debug_ospf_nsm_cmd); install_element(CONFIG_NODE, &no_debug_ospf_lsa_cmd); install_element(CONFIG_NODE, &no_debug_ospf_zebra_cmd); install_element(CONFIG_NODE, &no_debug_ospf_event_cmd); install_element(CONFIG_NODE, &no_debug_ospf_nssa_cmd); install_element(CONFIG_NODE, &no_debug_ospf_te_cmd); + install_element(CONFIG_NODE, &no_debug_ospf_sr_cmd); install_element(CONFIG_NODE, &debug_ospf_instance_nsm_cmd); install_element(CONFIG_NODE, &debug_ospf_instance_lsa_cmd); |
