diff options
Diffstat (limited to 'transporthandler.hpp')
-rw-r--r-- | transporthandler.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/transporthandler.hpp b/transporthandler.hpp index f1fd410..24ee8be 100644 --- a/transporthandler.hpp +++ b/transporthandler.hpp @@ -1,7 +1,7 @@ #pragma once +#include "types.hpp" #include <string> - // IPMI commands for Transport net functions. enum ipmi_netfn_storage_cmds { @@ -24,6 +24,7 @@ static const int LAN_PARM_IP = 3; static const int LAN_PARM_MAC = 5; static const int LAN_PARM_SUBNET = 6; static const int LAN_PARM_GATEWAY = 12; +static const int LAN_PARM_VLAN = 20; struct ChannelConfig_t { @@ -31,11 +32,17 @@ struct ChannelConfig_t std::string netmask; std::string gateway; std::string macAddress; + // IPMI stores the vlan info in 16 bits,32 bits is to aligned + // with phosphor-dbus interfaces. + // vlan id is in 12 bits and the 16th bit is for enable mask. + uint32_t vlanID = ipmi::network::VLAN_ID_MASK; + void clear() { ipaddr.clear(); netmask.clear(); gateway.clear(); macAddress.clear(); + vlanID = ipmi::network::VLAN_ID_MASK; } }; |