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

Function parse_portmask

dpdk/examples/l3fwd/main.c:474–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

472}
473
474static int
475parse_portmask(const char *portmask)
476{
477 char *end = NULL;
478 unsigned long pm;
479
480 /* parse hexadecimal string */
481 pm = strtoul(portmask, &end, 16);
482 if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0'))
483 return 0;
484
485 return pm;
486}
487
488static int
489parse_config(const char *q_arg)

Callers 1

parse_argsFunction · 0.70

Calls 1

strtoulFunction · 0.85

Tested by

no test coverage detected