diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-07-30 10:39:22 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2017-08-13 22:26:01 +0530 |
commit | 533d03b5f923e6c59ca1ffb16b6a5eb14e3f96c6 (patch) | |
tree | 54b2119d2fbc24774d214f48a5e0ff327d23bf0e /utils.hpp | |
parent | b8e9955db5216a0b170a2fb99125d1f22bb9d1c0 (diff) | |
download | phosphor-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.hpp | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -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 |