X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvom%2Fvom%2Ftypes.hpp;h=56759d5e741644376abb2979e4a117630d348696;hb=d8cf40b8bb5e00eb8b668f7d762e8eb5267a228a;hp=7b08d831352b4dc52fd03aa4eb6abf8a8bbe152d;hpb=208c29aac523231af2420a95ba7e5d361698780b;p=vpp.git diff --git a/extras/vom/vom/types.hpp b/extras/vom/vom/types.hpp index 7b08d831352..56759d5e741 100644 --- a/extras/vom/vom/types.hpp +++ b/extras/vom/vom/types.hpp @@ -289,7 +289,7 @@ std::ostream& operator<<(std::ostream& os, const handle_t& h); */ struct mac_address_t { - mac_address_t(uint8_t bytes[6]); + mac_address_t(const uint8_t bytes[6]); mac_address_t(const std::string& str); mac_address_t(std::initializer_list bytes); /** @@ -378,6 +378,22 @@ struct l2_address_t std::vector bytes; }; +struct counter_t +{ + counter_t() + : packets(0) + , bytes(0) + { + } + counter_t(const counter_t& c) + : packets(c.packets) + , bytes(c.bytes) + { + } + uint64_t packets; + uint64_t bytes; +}; + /** * Ostream operator for a MAC address */ @@ -387,6 +403,11 @@ std::ostream& operator<<(std::ostream& os, const mac_address_t& mac); * Ostream operator for a MAC address */ std::ostream& operator<<(std::ostream& os, const l2_address_t& l2); + +/** + * Ostream operator for a MAC address + */ +std::ostream& operator<<(std::ostream& os, const counter_t& c); }; /*