]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Allow compilation without Dot1.
authorVincent Bernat <bernat@luffy.cx>
Tue, 3 Apr 2012 11:29:47 +0000 (13:29 +0200)
committerVincent Bernat <bernat@luffy.cx>
Tue, 3 Apr 2012 11:29:47 +0000 (13:29 +0200)
src/edp.c
src/lldpd.h

index 66325fc7aa890cd3a1ed391a074a2dbf492da42f..b1c8a98bbd83beaa5a8d9af4769e01f5e92cf2b7 100644 (file)
--- a/src/edp.c
+++ b/src/edp.c
@@ -230,8 +230,8 @@ edp_decode(struct lldpd *cfg, char *frame, int s,
 {
        struct lldpd_chassis *chassis;
        struct lldpd_port *port;
-       struct lldpd_mgmt *mgmt, *mgmt_next, *m;
 #ifdef ENABLE_DOT1
+       struct lldpd_mgmt *mgmt, *mgmt_next, *m;
        struct lldpd_vlan *lvlan = NULL, *lvlan_next;
 #endif
        const unsigned char edpaddr[] = EDP_MULTICAST_ADDR;
index 6466e56efd7431398b7ea0af55b9710f907415b8..97c8531b760be438e44a0aaab3ca4ad65d327c3d 100644 (file)
 #define LLDPD_PPVID_CAP_SUPPORTED              (1 << 1)
 #define LLDPD_PPVID_CAP_ENABLED                        (1 << 2)
 
-enum {
-       LLDPD_AF_UNSPEC = 0,
-       LLDPD_AF_IPV4,
-       LLDPD_AF_IPV6,
-       LLDPD_AF_LAST
-};
-
-inline static int
-lldpd_af(int af)
-{
-       switch (af) {
-       case LLDPD_AF_IPV4:
-               return AF_INET;
-       case LLDPD_AF_IPV6:
-               return AF_INET6;
-       case LLDPD_AF_LAST:
-               return AF_MAX;
-       default:
-               return AF_UNSPEC;
-       }
-}
-
 struct lldpd_ppvid {
        TAILQ_ENTRY(lldpd_ppvid) p_entries;
        u_int8_t                p_cap_status;
@@ -178,6 +156,28 @@ struct lldpd_dot3_power {
 MARSHAL(lldpd_dot3_power);
 #endif
 
+enum {
+       LLDPD_AF_UNSPEC = 0,
+       LLDPD_AF_IPV4,
+       LLDPD_AF_IPV6,
+       LLDPD_AF_LAST
+};
+
+inline static int
+lldpd_af(int af)
+{
+       switch (af) {
+       case LLDPD_AF_IPV4:
+               return AF_INET;
+       case LLDPD_AF_IPV6:
+               return AF_INET6;
+       case LLDPD_AF_LAST:
+               return AF_MAX;
+       default:
+               return AF_UNSPEC;
+       }
+}
+
 #define LLDPD_MGMT_MAXADDRSIZE 16 /* sizeof(struct in6_addr) */
 struct lldpd_mgmt {
        TAILQ_ENTRY(lldpd_mgmt) m_entries;