summaryrefslogtreecommitdiffstats
path: root/utils.hpp
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-07-30 10:39:22 +0530
committerRatan Gupta <ratagupt@in.ibm.com>2017-08-13 22:26:01 +0530
commit533d03b5f923e6c59ca1ffb16b6a5eb14e3f96c6 (patch)
tree54b2119d2fbc24774d214f48a5e0ff327d23bf0e /utils.hpp
parentb8e9955db5216a0b170a2fb99125d1f22bb9d1c0 (diff)
downloadphosphor-host-ipmid-533d03b5f923e6c59ca1ffb16b6a5eb14e3f96c6.tar.gz
phosphor-host-ipmid-533d03b5f923e6c59ca1ffb16b6a5eb14e3f96c6.zip
Add support for vlan(set lan command)
Resolves openbmc/openbmc#1899 Change-Id: I3c436045676bc96e5d91fd9420509bc991549a13 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'utils.hpp')
-rw-r--r--utils.hpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/utils.hpp b/utils.hpp
index cb64a25..a172e22 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -135,7 +135,7 @@ namespace network
{
constexpr auto ROOT = "/xyz/openbmc_project/network";
-constexpr auto NETWORK_SERVICE = "xyz.openbmc_project.Network";
+constexpr auto SERVICE = "xyz.openbmc_project.Network";
constexpr auto INTERFACE = "eth0";
constexpr auto IP_TYPE = "ipv4";
constexpr auto IP_INTERFACE = "xyz.openbmc_project.Network.IP";
@@ -143,6 +143,8 @@ constexpr auto MAC_INTERFACE = "xyz.openbmc_project.Network.MACAddress";
constexpr auto SYSTEMCONFIG_INTERFACE = "xyz.openbmc_project.Network.SystemConfiguration";
constexpr auto ETHERNET_INTERFACE = "xyz.openbmc_project.Network.EthernetInterface";
constexpr auto IP_CREATE_INTERFACE = "xyz.openbmc_project.Network.IP.Create";
+constexpr auto VLAN_CREATE_INTERFACE = "xyz.openbmc_project.Network.VLAN.Create";
+constexpr auto VLAN_INTERFACE = "xyz.openbmc_project.Network.VLAN";
/* @brief converts the given subnet into prefix notation.
* @param[in] addressFamily - IP address family(AF_INET/AF_INET6).
@@ -167,8 +169,25 @@ void createIP(sdbusplus::bus::bus& bus,
const std::string& ipaddress,
uint8_t prefix);
-}//namespace network
+/** @brief Creates the VLAN on the given interface.
+ * @param[in] bus - DBUS Bus Object.
+ * @param[in] service - Dbus service name.
+ * @param[in] objPath - Dbus object path.
+ * @param[in] interface - EthernetInterface.
+ * @param[in] vlanID - Vlan ID.
+ */
+void createVLAN(sdbusplus::bus::bus& bus,
+ const std::string& service,
+ const std::string& objPath,
+ const std::string& interface,
+ uint32_t vlanID);
+
+/** @brief Gets the vlan id from the given object path.
+ * @param[in] path - Dbus object path.
+ */
+uint32_t getVLAN(const std::string& path);
+} //namespace network
} // namespace ipmi
OpenPOWER on IntegriCloud