tests: Expand 'bundle with many ports' test.
[cascardo/ovs.git] / lib / rstp-common.h
index 587f88c..7bbee4d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2014 M3S, Srl - Italy
+ * Copyright (c) 2011-2015 M3S, Srl - Italy
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
  * Authors:
  *         Martino Fornasa <mf@fornasa.it>
  *         Daniele Venturino <daniele.venturino@m3s.it>
+ *         Carlo Andreotti <c.andreotti@m3s.it>
  *
  * References to IEEE 802.1D-2004 standard are enclosed in square brackets.
  * E.g. [17.3], [Table 17-1], etc.
@@ -141,7 +142,7 @@ enum port_role_transition_state_machine {
     PORT_ROLE_TRANSITION_SM_DESIGNATED_DISCARD_EXEC,
     PORT_ROLE_TRANSITION_SM_ALTERNATE_PORT_EXEC,
     PORT_ROLE_TRANSITION_SM_ALTERNATE_PORT,
-    PORT_ROLE_TRANSITION_SM_ALTERNATE_AGREED,
+    PORT_ROLE_TRANSITION_SM_ALTERNATE_AGREED_EXEC,
     PORT_ROLE_TRANSITION_SM_ALTERNATE_PROPOSED_EXEC,
     PORT_ROLE_TRANSITION_SM_BLOCK_PORT_EXEC,
     PORT_ROLE_TRANSITION_SM_BLOCK_PORT,
@@ -240,12 +241,6 @@ struct rstp_bpdu {
     uint8_t padding[7];
 });
 
-enum rstp_admin_point_to_point_mac_state {
-    RSTP_ADMIN_P2P_MAC_FORCE_TRUE,
-    RSTP_ADMIN_P2P_MAC_FORCE_FALSE,
-    RSTP_ADMIN_P2P_MAC_FORCE_AUTO
-};
-
 enum rstp_info_is {
     INFO_IS_DISABLED,
     INFO_IS_RECEIVED,
@@ -711,7 +706,7 @@ struct rstp_port {
 };
 
 struct rstp {
-    struct list node OVS_GUARDED_BY(rstp_mutex);   /* In rstp instances list */
+    struct ovs_list node OVS_GUARDED_BY(rstp_mutex);   /* In rstp instances list */
     char *name;     /* Bridge name. */
 
     /* Changes in last SM execution. */
@@ -872,8 +867,12 @@ struct rstp {
     struct ovs_refcount ref_cnt;
 
     /* Interface to client. */
-    void (*send_bpdu)(struct ofpbuf *bpdu, void *port_aux, void *rstp_aux);
+    void (*send_bpdu)(struct dp_packet *bpdu, void *port_aux, void *rstp_aux);
     void *aux;
+
+    bool root_changed;
+    void *old_root_aux;
+    void *new_root_aux;
 };
 
 #endif /* rstp-common.h */