1 #pragma once
2 #include <nlohmann/json.hpp>
3 
4 namespace ethernet_interface
5 {
6 // clang-format off
7 
8 enum class LinkStatus{
9     Invalid,
10     LinkUp,
11     NoLink,
12     LinkDown,
13 };
14 
15 enum class DHCPv6OperatingMode{
16     Invalid,
17     Stateful,
18     Stateless,
19     Disabled,
20     Enabled,
21 };
22 
23 enum class DHCPFallback{
24     Invalid,
25     Static,
26     AutoConfig,
27     None,
28 };
29 
30 enum class EthernetDeviceType{
31     Invalid,
32     Physical,
33     Virtual,
34 };
35 
36 enum class TeamMode{
37     Invalid,
38     None,
39     RoundRobin,
40     ActiveBackup,
41     XOR,
42     Broadcast,
43     IEEE802_3ad,
44     AdaptiveTransmitLoadBalancing,
45     AdaptiveLoadBalancing,
46 };
47 
48 enum class RoutingScope{
49     Invalid,
50     External,
51     HostOnly,
52     Internal,
53     Limited,
54 };
55 
56 NLOHMANN_JSON_SERIALIZE_ENUM(LinkStatus, {
57     {LinkStatus::Invalid, "Invalid"},
58     {LinkStatus::LinkUp, "LinkUp"},
59     {LinkStatus::NoLink, "NoLink"},
60     {LinkStatus::LinkDown, "LinkDown"},
61 });
62 
63 NLOHMANN_JSON_SERIALIZE_ENUM(DHCPv6OperatingMode, {
64     {DHCPv6OperatingMode::Invalid, "Invalid"},
65     {DHCPv6OperatingMode::Stateful, "Stateful"},
66     {DHCPv6OperatingMode::Stateless, "Stateless"},
67     {DHCPv6OperatingMode::Disabled, "Disabled"},
68     {DHCPv6OperatingMode::Enabled, "Enabled"},
69 });
70 
71 NLOHMANN_JSON_SERIALIZE_ENUM(DHCPFallback, {
72     {DHCPFallback::Invalid, "Invalid"},
73     {DHCPFallback::Static, "Static"},
74     {DHCPFallback::AutoConfig, "AutoConfig"},
75     {DHCPFallback::None, "None"},
76 });
77 
78 NLOHMANN_JSON_SERIALIZE_ENUM(EthernetDeviceType, {
79     {EthernetDeviceType::Invalid, "Invalid"},
80     {EthernetDeviceType::Physical, "Physical"},
81     {EthernetDeviceType::Virtual, "Virtual"},
82 });
83 
84 NLOHMANN_JSON_SERIALIZE_ENUM(TeamMode, {
85     {TeamMode::Invalid, "Invalid"},
86     {TeamMode::None, "None"},
87     {TeamMode::RoundRobin, "RoundRobin"},
88     {TeamMode::ActiveBackup, "ActiveBackup"},
89     {TeamMode::XOR, "XOR"},
90     {TeamMode::Broadcast, "Broadcast"},
91     {TeamMode::IEEE802_3ad, "IEEE802_3ad"},
92     {TeamMode::AdaptiveTransmitLoadBalancing, "AdaptiveTransmitLoadBalancing"},
93     {TeamMode::AdaptiveLoadBalancing, "AdaptiveLoadBalancing"},
94 });
95 
96 NLOHMANN_JSON_SERIALIZE_ENUM(RoutingScope, {
97     {RoutingScope::Invalid, "Invalid"},
98     {RoutingScope::External, "External"},
99     {RoutingScope::HostOnly, "HostOnly"},
100     {RoutingScope::Internal, "Internal"},
101     {RoutingScope::Limited, "Limited"},
102 });
103 
104 }
105 // clang-format on
106