UDP struct uses IpAddr and MacAddr

This commit is contained in:
Erik Frojdh
2021-09-07 15:16:03 +02:00
parent 9d744deb4a
commit ba52bfb65e
6 changed files with 55 additions and 86 deletions

View File

@ -72,18 +72,18 @@ std::string MacAddr::hex() const { return to_hex(); }
std::string UdpDestination::str() const {
std::ostringstream oss;
oss << '[' << std::endl
<< "entry " << entry_ << std::endl
<< "ip " << ip_ << std::endl
<< "mac " << mac_ << std::endl
<< "port " << port_ << std::endl;
if (port2_ != 0) {
oss << "port2 " << port2_ << std::endl;
<< "entry " << entry << std::endl
<< "ip " << ip << std::endl
<< "mac " << mac << std::endl
<< "port " << port << std::endl;
if (port2 != 0) {
oss << "port2 " << port2 << std::endl;
}
if (ip2_ != 0) {
oss << "ip2 " << ip2_ << std::endl;
if (ip2 != 0) {
oss << "ip2 " << ip2 << std::endl;
}
if (mac2_ != 0) {
oss << "mac2 " << mac2_ << std::endl;
if (mac2 != 0) {
oss << "mac2 " << mac2 << std::endl;
}
oss << ']';
return oss.str();