-
Notifications
You must be signed in to change notification settings - Fork 40
/
eth_phy_intf.cpp
100 lines (75 loc) · 2.11 KB
/
eth_phy_intf.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Copyright (c) 2013 Arista Networks, Inc. All rights reserved.
// Arista Networks, Inc. Confidential and Proprietary.
#include "eos/eth_phy_intf.h"
#include "impl.h"
namespace eos {
eth_phy_intf_handler::eth_phy_intf_handler(eth_phy_intf_mgr * mgr)
: base_handler<eth_phy_intf_mgr, eth_phy_intf_handler>(mgr) {
}
void
eth_phy_intf_handler::watch_all_eth_phy_intfs(bool all) {
// TODO: No op impl.
}
void
eth_phy_intf_handler::watch_eth_phy_intf(intf_id_t, bool) {
// TODO: No op impl.
}
void
eth_phy_intf_handler::on_eth_phy_intf_create(intf_id_t) {
// TODO: No op impl.
}
void
eth_phy_intf_handler::on_eth_phy_intf_delete(intf_id_t) {
// TODO: No op impl.
}
void
eth_phy_intf_handler::on_eth_phy_intf_hardware_present(intf_id_t, bool) {
// TODO: No op impl.
}
void
eth_phy_intf_handler::on_eth_phy_intf_link_speed(intf_id_t, eth_link_speed_t) {
// TODO: No op impl.
}
void
eth_phy_intf_handler::on_eth_phy_intf_transceiver_present(intf_id_t, bool) {
// TODO: No op impl.
}
class eth_phy_intf_mgr_impl : public eth_phy_intf_mgr {
public:
eth_phy_intf_mgr_impl() {
}
eth_phy_intf_iter_t eth_phy_intf_iter() const {
eth_phy_intf_iter_t * nop = 0;
return *nop; // TODO: No op impl.
}
bool exists(intf_id_t) const {
return false;
}
bool hardware_present(intf_id_t) const {
return false;
}
// Read the "burned in" address
eth_addr_t burned_in_eth_addr(intf_id_t) const {
return eth_addr_t();
}
eth_link_speed_t link_speed(intf_id_t intf_id) const {
return LINK_SPEED_UNKNOWN; // TODO: No op impl.
}
bool transceiver_present(intf_id_t intf_id) const {
return false; // TODO: No op impl.
}
};
DEFINE_STUB_MGR_CTOR(eth_phy_intf_mgr)
class eth_phy_intf_counter_mgr_impl : public eth_phy_intf_counter_mgr {
public:
eth_phy_intf_counter_mgr_impl() {
}
eth_phy_intf_counters_t counters(intf_id_t) const {
return eth_phy_intf_counters_t();
}
eth_phy_intf_bin_counters_t bin_counters(intf_id_t) const {
return eth_phy_intf_bin_counters_t();
}
};
DEFINE_STUB_MGR_CTOR(eth_phy_intf_counter_mgr)
}