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

Function cli_ipv6_lookup

dpdk/app/graph/ip6_route.c:151–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151static void
152cli_ipv6_lookup(void *parsed_result, __rte_unused struct cmdline *cl, void *data __rte_unused)
153{
154 struct ip6_lookup_cmd_tokens *res = parsed_result;
155 struct route_ipv6_config config;
156 int rc = -EINVAL;
157
158 if (parser_ip6_read(config.ip, res->ip)) {
159 printf(MSG_ARG_INVALID, "ipv6");
160 return;
161 }
162
163 if (parser_ip6_read(config.mask, res->mask)) {
164 printf(MSG_ARG_INVALID, "netmask");
165 return;
166 }
167
168 if (parser_ip6_read(config.gateway, res->via_ip)) {
169 printf(MSG_ARG_INVALID, "gateway ip");
170 return;
171 }
172
173 rc = route_ip6_add(&config);
174 if (rc)
175 printf(MSG_CMD_FAIL, res->cmd);
176}
177
178cmdline_parse_token_string_t ip6_lookup_cmd =
179 TOKEN_STRING_INITIALIZER(struct ip6_lookup_cmd_tokens, cmd, "ipv6_lookup");

Callers

nothing calls this directly

Calls 3

parser_ip6_readFunction · 0.85
route_ip6_addFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected