diff --git a/src/base/inet.cc b/src/base/inet.cc index bc9c51615e..f8fe9444f2 100644 --- a/src/base/inet.cc +++ b/src/base/inet.cc @@ -50,7 +50,9 @@ #include "base/logging.hh" #include "base/types.hh" -namespace Net { +GEM5_DEPRECATED_NAMESPACE(Net, networking); +namespace networking +{ EthAddr::EthAddr() { @@ -407,5 +409,4 @@ hsplit(const EthPacketPtr &ptr) return split_point; } - -} // namespace Net +} // namespace networking diff --git a/src/base/inet.hh b/src/base/inet.hh index f0d1f7543f..3a2f4c4d5e 100644 --- a/src/base/inet.hh +++ b/src/base/inet.hh @@ -65,7 +65,9 @@ #include "dnet/blob.h" #include "dnet/rand.h" -namespace Net { +GEM5_DEPRECATED_NAMESPACE(Net, networking); +namespace networking +{ /* * Ethernet Stuff @@ -828,6 +830,6 @@ uint16_t cksum(const UdpPtr &ptr); */ int hsplit(const EthPacketPtr &ptr); -} // namespace Net +} // namespace networking #endif // __BASE_INET_HH__ diff --git a/src/dev/net/etherswitch.cc b/src/dev/net/etherswitch.cc index 27fbc78534..cd22d46653 100644 --- a/src/dev/net/etherswitch.cc +++ b/src/dev/net/etherswitch.cc @@ -133,8 +133,8 @@ EtherSwitch::Interface::Interface(const std::string &name, bool EtherSwitch::Interface::recvPacket(EthPacketPtr packet) { - Net::EthAddr destMacAddr(packet->data); - Net::EthAddr srcMacAddr(&packet->data[6]); + networking::EthAddr destMacAddr(packet->data); + networking::EthAddr srcMacAddr(&packet->data[6]); learnSenderAddr(srcMacAddr, this); Interface *receiver = lookupDestPort(destMacAddr); @@ -206,7 +206,7 @@ EtherSwitch::Interface::switchingDelay() } EtherSwitch::Interface* -EtherSwitch::Interface::lookupDestPort(Net::EthAddr destMacAddr) +EtherSwitch::Interface::lookupDestPort(networking::EthAddr destMacAddr) { auto it = parent->forwardingTable.find(uint64_t(destMacAddr)); @@ -230,7 +230,7 @@ EtherSwitch::Interface::lookupDestPort(Net::EthAddr destMacAddr) } void -EtherSwitch::Interface::learnSenderAddr(Net::EthAddr srcMacAddr, +EtherSwitch::Interface::learnSenderAddr(networking::EthAddr srcMacAddr, Interface *sender) { // learn the port for the sending MAC address diff --git a/src/dev/net/etherswitch.hh b/src/dev/net/etherswitch.hh index 3c6a4c85c4..6cba36af8b 100644 --- a/src/dev/net/etherswitch.hh +++ b/src/dev/net/etherswitch.hh @@ -81,8 +81,8 @@ class EtherSwitch : public SimObject void sendDone() {} Tick switchingDelay(); - Interface* lookupDestPort(Net::EthAddr destAddr); - void learnSenderAddr(Net::EthAddr srcMacAddr, Interface *sender); + Interface* lookupDestPort(networking::EthAddr destAddr); + void learnSenderAddr(networking::EthAddr srcMacAddr, Interface *sender); void serialize(CheckpointOut &cp) const; void unserialize(CheckpointIn &cp); diff --git a/src/dev/net/i8254xGBe.cc b/src/dev/net/i8254xGBe.cc index 34a1e7e50e..fd9005acae 100644 --- a/src/dev/net/i8254xGBe.cc +++ b/src/dev/net/i8254xGBe.cc @@ -53,7 +53,7 @@ #include "sim/system.hh" using namespace igbreg; -using namespace Net; +using namespace networking; IGbE::IGbE(const Params &p) : EtherDevice(p), etherInt(NULL), diff --git a/src/dev/net/ns_gige.cc b/src/dev/net/ns_gige.cc index 6d1313da1e..bb38acb038 100644 --- a/src/dev/net/ns_gige.cc +++ b/src/dev/net/ns_gige.cc @@ -85,7 +85,7 @@ const char *NsDmaState[] = "dmaWriteWaiting" }; -using namespace Net; +using namespace networking; /////////////////////////////////////////////////////////////////////// // diff --git a/src/dev/net/sinic.cc b/src/dev/net/sinic.cc index 4f844f6ca5..8491674a31 100644 --- a/src/dev/net/sinic.cc +++ b/src/dev/net/sinic.cc @@ -43,7 +43,7 @@ #include "sim/eventq.hh" #include "sim/stats.hh" -using namespace Net; +using namespace networking; GEM5_DEPRECATED_NAMESPACE(Sinic, sinic); namespace sinic diff --git a/src/python/m5/params.py b/src/python/m5/params.py index 460a7d0331..6ee8b5c6ad 100644 --- a/src/python/m5/params.py +++ b/src/python/m5/params.py @@ -934,7 +934,7 @@ def NextEthernetAddr(): return value class EthernetAddr(ParamValue): - cxx_type = 'Net::EthAddr' + cxx_type = 'networking::EthAddr' ex_str = "00:90:00:00:00:01" cmd_line_settable = True @@ -981,13 +981,13 @@ class EthernetAddr(ParamValue): @classmethod def cxx_ini_parse(self, code, src, dest, ret): - code('%s = Net::EthAddr(%s);' % (dest, src)) + code('%s = networking::EthAddr(%s);' % (dest, src)) code('%s true;' % ret) # When initializing an IpAddress, pass in an existing IpAddress, a string of # the form "a.b.c.d", or an integer representing an IP. class IpAddress(ParamValue): - cxx_type = 'Net::IpAddress' + cxx_type = 'networking::IpAddress' ex_str = "127.0.0.1" cmd_line_settable = True @@ -1039,7 +1039,7 @@ class IpAddress(ParamValue): # the form "a.b.c.d/n" or "a.b.c.d/e.f.g.h", or an ip and netmask as # positional or keyword arguments. class IpNetmask(IpAddress): - cxx_type = 'Net::IpNetmask' + cxx_type = 'networking::IpNetmask' ex_str = "127.0.0.0/24" cmd_line_settable = True @@ -1113,7 +1113,7 @@ class IpNetmask(IpAddress): # When initializing an IpWithPort, pass in an existing IpWithPort, a string of # the form "a.b.c.d:p", or an ip and port as positional or keyword arguments. class IpWithPort(IpAddress): - cxx_type = 'Net::IpWithPort' + cxx_type = 'networking::IpWithPort' ex_str = "127.0.0.1:80" cmd_line_settable = True diff --git a/src/python/pybind11/core.cc b/src/python/pybind11/core.cc index 8eac65c08a..dbd8a0fbbb 100644 --- a/src/python/pybind11/core.cc +++ b/src/python/pybind11/core.cc @@ -179,22 +179,22 @@ init_net(py::module_ &m_native) { py::module_ m = m_native.def_submodule("net"); - py::class_(m, "EthAddr") + py::class_(m, "EthAddr") .def(py::init<>()) .def(py::init()) ; - py::class_(m, "IpAddress") + py::class_(m, "IpAddress") .def(py::init<>()) .def(py::init()) ; - py::class_(m, "IpNetmask") + py::class_(m, "IpNetmask") .def(py::init<>()) .def(py::init()) ; - py::class_(m, "IpWithPort") + py::class_(m, "IpWithPort") .def(py::init<>()) .def(py::init()) ;