| 276 | } |
| 277 | |
| 278 | int WildcardMatch::FindTuple(wm_hkey_t *mask) { |
| 279 | int i = 0; |
| 280 | |
| 281 | for (const auto &tuple : tuples_) { |
| 282 | if (memcmp(&tuple.mask, mask, total_key_size_) == 0) { |
| 283 | return i; |
| 284 | } |
| 285 | i++; |
| 286 | } |
| 287 | return -ENOENT; |
| 288 | } |
| 289 | |
| 290 | int WildcardMatch::AddTuple(wm_hkey_t *mask) { |
| 291 | if (tuples_.size() >= MAX_TUPLES) { |
nothing calls this directly
no outgoing calls
no test coverage detected