| 2349 | "pipeline <pipeline_name> port in <port_id> disable\n"; |
| 2350 | |
| 2351 | static void |
| 2352 | cmd_pipeline_port_in_disable(char **tokens, |
| 2353 | uint32_t n_tokens, |
| 2354 | char *out, |
| 2355 | size_t out_size) |
| 2356 | { |
| 2357 | char *pipeline_name; |
| 2358 | uint32_t port_id; |
| 2359 | int status; |
| 2360 | |
| 2361 | if (n_tokens != 6) { |
| 2362 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 2363 | return; |
| 2364 | } |
| 2365 | |
| 2366 | pipeline_name = tokens[1]; |
| 2367 | |
| 2368 | if (strcmp(tokens[2], "port") != 0) { |
| 2369 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "port"); |
| 2370 | return; |
| 2371 | } |
| 2372 | |
| 2373 | if (strcmp(tokens[3], "in") != 0) { |
| 2374 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "in"); |
| 2375 | return; |
| 2376 | } |
| 2377 | |
| 2378 | if (parser_read_uint32(&port_id, tokens[4]) != 0) { |
| 2379 | snprintf(out, out_size, MSG_ARG_INVALID, "port_id"); |
| 2380 | return; |
| 2381 | } |
| 2382 | |
| 2383 | if (strcmp(tokens[5], "disable") != 0) { |
| 2384 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "disable"); |
| 2385 | return; |
| 2386 | } |
| 2387 | |
| 2388 | status = pipeline_port_in_disable(pipeline_name, port_id); |
| 2389 | if (status) { |
| 2390 | snprintf(out, out_size, MSG_CMD_FAIL, tokens[0]); |
| 2391 | return; |
| 2392 | } |
| 2393 | } |
| 2394 | |
| 2395 | |
| 2396 | static const char cmd_pipeline_port_out_stats_help[] = |
no test coverage detected