]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
interface: more media for *BSD
authorVincent Bernat <vincent@bernat.im>
Sun, 7 Aug 2016 08:19:14 +0000 (10:19 +0200)
committerVincent Bernat <vincent@bernat.im>
Sun, 7 Aug 2016 08:21:35 +0000 (10:21 +0200)
OpenBSD and FreeBSD didn't agree on symbol names. Use #ifdef everywhere.

src/daemon/interfaces-bsd.c

index a2c3c501d30ec554d70ca55c8fb8a645f58859e5..458e02cddb3e01f84c6db9c195c291669b957c98 100644 (file)
@@ -541,8 +541,26 @@ ifbsd_macphy(struct lldpd *cfg,
                 LLDP_DOT3_MAU_10GIGBASESR, LLDP_DOT3_MAU_10GIGBASESR},
                {IFM_10G_CX4,
                 LLDP_DOT3_MAU_10GIGBASELX4, LLDP_DOT3_MAU_10GIGBASELX4},
+#ifdef IFM_10G_T
                {IFM_10G_T,
-                LLDP_DOT3_MAU_10GIGBASER, LLDP_DOT3_MAU_10GIGBASER}, // no better, same as for Linux
+                LLDP_DOT3_MAU_10GIGBASECX4, LLDP_DOT3_MAU_10GIGBASECX4},
+#endif
+#ifdef IFM_10G_TWINAX
+               {IFM_10G_TWINAX,
+                LLDP_DOT3_MAU_10GIGBASECX4, LLDP_DOT3_MAU_10GIGBASECX4},
+#endif
+#ifdef IFM_10G_TWINAX_LONG
+               {IFM_10G_TWINAX_LONG,
+                LLDP_DOT3_MAU_10GIGBASECX4, LLDP_DOT3_MAU_10GIGBASECX4},
+#endif
+#ifdef IFM_10G_LRM
+               {IFM_10G_LRM,
+                LLDP_DOT3_MAU_10GIGBASELR, LLDP_DOT3_MAU_10GIGBASELR},
+#endif
+#ifdef IFM_10G_SFP_CU
+               {IFM_10G_SFP_CU,
+                LLDP_DOT3_MAU_10GIGBASECX4, LLDP_DOT3_MAU_10GIGBASECX4},
+#endif
                {0, 0, 0}
        };