MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cli_neigh_v4

Function cli_neigh_v4

dpdk/app/graph/neigh.c:238–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238static void
239cli_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
261static void
262cli_neigh_v6(void *parsed_result, __rte_unused struct cmdline *cl, void *data __rte_unused)

Callers

nothing calls this directly

Calls 4

parser_ip4_readFunction · 0.85
parser_mac_readFunction · 0.85
neigh_ip4_addFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected