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

Function cli_ip4_addr

dpdk/app/graph/ethdev.c:589–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589static void
590cli_ip4_addr(void *parsed_result, __rte_unused struct cmdline *cl, void *data __rte_unused)
591{
592 struct ethdev_ip4_cmd_tokens *res = parsed_result;
593 struct ipv4_addr_config config;
594 int rc = -EINVAL;
595
596 if (parser_ip4_read(&config.ip, res->ip)) {
597 printf(MSG_ARG_INVALID, "ip");
598 return;
599 }
600
601 if (parser_ip4_read(&config.mask, res->mask)) {
602 printf(MSG_ARG_INVALID, "netmask");
603 return;
604 }
605
606 rc = ethdev_ip4_addr_add(res->dev, &config);
607 if (rc < 0)
608 printf(MSG_CMD_FAIL, res->cmd);
609}
610
611static void
612cli_ip6_addr(void *parsed_result, __rte_unused struct cmdline *cl, void *data __rte_unused)

Callers

nothing calls this directly

Calls 3

parser_ip4_readFunction · 0.85
ethdev_ip4_addr_addFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected