-- Copyright (c) 2024 Huawei Technologies Co., Ltd.
-- openUBMC is licensed under Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at:
--         http://license.coscl.org.cn/MulanPSL2
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-- EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-- MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-- See the Mulan PSL v2 for more details.

local num = ProcessingFlow[2].Destination.NetDevFuncCapabilities
local ret_array = {}

if (num & 0x01) ~= 0 then
    ret_array[#ret_array + 1] = 'Ethernet'
end

if (num & 0x02) ~= 0 then
    ret_array[#ret_array + 1] = 'FibreChannel'
end

if (num & 0x04) ~= 0 then
    ret_array[#ret_array + 1] = 'iSCSI'
end

if (num & 0x08) ~= 0 then
    ret_array[#ret_array + 1] = 'FCoE'
end

if (num & 0x10) ~= 0 then
    ret_array[#ret_array + 1] = 'OPA'
end

if (num & 0x20) ~= 0 then
    ret_array[#ret_array + 1] = 'IB'
end

return ret_array
