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

Function parse_portmask

dpdk/examples/distributor/main.c:705–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705static int
706parse_portmask(const char *portmask)
707{
708 char *end = NULL;
709 unsigned long pm;
710
711 /* parse hexadecimal string */
712 pm = strtoul(portmask, &end, 16);
713 if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0'))
714 return 0;
715
716 return pm;
717}
718
719/* Parse the argument given in the command line of the application */
720static int

Callers 1

parse_argsFunction · 0.70

Calls 1

strtoulFunction · 0.85

Tested by

no test coverage detected