summaryrefslogtreecommitdiffstats
path: root/lib/json.h
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2017-11-19 07:26:50 +0100
committerChirag Shah <chirag@cumulusnetworks.com>2017-11-26 18:18:19 +0100
commit0f478e3050ce918402bcc718569c8918cc1eef4a (patch)
treee23c8750e8616e3146ef2c06bab288359486c0f8 /lib/json.h
parentospfd: Running config to display VRF aware OSPF (diff)
downloadfrr-0f478e3050ce918402bcc718569c8918cc1eef4a.tar.xz
frr-0f478e3050ce918402bcc718569c8918cc1eef4a.zip
ospfd: show ip ospf route json support
Define JSON_C_TO_STRING_NOSLASHESCAPE used for escaping forward slash. Disply json output for 'show ip ospf route [vrf all] json' Ticket:CM-18659 Reviewed By: Testing Done: Configure multiple non-default VRF, inject external routes via redistribute to ospf area. checked show ip ospf route vrf all /json based output. Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'lib/json.h')
-rw-r--r--lib/json.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/json.h b/lib/json.h
index e3e55ab96..675d852af 100644
--- a/lib/json.h
+++ b/lib/json.h
@@ -52,4 +52,19 @@ extern void json_object_free(struct json_object *obj);
#define JSON_STR "JavaScript Object Notation\n"
+/* NOTE: json-c lib has following commit 316da85 which
+ * handles escape of forward slash.
+ * This allows prefix "20.0.14.0\/24":{
+ * to "20.0.14.0/24":{ some platforms do not have
+ * latest copy of json-c where defining below macro.
+ */
+
+#ifndef JSON_C_TO_STRING_NOSLASHESCAPE
+
+/**
+ * Don't escape forward slashes.
+ */
+#define JSON_C_TO_STRING_NOSLASHESCAPE (1<<4)
+#endif
+
#endif /* _QUAGGA_JSON_H */