1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 #pragma once 4 #include <nlohmann/json.hpp> 5 6 namespace network_device_function 7 { 8 // clang-format off 9 10 enum class NetworkDeviceTechnology{ 11 Invalid, 12 Disabled, 13 Ethernet, 14 FibreChannel, 15 iSCSI, 16 FibreChannelOverEthernet, 17 InfiniBand, 18 }; 19 20 enum class IPAddressType{ 21 Invalid, 22 IPv4, 23 IPv6, 24 }; 25 26 enum class AuthenticationMethod{ 27 Invalid, 28 None, 29 CHAP, 30 MutualCHAP, 31 }; 32 33 enum class WWNSource{ 34 Invalid, 35 ConfiguredLocally, 36 ProvidedByFabric, 37 }; 38 39 enum class BootMode{ 40 Invalid, 41 Disabled, 42 PXE, 43 iSCSI, 44 FibreChannel, 45 FibreChannelOverEthernet, 46 HTTP, 47 }; 48 49 enum class DataDirection{ 50 Invalid, 51 None, 52 Ingress, 53 Egress, 54 }; 55 56 NLOHMANN_JSON_SERIALIZE_ENUM(NetworkDeviceTechnology, { 57 {NetworkDeviceTechnology::Invalid, "Invalid"}, 58 {NetworkDeviceTechnology::Disabled, "Disabled"}, 59 {NetworkDeviceTechnology::Ethernet, "Ethernet"}, 60 {NetworkDeviceTechnology::FibreChannel, "FibreChannel"}, 61 {NetworkDeviceTechnology::iSCSI, "iSCSI"}, 62 {NetworkDeviceTechnology::FibreChannelOverEthernet, "FibreChannelOverEthernet"}, 63 {NetworkDeviceTechnology::InfiniBand, "InfiniBand"}, 64 }); 65 66 NLOHMANN_JSON_SERIALIZE_ENUM(IPAddressType, { 67 {IPAddressType::Invalid, "Invalid"}, 68 {IPAddressType::IPv4, "IPv4"}, 69 {IPAddressType::IPv6, "IPv6"}, 70 }); 71 72 NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationMethod, { 73 {AuthenticationMethod::Invalid, "Invalid"}, 74 {AuthenticationMethod::None, "None"}, 75 {AuthenticationMethod::CHAP, "CHAP"}, 76 {AuthenticationMethod::MutualCHAP, "MutualCHAP"}, 77 }); 78 79 NLOHMANN_JSON_SERIALIZE_ENUM(WWNSource, { 80 {WWNSource::Invalid, "Invalid"}, 81 {WWNSource::ConfiguredLocally, "ConfiguredLocally"}, 82 {WWNSource::ProvidedByFabric, "ProvidedByFabric"}, 83 }); 84 85 NLOHMANN_JSON_SERIALIZE_ENUM(BootMode, { 86 {BootMode::Invalid, "Invalid"}, 87 {BootMode::Disabled, "Disabled"}, 88 {BootMode::PXE, "PXE"}, 89 {BootMode::iSCSI, "iSCSI"}, 90 {BootMode::FibreChannel, "FibreChannel"}, 91 {BootMode::FibreChannelOverEthernet, "FibreChannelOverEthernet"}, 92 {BootMode::HTTP, "HTTP"}, 93 }); 94 95 NLOHMANN_JSON_SERIALIZE_ENUM(DataDirection, { 96 {DataDirection::Invalid, "Invalid"}, 97 {DataDirection::None, "None"}, 98 {DataDirection::Ingress, "Ingress"}, 99 {DataDirection::Egress, "Egress"}, 100 }); 101 102 } 103 // clang-format on 104