| 236 | } |
| 237 | |
| 238 | static void |
| 239 | cli_neigh_v4(void *parsed_result, __rte_unused struct cmdline *cl, void *data __rte_unused) |
| 240 | { |
| 241 | struct neigh_v4_cmd_tokens *res = parsed_result; |
| 242 | int rc = -EINVAL; |
| 243 | uint64_t mac; |
| 244 | uint32_t ip; |
| 245 | |
| 246 | if (parser_ip4_read(&ip, res->ip)) { |
| 247 | printf(MSG_ARG_INVALID, "ip"); |
| 248 | return; |
| 249 | } |
| 250 | |
| 251 | if (parser_mac_read(&mac, res->mac)) { |
| 252 | printf(MSG_ARG_INVALID, "mac"); |
| 253 | return; |
| 254 | } |
| 255 | |
| 256 | rc = neigh_ip4_add(ip, mac); |
| 257 | if (rc < 0) |
| 258 | printf(MSG_CMD_FAIL, res->cmd); |
| 259 | } |
| 260 | |
| 261 | static void |
| 262 | cli_neigh_v6(void *parsed_result, __rte_unused struct cmdline *cl, void *data __rte_unused) |
nothing calls this directly
no test coverage detected