lacp: Transmit more judiciously.
[openvswitch] / lib / packets.h
index 0bc368b939f617d73844c5920618214984df938c..c858fc091ea39b83ef494b72ac4c7760da468bc7 100644 (file)
@@ -429,12 +429,12 @@ bool ipv6_is_cidr(const struct in6_addr *netmask);
 
 #define LACP_INFO_LEN 15
 struct lacp_info {
-    ovs_be16 sys_priority;       /* System priority. */
-    uint8_t sysid[ETH_ADDR_LEN]; /* System ID. */
-    ovs_be16 key;                /* Operational key. */
-    ovs_be16 port_priority;      /* Port priority. */
-    ovs_be16 portid;             /* Port ID. */
-    uint8_t state;               /* State mask.  See LACP_STATE macros. */
+    ovs_be16 sys_priority;            /* System priority. */
+    uint8_t sys_id[ETH_ADDR_LEN];     /* System ID. */
+    ovs_be16 key;                     /* Operational key. */
+    ovs_be16 port_priority;           /* Port priority. */
+    ovs_be16 port_id;                 /* Port ID. */
+    uint8_t state;                    /* State mask.  See LACP_STATE macros. */
 } __attribute__((packed));
 BUILD_ASSERT_DECL(LACP_INFO_LEN == sizeof(struct lacp_info));
 
@@ -460,9 +460,11 @@ struct lacp_pdu {
 } __attribute__((packed));
 BUILD_ASSERT_DECL(LACP_PDU_LEN == sizeof(struct lacp_pdu));
 
-void compose_lacp_packet(struct ofpbuf *, struct lacp_info *actor,
-                         struct lacp_info *partner,
-                         const uint8_t eth_src[ETH_ADDR_LEN]);
+void compose_lacp_packet(struct ofpbuf *, const uint8_t eth_src[ETH_ADDR_LEN],
+                         const struct lacp_pdu *);
+
+void compose_lacp_pdu(const struct lacp_info *actor,
+                      const struct lacp_info *partner, struct lacp_pdu *);
 
 const struct lacp_pdu *parse_lacp_packet(const struct ofpbuf *);