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

Function parse_portmask

dpdk/examples/l3fwd-graph/main.c:388–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388static int
389parse_portmask(const char *portmask)
390{
391 char *end = NULL;
392 unsigned long pm;
393
394 /* Parse hexadecimal string */
395 pm = strtoul(portmask, &end, 16);
396 if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0'))
397 return 0;
398
399 return pm;
400}
401
402static int
403parse_config(const char *q_arg)

Callers 1

parse_argsFunction · 0.70

Calls 1

strtoulFunction · 0.85

Tested by

no test coverage detected