lldp: Fix DPDK build.
[cascardo/ovs.git] / lib / lldp / lldpd-structs.h
index 7214d98..59d239c 100644 (file)
@@ -22,7 +22,6 @@
 #include <net/if.h>
 #ifndef _WIN32
 #include <netinet/in.h>
-#include <netinet/if_ether.h>
 #endif
 #include <sys/socket.h>
 #include <sys/types.h>
@@ -67,7 +66,7 @@ struct lldpd_chassis {
     u_int16_t       c_index;      /* Monotonic index */
     u_int8_t        c_protocol;   /* Protocol used to get this chassis */
     u_int8_t        c_id_subtype;
-    char            *c_id;
+    uint8_t         *c_id;        /* Typically an Ethernet address. */
     int             c_id_len;
     char            *c_name;
     char            *c_descr;
@@ -77,7 +76,7 @@ struct lldpd_chassis {
 
     u_int16_t       c_ttl;
 
-    struct lldpd_mgmt  c_mgmt;
+    struct ovs_list c_mgmt;     /* Contains "struct lldp_mgmt"s. */
 };
 /* WARNING: any change to this structure should also be reflected into
    `lldpd_copy_chassis()` which is not using marshaling. */
@@ -90,7 +89,7 @@ struct lldpd_port {
     struct lldpd_frame   *p_lastframe; /* Frame received during last update */
     u_int8_t             p_protocol;   /* Protocol used to get this port */
     u_int8_t             p_hidden_in:1; /* Considered hidden for reception */
-    u_int8_t             p_hidden_out:2; /* Considered hidden for emission */
+    u_int8_t             p_hidden_out:1; /* Considered hidden for emission */
     /* Important: all fields that should be ignored to check if a port has
      * been changed should be before p_id_subtype. Check
      * `lldpd_reset_timer()`.
@@ -104,11 +103,6 @@ struct lldpd_port {
     struct ovs_list p_isid_vlan_maps; /* Contains "struct lldpd_aa_isid_vlan_maps_tlv"s. */
 };
 
-/* Used to modify some port related settings */
-struct lldpd_port_set {
-    char *ifname;
-};
-
 /* Smart mode / Hide mode */
 #define SMART_INCOMING_FILTER     (1<<0) /* Incoming filtering enabled */
 #define SMART_INCOMING_ONE_PROTO  (1<<1) /* On reception, keep only 1 proto */
@@ -156,13 +150,13 @@ struct lldpd_frame {
 struct lldpd_hardware;
 struct lldpd;
 struct lldpd_ops {
-    int(*send)(struct lldpd *,
-               struct lldpd_hardware*,
-               char *, size_t); /* Function to send a frame */
-    int(*recv)(struct lldpd *,
-               struct lldpd_hardware*,
-               int, char *, size_t); /* Function to receive a frame */
-    int(*cleanup)(struct lldpd *, struct lldpd_hardware *); /* Cleanup */
+    int (*send)(struct lldpd *,
+                struct lldpd_hardware *,
+                char *, size_t); /* Function to send a frame */
+    int (*recv)(struct lldpd *,
+                struct lldpd_hardware *,
+                int, char *, size_t); /* Function to receive a frame */
+    int (*cleanup)(struct lldpd *, struct lldpd_hardware *); /* Cleanup */
 };
 
 /* An interface is uniquely identified by h_ifindex, h_ifname and h_ops. This
@@ -203,7 +197,7 @@ struct lldpd_hardware {
                                       * is a change
                                       */
     struct lldpd_port h_lport;  /* Port attached to this hardware port */
-    struct lldpd_port h_rports; /* Remote ports */
+    struct ovs_list h_rports;   /* Contains "struct lldp_port"s. */
 };
 
 struct lldpd_interface;