| 105 | IPTable() = default; |
| 106 | |
| 107 | uint32_t |
| 108 | increment(swoc::IPAddr const &ip) |
| 109 | { |
| 110 | std::unique_lock lock(_mutex); |
| 111 | auto item = _table.find(ip); |
| 112 | if (item == _table.end()) { |
| 113 | _table.insert(std::make_pair(ip, IPTableItem())); |
| 114 | return 1; |
| 115 | } else { |
| 116 | ++item->second._count; |
| 117 | uint32_t tmp_count = item->second._count; |
| 118 | return tmp_count; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | uint32_t |
| 123 | getCount(swoc::IPAddr const &ip) |
no test coverage detected