summaryrefslogtreecommitdiffstats
path: root/transporthandler.hpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2018-03-07 12:31:05 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2018-03-20 06:02:53 +0000
commit7a7f0126a7e76d7c455b9de06135a308ac370369 (patch)
tree72495f473f863656c8ef3f1839d06887770e5cd9 /transporthandler.hpp
parent32cbd65b41ffd444819c5bcf988ca1f5f1cfe415 (diff)
downloadphosphor-host-ipmid-7a7f0126a7e76d7c455b9de06135a308ac370369.tar.gz
phosphor-host-ipmid-7a7f0126a7e76d7c455b9de06135a308ac370369.zip
SetLan: Apply the network changes once the timer expires
Start the timer once the set in progress parameter set to set complete as part of Set LAN Configuration Parameters command. Resolves openbmc/openbmc#2932 Resolves openbmc/openbmc#2993 Change-Id: Ie6f3b331531da23c74fa44bb52fa1ddccffabd13 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'transporthandler.hpp')
-rw-r--r--transporthandler.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/transporthandler.hpp b/transporthandler.hpp
index 42bf717..f440403 100644
--- a/transporthandler.hpp
+++ b/transporthandler.hpp
@@ -47,6 +47,7 @@ struct ChannelConfig_t
// vlan id is in 12 bits and the 16th bit is for enable mask.
uint32_t vlanID = ipmi::network::VLAN_ID_MASK;
uint8_t lan_set_in_progress = SET_COMPLETE;
+ bool flush = false;
void clear()
{
@@ -57,6 +58,7 @@ struct ChannelConfig_t
vlanID = ipmi::network::VLAN_ID_MASK;
ipsrc = ipmi::network::IPOrigin::UNSPECIFIED;
lan_set_in_progress = SET_COMPLETE;
+ flush = false;
}
};
@@ -66,3 +68,19 @@ struct ChannelConfig_t
// @param[in] channel the channel
// @return the ChannelConfig_t pointer.
struct ChannelConfig_t* getChannelConfig(int channel);
+
+/** @brief Iterate over all the channelconfig and if
+ * user has given the data for a channel then
+ * apply the network changes for that channel.
+ */
+void commitNetworkChanges();
+
+/* @brief Apply the network changes which is there in the
+ * network cache for a given channel which gets filled
+ * through setLan command. If some of the network
+ * parameter was not given by the setLan then this function
+ * gets the value of that parameter which is already
+ * configured on the system.
+ * @param[in] channel: channel number.
+ */
+void applyChanges(int channel);
OpenPOWER on IntegriCloud