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

Function parse_port

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

Parse port and update context. */

Source from the content-addressed store, hash-verified

11239
11240/** Parse port and update context. */
11241static int
11242parse_port(struct context *ctx, const struct token *token,
11243 const char *str, unsigned int len,
11244 void *buf, unsigned int size)
11245{
11246 struct buffer *out = &(struct buffer){ .port = 0 };
11247 int ret;
11248
11249 if (buf)
11250 out = buf;
11251 else {
11252 ctx->objdata = 0;
11253 ctx->object = out;
11254 ctx->objmask = NULL;
11255 size = sizeof(*out);
11256 }
11257 ret = parse_int(ctx, token, str, len, out, size);
11258 if (ret >= 0)
11259 ctx->port = out->port;
11260 if (!buf)
11261 ctx->object = NULL;
11262 return ret;
11263}
11264
11265/** Parse tokens for shared indirect actions. */
11266static int

Callers

nothing calls this directly

Calls 1

parse_intFunction · 0.85

Tested by

no test coverage detected