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

Function cmd_flow_tok

dpdk/app/test-pmd/cmdline_flow.c:12423–12450  ·  view source on GitHub ↗

Populate the next dynamic token. */

Source from the content-addressed store, hash-verified

12421
12422/** Populate the next dynamic token. */
12423static void
12424cmd_flow_tok(cmdline_parse_token_hdr_t **hdr,
12425 cmdline_parse_token_hdr_t **hdr_inst)
12426{
12427 struct context *ctx = &cmd_flow_context;
12428
12429 /* Always reinitialize context before requesting the first token. */
12430 if (!(hdr_inst - cmd_flow.tokens))
12431 cmd_flow_context_init(ctx);
12432 /* Return NULL when no more tokens are expected. */
12433 if (!ctx->next_num && ctx->curr) {
12434 *hdr = NULL;
12435 return;
12436 }
12437 /* Determine if command should end here. */
12438 if (ctx->eol && ctx->last && ctx->next_num) {
12439 const enum index *list = ctx->next[ctx->next_num - 1];
12440 int i;
12441
12442 for (i = 0; list[i]; ++i) {
12443 if (list[i] != END)
12444 continue;
12445 *hdr = NULL;
12446 return;
12447 }
12448 }
12449 *hdr = &cmd_flow_token_hdr;
12450}
12451
12452static SLIST_HEAD(, indlst_conf) indlst_conf_head =
12453 SLIST_HEAD_INITIALIZER();

Callers 1

cmd_flow_cbFunction · 0.85

Calls 1

cmd_flow_context_initFunction · 0.85

Tested by

no test coverage detected