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 NLOHMANN_JSON_SERIALIZE_ENUM(LinkStatus, {
49     {LinkStatus::Invalid, "Invalid"},
50     {LinkStatus::LinkUp, "LinkUp"},
51     {LinkStatus::NoLink, "NoLink"},
52     {LinkStatus::LinkDown, "LinkDown"},
53 });
54 
55 NLOHMANN_JSON_SERIALIZE_ENUM(DHCPv6OperatingMode, {
56     {DHCPv6OperatingMode::Invalid, "Invalid"},
57     {DHCPv6OperatingMode::Stateful, "Stateful"},
58     {DHCPv6OperatingMode::Stateless, "Stateless"},
59     {DHCPv6OperatingMode::Disabled, "Disabled"},
60     {DHCPv6OperatingMode::Enabled, "Enabled"},
61 });
62 
63 NLOHMANN_JSON_SERIALIZE_ENUM(DHCPFallback, {
64     {DHCPFallback::Invalid, "Invalid"},
65     {DHCPFallback::Static, "Static"},
66     {DHCPFallback::AutoConfig, "AutoConfig"},
67     {DHCPFallback::None, "None"},
68 });
69 
70 NLOHMANN_JSON_SERIALIZE_ENUM(EthernetDeviceType, {
71     {EthernetDeviceType::Invalid, "Invalid"},
72     {EthernetDeviceType::Physical, "Physical"},
73     {EthernetDeviceType::Virtual, "Virtual"},
74 });
75 
76 NLOHMANN_JSON_SERIALIZE_ENUM(TeamMode, {
77     {TeamMode::Invalid, "Invalid"},
78     {TeamMode::None, "None"},
79     {TeamMode::RoundRobin, "RoundRobin"},
80     {TeamMode::ActiveBackup, "ActiveBackup"},
81     {TeamMode::XOR, "XOR"},
82     {TeamMode::Broadcast, "Broadcast"},
83     {TeamMode::IEEE802_3ad, "IEEE802_3ad"},
84     {TeamMode::AdaptiveTransmitLoadBalancing, "AdaptiveTransmitLoadBalancing"},
85     {TeamMode::AdaptiveLoadBalancing, "AdaptiveLoadBalancing"},
86 });
87 
88 }
89 // clang-format on
90