]> git.ipfire.org Git - people/ms/mstpd.git/commitdiff
driver hooks for creating/deleting new MSTI master
authorVitalii Demianets <vitas@nppfactor.kiev.ua>
Mon, 3 Oct 2011 16:01:43 +0000 (16:01 +0000)
committerVitalii Demianets <vitas@nppfactor.kiev.ua>
Mon, 3 Oct 2011 16:01:43 +0000 (16:01 +0000)
git-svn-id: http://svn.code.sf.net/p/mstpd/code/trunk@13 fbe50366-0c72-4402-a84b-5d246361dba7

bridge_track.c
driver.h
driver_deps.c

index 9b5e5b82f64a9e1acc92be8de39200b2f3f8dd9a..9eae78ced555a1ddbce9bb7652d57187fa31fb4f 100644 (file)
@@ -772,13 +772,17 @@ int CTL_get_mstilist(int br_index, int *num_mstis, __u16 *mstids)
 int CTL_create_msti(int br_index, __u16 mstid)
 {
     CTL_CHECK_BRIDGE;
-    return MSTP_IN_create_msti(br, mstid) ? 0 : -1;
+    if((!driver_create_msti(br, mstid)) || (!MSTP_IN_create_msti(br, mstid)))
+        return -1;
+    return 0;
 }
 
 int CTL_delete_msti(int br_index, __u16 mstid)
 {
     CTL_CHECK_BRIDGE;
-    return MSTP_IN_delete_msti(br, mstid) ? 0 : -1;
+    if((!driver_delete_msti(br, mstid)) || (!MSTP_IN_delete_msti(br, mstid)))
+        return -1;
+    return 0;
 }
 
 int CTL_get_mstconfid(int br_index, mst_configuration_identifier_t *cfg)
index 53ca58c45ddab022c65cda190a47705adcb0c78e..97012927811abaf6bd4f92c3fa34f36c83d93140 100644 (file)
--- a/driver.h
+++ b/driver.h
@@ -15,5 +15,7 @@
 int driver_set_new_state(per_tree_port_t *ptp, int new_state);
 void driver_flush_all_fids(per_tree_port_t *ptp);
 unsigned int driver_set_ageing_time(bridge_t *br, unsigned int ageingTime);
+bool driver_create_msti(bridge_t *br, __u16 mstid);
+bool driver_delete_msti(bridge_t *br, __u16 mstid);
 
 #endif /* _MSTP_DRIVER_H */
index edc6e98912379c1c868aefe0a043800298adf054..298a15e8192037a4db10039ca745b7c2b1a84f80 100644 (file)
@@ -27,6 +27,18 @@ int driver_set_new_state(per_tree_port_t *ptp, int new_state)
     return new_state;
 }
 
+bool driver_create_msti(bridge_t *br, __u16 mstid)
+{
+    /* TODO: send "create msti" command to driver */
+    return true;
+}
+
+bool driver_delete_msti(bridge_t *br, __u16 mstid)
+{
+    /* TODO: send "delete msti" command to driver */
+    return true;
+}
+
 void driver_flush_all_fids(per_tree_port_t *ptp)
 {
     /* TODO: do real flushing.