summaryrefslogtreecommitdiffstats
path: root/proto/ospf/ospf.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/ospf.h')
-rw-r--r--proto/ospf/ospf.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/ospf/ospf.h b/proto/ospf/ospf.h
index da0104d..c1d5de7 100644
--- a/proto/ospf/ospf.h
+++ b/proto/ospf/ospf.h
@@ -424,6 +424,10 @@ struct ospf_lsa_ext
#define LSA_EXT_EBIT 0x80000000
+/* Endianity swap for lsa->type */
+#define ntoht(x) x
+#define htont(x) x
+
#else /* OSPFv3 */
@@ -488,6 +492,10 @@ struct ospf_lsa_prefix
#define LSA_EXT_FBIT 0x2000000
#define LSA_EXT_TBIT 0x1000000
+/* Endianity swap for lsa->type */
+#define ntoht(x) ntohs(x)
+#define htont(x) htons(x)
+
#endif
#define METRIC_MASK 0x00FFFFFF