summaryrefslogtreecommitdiff
path: root/cleopatre
diff options
context:
space:
mode:
authorMilan Stevanovic2012-05-21 11:52:33 +0200
committerMilan Stevanovic2012-05-25 17:27:13 +0200
commit5347ab7e8479129fc946cac7c36070e2287c1cfc (patch)
tree8e0ae6cc7f7502ee77bba6a62c3f5577c2921de4 /cleopatre
parent218135a59776b38af6efa13393ae7a5245bdca36 (diff)
cleo/{app/{libspid,onlined},devkit/tests,buildroot/target}[eoc]: optimize number of configuration files, closes #3124
- merge storm, vlanport and ethport files in port_v2.conf file - update onlined to check new port_v2.conf - add libspid function to read and write to port_v2.conf - update libspid and onlined utests with new port_v2.conf file - clean code
Diffstat (limited to 'cleopatre')
-rw-r--r--cleopatre/application/libspid/inc/defs.h12
-rw-r--r--cleopatre/application/libspid/inc/libspid.h42
-rw-r--r--cleopatre/application/libspid/inc/path.h9
-rw-r--r--cleopatre/application/libspid/src/community_eoc.c2
-rw-r--r--cleopatre/application/libspid/src/ethernet_port_eoc.c198
-rw-r--r--cleopatre/application/libspid/src/storm_eoc.c128
-rw-r--r--cleopatre/application/libspid/src/vlan_port_eoc.c140
-rw-r--r--cleopatre/application/libspid/src/wl_eoc.c216
-rw-r--r--cleopatre/application/onlined/src/onlined_configure.c6
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/ethport.conf1
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/maclimit.conf2
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/port_v2.conf1
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/storm.conf1
-rw-r--r--cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/vlanport.conf1
-rwxr-xr-xcleopatre/devkit/tests/libspid/utests/override/inc/eoc_utests.h12
-rw-r--r--cleopatre/devkit/tests/libspid/utests/src/ethernet_port_eoc_utests.c158
-rw-r--r--cleopatre/devkit/tests/libspid/utests/src/storm_eoc_utests.c30
-rw-r--r--cleopatre/devkit/tests/libspid/utests/src/vlan_port_utests.c46
-rw-r--r--cleopatre/devkit/tests/libspid/utests/src/wl_eoc_utests.c180
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_1.conf12
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_2.conf38
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/ethport.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/port_v2.conf21
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_dup_key.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_index_err.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_format.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_not_in_wl.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_en_err.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_thr_err.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_en_err.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_thr_err.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_en_err.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_thr_err.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error1.conf38
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error2.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error3.conf42
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line2.conf4
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line7.conf14
-rw-r--r--cleopatre/devkit/tests/libspid/utests/testfiles/vlanport.conf40
-rw-r--r--cleopatre/devkit/tests/onlined/utests/src/onlined_utests.c40
-rw-r--r--cleopatre/devkit/tests/onlined/utests/testfiles/ethernet_porttable.conf6
-rw-r--r--cleopatre/devkit/tests/onlined/utests/testfiles/port_v2.conf21
-rw-r--r--cleopatre/devkit/tests/onlined/utests/testfiles/storm_protection.conf6
-rw-r--r--cleopatre/devkit/tests/onlined/utests/testfiles/vlan_porttable.conf6
45 files changed, 918 insertions, 1101 deletions
diff --git a/cleopatre/application/libspid/inc/defs.h b/cleopatre/application/libspid/inc/defs.h
index 9b99452624..44b0ce3d5b 100644
--- a/cleopatre/application/libspid/inc/defs.h
+++ b/cleopatre/application/libspid/inc/defs.h
@@ -149,7 +149,6 @@
#define LIBSPID_EOC_STORM_ITMES_MAX 256
#define LIBSPID_EOC_STORM_PARAM_NUM 6
-#define LIBSPID_BROADCAST_STORM_CONF_DELIMITER " "
#define LIBSPID_EOC_STORM_BCAST_THRES_HOLD_MIN 100
#define LIBSPID_EOC_STORM_BCAST_THRES_HOLD_MAX 25500
#define LIBSPID_EOC_STORM_MULTI_THRES_HOLD_MIN 100
@@ -251,22 +250,14 @@
#define LIBSPID_VLAN_TABLE_ERROR_TYPES_NUM 3
#define LIBSPID_VLAN_PORT_PER_SLAVE_MAX 5
-#define LIBSPID_VLAN_PORT_TOTAL_MAX \
- (LIBSPID_ONLINE_INFO_LINE_MAX_NB * LIBSPID_PORT_PER_SLAVE_MAX)
-#define LIBSPID_VLAN_PORT_CONF_DELIMITER " "
#define LIBSPID_VLAN_PORT_BYTE_PER_STA 16
#define LIBSPID_VLAN_PORT_STA_MAX_CNT 93
-#define LIBSPID_VLAN_PORT_PARAM_NUM 4
#define LIBSPID_VLAN_TABLE_NUM_MAX 4095
#define LIBSPID_VLAN_PORT_ERROR_TYPES_NUM 8
/*ethernet port table*/
#define LIBSPID_ETHERNET_PORT_PER_SLAVE_MAX 5
-#define LIBSPID_ETHERNET_PORT_TOTAL_MAX \
- (LIBSPID_ONLINE_INFO_LINE_MAX_NB * LIBSPID_ETHERNET_PORT_PER_SLAVE_MAX)
-#define LIBSPID_ETHERNET_PORT_CONF_DELIMITER " "
-#define LIBSPID_ETHERNET_PORT_PARAM_NUM 3
/* EoC debug and logging */
#define LIBSPID_EOC_DEBUG 1
@@ -343,4 +334,7 @@
#define LIBSPID_PTABLE_ROW_MIN 1
#define LIBSPID_PTABLE_ROW_MAX 512
+#define LIBSPID_PORT_V2_PARAM_NUM 13
+#define LIBSPID_PORT_V2_CONF_DELIMITER " "
+
#endif /* LIBSPID_DEFS_H */
diff --git a/cleopatre/application/libspid/inc/libspid.h b/cleopatre/application/libspid/inc/libspid.h
index ad6174a010..73defed699 100644
--- a/cleopatre/application/libspid/inc/libspid.h
+++ b/cleopatre/application/libspid/inc/libspid.h
@@ -790,6 +790,41 @@ typedef struct
char duplex[2];
} libspid_eoc_ethernet_port_entry_t;
+/** structure for EoC port_v2 table entry */
+typedef struct
+{
+ /* slave MAC address */
+ char mac_addr[LIBSPID_MAC_STR_LEN];
+ /* port index (1-4) */
+ char port_index[2];
+ /* auto neg */
+ char auto_neg[2];
+ /* speed */
+ char speed[4];
+ /* duplex mode */
+ char duplex[2];
+
+ char vlan_port_pvid[5];
+ /*eocVLANPortTPID(5)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/R/D/h */
+ char vlan_port_tpid[6];
+ /*eocVLANPortPrio(6)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/R/D/h */
+ char vlan_port_prio[2];
+ /* eocVLANPortMode(9)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/D/h */
+ char vlan_port_mode[4];
+ /* eocBroadcastStormProtectionEN */
+ char bcast_protect_en[2];
+ /* eocBroadcastStormThreshold */
+ char bcast_thres_hold[8];
+ /* eocMulticastStormProtectionEN */
+ char multi_protect_en[2];
+ /* eocMulticastStormThreshold */
+ char multi_thres_hold[8];
+ /* eocUnknownUnicastStormProtectionEN */
+ char unknow_protect_en[2];
+ /* eocUnknownUnicastStormThreshold */
+ char unknow_thres_hold[64];
+} libspid_eoc_port_v2_entry_t;
+
/*The struct for community data*/
typedef struct
{
@@ -1167,7 +1202,12 @@ extern libspid_error_t libspid_eoc_maclimit_check (void);
extern libspid_error_t
libspid_eoc_ethernet_port_get (char *mac_address, char *index,
libspid_eoc_ethernet_port_entry_t * entry);
-
+extern libspid_error_t
+libspid_eoc_port_v2_get (char *mac_address, char *index,
+ libspid_eoc_port_v2_entry_t * entry);
+extern libspid_error_t
+libspid_eoc_port_v2_set (char *mac_address, char *index,
+ libspid_eoc_port_v2_entry_t * entry);
extern libspid_error_t
libspid_eoc_ethernet_port_get_list (libspid_eoc_ethernet_port_entry_t * entry,
int *count);
diff --git a/cleopatre/application/libspid/inc/path.h b/cleopatre/application/libspid/inc/path.h
index 3e99e3ea0c..6923c0e007 100644
--- a/cleopatre/application/libspid/inc/path.h
+++ b/cleopatre/application/libspid/inc/path.h
@@ -58,13 +58,12 @@
#define LIBSPID_EOC_TMP_PATH "/tmp/utests/"
#define LIBSPID_SNMPD_CONF_PATH "/tmp/utests/etc/snmp/snmpd.conf"
#define LIBSPID_EOC_HOSTNAME "/tmp/utests/etc/hostname"
- #define LIBSPID_BROADCAST_STORM_CONF_PATH "/tmp/utests/etc/storm.conf"
#define LIBSPID_MAC_LIMITATION_CONF_PATH "/tmp/utests/etc/maclimit.conf"
#define LIBSPID_VLAN_TABLE_CONF_PATH "/tmp/utests/etc/vlan.conf"
- #define LIBSPID_VLAN_PORTTABLE_CONF_PATH "/tmp/utests/etc/vlanport.conf"
- #define LIBSPID_ETHERNET_PORT_CONF_PATH "/tmp/utests/etc/ethport.conf"
#define LIBSPID_TRAP_CONF_PATH "/tmp/utests/etc/trap.conf"
#define LIBSPID_NETWORK_FOR_SLAVE_CONF_PATH "/tmp/utests/autoconf/network/interfaces"
+ #define LIBSPID_EOC_PORT_V2_FILE "/tmp/utests/etc/port_v2.conf"
+
#else
#define LIBSPID_SAVE_LIST_PATH "/etc/save.lst"
@@ -93,8 +92,6 @@
#define LIBSPID_SNMP_INFO_PATH "/var/run/info/snmp.info"
#define LIBSPID_TRAP_CONF_PATH "/etc/trap.conf"
#define LIBSPID_VLAN_TABLE_CONF_PATH "/etc/vlan.conf"
- #define LIBSPID_VLAN_PORTTABLE_CONF_PATH "/etc/vlanport.conf"
- #define LIBSPID_BROADCAST_STORM_CONF_PATH "/etc/storm.conf"
#define LIBSPID_MAC_LIMITATION_CONF_PATH "/etc/maclimit.conf"
#define LIBSPID_SNMPD_CONF_PATH "/etc/snmp/snmpd.conf"
#define LIBSPID_UPDATE_INFO_PATH "/etc/update.info"
@@ -106,7 +103,6 @@
#define LIBSPID_SLAVE_CONF_PATH "/etc/slave.conf"
#define LIBSPID_SERVICE_CONF_PATH "/etc/service.conf"
#define LIBSPID_PORT_CONF_PATH "/etc/port.conf"
- #define LIBSPID_ETHERNET_PORT_CONF_PATH "/etc/ethport.conf"
#define LIBSPID_MULTICAST_INFO_PATH "/var/run/info/mcast.info"
#define LIBSPID_DISCRETE_ALARM_CONF_PATH "/etc/alarm_discrete.conf"
#define LIBSPID_ANALOG_ALARM_CONF_PATH "/etc/alarm_analog.conf"
@@ -117,6 +113,7 @@
#define LIBSPID_EOC_HOSTNAME "/etc/hostname"
#define LIBSPID_AUTODISCOVERY_INFO_PATH "/var/run/info/autodiscovery.info"
#define LIBSPID_WEB_RESET_INFO_PATH "/etc/web_reset.info"
+ #define LIBSPID_EOC_PORT_V2_FILE "/etc/port_v2.conf"
#endif
diff --git a/cleopatre/application/libspid/src/community_eoc.c b/cleopatre/application/libspid/src/community_eoc.c
index 0ee87e703d..1b3d00af4d 100644
--- a/cleopatre/application/libspid/src/community_eoc.c
+++ b/cleopatre/application/libspid/src/community_eoc.c
@@ -465,7 +465,7 @@ libspid_eoc_write_snmpd_line (char *old_comm_name, char *old_sec_name,
break;
default:
fprintf (fp_out, "%s", buffer);
- printf ("community_eoc:security_line version write error\n");
+ LIBSPID_EOC_LOG_0 ("community_eoc:security_line version write error\n");
}
goto write_line;
diff --git a/cleopatre/application/libspid/src/ethernet_port_eoc.c b/cleopatre/application/libspid/src/ethernet_port_eoc.c
index a6ca0d27b4..62cb335e4f 100644
--- a/cleopatre/application/libspid/src/ethernet_port_eoc.c
+++ b/cleopatre/application/libspid/src/ethernet_port_eoc.c
@@ -47,13 +47,8 @@ extern libspid_error_t
libspid_eoc_ethernet_port_get (char *mac_address, char *index,
libspid_eoc_ethernet_port_entry_t * entry)
{
- const char delimiters[2] = LIBSPID_ETHERNET_PORT_CONF_DELIMITER "\0";
- char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
- unsigned int elt_number = LIBSPID_CONFIG_ELT_MAX_NB;
- char *elt[LIBSPID_CONFIG_ELT_MAX_NB] = { 0 };
- char buffer[LIBSPID_CONFIG_LINE_MAX_LEN] = { 0 };
- libspid_error_t error;
- int i;
+ int i, ret;
+ libspid_eoc_port_v2_entry_t port_v2_entry;
/* check input parameters */
if ((mac_address == NULL) || (index == NULL) || (entry == NULL))
@@ -66,34 +61,18 @@ libspid_eoc_ethernet_port_get (char *mac_address, char *index,
mac_address[i] = tolower (mac_address[i]);
}
- /* use slave MAC and port index to compose key */
- /* for line in configuration file */
- sprintf (key, "%s.%s", mac_address, index);
-
strcpy (entry->mac_addr, mac_address);
strcpy (entry->port_index, index);
- error = libspid_config_read_line (LIBSPID_ETHERNET_PORT_CONF_PATH,
- delimiters, key,
- &elt_number, elt, buffer,
- LIBSPID_CONFIG_LINE_MAX_LEN);
- if (LIBSPID_SUCCESS != error)
- return error;
-
- if (elt_number < LIBSPID_ETHERNET_PORT_PARAM_NUM)
- {
- strcpy (entry->auto_neg, "");
- strcpy (entry->speed, "");
- strcpy (entry->duplex, "");
- }
- else
+ ret = libspid_eoc_port_v2_get (mac_address, index, &port_v2_entry);
+ if (LIBSPID_SUCCESS == ret)
{
- strcpy (entry->auto_neg, elt[0]);
- strcpy (entry->speed, elt[1]);
- strcpy (entry->duplex, elt[2]);
+ strcpy (entry->auto_neg, port_v2_entry.auto_neg);
+ strcpy (entry->speed, port_v2_entry.speed);
+ strcpy (entry->duplex, port_v2_entry.duplex);;
}
- return LIBSPID_SUCCESS;
+ return ret;
}
/**
@@ -110,7 +89,7 @@ extern libspid_error_t
libspid_eoc_ethernet_port_get_list (libspid_eoc_ethernet_port_entry_t * entry,
int *count)
{
- const char delimiters[2] = LIBSPID_ETHERNET_PORT_CONF_DELIMITER "\0";
+ const char delimiters[2] = LIBSPID_PORT_V2_CONF_DELIMITER "\0";
char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
unsigned int elt_number = LIBSPID_CONFIG_ELT_MAX_NB;
char *elt[LIBSPID_CONFIG_ELT_MAX_NB] = { 0 };
@@ -133,7 +112,7 @@ libspid_eoc_ethernet_port_get_list (libspid_eoc_ethernet_port_entry_t * entry,
/* get the first key */
error =
- libspid_config_read_line_repetitive (LIBSPID_ETHERNET_PORT_CONF_PATH,
+ libspid_config_read_line_repetitive (LIBSPID_EOC_PORT_V2_FILE,
delimiters, key, &elt_number,
elt, buffer,
LIBSPID_CONFIG_LINE_MAX_LEN,
@@ -141,14 +120,14 @@ libspid_eoc_ethernet_port_get_list (libspid_eoc_ethernet_port_entry_t * entry,
if (LIBSPID_SUCCESS != error)
return error;
- for (; *count < LIBSPID_ETHERNET_PORT_TOTAL_MAX && strcmp (key, "");
+ for (; *count < LIBSPID_PORT_TOTAL_MAX && strcmp (key, "");
(*count)++)
{
/* Get a line from the conf file */
elt_number = LIBSPID_CONFIG_ELT_MAX_NB;
error =
libspid_config_read_line_repetitive
- (LIBSPID_ETHERNET_PORT_CONF_PATH, delimiters, key, &elt_number,
+ (LIBSPID_EOC_PORT_V2_FILE, delimiters, key, &elt_number,
elt, buffer, LIBSPID_CONFIG_LINE_MAX_LEN, &user_data);
if (LIBSPID_SUCCESS != error)
return error;
@@ -167,7 +146,7 @@ libspid_eoc_ethernet_port_get_list (libspid_eoc_ethernet_port_entry_t * entry,
strcpy (entry_ptr->mac_addr, buffer);
strcpy (entry_ptr->port_index, index_str);
- if (elt_number < LIBSPID_ETHERNET_PORT_PARAM_NUM)
+ if (elt_number < LIBSPID_PORT_V2_PARAM_NUM)
{
strcpy (entry_ptr->auto_neg, "");
strcpy (entry_ptr->speed, "");
@@ -200,11 +179,132 @@ extern libspid_error_t
libspid_eoc_ethernet_port_set (char *mac_address, char *index,
libspid_eoc_ethernet_port_entry_t * entry)
{
- const char delimiter = LIBSPID_ETHERNET_PORT_CONF_DELIMITER[0];
+ libspid_error_t ret;
+ libspid_eoc_port_v2_entry_t port_v2_entry;
+
+ /* check input parameters */
+ if ((mac_address == NULL) || (index == NULL) || (entry == NULL))
+ return LIBSPID_ERROR_PARAM;
+
+ /* check that MAC address and port index already exist */
+ ret = libspid_eoc_port_v2_get (mac_address, index, &port_v2_entry);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ return ret;
+ }
+
+ strcpy (port_v2_entry.auto_neg, entry->auto_neg);
+ strcpy (port_v2_entry.speed, entry->speed);
+ strcpy (port_v2_entry.duplex, entry->duplex);
+
+ ret = libspid_eoc_port_v2_set (mac_address, index, &port_v2_entry);
+
+ return ret;
+}
+
+/**
+ * Returns the port_v2 entry for the given
+ * slave MAC address and port index.<BR>
+ * \param mac_address slave MAC address
+ * \param index port index
+ * \param entry port_v2 entry
+ * \return error type (LIBSPID_SUCCESS if success)
+ * \return LIBSPID_ERROR_NOT_FOUND: entry not found
+ * \return LIBSPID_ERROR_PARAM: bad input parameters
+ * \return LIBSPID_ERROR_SYSTEM: system error, see errno for details
+ */
+extern libspid_error_t
+libspid_eoc_port_v2_get (char *mac_address, char *index,
+ libspid_eoc_port_v2_entry_t * entry)
+{
+ const char delimiters[2] = LIBSPID_PORT_V2_CONF_DELIMITER "\0";
+ char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
+ unsigned int elt_number = LIBSPID_CONFIG_ELT_MAX_NB;
+ char *elt[LIBSPID_CONFIG_ELT_MAX_NB] = { 0 };
+ char buffer[LIBSPID_CONFIG_LINE_MAX_LEN] = { 0 };
+ libspid_error_t error;
+ int i;
+
+ /* check input parameters */
+ if ((mac_address == NULL) || (index == NULL) || (entry == NULL))
+ return LIBSPID_ERROR_PARAM;
+
+ memset (entry, 0x0, sizeof (entry));
+
+ for (i = 0; i < LIBSPID_MAC_STR_LEN; i++)
+ {
+ mac_address[i] = tolower (mac_address[i]);
+ }
+
+ /* use slave MAC and port index to compose key */
+ /* for line in configuration file */
+ sprintf (key, "%s.%s", mac_address, index);
+
+ strcpy (entry->mac_addr, mac_address);
+ strcpy (entry->port_index, index);
+
+ error = libspid_config_read_line (LIBSPID_EOC_PORT_V2_FILE,
+ delimiters, key,
+ &elt_number, elt, buffer,
+ LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (LIBSPID_SUCCESS != error)
+ return error;
+
+ if (elt_number < LIBSPID_PORT_V2_PARAM_NUM)
+ {
+ strcpy (entry->auto_neg, "");
+ strcpy (entry->speed, "");
+ strcpy (entry->duplex, "");
+ strcpy (entry->vlan_port_pvid, "");
+ strcpy (entry->vlan_port_tpid, "");
+ strcpy (entry->vlan_port_prio, "");
+ strcpy (entry->vlan_port_mode, "");
+ strcpy (entry->bcast_protect_en, "");
+ strcpy (entry->bcast_thres_hold, "");
+ strcpy (entry->multi_protect_en, "");
+ strcpy (entry->multi_thres_hold, "");
+ strcpy (entry->unknow_protect_en, "");
+ strcpy (entry->unknow_thres_hold, "");
+ }
+ else
+ {
+ strcpy (entry->auto_neg, elt[0]);
+ strcpy (entry->speed, elt[1]);
+ strcpy (entry->duplex, elt[2]);
+ strcpy (entry->vlan_port_pvid, elt[3]);
+ strcpy (entry->vlan_port_tpid, elt[4]);
+ strcpy (entry->vlan_port_prio, elt[5]);
+ strcpy (entry->vlan_port_mode, elt[6]);
+ strcpy (entry->bcast_protect_en, elt[7]);
+ strcpy (entry->bcast_thres_hold, elt[8]);
+ strcpy (entry->multi_protect_en, elt[9]);
+ strcpy (entry->multi_thres_hold, elt[10]);
+ strcpy (entry->unknow_protect_en, elt[11]);
+ strcpy (entry->unknow_thres_hold, elt[12]);
+ }
+
+ return LIBSPID_SUCCESS;
+}
+
+/**
+ * Set port_v2 entry with the given slave MAC address and index.<BR>
+ * \param mac_address slave MAC address
+ * \param index ethernet port index
+ * \param entry ethernet port entry
+ * \return error type (LIBSPID_SUCCESS if success)
+ * \return LIBSPID_ERROR_NOT_FOUND: entry not found
+ * \return LIBSPID_ERROR_PARAM: bad input parameters
+ * \return LIBSPID_ERROR_SYSTEM: system error, see errno for details
+ */
+extern libspid_error_t
+libspid_eoc_port_v2_set (char *mac_address, char *index,
+ libspid_eoc_port_v2_entry_t * entry)
+{
+ const char delimiter = LIBSPID_PORT_V2_CONF_DELIMITER[0];
char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
- char *elt[4];
+ char *elt[LIBSPID_PORT_V2_PARAM_NUM];
libspid_error_t ret;
- libspid_eoc_ethernet_port_entry_t port_get_entry;
+ libspid_eoc_port_v2_entry_t port_v2_entry;
int i;
/* check input parameters */
@@ -212,8 +312,8 @@ libspid_eoc_ethernet_port_set (char *mac_address, char *index,
return LIBSPID_ERROR_PARAM;
/* check that MAC address and port index already exist */
- ret = libspid_eoc_ethernet_port_get (mac_address, index, &port_get_entry);
-
+ ret = libspid_eoc_port_v2_get (mac_address, index,
+ &port_v2_entry);
if (LIBSPID_SUCCESS != ret)
{
return ret;
@@ -224,7 +324,7 @@ libspid_eoc_ethernet_port_set (char *mac_address, char *index,
sprintf (key, "%s.%s", mac_address, index);
/* allocate buffers */
- for (i = 0; i < LIBSPID_ETHERNET_PORT_PARAM_NUM; i++)
+ for (i = 0; i < LIBSPID_PORT_V2_PARAM_NUM; i++)
{
elt[i] = (char *) malloc (4 * sizeof (char));
if (NULL != elt[i])
@@ -240,13 +340,23 @@ libspid_eoc_ethernet_port_set (char *mac_address, char *index,
strcpy (elt[0], entry->auto_neg);
strcpy (elt[1], entry->speed);
strcpy (elt[2], entry->duplex);
-
- ret = libspid_config_write_line (LIBSPID_ETHERNET_PORT_CONF_PATH,
+ strcpy (elt[3], entry->vlan_port_pvid);
+ strcpy (elt[4], entry->vlan_port_tpid);
+ strcpy (elt[5], entry->vlan_port_prio);
+ strcpy (elt[6], entry->vlan_port_mode);
+ strcpy (elt[7], entry->bcast_protect_en);
+ strcpy (elt[8], entry->bcast_thres_hold);
+ strcpy (elt[9], entry->multi_protect_en);
+ strcpy (elt[10], entry->multi_thres_hold);
+ strcpy (elt[11], entry->unknow_protect_en);
+ strcpy (elt[12], entry->unknow_thres_hold);
+
+ ret = libspid_config_write_line (LIBSPID_EOC_PORT_V2_FILE,
delimiter, key,
- LIBSPID_ETHERNET_PORT_PARAM_NUM, elt);
+ LIBSPID_PORT_V2_PARAM_NUM, elt);
/* free element buffers */
- for (i = 0; i < LIBSPID_ETHERNET_PORT_PARAM_NUM; i++)
+ for (i = 0; i < LIBSPID_PORT_V2_PARAM_NUM; i++)
{
if (elt[i])
{
diff --git a/cleopatre/application/libspid/src/storm_eoc.c b/cleopatre/application/libspid/src/storm_eoc.c
index 6ddd38807a..4495fcfc63 100644
--- a/cleopatre/application/libspid/src/storm_eoc.c
+++ b/cleopatre/application/libspid/src/storm_eoc.c
@@ -45,13 +45,8 @@ extern libspid_error_t
libspid_eoc_storm_get (char *mac_address, char *index,
libspid_eoc_storm_entry_t * entry)
{
- const char delimiters[2] = LIBSPID_DELIMITER "\0";
- char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
- unsigned int elt_number = LIBSPID_CONFIG_ELT_MAX_NB;
- char *elt[LIBSPID_CONFIG_ELT_MAX_NB] = { 0 };
- char buffer[LIBSPID_CONFIG_LINE_MAX_LEN] = { 0 };
- libspid_error_t error;
- int i;
+ int i, ret;
+ libspid_eoc_port_v2_entry_t port_v2_entry;
/* check input parameters */
if ((mac_address == NULL) || (index == NULL) || (entry == NULL))
@@ -64,40 +59,21 @@ libspid_eoc_storm_get (char *mac_address, char *index,
mac_address[i] = tolower (mac_address[i]);
}
- /* use slave MAC and port index to compose key */
- /* for line in configuration file */
- sprintf (key, "%s.%s", mac_address, index);
-
strcpy (entry->mac_addr, mac_address);
strcpy (entry->port_index, index);
- error = libspid_config_read_line (LIBSPID_BROADCAST_STORM_CONF_PATH,
- delimiters, key,
- &elt_number, elt, buffer,
- LIBSPID_CONFIG_LINE_MAX_LEN);
- if (LIBSPID_SUCCESS != error)
- return error;
-
- if (elt_number < LIBSPID_EOC_STORM_PARAM_NUM)
+ ret = libspid_eoc_port_v2_get (mac_address, index, &port_v2_entry);
+ if (LIBSPID_SUCCESS == ret)
{
- strcpy (entry->bcast_protect_en, "");
- strcpy (entry->bcast_thres_hold, "");
- strcpy (entry->multi_protect_en, "");
- strcpy (entry->multi_thres_hold, "");
- strcpy (entry->unknow_protect_en, "");
- strcpy (entry->unknow_thres_hold, "");
- }
- else
- {
- strcpy (entry->bcast_protect_en, elt[0]);
- strcpy (entry->bcast_thres_hold, elt[1]);
- strcpy (entry->multi_protect_en, elt[2]);
- strcpy (entry->multi_thres_hold, elt[3]);
- strcpy (entry->unknow_protect_en, elt[4]);
- strcpy (entry->unknow_thres_hold, elt[5]);
+ strcpy (entry->bcast_protect_en, port_v2_entry.bcast_protect_en);
+ strcpy (entry->bcast_thres_hold, port_v2_entry.bcast_thres_hold);
+ strcpy (entry->multi_protect_en, port_v2_entry.multi_protect_en);
+ strcpy (entry->multi_thres_hold, port_v2_entry.multi_thres_hold);
+ strcpy (entry->unknow_protect_en, port_v2_entry.unknow_protect_en);
+ strcpy (entry->unknow_thres_hold, port_v2_entry.unknow_thres_hold);
}
- return LIBSPID_SUCCESS;
+ return ret;
}
/**
@@ -113,74 +89,30 @@ extern libspid_error_t
libspid_eoc_storm_set (char *mac_address, char *index,
libspid_eoc_storm_entry_t * entry)
{
- const char delimiter = LIBSPID_DELIMITER[0];
- char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
- char *elt[LIBSPID_EOC_STORM_PARAM_NUM];
libspid_error_t ret;
- libspid_eoc_storm_entry_t port_get_entry;
- int i;
+ libspid_eoc_port_v2_entry_t port_v2_entry;
/* check input parameters */
if ((mac_address == NULL) || (index == NULL) || (entry == NULL))
return LIBSPID_ERROR_PARAM;
/* check that MAC address and port index already exist */
- ret = libspid_eoc_storm_get (mac_address, index, &port_get_entry);
-
+ ret = libspid_eoc_port_v2_get (mac_address, index, &port_v2_entry);
if (LIBSPID_SUCCESS != ret)
{
return ret;
}
- /* use slave MAC and port index to compose */
- /* key for line in configuration file */
- sprintf (key, "%s.%s", mac_address, index);
-
- /* allocate buffers */
- memset (elt, 0, sizeof (elt));
-
- for (i = 0; i < LIBSPID_EOC_STORM_PARAM_NUM; i++)
- {
- elt[i] = (char *) malloc (4 * sizeof (char));
- if (NULL != elt[i])
- memset (elt[i], 0, 4);
- else
- {
- LIBSPID_EOC_LOG_2 ("%s: error allocating element "
- "buffers (errno=%d)", __FUNCTION__, errno);
- return LIBSPID_ERROR_SYSTEM;
- }
- }
-
- strcpy (elt[0], entry->bcast_protect_en);
- strcpy (elt[1], entry->bcast_thres_hold);
- strcpy (elt[2], entry->multi_protect_en);
- strcpy (elt[3], entry->multi_thres_hold);
- strcpy (elt[4], entry->unknow_protect_en);
- strcpy (elt[5], entry->unknow_thres_hold);
+ strcpy (port_v2_entry.bcast_protect_en, entry->bcast_protect_en);
+ strcpy (port_v2_entry.bcast_thres_hold, entry->bcast_thres_hold);
+ strcpy (port_v2_entry.multi_protect_en, entry->multi_protect_en);
+ strcpy (port_v2_entry.multi_thres_hold, entry->multi_thres_hold);
+ strcpy (port_v2_entry.unknow_protect_en, entry->unknow_protect_en);
+ strcpy (port_v2_entry.unknow_thres_hold, entry->unknow_thres_hold);
- ret = libspid_config_write_line (LIBSPID_BROADCAST_STORM_CONF_PATH,
- delimiter, key,
- LIBSPID_EOC_STORM_PARAM_NUM, elt);
+ ret = libspid_eoc_port_v2_set (mac_address, index, &port_v2_entry);
- /* free element buffers */
- for (i = 0; i < LIBSPID_EOC_STORM_PARAM_NUM; i++)
- {
- if (elt[i])
- {
- free (elt[i]);
- elt[i] = NULL;
- }
- }
-
- if (ret != LIBSPID_SUCCESS)
- {
- LIBSPID_EOC_LOG_2 ("%s: cannot write storm port entry (errno=%d)",
- __FUNCTION__, errno);
- return ret;
- }
-
- return LIBSPID_SUCCESS;
+ return ret;
}
/**
@@ -219,7 +151,7 @@ libspid_eoc_storm_get_list (libspid_eoc_storm_entry_t * entry, int *count)
/* get the first key */
error =
- libspid_config_read_line_repetitive (LIBSPID_BROADCAST_STORM_CONF_PATH,
+ libspid_config_read_line_repetitive (LIBSPID_EOC_PORT_V2_FILE,
delimiters, key, &elt_number,
elt, buffer,
LIBSPID_CONFIG_LINE_MAX_LEN,
@@ -233,7 +165,7 @@ libspid_eoc_storm_get_list (libspid_eoc_storm_entry_t * entry, int *count)
/* Get a line from the conf file */
elt_number = LIBSPID_CONFIG_ELT_MAX_NB;
error =
- libspid_config_read_line_repetitive (LIBSPID_BROADCAST_STORM_CONF_PATH,
+ libspid_config_read_line_repetitive (LIBSPID_EOC_PORT_V2_FILE,
delimiters, key, &elt_number,elt, buffer,
LIBSPID_CONFIG_LINE_MAX_LEN,
&user_data);
@@ -254,7 +186,7 @@ libspid_eoc_storm_get_list (libspid_eoc_storm_entry_t * entry, int *count)
strcpy (entry_ptr->mac_addr, buffer);
strcpy (entry_ptr->port_index, index_str);
- if (elt_number < LIBSPID_EOC_STORM_PARAM_NUM)
+ if (elt_number < LIBSPID_PORT_V2_PARAM_NUM)
{
strcpy (entry_ptr->bcast_protect_en, "");
strcpy (entry_ptr->bcast_thres_hold, "");
@@ -265,12 +197,12 @@ libspid_eoc_storm_get_list (libspid_eoc_storm_entry_t * entry, int *count)
}
else
{
- strcpy (entry_ptr->bcast_protect_en, elt[0]);
- strcpy (entry_ptr->bcast_thres_hold, elt[1]);
- strcpy (entry_ptr->multi_protect_en, elt[2]);
- strcpy (entry_ptr->multi_thres_hold, elt[3]);
- strcpy (entry_ptr->unknow_protect_en, elt[4]);
- strcpy (entry_ptr->unknow_thres_hold, elt[5]);
+ strcpy (entry_ptr->bcast_protect_en, elt[7]);
+ strcpy (entry_ptr->bcast_thres_hold, elt[8]);
+ strcpy (entry_ptr->multi_protect_en, elt[9]);
+ strcpy (entry_ptr->multi_thres_hold, elt[10]);
+ strcpy (entry_ptr->unknow_protect_en, elt[11]);
+ strcpy (entry_ptr->unknow_thres_hold, elt[12]);
}
entry_ptr++;
diff --git a/cleopatre/application/libspid/src/vlan_port_eoc.c b/cleopatre/application/libspid/src/vlan_port_eoc.c
index ef9ca5e2b4..9da671a467 100644
--- a/cleopatre/application/libspid/src/vlan_port_eoc.c
+++ b/cleopatre/application/libspid/src/vlan_port_eoc.c
@@ -46,14 +46,8 @@ extern libspid_error_t
libspid_eoc_vlan_port_get (char *mac_address, char *index,
libspid_eoc_vlan_port_table_entry_t * entry)
{
- const char delimiters[2] = LIBSPID_VLAN_PORT_CONF_DELIMITER "\0";
- char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
- unsigned int elt_number = LIBSPID_CONFIG_ELT_MAX_NB;
- char *elt[LIBSPID_CONFIG_ELT_MAX_NB] = { 0 };
- char buffer[LIBSPID_LINE_MAX_LEN] = { 0 };
- char mac_buffer[LIBSPID_MAC_STR_LEN] = { 0 };
- libspid_error_t error;
- int i;
+ int i, ret;
+ libspid_eoc_port_v2_entry_t port_v2_entry;
/* check input parameters */
if ((mac_address == NULL) || (index == NULL) || (entry == NULL))
@@ -63,53 +57,22 @@ libspid_eoc_vlan_port_get (char *mac_address, char *index,
for (i = 0; i < LIBSPID_MAC_STR_LEN; i++)
{
- if (mac_address[i] == 0)
- break;
-
- mac_buffer[i] = tolower (mac_address[i]);
+ mac_address[i] = tolower (mac_address[i]);
}
- mac_buffer[sizeof (mac_buffer) - 1] = 0;
- /* use slave MAC and vlan port table index to compose key for line
- * in configuration file */
- sprintf (key, "%s.%s", mac_buffer, index);
- strcpy (entry->vlan_port_mac, mac_buffer);
+ strcpy (entry->vlan_port_mac, mac_address);
strcpy (entry->vlan_port_index, index);
- if (LIBSPID_SUCCESS !=
- (error =
- libspid_config_read_line (LIBSPID_VLAN_PORTTABLE_CONF_PATH,
- delimiters, key, &elt_number, elt, buffer,
- LIBSPID_LINE_MAX_LEN)))
- return error;
-
- if (elt_number < LIBSPID_VLAN_PORT_PARAM_NUM)
+ ret = libspid_eoc_port_v2_get (mac_address, index, &port_v2_entry);
+ if (LIBSPID_SUCCESS == ret)
{
- strcpy (entry->vlan_port_pvid, "");
- strcpy (entry->vlan_port_tpid, "");
- strcpy (entry->vlan_port_prio, "");
- strcpy (entry->vlan_port_mode, "");
+ strcpy (entry->vlan_port_pvid, port_v2_entry.vlan_port_pvid);
+ strcpy (entry->vlan_port_tpid, port_v2_entry.vlan_port_tpid);
+ strcpy (entry->vlan_port_prio, port_v2_entry.vlan_port_prio);
+ strcpy (entry->vlan_port_mode, port_v2_entry.vlan_port_mode);
}
- else
- {
- strncpy (entry->vlan_port_pvid, elt[0],
- sizeof (entry->vlan_port_pvid));
- entry->vlan_port_pvid[sizeof (entry->vlan_port_pvid) - 1] = 0;
-
- strncpy (entry->vlan_port_tpid, elt[1],
- sizeof (entry->vlan_port_tpid));
- entry->vlan_port_tpid[sizeof (entry->vlan_port_tpid) - 1] = 0;
-
- strncpy (entry->vlan_port_prio, elt[2],
- sizeof (entry->vlan_port_prio));
- entry->vlan_port_prio[sizeof (entry->vlan_port_prio) - 1] = 0;
- strncpy (entry->vlan_port_mode, elt[3],
- sizeof (entry->vlan_port_mode));
- entry->vlan_port_mode[sizeof (entry->vlan_port_mode) - 1] = 0;
- }
-
- return LIBSPID_SUCCESS;
+ return ret;
}
/**
@@ -126,7 +89,7 @@ extern libspid_error_t
libspid_eoc_vlan_port_get_list (libspid_eoc_vlan_port_table_entry_t * entry,
int *count)
{
- const char delimiters[2] = LIBSPID_VLAN_PORT_CONF_DELIMITER "\0";
+ const char delimiters[2] = LIBSPID_PORT_V2_CONF_DELIMITER "\0";
char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
unsigned int elt_number = LIBSPID_CONFIG_ELT_MAX_NB;
char *elt[LIBSPID_CONFIG_ELT_MAX_NB] = { 0 };
@@ -149,7 +112,7 @@ libspid_eoc_vlan_port_get_list (libspid_eoc_vlan_port_table_entry_t * entry,
if (LIBSPID_SUCCESS !=
(error =
libspid_config_read_line_repetitive
- (LIBSPID_VLAN_PORTTABLE_CONF_PATH, delimiters, key, &elt_number, elt,
+ (LIBSPID_EOC_PORT_V2_FILE, delimiters, key, &elt_number, elt,
buffer, LIBSPID_LINE_MAX_LEN, &user_data)))
return error;
@@ -161,7 +124,7 @@ libspid_eoc_vlan_port_get_list (libspid_eoc_vlan_port_table_entry_t * entry,
if (LIBSPID_SUCCESS !=
(error =
libspid_config_read_line_repetitive
- (LIBSPID_VLAN_PORTTABLE_CONF_PATH, delimiters, key, &elt_number,
+ (LIBSPID_EOC_PORT_V2_FILE, delimiters, key, &elt_number,
elt, buffer, LIBSPID_LINE_MAX_LEN, &user_data)))
return error;
@@ -181,7 +144,7 @@ libspid_eoc_vlan_port_get_list (libspid_eoc_vlan_port_table_entry_t * entry,
strcpy (entry_ptr->vlan_port_mac, buffer);
strcpy (entry_ptr->vlan_port_index, index_str);
- if (elt_number < LIBSPID_VLAN_PORT_PARAM_NUM)
+ if (elt_number < LIBSPID_PORT_V2_PARAM_NUM)
{
strcpy (entry_ptr->vlan_port_pvid, "");
strcpy (entry_ptr->vlan_port_tpid, "");
@@ -190,19 +153,19 @@ libspid_eoc_vlan_port_get_list (libspid_eoc_vlan_port_table_entry_t * entry,
}
else
{
- strncpy (entry_ptr->vlan_port_pvid, elt[0],
+ strncpy (entry_ptr->vlan_port_pvid, elt[3],
sizeof (entry_ptr->vlan_port_pvid));
entry_ptr->vlan_port_pvid[sizeof (entry_ptr->vlan_port_pvid) -
1] = 0;
- strncpy (entry_ptr->vlan_port_tpid, elt[1],
+ strncpy (entry_ptr->vlan_port_tpid, elt[4],
sizeof (entry_ptr->vlan_port_tpid));
entry_ptr->vlan_port_tpid[sizeof (entry_ptr->vlan_port_tpid) -
1] = 0;
- strncpy (entry_ptr->vlan_port_prio, elt[2],
+ strncpy (entry_ptr->vlan_port_prio, elt[5],
sizeof (entry_ptr->vlan_port_prio));
entry_ptr->vlan_port_prio[sizeof (entry_ptr->vlan_port_prio) -
1] = 0;
- strncpy (entry_ptr->vlan_port_mode, elt[3],
+ strncpy (entry_ptr->vlan_port_mode, elt[6],
sizeof (entry_ptr->vlan_port_mode));
entry_ptr->vlan_port_mode[sizeof (entry_ptr->vlan_port_mode) -
1] = 0;
@@ -229,75 +192,28 @@ extern libspid_error_t
libspid_eoc_vlan_port_set (char *mac_address, char *index,
libspid_eoc_vlan_port_table_entry_t * entry)
{
- const char delimiter = LIBSPID_VLAN_PORT_CONF_DELIMITER[0];
- char key[LIBSPID_CONFIG_KEY_MAX_LEN] = { 0 };
- char *elt[LIBSPID_VLAN_PORT_PARAM_NUM];
libspid_error_t ret;
- libspid_eoc_vlan_port_table_entry_t port_get_entry;
- int i;
+ libspid_eoc_port_v2_entry_t port_v2_entry;
/* check input parameters */
if ((mac_address == NULL) || (index == NULL) || (entry == NULL))
- {
return LIBSPID_ERROR_PARAM;
- }
-
-
- /* check that MAC address and vlan port table index already exist */
- ret = libspid_eoc_vlan_port_get (mac_address, index, &port_get_entry);
+ /* check that MAC address and port index already exist */
+ ret = libspid_eoc_port_v2_get (mac_address, index, &port_v2_entry);
if (LIBSPID_SUCCESS != ret)
{
return ret;
}
- /* use slave MAC and vlan port table index to
- * compose key for line in configuration file */
- sprintf (key, "%s.%s", mac_address, index);
-
- /* allocate buffers */
- for (i = 0; i < LIBSPID_VLAN_PORT_PARAM_NUM; i++)
- {
- elt[i] = (char *) malloc (8 * sizeof (char));
-
- if (NULL != elt[i])
- memset (elt[i], 0, 8);
- else
- {
- LIBSPID_EOC_LOG_2
- ("%s: error allocating element buffers (errno=%d)",
- __FUNCTION__, errno);
- return LIBSPID_ERROR_SYSTEM;
- }
- }
+ strcpy (port_v2_entry.vlan_port_pvid, entry->vlan_port_pvid);
+ strcpy (port_v2_entry.vlan_port_tpid, entry->vlan_port_tpid);
+ strcpy (port_v2_entry.vlan_port_prio, entry->vlan_port_prio);
+ strcpy (port_v2_entry.vlan_port_mode, entry->vlan_port_mode);
- strcpy (elt[0], entry->vlan_port_pvid);
- strcpy (elt[1], entry->vlan_port_tpid);
- strcpy (elt[2], entry->vlan_port_prio);
- strcpy (elt[3], entry->vlan_port_mode);
- ret = libspid_config_write_line (LIBSPID_VLAN_PORTTABLE_CONF_PATH,
- delimiter, key, 4, elt);
+ ret = libspid_eoc_port_v2_set (mac_address, index, &port_v2_entry);
- /* free element buffers */
- for (i = 0; i < LIBSPID_VLAN_PORT_PARAM_NUM; i++)
- {
- if (elt[i])
- {
- free (elt[i]);
- elt[i] = NULL;
- }
- }
-
-
- if (ret != LIBSPID_SUCCESS)
- {
- LIBSPID_EOC_LOG_2 ("%s: cannot write port entry (errno=%d)",
- __FUNCTION__, errno);
- return ret;
- }
-
-
- return LIBSPID_SUCCESS;
+ return ret;
}
/** internal helper function for checking parameters of port.conf */
diff --git a/cleopatre/application/libspid/src/wl_eoc.c b/cleopatre/application/libspid/src/wl_eoc.c
index ca1e3900b2..3e7801d079 100644
--- a/cleopatre/application/libspid/src/wl_eoc.c
+++ b/cleopatre/application/libspid/src/wl_eoc.c
@@ -342,168 +342,25 @@ libspid_eoc_maclimits_remove (char *mac_address)
return LIBSPID_SUCCESS;
}
-
-/* internal helper function: adds storm protection list entries for slave with given */
-/* MAC address - initial port parameters set to 0 */
-libspid_error_t
-libspid_eoc_storm_protection_add (char *mac_address)
-{
-
- int i;
- int ret;
- char thread_hold[3][64];
- char *port_elt[6] = {"0", thread_hold[0],
- "0", thread_hold[1],
- "0", thread_hold[2]};
-
- char port_key[LIBSPID_CONFIG_KEY_MAX_LEN];
- const char port_delimiter = LIBSPID_BROADCAST_STORM_CONF_DELIMITER[0];
-
- sprintf (thread_hold[0], "%d", LIBSPID_EOC_STORM_BCAST_THRES_HOLD_MIN);
- sprintf (thread_hold[1], "%d", LIBSPID_EOC_STORM_MULTI_THRES_HOLD_MIN);
- sprintf (thread_hold[2], "%d", LIBSPID_EOC_STORM_UNKNOW_THRES_HOLD_MIN);
-
- /* check input parameter */
- if (mac_address == NULL)
- {
- return LIBSPID_ERROR_PARAM;
- }
-
- for (i = 0; i < LIBSPID_PORT_PER_SLAVE_MAX; i++)
- {
- sprintf (port_key, "%s.%d", mac_address, i);
- ret = libspid_config_write_line (LIBSPID_BROADCAST_STORM_CONF_PATH,
- port_delimiter, port_key, 6,
- port_elt);
- if (ret != LIBSPID_SUCCESS)
- {
- LIBSPID_EOC_LOG_2 ("%s: cannot write storm list entry (errno=%d)",
- __FUNCTION__, errno);
- return ret;
- }
- }
-
- return LIBSPID_SUCCESS;
-}
-/* internal helper function: remove storm protection list entries for slave with given */
-/* MAC address - initial port parameters set to 0 */
-libspid_error_t
-libspid_eoc_storm_protection_remove (char *mac_address)
-{
- int i, j;
- int ret;
- char port_key[LIBSPID_CONFIG_KEY_MAX_LEN];
-
- /* check input parameter */
- if (mac_address == NULL)
- {
- return LIBSPID_ERROR_PARAM;
- }
-
- for (i = 0; i < LIBSPID_PORT_PER_SLAVE_MAX; i++)
- {
- /* make sure MAC address is in lowercase */
- for (j = 0; j < LIBSPID_MAC_STR_LEN; j++)
- {
- mac_address[j] = tolower (mac_address[j]);
- }
- sprintf (port_key, "%s.%d", mac_address, i);
- ret = libspid_config_remove_line (LIBSPID_BROADCAST_STORM_CONF_PATH,
- LIBSPID_BROADCAST_STORM_CONF_DELIMITER,
- port_key);
- if (ret != LIBSPID_SUCCESS)
- {
- LIBSPID_EOC_LOG_3 ("%s: cannot remove strom list entry %s "
- "(errno=%d)", __FUNCTION__, port_key, errno);
- return ret;
- }
- }
-
- return LIBSPID_SUCCESS;
-}
-
-
-/* internal helper function: adds vlan port list entries for slave with given */
-/* MAC address - initial vlan port parameters set to 0 */
-libspid_error_t
-libspid_eoc_vlan_ports_add (char *mac_address)
-{
- int i;
- int ret;
-
- char *port_elt[4] = {"0", "33024", "0", "0"};
- char port_key[LIBSPID_CONFIG_KEY_MAX_LEN];
- const char port_delimiter = LIBSPID_VLAN_PORT_CONF_DELIMITER[0];
-
- /* check input parameter */
- if (mac_address == NULL)
- {
- return LIBSPID_ERROR_PARAM;
- }
-
- for (i = 0; i < LIBSPID_PORT_PER_SLAVE_MAX; i++)
- {
- sprintf (port_key, "%s.%d", mac_address, i);
- ret = libspid_config_write_line (LIBSPID_VLAN_PORTTABLE_CONF_PATH,
- port_delimiter, port_key, 4,
- port_elt);
- if (ret != LIBSPID_SUCCESS)
- {
- LIBSPID_EOC_LOG_2 ("%s: cannot write port list entry (errno=%d)",
- __FUNCTION__, errno);
- return ret;
- }
- }
-
- return LIBSPID_SUCCESS;
-}
-
-/* internal helper function: removes vlan port list entries for slave */
+/* internal helper function: adds port_v2 list entries for slave */
/* with given MAC address */
libspid_error_t
-libspid_eoc_vlan_ports_remove (char *mac_address)
-{
- int i,j;
- int ret;
- char port_key[LIBSPID_CONFIG_KEY_MAX_LEN];
-
- /* check input parameter */
- if (mac_address == NULL)
- {
- return LIBSPID_ERROR_PARAM;
- }
-
- for (i = 0; i < LIBSPID_PORT_PER_SLAVE_MAX; i++)
- {
- /* make sure MAC address is in lowercase */
- for (j = 0; j < LIBSPID_MAC_STR_LEN; j++)
- {
- mac_address[j] = tolower (mac_address[j]);
- }
- sprintf (port_key, "%s.%d", mac_address, i);
- ret = libspid_config_remove_line (LIBSPID_VLAN_PORTTABLE_CONF_PATH,
- LIBSPID_VLAN_PORT_CONF_DELIMITER,
- port_key);
- if (ret != LIBSPID_SUCCESS)
- {
- LIBSPID_EOC_LOG_3 ("%s: cannot remove port list entry %s "
- "(errno=%d)", __FUNCTION__, port_key, errno);
- return ret;
- }
- }
-
- return LIBSPID_SUCCESS;
-}
-/* internal helper function: adds ethernet port list entries for slave with given */
-/* MAC address - initial vlan port parameters set to 0 */
-libspid_error_t
-libspid_eoc_ethernet_ports_add (char *mac_address)
+libspid_eoc_ports_v2_add (char *mac_address)
{
int i;
int ret;
- char *port_elt[3] = {"1", "2", "2"};
+ char thres_hold[3][64];
+ char *port_elt[LIBSPID_PORT_V2_PARAM_NUM] = {"1", "2", "2",
+ "0", "33024", "0", "0",
+ "0", thres_hold[0],
+ "0", thres_hold[1],
+ "0", thres_hold[2]};
char port_key[LIBSPID_CONFIG_KEY_MAX_LEN];
- const char port_delimiter = LIBSPID_ETHERNET_PORT_CONF_DELIMITER[0];
+ const char port_delimiter = LIBSPID_PORT_V2_CONF_DELIMITER[0];
+
+ sprintf (thres_hold[0], "%d", LIBSPID_EOC_STORM_BCAST_THRES_HOLD_MIN);
+ sprintf (thres_hold[1], "%d", LIBSPID_EOC_STORM_MULTI_THRES_HOLD_MIN);
+ sprintf (thres_hold[2], "%d", LIBSPID_EOC_STORM_UNKNOW_THRES_HOLD_MIN);
/* check input parameter */
if (mac_address == NULL)
@@ -514,8 +371,9 @@ libspid_eoc_ethernet_ports_add (char *mac_address)
for (i = 0; i < LIBSPID_ETHERNET_PORT_PER_SLAVE_MAX; i++)
{
sprintf (port_key, "%s.%d", mac_address, i);
- ret = libspid_config_write_line (LIBSPID_ETHERNET_PORT_CONF_PATH,
- port_delimiter, port_key, 3,
+ ret = libspid_config_write_line (LIBSPID_EOC_PORT_V2_FILE,
+ port_delimiter, port_key,
+ LIBSPID_PORT_V2_PARAM_NUM,
port_elt);
if (ret != LIBSPID_SUCCESS)
{
@@ -528,10 +386,10 @@ libspid_eoc_ethernet_ports_add (char *mac_address)
return LIBSPID_SUCCESS;
}
-/* internal helper function: removes ethernet port list entries for slave */
+/* internal helper function: removes port_v2 list entries for slave */
/* with given MAC address */
libspid_error_t
-libspid_eoc_ethernet_ports_remove (char *mac_address)
+libspid_eoc_ports_v2_remove (char *mac_address)
{
int i,j;
int ret;
@@ -551,8 +409,8 @@ libspid_eoc_ethernet_ports_remove (char *mac_address)
mac_address[j] = tolower (mac_address[j]);
}
sprintf (port_key, "%s.%d", mac_address, i);
- ret = libspid_config_remove_line (LIBSPID_ETHERNET_PORT_CONF_PATH,
- LIBSPID_ETHERNET_PORT_CONF_DELIMITER,
+ ret = libspid_config_remove_line (LIBSPID_EOC_PORT_V2_FILE,
+ LIBSPID_PORT_V2_CONF_DELIMITER,
port_key);
if (ret != LIBSPID_SUCCESS)
{
@@ -659,12 +517,6 @@ libspid_eoc_wl_set (char *mac_address, libspid_eoc_wl_entry_t *eoc_wl_entry)
{
return ret;
}
- /* create broadcast storm protection entries for slave */
- ret = libspid_eoc_storm_protection_add (mac_address);
- if (LIBSPID_SUCCESS != ret)
- {
- return ret;
- }
/* create mac limitation entries for slave */
ret = libspid_eoc_maclimits_add (mac_address);
@@ -673,13 +525,7 @@ libspid_eoc_wl_set (char *mac_address, libspid_eoc_wl_entry_t *eoc_wl_entry)
return ret;
}
- /* create vlan ports entries for slave */
- ret = libspid_eoc_vlan_ports_add (mac_address);
- if (LIBSPID_SUCCESS != ret)
- {
- return ret;
- }
- ret = libspid_eoc_ethernet_ports_add (mac_address);
+ ret = libspid_eoc_ports_v2_add (mac_address);
if (LIBSPID_SUCCESS != ret)
{
return ret;
@@ -728,29 +574,15 @@ libspid_eoc_wl_remove (char *mac_address)
return ret;
}
-
- /* remove broadcast storm protection entries for slave */
- ret = libspid_eoc_storm_protection_remove (mac_address);
- if (LIBSPID_SUCCESS != ret)
- {
- return ret;
- }
- /* remove mac limitation entries for slave */
+ /* remove mac limitation entries for slave */
ret = libspid_eoc_maclimits_remove (mac_address);
if (LIBSPID_SUCCESS != ret)
{
return ret;
}
- /* remove vlan ports entries for slave */
- ret = libspid_eoc_vlan_ports_remove (mac_address);
- if (LIBSPID_SUCCESS != ret)
- {
- return ret;
- }
-
- /* remove ethernet ports entries for slave */
- ret = libspid_eoc_ethernet_ports_remove (mac_address);
+ /* remove port_v2 entries for slave */
+ ret = libspid_eoc_ports_v2_remove (mac_address);
if (LIBSPID_SUCCESS != ret)
{
return ret;
diff --git a/cleopatre/application/onlined/src/onlined_configure.c b/cleopatre/application/onlined/src/onlined_configure.c
index 7341611e66..12ad23f666 100644
--- a/cleopatre/application/onlined/src/onlined_configure.c
+++ b/cleopatre/application/onlined/src/onlined_configure.c
@@ -335,7 +335,7 @@ onlined_tag_vlan (onlined_ctx_t * ctx, char *mac, int nvram_nb_eth_port)
if (LIBSPID_TRUE == mode_value)
{
- if (stat (LIBSPID_VLAN_PORTTABLE_CONF_PATH, &statbuf) != 0)
+ if (stat (LIBSPID_EOC_PORT_V2_FILE, &statbuf) != 0)
return ONLINED_ERROR_FOPS;
else if (statbuf.st_mtime != ctx->vlan_port_modification_time)
{
@@ -1083,7 +1083,7 @@ onlined_broadcast_storm_mod_eoc (onlined_ctx_t * ctx, char *mac)
return ONLINED_ERROR_PARAM;
}
- if (stat (LIBSPID_BROADCAST_STORM_CONF_PATH, &statbuf) != 0)
+ if (stat (LIBSPID_EOC_PORT_V2_FILE, &statbuf) != 0)
return ONLINED_ERROR_FOPS;
else if (statbuf.st_mtime != ctx->storm_modification_time)
{
@@ -1161,7 +1161,7 @@ onlined_eth_port_mod_eoc (onlined_ctx_t * ctx, char *mac)
onlined_log (LOG_WARNING, "Pointer on mac address invalid");
return ONLINED_ERROR_PARAM;
}
- if (stat (LIBSPID_ETHERNET_PORT_CONF_PATH, &statbuf) != 0)
+ if (stat (LIBSPID_EOC_PORT_V2_FILE, &statbuf) != 0)
return ONLINED_ERROR_FOPS;
else if (statbuf.st_mtime != ctx->ethernet_port_modification_time)
{
diff --git a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/ethport.conf b/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/ethport.conf
deleted file mode 100644
index 9d4a9cac57..0000000000
--- a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/ethport.conf
+++ /dev/null
@@ -1 +0,0 @@
-#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX
diff --git a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/maclimit.conf b/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/maclimit.conf
index 20b9370622..f1060cfd1e 100644
--- a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/maclimit.conf
+++ b/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/maclimit.conf
@@ -1 +1 @@
-# <MAC_ADDRESS> MAC_LIMIATION
+# <MAC_ADDRESS> MAC_LIMITATION
diff --git a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/port_v2.conf b/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/port_v2.conf
new file mode 100644
index 0000000000..49d19e3b27
--- /dev/null
+++ b/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/port_v2.conf
@@ -0,0 +1 @@
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
diff --git a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/storm.conf b/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/storm.conf
deleted file mode 100644
index 5b8d56dd5d..0000000000
--- a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/storm.conf
+++ /dev/null
@@ -1 +0,0 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
diff --git a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/vlanport.conf b/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/vlanport.conf
deleted file mode 100644
index 72938ec2ac..0000000000
--- a/cleopatre/buildroot/target/device/Spidcom/target_skeleton_add_eoc_master/etc/vlanport.conf
+++ /dev/null
@@ -1 +0,0 @@
-#<MAC_ADDRESS.PORT_NB> VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE
diff --git a/cleopatre/devkit/tests/libspid/utests/override/inc/eoc_utests.h b/cleopatre/devkit/tests/libspid/utests/override/inc/eoc_utests.h
index 480f2f68a9..5089356240 100755
--- a/cleopatre/devkit/tests/libspid/utests/override/inc/eoc_utests.h
+++ b/cleopatre/devkit/tests/libspid/utests/override/inc/eoc_utests.h
@@ -58,17 +58,9 @@ libspid_eoc_maclimits_add (char *mac_address);
libspid_error_t
libspid_eoc_maclimits_remove (char *mac_address);
libspid_error_t
-libspid_eoc_storm_protection_add (char *mac_address);
+libspid_eoc_ports_v2_add (char *mac_address);
libspid_error_t
-libspid_eoc_storm_protection_remove (char *mac_address);
-libspid_error_t
-libspid_eoc_vlan_ports_add (char *mac_address);
-libspid_error_t
-libspid_eoc_vlan_ports_remove (char *mac_address);
-libspid_error_t
-libspid_eoc_ethernet_ports_add (char *mac_address);
-libspid_error_t
-libspid_eoc_ethernet_ports_remove (char *mac_address);
+libspid_eoc_ports_v2_remove (char *mac_address);
libspid_error_t
libspid_eoc_ports_add (char *mac_address);
libspid_error_t
diff --git a/cleopatre/devkit/tests/libspid/utests/src/ethernet_port_eoc_utests.c b/cleopatre/devkit/tests/libspid/utests/src/ethernet_port_eoc_utests.c
index f1ee473afe..1b712e3885 100644
--- a/cleopatre/devkit/tests/libspid/utests/src/ethernet_port_eoc_utests.c
+++ b/cleopatre/devkit/tests/libspid/utests/src/ethernet_port_eoc_utests.c
@@ -48,6 +48,7 @@
#define ETH_PORT_MAC_CONF_2 "testfiles/eth_port_mac_2.conf"
#define ETH_PORT_ENTRY_NUM 20
#define WHITE_LIST_CONF "testfiles/white_list.conf"
+#define PORT_V2 "testfiles/port_v2.conf"
/* fixtures - run before and after each unit test */
void
setup (void)
@@ -143,14 +144,14 @@ START_TEST (test_libspid_eoc_ethernet_port_set)
libspid_eoc_ethernet_port_entry_t eth_port_entry_received;
memset (&eth_port_entry, 0, sizeof (eth_port_entry));
- strcpy (eth_port_entry.mac_addr, "00:13:D7:00:00:01");
+ strcpy (eth_port_entry.mac_addr, "00:13:d7:00:00:01");
strcpy (eth_port_entry.port_index, "1");
strcpy (eth_port_entry.auto_neg, "0");
strcpy (eth_port_entry.speed, "1");
strcpy (eth_port_entry.duplex, "1");
- ret = system ("cp " ETH_PORT_CONF " " UTESTS_TMP_DIR "/etc");
+ ret = system ("cp " ETH_PORT_CONF " " LIBSPID_EOC_PORT_V2_FILE);
ret = libspid_eoc_ethernet_port_set (eth_port_entry.mac_addr,
eth_port_entry.port_index,
&eth_port_entry);
@@ -192,7 +193,7 @@ START_TEST (test_libspid_eoc_ethernet_port_get)
strcpy (port_index, "1");
- ret = system ("cp " ETH_PORT_CONF " " UTESTS_TMP_DIR "/etc");
+ ret = system ("cp " ETH_PORT_CONF " " LIBSPID_EOC_PORT_V2_FILE);
ret = libspid_eoc_ethernet_port_get (mac_addr, port_index,
&eth_port_entry);
@@ -212,6 +213,141 @@ START_TEST (test_libspid_eoc_ethernet_port_get)
}
END_TEST
+START_TEST (test_libspid_eoc_port_v2_set)
+{
+ int ret;
+
+ libspid_eoc_port_v2_entry_t eth_port_v2_entry;
+ libspid_eoc_port_v2_entry_t eth_port_v2_entry_received;
+
+ memset (&eth_port_v2_entry, 0, sizeof (eth_port_v2_entry));
+ strcpy (eth_port_v2_entry.mac_addr, "00:13:d7:00:00:01");
+ strcpy (eth_port_v2_entry.port_index, "1");
+ strcpy (eth_port_v2_entry.auto_neg, "0");
+ strcpy (eth_port_v2_entry.speed, "1");
+ strcpy (eth_port_v2_entry.duplex, "1");
+ strcpy (eth_port_v2_entry.vlan_port_pvid, "0");
+ strcpy (eth_port_v2_entry.vlan_port_tpid, "1");
+ strcpy (eth_port_v2_entry.vlan_port_prio, "2");
+ strcpy (eth_port_v2_entry.vlan_port_mode, "3");
+ strcpy (eth_port_v2_entry.bcast_protect_en, "4");
+ strcpy (eth_port_v2_entry.bcast_thres_hold, "5");
+ strcpy (eth_port_v2_entry.multi_protect_en, "6");
+ strcpy (eth_port_v2_entry.multi_thres_hold, "7");
+ strcpy (eth_port_v2_entry.unknow_protect_en, "8");
+ strcpy (eth_port_v2_entry.unknow_thres_hold, "9");
+
+ ret = system ("cp " PORT_V2 " " LIBSPID_EOC_PORT_V2_FILE);
+ ret = libspid_eoc_port_v2_set (eth_port_v2_entry.mac_addr,
+ eth_port_v2_entry.port_index,
+ &eth_port_v2_entry);
+
+ fail_if (ret != LIBSPID_SUCCESS, "libspid_eoc_ethernet_port_set failed");
+
+ ret = libspid_eoc_port_v2_get (eth_port_v2_entry.mac_addr,
+ eth_port_v2_entry.port_index,
+ &eth_port_v2_entry_received);
+ fail_if (ret != LIBSPID_SUCCESS, "libspid_eoc_ethernet_port_get failed");
+ fail_if (strcmp (eth_port_v2_entry.mac_addr,
+ eth_port_v2_entry_received.mac_addr) != 0,
+ "mac addres is wrong");
+ fail_if (strcmp (eth_port_v2_entry.port_index,
+ eth_port_v2_entry_received.port_index) != 0,
+ "port index is wrong");
+ fail_if (strcmp (eth_port_v2_entry.auto_neg,
+ eth_port_v2_entry_received.auto_neg) != 0,
+ "auto neg is wrong");
+ fail_if (strcmp (eth_port_v2_entry.speed,
+ eth_port_v2_entry_received.speed) != 0,
+ "speed is wrong");
+ fail_if (strcmp (eth_port_v2_entry.duplex,
+ eth_port_v2_entry_received.duplex) != 0,
+ "duplex is wrong");
+ fail_if (strcmp (eth_port_v2_entry.vlan_port_pvid,
+ eth_port_v2_entry_received.vlan_port_pvid) != 0,
+ "vlan_port_pvid is wrong");
+ fail_if (strcmp (eth_port_v2_entry.vlan_port_tpid,
+ eth_port_v2_entry_received.vlan_port_tpid) != 0,
+ "vlan_port_tpid is wrong");
+ fail_if (strcmp (eth_port_v2_entry.vlan_port_prio,
+ eth_port_v2_entry_received.vlan_port_prio) != 0,
+ "vlan_port_prio is wrong");
+ fail_if (strcmp (eth_port_v2_entry.vlan_port_mode,
+ eth_port_v2_entry_received.vlan_port_mode) != 0,
+ "vlan_port_mode is wrong");
+ fail_if (strcmp (eth_port_v2_entry.bcast_protect_en,
+ eth_port_v2_entry_received.bcast_protect_en) != 0,
+ "bcast_protect_en is wrong");
+ fail_if (strcmp (eth_port_v2_entry.bcast_thres_hold,
+ eth_port_v2_entry_received.bcast_thres_hold) != 0,
+ "bcast_thres_hold is wrong");
+ fail_if (strcmp (eth_port_v2_entry.multi_protect_en,
+ eth_port_v2_entry_received.multi_protect_en) != 0,
+ "multi_protect_en is wrong");
+ fail_if (strcmp (eth_port_v2_entry.multi_thres_hold,
+ eth_port_v2_entry_received.multi_thres_hold) != 0,
+ "multi_thres_hold is wrong");
+ fail_if (strcmp (eth_port_v2_entry.unknow_protect_en,
+ eth_port_v2_entry_received.unknow_protect_en) != 0,
+ "unknow_protect_en is wrong");
+ fail_if (strcmp (eth_port_v2_entry.unknow_thres_hold,
+ eth_port_v2_entry_received.unknow_thres_hold) != 0,
+ "unknow_thres_hold is wrong");
+}
+
+END_TEST
+START_TEST (test_libspid_eoc_port_v2_get)
+{
+ int ret;
+ char mac_addr[LIBSPID_MAC_STR_LEN];
+ char port_index[2];
+ libspid_eoc_port_v2_entry_t eth_port_v2_entry;
+
+ memset (&eth_port_v2_entry, 0, sizeof (eth_port_v2_entry));
+ strcpy (mac_addr, "00:13:d7:00:00:02");
+ strcpy (port_index, "2");
+
+
+ ret = system ("cp " PORT_V2 " " LIBSPID_EOC_PORT_V2_FILE);
+ ret = libspid_eoc_port_v2_get (mac_addr, port_index,
+ &eth_port_v2_entry);
+
+ fail_if (ret != LIBSPID_SUCCESS,
+ "libspid_eoc_port_v2_get return unsuccessful");
+ fail_if (strcmp (eth_port_v2_entry.mac_addr, "00:13:d7:00:00:02") != 0,
+ "libspid_eoc_port_v2_get gets wrong mac addr");
+ fail_if (strcmp (eth_port_v2_entry.port_index, "2") != 0,
+ "libspid_eoc_port_v2_get gets wrong port_index");
+ fail_if (strcmp (eth_port_v2_entry.auto_neg, "1") != 0,
+ "libspid_eoc_port_v2_get gets wrong auto_neg");
+ fail_if (strcmp (eth_port_v2_entry.speed, "2") != 0,
+ "libspid_eoc_port_v2_get gets wrong speed");
+ fail_if (strcmp (eth_port_v2_entry.duplex, "2") != 0,
+ "libspid_eoc_port_v2_get gets wrong duplex");
+ fail_if (strcmp (eth_port_v2_entry.vlan_port_pvid, "0") != 0,
+ "libspid_eoc_port_v2_get gets wrong vlan_port_pvid");
+ fail_if (strcmp (eth_port_v2_entry.vlan_port_tpid, "33024") != 0,
+ "libspid_eoc_port_v2_get gets wrong vlan_port_tpid");
+ fail_if (strcmp (eth_port_v2_entry.vlan_port_prio, "0") != 0,
+ "libspid_eoc_port_v2_get gets wrong vlan_port_prio");
+ fail_if (strcmp (eth_port_v2_entry.vlan_port_mode, "0") != 0,
+ "libspid_eoc_port_v2_get gets wrong vlan_port_mode");
+ fail_if (strcmp (eth_port_v2_entry.bcast_protect_en, "0") != 0,
+ "libspid_eoc_port_v2_get gets wrong bcast_protect_en");
+ fail_if (strcmp (eth_port_v2_entry.bcast_thres_hold, "107") != 0,
+ "libspid_eoc_port_v2_get gets wrong bcast_thres_hold");
+ fail_if (strcmp (eth_port_v2_entry.multi_protect_en, "0") != 0,
+ "libspid_eoc_port_v2_get gets wrong multi_protect_en");
+ fail_if (strcmp (eth_port_v2_entry.multi_thres_hold, "207") != 0,
+ "libspid_eoc_port_v2_get gets wrong multi_thres_hold");
+ fail_if (strcmp (eth_port_v2_entry.unknow_protect_en, "0") != 0,
+ "libspid_eoc_port_v2_get gets wrong unknow_protect_en");
+ fail_if (strcmp (eth_port_v2_entry.unknow_thres_hold, "8") != 0,
+ "libspid_eoc_port_v2_get gets wrong unknow_thres_hold");
+
+}
+
+END_TEST
START_TEST (test_libspid_eoc_ethernet_port_get_list)
{
int ret;
@@ -245,7 +381,7 @@ START_TEST (test_libspid_eoc_ethernet_port_get_list)
memset (entries, 0, ETH_PORT_ENTRY_NUM *
sizeof (libspid_eoc_ethernet_port_entry_t));
- ret = system ("cp " ETH_PORT_CONF " " UTESTS_TMP_DIR "/etc");
+ ret = system ("cp " ETH_PORT_CONF " " LIBSPID_EOC_PORT_V2_FILE);
ret = libspid_eoc_ethernet_port_get_list (entries, &line_count);
@@ -281,7 +417,7 @@ START_TEST (test_libspid_eoc_ethernet_port_check)
libspid_eoc_ethernet_port_entry_t eth_port_entry;
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " ETH_PORT_CONF " " UTESTS_TMP_DIR "/etc");
+ ret = system ("cp " ETH_PORT_CONF " " LIBSPID_EOC_PORT_V2_FILE);
ret = libspid_eoc_ethernet_port_check ();
fail_if (ret != LIBSPID_SUCCESS,
@@ -289,7 +425,7 @@ START_TEST (test_libspid_eoc_ethernet_port_check)
/* add wrong duplex parameter */
memset (&eth_port_entry, 0, sizeof (eth_port_entry));
- strcpy (eth_port_entry.mac_addr, "00:13:D7:00:00:01");
+ strcpy (eth_port_entry.mac_addr, "00:13:d7:00:00:01");
strcpy (eth_port_entry.port_index, "1");
strcpy (eth_port_entry.auto_neg, "0");
strcpy (eth_port_entry.speed, "2");
@@ -307,7 +443,7 @@ START_TEST (test_libspid_eoc_ethernet_port_check)
/* add wrong speed parameter */
memset (&eth_port_entry, 0, sizeof (eth_port_entry));
- strcpy (eth_port_entry.mac_addr, "00:13:D7:00:00:01");
+ strcpy (eth_port_entry.mac_addr, "00:13:d7:00:00:01");
strcpy (eth_port_entry.port_index, "1");
strcpy (eth_port_entry.auto_neg, "0");
strcpy (eth_port_entry.speed, "a");
@@ -325,7 +461,7 @@ START_TEST (test_libspid_eoc_ethernet_port_check)
/* add wrong auto_neg parameter */
memset (&eth_port_entry, 0, sizeof (eth_port_entry));
- strcpy (eth_port_entry.mac_addr, "00:13:D7:00:00:01");
+ strcpy (eth_port_entry.mac_addr, "00:13:d7:00:00:01");
strcpy (eth_port_entry.port_index, "1");
strcpy (eth_port_entry.auto_neg, "a");
strcpy (eth_port_entry.speed, "2");
@@ -343,14 +479,14 @@ START_TEST (test_libspid_eoc_ethernet_port_check)
ret = system ("cp " ETH_PORT_MAC_CONF_1 " "
- LIBSPID_ETHERNET_PORT_CONF_PATH);
+ LIBSPID_EOC_PORT_V2_FILE);
ret = libspid_eoc_ethernet_port_check ();
fail_if (ret == LIBSPID_SUCCESS,
"libspid_eoc_ethernet_port_check must return unsuccessful");
ret = system ("cp " ETH_PORT_MAC_CONF_2 " "
- LIBSPID_ETHERNET_PORT_CONF_PATH);
+ LIBSPID_EOC_PORT_V2_FILE);
ret = libspid_eoc_ethernet_port_check ();
fail_if (ret == LIBSPID_SUCCESS,
@@ -379,6 +515,8 @@ libspid_eoc_suite (void)
tcase_add_test (tc_core, test_libspid_eoc_ethernet_port_get);
tcase_add_test (tc_core, test_libspid_eoc_ethernet_port_get_list);
tcase_add_test (tc_core, test_libspid_eoc_ethernet_port_check);
+ tcase_add_test (tc_core, test_libspid_eoc_port_v2_set);
+ tcase_add_test (tc_core, test_libspid_eoc_port_v2_get);
suite_add_tcase (s, tc_core);
suite_add_tcase (s, tc_param ());
return s;
diff --git a/cleopatre/devkit/tests/libspid/utests/src/storm_eoc_utests.c b/cleopatre/devkit/tests/libspid/utests/src/storm_eoc_utests.c
index dede758d1a..4ad76ced5f 100644
--- a/cleopatre/devkit/tests/libspid/utests/src/storm_eoc_utests.c
+++ b/cleopatre/devkit/tests/libspid/utests/src/storm_eoc_utests.c
@@ -103,7 +103,7 @@ START_TEST (test_libspid_eoc_storm_get)
unsigned int i = 0;
ret = system ("cp " STORM_PROTECTION_CONF
- " "LIBSPID_BROADCAST_STORM_CONF_PATH );
+ " "LIBSPID_EOC_PORT_V2_FILE );
strcpy (index, "0");
strcpy (mac, "00:11:22:33:44:55");
@@ -175,7 +175,7 @@ START_TEST (test_libspid_eoc_storm_set)
libspid_eoc_storm_entry_t entry, entry2;
ret = system ("cp " STORM_PROTECTION_CONF
- " "LIBSPID_BROADCAST_STORM_CONF_PATH );
+ " "LIBSPID_EOC_PORT_V2_FILE );
strcpy (index, "0");
strcpy (mac, "00:11:22:33:44:55");
@@ -261,9 +261,7 @@ START_TEST (test_libspid_eoc_storm_get_list)
static libspid_eoc_storm_entry_t entry;
ret = system ("cp " STORM_PROTECTION_CONF
- " "LIBSPID_BROADCAST_STORM_CONF_PATH );
-
-
+ " "LIBSPID_EOC_PORT_V2_FILE );
ret = libspid_eoc_storm_get_list (0, &cnt);
fail_if (LIBSPID_SUCCESS == ret, "must fail, for param 1 error");
@@ -323,7 +321,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " STORM_PROTECTION_CONF
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
@@ -332,7 +330,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_MAC_FORMAT
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
@@ -341,7 +339,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_DUP_KEY
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
@@ -349,7 +347,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_INDEX_ERR
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
@@ -358,7 +356,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_STORM_EN_ERR
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
@@ -366,7 +364,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_STORM_THR_ERR
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
@@ -374,7 +372,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_MULT_EN_ERR
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
@@ -382,7 +380,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_MULT_THR_ERR
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
@@ -390,7 +388,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_UNKNOW_EN_ERR
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
@@ -398,7 +396,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_UNKNOW_THR_ERR
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
@@ -406,7 +404,7 @@ START_TEST (test_libspid_eoc_storm_check)
setup ();
ret = system ("cp " SP_CONF_MAC_NOT_IN_WL
- " "LIBSPID_BROADCAST_STORM_CONF_PATH);
+ " "LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF
" "LIBSPID_WHITE_LIST_CONF_PATH);
ret = libspid_eoc_storm_check ();
diff --git a/cleopatre/devkit/tests/libspid/utests/src/vlan_port_utests.c b/cleopatre/devkit/tests/libspid/utests/src/vlan_port_utests.c
index 4089ec25d8..8286c00022 100644
--- a/cleopatre/devkit/tests/libspid/utests/src/vlan_port_utests.c
+++ b/cleopatre/devkit/tests/libspid/utests/src/vlan_port_utests.c
@@ -54,8 +54,7 @@ test_create_test_file_2 ()
{
int ret;
- ret = system ("cp " VLAN_PORT_LINE2 " " UTESTS_TMP_DIR
- ETC_VLAN_PORT_CONF);
+ ret = system ("cp " VLAN_PORT_LINE2 " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
}
@@ -64,8 +63,7 @@ test_create_test_file_7 ()
{
int ret;
- ret = system ("cp " VLAN_PORT_LINE7 " " UTESTS_TMP_DIR
- ETC_VLAN_PORT_CONF);
+ ret = system ("cp " VLAN_PORT_LINE7 " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
}
@@ -121,24 +119,25 @@ teardown (void)
START_TEST (test_libspid_eoc_vlan_port_get)
{
int ret;
- char *index;
- char *mac;
+ char index[2];
+ char mac[LIBSPID_MAC_STR_LEN];
libspid_eoc_vlan_port_table_entry_t entry;
- index = "1";
+
+ strcpy (index, "1");
ret = libspid_eoc_vlan_port_get (0, index, &entry);
fail_if (LIBSPID_SUCCESS == ret, "param 1 is 0,but return suc");
- mac = "00:11:22:33:44:55";
+ strcpy (mac, "00:13:d7:00:00:01");
ret = libspid_eoc_vlan_port_get (mac, 0, &entry);
fail_if (LIBSPID_SUCCESS == ret, "param 2 is 0,but return suc");
ret = libspid_eoc_vlan_port_get (mac, index, 0);
fail_if (LIBSPID_SUCCESS == ret, "param 3 is 0,but return suc");
test_create_test_file_7 ();
- mac = "00:13:d7:00:00:01";
+ strcpy (mac, "00:13:d7:00:00:01");
- index = "3";
+ strcpy (index, "3");
ret = libspid_eoc_vlan_port_get (mac, index, &entry);
fail_if (LIBSPID_SUCCESS != ret, "must get it,but not");
fail_if (3 != atoi (entry.vlan_port_index), "Get the port index error");
@@ -147,13 +146,13 @@ START_TEST (test_libspid_eoc_vlan_port_get)
fail_if (2 != atoi (entry.vlan_port_prio), "Get the port prio error");
fail_if (1 != atoi (entry.vlan_port_mode), "Get the port mode error");
- mac = "00:13:d7:44:00:10";
- index = "3";
+ strcpy (mac, "00:13:d7:44:00:10");
+ strcpy (index, "3");
ret = libspid_eoc_vlan_port_get (mac, index, &entry);
fail_if (LIBSPID_SUCCESS == ret, "vaild mac ,but return suc");
- mac = "00:13:d7:00:00:02";
- index = "4";
+ strcpy (mac, "00:13:d7:00:00:02");
+ strcpy (index, "4");
ret = libspid_eoc_vlan_port_get (mac, index, &entry);
fail_if (LIBSPID_SUCCESS == ret, "vaild index ,but return suc");
}
@@ -200,8 +199,9 @@ START_TEST (test_libspid_eoc_vlan_port_set)
{
int ret;
char mac[LIBSPID_MAC_STR_LEN];
- char *index = "2";
+ char index[2];
+ strcpy (index, "2");
strcpy (mac, "00:13:D7:00:00:20");
libspid_eoc_vlan_port_table_entry_t entry, temp_entry;
@@ -221,7 +221,7 @@ START_TEST (test_libspid_eoc_vlan_port_set)
test_create_test_file_7 ();
strcpy (mac, "00:13:D7:00:00:02");
- index = "1";
+ strcpy (index, "1");
strcpy (entry.vlan_port_pvid, "10");
strcpy (entry.vlan_port_tpid, "11");
@@ -253,7 +253,7 @@ START_TEST (test_libspid_eoc_vlan_port_set)
ret = strcasecmp (entry.vlan_port_mode, temp_entry.vlan_port_mode);
fail_if (0 != ret, "vlan_port_mode not right");
strcpy(mac, "00:13:D7:00:00:20");
- index = "2";
+ strcpy (index, "1");
strcpy (entry.vlan_port_pvid, "10");
strcpy (entry.vlan_port_tpid, "11");
@@ -270,8 +270,7 @@ test_create_port_check_test_file_ok_1 ()
{
int ret;
- ret = system ("cp " TEST_VLAN_PORT_CONF " " UTESTS_TMP_DIR
- ETC_VLAN_PORT_CONF);
+ ret = system ("cp " TEST_VLAN_PORT_CONF " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
}
@@ -281,8 +280,7 @@ test_create_port_check_test_file_error_1 ()
{
int ret;
- ret = system ("cp " VLAN_PORT_ERROR1 " " UTESTS_TMP_DIR
- ETC_VLAN_PORT_CONF);
+ ret = system ("cp " VLAN_PORT_ERROR1 " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
}
@@ -291,8 +289,7 @@ test_create_port_check_test_file_error_2 ()
{
int ret;
- ret = system ("cp " VLAN_PORT_ERROR2 " " UTESTS_TMP_DIR
- ETC_VLAN_PORT_CONF);
+ ret = system ("cp " VLAN_PORT_ERROR2 " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
}
@@ -301,8 +298,7 @@ test_create_port_check_test_file_error_3 ()
{
int ret;
- ret = system ("cp " VLAN_PORT_ERROR3 " " UTESTS_TMP_DIR
- ETC_VLAN_PORT_CONF);
+ ret = system ("cp " VLAN_PORT_ERROR3 " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
}
diff --git a/cleopatre/devkit/tests/libspid/utests/src/wl_eoc_utests.c b/cleopatre/devkit/tests/libspid/utests/src/wl_eoc_utests.c
index 0130e19e30..61597039d4 100644
--- a/cleopatre/devkit/tests/libspid/utests/src/wl_eoc_utests.c
+++ b/cleopatre/devkit/tests/libspid/utests/src/wl_eoc_utests.c
@@ -51,9 +51,7 @@
#define SYSTEM_CONF_EOC "testfiles/system_v2.conf"
#define WHITE_LIST_CONF_SYSTEM "/etc/white_list.conf"
#define PORT_CONF "testfiles/port.conf"
-#define STORM_CONF "testfiles/storm.conf"
-#define ETH_PORT_CONF "testfiles/ethport.conf"
-#define VLAN_PORT_CONF "testfiles/vlanport.conf"
+#define PORT_V2 "testfiles/port_v2.conf"
#define MAC_LIMIT_CONF "testfiles/maclimit.conf"
#define WL_NO_ERROR "testfiles/wl.conf_no_error"
#define WL_ERROR_MAC "testfiles/wl.conf_error_mac"
@@ -267,9 +265,7 @@ START_TEST (test_libspid_eoc_wl_remove)
ret = system ("rm -rf " UTESTS_TMP_DIR "/etc/*");
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
ret = system ("cp " PORT_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " STORM_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " ETH_PORT_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " VLAN_PORT_CONF " " UTESTS_TMP_DIR "/etc");
+ ret = system ("cp " PORT_V2 " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " MAC_LIMIT_CONF " " UTESTS_TMP_DIR "/etc");
strcpy (mac_address, "00:13:D7:00:00:02");
@@ -288,9 +284,7 @@ START_TEST (test_libspid_eoc_wl_flush)
ret = system ("rm -rf " UTESTS_TMP_DIR "/etc/*");
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
ret = system ("cp " PORT_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " STORM_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " ETH_PORT_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " VLAN_PORT_CONF " " UTESTS_TMP_DIR "/etc");
+ ret = system ("cp " PORT_V2 " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " MAC_LIMIT_CONF " " UTESTS_TMP_DIR "/etc");
ret = libspid_eoc_wl_flush ();
@@ -424,9 +418,7 @@ void test_libspid_eoc_wl_mac_change_mod_eoc (libspid_boolean_t mod_eoc)
ret = system ("rm -rf " UTESTS_TMP_DIR "/etc/*");
ret = system ("cp " WHITE_LIST_CONF " " UTESTS_TMP_DIR "/etc");
ret = system ("cp " PORT_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " STORM_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " ETH_PORT_CONF " " UTESTS_TMP_DIR "/etc");
- ret = system ("cp " VLAN_PORT_CONF " " UTESTS_TMP_DIR "/etc");
+ ret = system ("cp " PORT_V2 " " LIBSPID_EOC_PORT_V2_FILE);
ret = system ("cp " MAC_LIMIT_CONF " " UTESTS_TMP_DIR "/etc");
ret = system ("cp " SERVICE_CONF " " UTESTS_TMP_DIR "/etc/");
if (mod_eoc == LIBSPID_TRUE )
@@ -712,7 +704,7 @@ START_TEST (test_libspid_eoc_maclimits_remove)
}
END_TEST
-START_TEST (test_libspid_eoc_storm_protection_add)
+START_TEST (test_libspid_eoc_ports_v2_add)
{
int ret = 0 ;
int i = 0;
@@ -721,14 +713,13 @@ START_TEST (test_libspid_eoc_storm_protection_add)
libspid_eoc_storm_entry_t entry;
ret = system ("cp "WHITE_LIST_CONF" "LIBSPID_CONF_ROOT_PATH);
- ret = libspid_eoc_storm_protection_add ((char *)0);
+ ret = libspid_eoc_ports_v2_add ((char *)0);
fail_if (ret == LIBSPID_SUCCESS,
"The param is error, must return error");
-
- ret = libspid_eoc_storm_protection_add (mac);
+ ret = libspid_eoc_ports_v2_add (mac);
fail_if (ret != LIBSPID_SUCCESS,
- "must add storm protection suc");
+ "add new entry to conf file must be successful");
for (i = 0; i < LIBSPID_PORT_PER_SLAVE_MAX; i ++)
{
@@ -760,162 +751,29 @@ START_TEST (test_libspid_eoc_storm_protection_add)
END_TEST
-START_TEST (test_libspid_eoc_storm_protection_remove)
+START_TEST (test_libspid_eoc_ports_v2_remove)
{
int ret = 0 ;
char mac[LIBSPID_MAC_STR_LEN] = {"00:11:22:33:44:55"};
- ret = libspid_eoc_storm_protection_remove ((char *)0);
+ ret = libspid_eoc_ports_v2_remove ((char *)0);
fail_if (ret == LIBSPID_SUCCESS,
"The param is error, must return error");
- ret = libspid_eoc_storm_protection_add (mac);
+ ret = libspid_eoc_ports_v2_add (mac);
fail_if (ret != LIBSPID_SUCCESS,
- "must add sp suc");
+ "add new entry to conf file must be successful");
- ret = libspid_eoc_storm_protection_remove (mac);
+ ret = libspid_eoc_ports_v2_remove (mac);
fail_if (ret != LIBSPID_SUCCESS,
- "must remove sp item limits suc");
+ "remove entry to conf file must be successful");
- ret = libspid_eoc_storm_protection_remove (mac);
+ ret = libspid_eoc_ports_v2_remove (mac);
fail_if (ret == LIBSPID_SUCCESS,
"must failed, because of not exist the mac");
}
END_TEST
-
-START_TEST (test_libspid_eoc_vlan_ports_add)
-{
- int ret = 0 ;
- char mac[LIBSPID_MAC_STR_LEN] = {"00:11:22:33:44:55"};
- int index = 0 ;
- char *port_index[5] = {"0", "1", "2", "3", "4"};
- libspid_eoc_vlan_port_table_entry_t entry;
-
- ret = libspid_eoc_vlan_ports_add ((char *)0);
- fail_if (ret == LIBSPID_SUCCESS,
- "The param is error, must return error");
-
- ret = libspid_eoc_vlan_ports_add (mac);
- fail_if (ret != LIBSPID_SUCCESS,
- "must add valn port suc");
-
- for (index = 0; index < LIBSPID_PORT_PER_SLAVE_MAX; index++)
- {
-
- ret = libspid_eoc_vlan_port_get (mac, port_index[index], &entry);
- fail_if (ret != LIBSPID_SUCCESS, "must suc");
-
- fail_if (strcmp (entry.vlan_port_mac, mac) != 0,
- "libspid_eoc_vlan_port_get corrupts mac");
-
- fail_if (strcmp (entry.vlan_port_index, port_index[index]) != 0,
- "libspid_eoc_vlan_port_get corrupts vlan_port_index");
-
- fail_if (strcmp (entry.vlan_port_pvid, "0") != 0,
- "libspid_eoc_vlan_port_get corrupts vlan_port_pvid");
-
- fail_if (strcmp (entry.vlan_port_tpid, "33024") != 0,
- "libspid_eoc_vlan_port_get corrupts vlan_port_tpid");
-
- fail_if (strcmp (entry.vlan_port_prio, "0") != 0,
- "libspid_eoc_vlan_port_get corrupts vlan_port_prio");
-
- fail_if (strcmp (entry.vlan_port_mode, "0") != 0,
- "libspid_eoc_vlan_port_get corrupts vlan_port_mode");
- }
-}
-END_TEST
-
-
-START_TEST (test_libspid_eoc_vlan_ports_remove)
-{
- int ret = 0;
- char mac[LIBSPID_MAC_STR_LEN] = {"00:11:22:33:44:55"};
-
- ret = libspid_eoc_vlan_ports_add ((char *)0);
- fail_if (ret == LIBSPID_SUCCESS,
- "The param is error, must return error");
-
- ret = libspid_eoc_vlan_ports_add (mac);
- fail_if (ret != LIBSPID_SUCCESS,
- "must add vlan port suc");
-
- ret = libspid_eoc_vlan_ports_remove (mac);
- fail_if (ret != LIBSPID_SUCCESS,
- "must remove vlan port item limits usc");
-
- ret = libspid_eoc_vlan_ports_remove (mac);
- fail_if (ret == LIBSPID_SUCCESS,
- "must failed, because of not exist the mac");
-
-}
-END_TEST
-
-START_TEST (test_libspid_eoc_ethernet_ports_add)
-{
- int ret = 0;
- int index = 0 ;
- char *port_index[5] = {"0", "1", "2", "3", "4"};
- char mac[LIBSPID_MAC_STR_LEN] = {"00:11:22:33:44:55"};
- libspid_eoc_ethernet_port_entry_t entry;
-
- ret = libspid_eoc_ethernet_ports_add ((char *)0);
- fail_if (ret == LIBSPID_SUCCESS,
- " must fail, because of param is error");
-
- ret = libspid_eoc_ethernet_ports_add (mac);
- fail_if (ret != LIBSPID_SUCCESS,
- "must add ethernet port suc");
-
- for (index = 0; index < LIBSPID_PORT_PER_SLAVE_MAX; index++)
- {
- ret = libspid_eoc_ethernet_port_get (mac, port_index[index], &entry);
- fail_if (ret != LIBSPID_SUCCESS, "must suc");
-
- fail_if (strcmp (entry.mac_addr, mac) != 0,
- "libspid_eoc_ethernet_port_get corrupts mac");
-
- fail_if (strcmp (entry.port_index, port_index[index]) != 0,
- "libspid_eoc_ethernet_port_get corrupts port index");
-
- fail_if (strcmp (entry.auto_neg, "1") != 0,
- "libspid_eoc_ethernet_port_get corrupts auto_neg");
-
- fail_if (strcmp (entry.speed, "2") != 0,
- "libspid_eoc_ethernet_port_get corrupts speed");
-
- fail_if (strcmp (entry.duplex, "2") != 0,
- "libspid_eoc_ethernet_port_get corrupts duplex");
- }
-}
-END_TEST
-
-
-START_TEST (test_libspid_eoc_ethernet_ports_remove)
-{
- int ret = 0;
- char mac[LIBSPID_MAC_STR_LEN] = {"00:11:22:33:44:55"};
-
- ret = libspid_eoc_ethernet_ports_remove ((char *)0);
- fail_if (ret == LIBSPID_SUCCESS,
- "The param is error, must return error");
-
- ret = libspid_eoc_ethernet_ports_add (mac);
- fail_if (ret != LIBSPID_SUCCESS,
- "must add ethernet port suc");
-
- ret = libspid_eoc_ethernet_ports_remove (mac);
- fail_if (ret != LIBSPID_SUCCESS,
- "must remove ethernet port item limits suc");
-
- ret = libspid_eoc_ethernet_ports_remove (mac);
- fail_if (ret == LIBSPID_SUCCESS,
- "must failed, because of not exist the mac");
-
-}
-END_TEST
-
START_TEST (test_libspid_eoc_ports_add)
{
int ret = 0, index;
@@ -1077,12 +935,8 @@ libspid_eoc_suite (void)
tcase_add_test (tc_core, test_libspid_eoc_wl_authorization);
tcase_add_test (tc_core, test_libspid_eoc_maclimits_add);
tcase_add_test (tc_core, test_libspid_eoc_maclimits_remove);
- tcase_add_test (tc_core, test_libspid_eoc_storm_protection_add);
- tcase_add_test (tc_core, test_libspid_eoc_storm_protection_remove);
- tcase_add_test (tc_core, test_libspid_eoc_vlan_ports_add);
- tcase_add_test (tc_core, test_libspid_eoc_vlan_ports_remove);
- tcase_add_test (tc_core, test_libspid_eoc_ethernet_ports_add);
- tcase_add_test (tc_core, test_libspid_eoc_ethernet_ports_remove);
+ tcase_add_test (tc_core, test_libspid_eoc_ports_v2_add);
+ tcase_add_test (tc_core, test_libspid_eoc_ports_v2_remove);
tcase_add_test (tc_core, test_libspid_eoc_ports_remove);
tcase_add_test (tc_core, test_libspid_eoc_ports_add);
tcase_add_test (tc_core, test_libspid_eoc_wl_check);
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_1.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_1.conf
index 1a1f0deb7e..b26a3aac26 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_1.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_1.conf
@@ -1,6 +1,6 @@
-#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX
-00:13:D7:00:00:01.0 0 2 2
-00:13:D7:00:00:01.1 0 1 1
-00:13:D7:00:00:01.2 0 2 2
-00:13:D7:00:00:01.3 0 2 2
-00:13:D7:00:00:01.4 0 2 2
+AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:01.1 0 1 1 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:01.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:01.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:01.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_2.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_2.conf
index 279d1012f2..bb2d1c3d49 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_2.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/eth_port_mac_2.conf
@@ -1,20 +1,20 @@
#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX
-00:13:D7:00:00:01.0 0 2 2
-00:13:D7:00:00:01.1 0 1 1
-00:13:D7:00:00:01.2 0 2 2
-00:13:D7:00:00:01.3 0 2 2
-00:13:D7:00:00:01.4 0 2 2
-00:13:D7:00:00:02.0 0 2 2
-00:13:D7:00:00:02.1 0 2 2
-00:13:D7:00:00:02.2 0 2 2
-00:13:D7:00:00:02.3 0 2 2
-00:13:D7:00:00:02.4 0 2 2
-00:13:D7:00:00:65.0 0 2 2
-00:13:D7:00:00:65.1 0 2 2
-00:13:D7:00:00:65.2 0 2 2
-00:13:D7:00:00:65.3 0 2 2
-00:13:D7:00:00:65.4 0 2 2
-00:13:D7:00:00:66.0 0 2 2
-00:13:D7:00:00:66.2 0 2 2
-00:13:D7:00:00:66.3 0 2 2
-00:13:D7:00:00:66.4 0 2 2
+00:13:D7:00:00:01.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:01.1 0 1 1 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:01.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:01.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:01.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:02.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:02.1 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:02.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:02.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:02.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:65.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:65.1 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:65.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:65.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:65.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:66.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:66.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:66.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:D7:00:00:66.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/ethport.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/ethport.conf
index 3fab6dcb1c..94c4e073c5 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/ethport.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/ethport.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX
-00:13:D7:00:00:01.0 0 2 2
-00:13:D7:00:00:01.1 0 1 1
-00:13:D7:00:00:01.2 0 2 2
-00:13:D7:00:00:01.3 0 2 2
-00:13:D7:00:00:01.4 0 2 2
-00:13:D7:00:00:02.0 0 2 2
-00:13:D7:00:00:02.1 0 2 2
-00:13:D7:00:00:02.2 0 2 2
-00:13:D7:00:00:02.3 0 2 2
-00:13:D7:00:00:02.4 0 2 2
-00:13:D7:00:00:65.0 0 2 2
-00:13:D7:00:00:65.1 0 2 2
-00:13:D7:00:00:65.2 0 2 2
-00:13:D7:00:00:65.3 0 2 2
-00:13:D7:00:00:65.4 0 2 2
-00:13:D7:00:00:66.0 0 2 2
-00:13:D7:00:00:66.1 0 2 2
-00:13:D7:00:00:66.2 0 2 2
-00:13:D7:00:00:66.3 0 2 2
-00:13:D7:00:00:66.4 0 2 2
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:d7:00:00:01.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:01.1 0 1 1 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:01.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:01.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:01.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:02.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:02.1 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:02.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:02.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:02.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:65.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:65.1 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:65.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:65.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:65.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:66.0 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:66.1 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:66.2 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:66.3 0 2 2 0 33024 0 0 0 100 0 100 0 1
+00:13:d7:00:00:66.4 0 2 2 0 33024 0 0 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/port_v2.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/port_v2.conf
new file mode 100644
index 0000000000..f837f4a6cb
--- /dev/null
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/port_v2.conf
@@ -0,0 +1,21 @@
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:d7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:d7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:d7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:d7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:d7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:d7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:d7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:d7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:d7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:d7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:d7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:d7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:d7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:d7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:d7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:d7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:d7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:d7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:d7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:d7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm.conf
index 4b33c90712..5acd92e3fe 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_dup_key.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_dup_key.conf
index b9820ee475..b6d06ee03d 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_dup_key.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_dup_key.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.1 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_index_err.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_index_err.conf
index 1e47b5d2b5..c4f8536837 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_index_err.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_index_err.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.9 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.9 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_format.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_format.conf
index 7bb5de08bc..a1b54995ba 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_format.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_format.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_not_in_wl.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_not_in_wl.conf
index f4221d9ba6..bc5d3422ad 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_not_in_wl.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mac_not_in_wl.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:83:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:83:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_en_err.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_en_err.conf
index b61778738b..774e3ee8a3 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_en_err.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_en_err.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 4 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 4 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_thr_err.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_thr_err.conf
index 0c47777a98..8bc80d2854 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_thr_err.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_mult_thr_err.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 99 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 99 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_en_err.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_en_err.conf
index 669135fb51..e2e8288757 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_en_err.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_en_err.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 2 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 2 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_thr_err.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_thr_err.conf
index 976c8ced41..d829c13a66 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_thr_err.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_storm_thr_err.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 255002 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 255002 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_en_err.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_en_err.conf
index 2860a2f8d9..6d574f997f 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_en_err.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_en_err.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 11
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 8 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 8 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_thr_err.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_thr_err.conf
index 302df7ef4c..78de63492a 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_thr_err.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/storm_protection_unknow_thr_err.conf
@@ -1,21 +1,21 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 100 0 200 0 1
-00:13:D7:00:00:01.1 0 101 0 201 0 2
-00:13:D7:00:00:01.2 0 102 0 202 0 3
-00:13:D7:00:00:01.3 0 103 0 203 0 4
-00:13:D7:00:00:01.4 0 104 0 204 0 5
-00:13:D7:00:00:02.0 0 105 0 205 0 6
-00:13:D7:00:00:02.1 0 106 0 206 0 7
-00:13:D7:00:00:02.2 0 107 0 207 0 8
-00:13:D7:00:00:02.3 0 108 0 208 0 9
-00:13:D7:00:00:02.4 0 109 0 209 0 10
-00:13:D7:00:00:65.0 0 110 0 210 0 0
-00:13:D7:00:00:65.1 0 111 0 211 0 12
-00:13:D7:00:00:65.2 0 112 0 212 0 13
-00:13:D7:00:00:65.3 0 113 0 213 0 14
-00:13:D7:00:00:65.4 0 114 0 214 0 15
-00:13:D7:00:00:66.0 0 115 0 215 0 16
-00:13:D7:00:00:66.1 0 116 0 216 0 17
-00:13:D7:00:00:66.2 0 117 0 217 0 18
-00:13:D7:00:00:66.3 0 118 0 218 0 19
-00:13:D7:00:00:66.4 0 119 0 219 0 20
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 0
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error1.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error1.conf
index 7cf6b495d4..813477e34f 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error1.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error1.conf
@@ -1,20 +1,20 @@
#<MAC_ADDRESS.PORT_NB> VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE
-00:13:D7:00:00:01.0 1 1 1 1
-00:13:D7:00:00:01.1 2 2 2 1
-00:13:D7:00:00:01.2 1 3 1 1
-00:13:D7:00:00:01.3 2 1 2 1
-00:13:D7:00:00:01.4 1 2 1 1
-00:13:D7:00:00:02.0 2 3 2 1
-00:13:D7:00:00:02.1 1 1 1 1
-00:13:D7:00:00:02.2 1 1 0 1
-00:13:D7:00:00:02.3 23 3 3 1
-00:13:D7:00:00:02.4 0 2 0 1
-00:13:D7:00:00:65.0 1 1 1 1
-00:13:D7:00:00:65.1 0 3 0 1
-00:13:D7:00:00:65.2 1 4 1 1
-00:13:D7:00:00:65.3 0 1 0 1
-00:13:D7:00:00:65.4 1 2 1 1
-00:13:D7:00:00:66.0 1 1 1 1
-00:13:D7:00:00:66.1 0 2 1 1
-00:13:D7:00:00:66.2 1 2 0 1
-00:13:D7:00:00:66.3 1 1 1 1
+00:13:D7:00:00:01.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.1 1 2 2 2 2 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.2 1 2 2 1 3 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.3 1 2 2 2 1 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.0 1 2 2 2 3 2 1 0 100 0 100 0 1
+00:13:D7:00:00:02.1 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.2 1 2 2 1 1 0 1 0 100 0 100 0 1
+00:13:D7:00:00:02.3 1 2 2 23 3 3 1 0 100 0 100 0 1
+00:13:D7:00:00:02.4 1 2 2 0 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.1 1 2 2 0 3 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.2 1 2 2 1 4 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.3 1 2 2 0 1 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.1 1 2 2 0 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.2 1 2 2 1 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:66.3 1 2 2 1 1 1 1 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error2.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error2.conf
index 12af356ba9..00f7c50764 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error2.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error2.conf
@@ -1,22 +1,22 @@
#<MAC_ADDRESS.PORT_NB> VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE
-00:13:D7:00:00:01.0 1 1 1 1
-00:13:D7:00:00:01.1 2 2 2 1
-00:13:D7:00:00:01.2 1 3 1 1
-00:13:D7:00:00:01.3 2 1 2 1
-00:13:D7:00:00:01.4 1 2 1 1
-00:13:D7:00:00:02.0 2 3 2 1
-00:13:D7:00:00:02.1 1 1 1 1
-00:13:D7:00:00:02.2 1 1 0 1
-00:13:D7:00:00:02.3 23 3 3 1
-00:13:D7:00:00:02.4 0 2 0 1
-00:13:D7:00:00:65.0 1 1 1 1
-00:13:D7:00:00:65.1 0 3 0 1
-00:13:D7:00:00:65.2 1 4 1 1
-00:13:D7:00:00:65.2 1 4 1 1
-00:13:D7:00:00:65.3 0 1 0 1
-00:13:D7:00:00:65.4 1 2 1 1
-00:13:D7:00:00:66.0 1 1 1 1
-00:13:D7:00:00:66.1 0 2 1 1
-00:13:D7:00:00:66.2 1 2 0 1
-00:13:D7:00:00:66.3 1 1 1 1
-00:13:D7:00:00:66.4 0 0 0 1
+00:13:D7:00:00:01.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.1 1 2 2 2 2 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.2 1 2 2 1 3 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.3 1 2 2 2 1 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.0 1 2 2 2 3 2 1 0 100 0 100 0 1
+00:13:D7:00:00:02.1 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.2 1 2 2 1 1 0 1 0 100 0 100 0 1
+00:13:D7:00:00:02.3 1 2 2 23 3 3 1 0 100 0 100 0 1
+00:13:D7:00:00:02.4 1 2 2 0 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.1 1 2 2 0 3 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.2 1 2 2 1 4 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.2 1 2 2 1 4 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.3 1 2 2 0 1 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.1 1 2 2 0 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.2 1 2 2 1 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:66.3 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.4 1 2 2 0 0 0 1 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error3.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error3.conf
index 4dada48443..5c0df46ff3 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error3.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_error3.conf
@@ -1,22 +1,22 @@
#<MAC_ADDRESS.PORT_NB> VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE
-00:13:D7:00:00:01.0 1 1 1 1
-00:13:D7:00:00:01.1 2 2 2 1
-00:13:D7:00:00:01.2 1 3 1 1
-00:13:D7:00:00:01.3 2 1 2 1
-00:13:D7:00:00:01.4 1 2 1 1
-00:13:D7:00:00:02.0 2 3 2 1
-00:13:D7:00:00:02.1 1 1 1 1
-00:13:D7:00:00:02.2 1 1 0 1
-00:13:D7:00:00:02.3 23 3 3 1
-00:13:D7:00:00:02.4 0 2 0 1
-00:13:D7:00:00:02.5 0 2 0 1
-00:13:D7:00:00:65.0 1 1 1 1
-00:13:D7:00:00:65.1 0 3 0 1
-00:13:D7:00:00:65.2 1 4 1 1
-00:13:D7:00:00:65.3 0 1 0 1
-00:13:D7:00:00:65.4 1 2 1 1
-00:13:D7:00:00:66.0 1 1 1 1
-00:13:D7:00:00:66.1 0 2 1 1
-00:13:D7:00:00:66.2 1 2 0 1
-00:13:D7:00:00:66.3 1 1 1 1
-00:13:D7:00:00:66.4 0 0 0 1
+00:13:D7:00:00:01.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.1 1 2 2 2 2 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.2 1 2 2 1 3 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.3 1 2 2 2 1 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.0 1 2 2 2 3 2 1 0 100 0 100 0 1
+00:13:D7:00:00:02.1 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.2 1 2 2 1 1 0 1 0 100 0 100 0 1
+00:13:D7:00:00:02.3 1 2 2 23 3 3 1 0 100 0 100 0 1
+00:13:D7:00:00:02.4 1 2 2 0 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:02.5 1 2 2 0 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.1 1 2 2 0 3 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.2 1 2 2 1 4 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.3 1 2 2 0 1 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.1 1 2 2 0 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.2 1 2 2 1 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:66.3 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.4 1 2 2 0 0 0 1 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line2.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line2.conf
index 68ab8612c6..3e5d40d12a 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line2.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line2.conf
@@ -1,3 +1,3 @@
#<MAC_ADDRESS.PORT_NB> VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE
-00:13:d7:04:00:01.1 1 2 3 4
-00:13:d7:04:00:AF.3 100 200 3 400
+00:13:d7:04:00:01.1 1 2 2 1 2 3 4 0 100 0 100 0 1
+00:13:d7:04:00:AF.3 1 2 2 100 200 3 400 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line7.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line7.conf
index 8ad0fbd0e2..a56b8f47f1 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line7.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/vlan_port_line7.conf
@@ -1,8 +1,8 @@
#<MAC_ADDRESS.PORT_NB> VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE
-00:13:D7:00:00:01.0 1 1 1 1
-00:13:D7:00:00:01.1 2 2 2 1
-00:13:D7:00:00:01.2 1 3 1 1
-00:13:D7:00:00:01.3 2 1 2 1
-00:13:D7:00:00:01.4 1 2 1 1
-00:13:D7:00:00:02.0 2 3 2 1
-00:13:D7:00:00:02.1 1 1 1 1
+00:13:D7:00:00:01.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.1 1 2 2 2 2 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.2 1 2 2 1 3 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.3 1 2 2 2 1 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.0 1 2 2 2 3 2 1 0 100 0 100 0 1
+00:13:D7:00:00:02.1 1 2 2 1 1 1 1 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/libspid/utests/testfiles/vlanport.conf b/cleopatre/devkit/tests/libspid/utests/testfiles/vlanport.conf
index 98ab142e96..15cb68793c 100644
--- a/cleopatre/devkit/tests/libspid/utests/testfiles/vlanport.conf
+++ b/cleopatre/devkit/tests/libspid/utests/testfiles/vlanport.conf
@@ -1,21 +1,21 @@
#<MAC_ADDRESS.PORT_NB> VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE
-00:13:D7:00:00:01.0 1 1 1 1
-00:13:D7:00:00:01.1 2 2 2 1
-00:13:D7:00:00:01.2 1 3 1 1
-00:13:D7:00:00:01.3 2 1 2 1
-00:13:D7:00:00:01.4 1 2 1 1
-00:13:D7:00:00:02.0 2 3 2 1
-00:13:D7:00:00:02.1 1 1 1 1
-00:13:D7:00:00:02.2 1 1 0 1
-00:13:D7:00:00:02.3 23 3 3 1
-00:13:D7:00:00:02.4 0 2 0 1
-00:13:D7:00:00:65.0 1 1 1 1
-00:13:D7:00:00:65.1 0 3 0 1
-00:13:D7:00:00:65.2 1 4 1 1
-00:13:D7:00:00:65.3 0 1 0 1
-00:13:D7:00:00:65.4 1 2 1 1
-00:13:D7:00:00:66.0 1 1 1 1
-00:13:D7:00:00:66.1 0 2 1 1
-00:13:D7:00:00:66.2 1 2 0 1
-00:13:D7:00:00:66.3 1 1 1 1
-00:13:D7:00:00:66.4 0 0 0 1
+00:13:D7:00:00:01.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.1 1 2 2 2 2 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.2 1 2 2 1 3 1 1 0 100 0 100 0 1
+00:13:D7:00:00:01.3 1 2 2 2 1 2 1 0 100 0 100 0 1
+00:13:D7:00:00:01.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.0 1 2 2 2 3 2 1 0 100 0 100 0 1
+00:13:D7:00:00:02.1 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:02.2 1 2 2 1 1 0 1 0 100 0 100 0 1
+00:13:D7:00:00:02.3 1 2 2 23 3 3 1 0 100 0 100 0 1
+00:13:D7:00:00:02.4 1 2 2 0 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.1 1 2 2 0 3 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.2 1 2 2 1 4 1 1 0 100 0 100 0 1
+00:13:D7:00:00:65.3 1 2 2 0 1 0 1 0 100 0 100 0 1
+00:13:D7:00:00:65.4 1 2 2 1 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.0 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.1 1 2 2 0 2 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.2 1 2 2 1 2 0 1 0 100 0 100 0 1
+00:13:D7:00:00:66.3 1 2 2 1 1 1 1 0 100 0 100 0 1
+00:13:D7:00:00:66.4 1 2 2 0 0 0 1 0 100 0 100 0 1
diff --git a/cleopatre/devkit/tests/onlined/utests/src/onlined_utests.c b/cleopatre/devkit/tests/onlined/utests/src/onlined_utests.c
index e478482c84..145764147a 100644
--- a/cleopatre/devkit/tests/onlined/utests/src/onlined_utests.c
+++ b/cleopatre/devkit/tests/onlined/utests/src/onlined_utests.c
@@ -122,7 +122,7 @@ START_TEST (test_onlined_file_preparation_not_existing_file)
system ("cp " LOCAL_SLAVE_CONF_FILE " " LIBSPID_SLAVE_CONF_PATH);
system ("cp " LOCAL_SYSTEM_V2_CONF_FILE " " LIBSPID_SYSTEM_CONF_PATH);
-
+
fail_if (NULL == (ctx = onlined_init ()),
"onlined file preparation fail: function fopen returned error");
@@ -147,7 +147,7 @@ START_TEST (test_onlined_file_preparation_wrong_content)
fclose (fp);
system ("cp " LOCAL_SLAVE_CONF_FILE " " LIBSPID_SLAVE_CONF_PATH);
system ("cp " LOCAL_SYSTEM_V2_CONF_FILE " " LIBSPID_SYSTEM_CONF_PATH);
-
+
fail_if (NULL == (ctx = onlined_init ()),
"onlined file preparation fail: function fopen returned error");
@@ -187,18 +187,18 @@ START_TEST (test_onlined_unknown_limit)
{
onlined_ctx_t *ctx;
FILE *fp;
-
+
system ("cp " LOCAL_SLAVE_CONF_FILE " " LIBSPID_SLAVE_CONF_PATH);
system ("cp " LOCAL_SYSTEM_V2_CONF_FILE " " LIBSPID_SYSTEM_CONF_PATH);
system ("cp " LOCAL_TEST_FILE ("master_unknown_limit.conf") " "
LIBSPID_MASTER_CONF_PATH);
-
+
fail_if (NULL == (ctx = onlined_init ()),
"onlined file preparation fail: function fopen returned error");
fail_if ((fp = fopen (ONLINED_AUTOCONF_SLAVE_FILE, "w+")) == NULL,
"function fopen failed");
fclose (fp);
-
+
onlined_broadcast_storm (ctx, "", 1, 1);
/* Check limitation part. */
char line [256];
@@ -212,7 +212,7 @@ START_TEST (test_onlined_bw_limit)
{
onlined_ctx_t *ctx;
FILE *fp;
-
+
system ("cp " LOCAL_SLAVE_CONF_FILE " " LIBSPID_SLAVE_CONF_PATH);
system ("cp " LOCAL_SYSTEM_CONF_FILE " " LIBSPID_SYSTEM_CONF_PATH);
system ("cp " LOCAL_TEST_FILE ("port.conf") " " LIBSPID_PORT_CONF_PATH);
@@ -294,8 +294,8 @@ START_TEST (test_onlined_bcast_storm_mod_eoc)
system ("cp " LOCAL_SLAVE_CONF_FILE " " LIBSPID_SLAVE_CONF_PATH);
system ("cp " LOCAL_SYSTEM_V2_CONF_FILE " " LIBSPID_SYSTEM_CONF_PATH);
- system ("cp " LOCAL_TEST_FILE ("storm_protection.conf") " "
- LIBSPID_BROADCAST_STORM_CONF_PATH);
+ system ("cp " LOCAL_TEST_FILE ("port_v2.conf") " "
+ LIBSPID_EOC_PORT_V2_FILE);
fail_if (NULL == (ctx = onlined_init ()),
"onlined file preparation fail: function fopen returned error");
@@ -331,12 +331,12 @@ START_TEST (test_onlined_eth_port_mod_eoc)
{
onlined_ctx_t *ctx;
FILE *fp;
-
+
system ("cp " LOCAL_SLAVE_CONF_FILE " " LIBSPID_SLAVE_CONF_PATH);
system ("cp " LOCAL_SYSTEM_V2_CONF_FILE " " LIBSPID_SYSTEM_CONF_PATH);
- system ("cp " LOCAL_TEST_FILE ("ethernet_porttable.conf") " "
- LIBSPID_ETHERNET_PORT_CONF_PATH);
-
+ system ("cp " LOCAL_TEST_FILE ("port_v2.conf") " "
+ LIBSPID_EOC_PORT_V2_FILE);
+
fail_if (NULL == (ctx = onlined_init ()),
"onlined file preparation fail: function fopen returned error");
fail_if ((fp = fopen (ONLINED_AUTOCONF_SLAVE_FILE, "w+")) == NULL,
@@ -382,7 +382,7 @@ START_TEST (test_onlined_slave_ip_set)
CHK_STR (line, "address", ip, "wrong param br0 address");
fail_if (fgets (line, 256, fp) == NULL, "file: wrong content");
CHK_STR (line, "netmask", "255.255.255.0", "wrong param br0 netmask");
-
+
fclose (fp);
}
END_TEST
@@ -394,18 +394,14 @@ START_TEST (test_onlined_configure)
system ("cp " LOCAL_SLAVE_CONF_FILE " " LIBSPID_SLAVE_CONF_PATH);
system ("cp " LOCAL_SYSTEM_V2_CONF_FILE " " LIBSPID_SYSTEM_CONF_PATH);
- system ("cp " LOCAL_TEST_FILE ("ethernet_porttable.conf") " "
- LIBSPID_ETHERNET_PORT_CONF_PATH);
- system ("cp " LOCAL_TEST_FILE ("vlan_porttable.conf") " "
- LIBSPID_VLAN_PORTTABLE_CONF_PATH);
+ system ("cp " LOCAL_TEST_FILE ("port_v2.conf") " "
+ LIBSPID_EOC_PORT_V2_FILE);
system ("cp " LOCAL_TEST_FILE ("port.conf") " " LIBSPID_PORT_CONF_PATH);
system ("cp " LOCAL_TEST_FILE ("service.conf") " "
LIBSPID_SERVICE_CONF_PATH);
- system ("cp " LOCAL_TEST_FILE ("storm_protection.conf") " "
- LIBSPID_BROADCAST_STORM_CONF_PATH);
system ("cp " LOCAL_TEST_FILE ("white_list.conf") " "
LIBSPID_WHITE_LIST_CONF_PATH);
-
+
fail_if (NULL == (ctx = onlined_init ()),
"onlined file preparation fail: function fopen returned error");
fail_if ((fp = fopen (ONLINED_AUTOCONF_SLAVE_FILE, "w+")) == NULL,
@@ -451,7 +447,7 @@ extern Suite* onlined_suite (void)
Suite *s = suite_create ("ONLINED");
TCase *tc_core = tcase_create ("Core");
tcase_add_checked_fixture (tc_core, setup, teardown);
-
+
tcase_add_test (tc_core, test_onlined_file_preparation_not_existing_file);
tcase_add_test (tc_core, test_onlined_file_preparation_wrong_content);
tcase_add_test (tc_core, test_onlined_bcast_limit);
@@ -461,7 +457,7 @@ extern Suite* onlined_suite (void)
tcase_add_test (tc_core, test_onlined_eth_port_mod_eoc);
tcase_add_test (tc_core, test_onlined_slave_ip_set);
tcase_add_test (tc_core, test_onlined_configure);
-
+
suite_add_tcase (s, tc_core);
return s;
}
diff --git a/cleopatre/devkit/tests/onlined/utests/testfiles/ethernet_porttable.conf b/cleopatre/devkit/tests/onlined/utests/testfiles/ethernet_porttable.conf
deleted file mode 100644
index eaf7d5607e..0000000000
--- a/cleopatre/devkit/tests/onlined/utests/testfiles/ethernet_porttable.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX
-00:13:D7:00:00:01.0 2 2 2
-00:13:D7:00:00:01.1 2 1 1
-00:13:D7:00:00:01.2 2 2 2
-00:13:D7:00:00:01.3 2 2 2
-00:13:D7:00:00:01.4 2 2 2
diff --git a/cleopatre/devkit/tests/onlined/utests/testfiles/port_v2.conf b/cleopatre/devkit/tests/onlined/utests/testfiles/port_v2.conf
new file mode 100644
index 0000000000..5acd92e3fe
--- /dev/null
+++ b/cleopatre/devkit/tests/onlined/utests/testfiles/port_v2.conf
@@ -0,0 +1,21 @@
+#<MAC_ADDRESS.PORT_NB> AUTO_NEG SPEED DUPLEX VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
+00:13:D7:00:00:01.0 1 2 2 0 33024 0 0 0 100 0 200 0 1
+00:13:D7:00:00:01.1 1 2 2 0 33024 0 0 0 101 0 201 0 2
+00:13:D7:00:00:01.2 1 2 2 0 33024 0 0 0 102 0 202 0 3
+00:13:D7:00:00:01.3 1 2 2 0 33024 0 0 0 103 0 203 0 4
+00:13:D7:00:00:01.4 1 2 2 0 33024 0 0 0 104 0 204 0 5
+00:13:D7:00:00:02.0 1 2 2 0 33024 0 0 0 105 0 205 0 6
+00:13:D7:00:00:02.1 1 2 2 0 33024 0 0 0 106 0 206 0 7
+00:13:D7:00:00:02.2 1 2 2 0 33024 0 0 0 107 0 207 0 8
+00:13:D7:00:00:02.3 1 2 2 0 33024 0 0 0 108 0 208 0 9
+00:13:D7:00:00:02.4 1 2 2 0 33024 0 0 0 109 0 209 0 10
+00:13:D7:00:00:65.0 1 2 2 0 33024 0 0 0 110 0 210 0 11
+00:13:D7:00:00:65.1 1 2 2 0 33024 0 0 0 111 0 211 0 12
+00:13:D7:00:00:65.2 1 2 2 0 33024 0 0 0 112 0 212 0 13
+00:13:D7:00:00:65.3 1 2 2 0 33024 0 0 0 113 0 213 0 14
+00:13:D7:00:00:65.4 1 2 2 0 33024 0 0 0 114 0 214 0 15
+00:13:D7:00:00:66.0 1 2 2 0 33024 0 0 0 115 0 215 0 16
+00:13:D7:00:00:66.1 1 2 2 0 33024 0 0 0 116 0 216 0 17
+00:13:D7:00:00:66.2 1 2 2 0 33024 0 0 0 117 0 217 0 18
+00:13:D7:00:00:66.3 1 2 2 0 33024 0 0 0 118 0 218 0 19
+00:13:D7:00:00:66.4 1 2 2 0 33024 0 0 0 119 0 219 0 20
diff --git a/cleopatre/devkit/tests/onlined/utests/testfiles/storm_protection.conf b/cleopatre/devkit/tests/onlined/utests/testfiles/storm_protection.conf
deleted file mode 100644
index 6e275f53f1..0000000000
--- a/cleopatre/devkit/tests/onlined/utests/testfiles/storm_protection.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-#<MAC_ADDRESS.PORT_NB> BCAST_LIMIT_EN BCAST_LIMIT_VALUE MCAST_LIMIT_EN MCAST_LIMIT_VALUE UNKNOWN_LIMIT_EN UNKNOWN_LIMIT_VALUE
-00:13:D7:00:00:01.0 0 1 0 2 0 3
-00:13:D7:00:00:01.1 0 1 0 2 0 3
-00:13:D7:00:00:01.2 0 1 0 2 0 3
-00:13:D7:00:00:01.3 0 1 0 2 0 3
-00:13:D7:00:00:01.4 0 1 0 2 0 3
diff --git a/cleopatre/devkit/tests/onlined/utests/testfiles/vlan_porttable.conf b/cleopatre/devkit/tests/onlined/utests/testfiles/vlan_porttable.conf
deleted file mode 100644
index 655d53c804..0000000000
--- a/cleopatre/devkit/tests/onlined/utests/testfiles/vlan_porttable.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-#<MAC_ADDRESS.PORT_NB> VLAN_PVID VLAN_TPID VLAN_PRIO VLAN_MODE
-00:13:D7:00:00:01.0 1 1 1 1
-00:13:D7:00:00:01.1 2 2 2 1
-00:13:D7:00:00:01.2 1 3 1 1
-00:13:D7:00:00:01.3 2 1 2 1
-00:13:D7:00:00:01.4 1 2 1 1