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

Function parse_ipv4_addr

dpdk/examples/ip_pipeline/parser.c:377–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377int
378parse_ipv4_addr(const char *token, struct in_addr *ipv4)
379{
380 if (strlen(token) >= INET_ADDRSTRLEN)
381 return -EINVAL;
382
383 if (inet_pton(AF_INET, token, ipv4) != 1)
384 return -EINVAL;
385
386 return 0;
387}
388
389int
390parse_ipv6_addr(const char *token, struct in6_addr *ipv6)

Callers 3

parse_matchFunction · 0.70
parse_table_action_encapFunction · 0.70
parse_table_action_natFunction · 0.70

Calls 1

inet_ptonFunction · 0.85

Tested by

no test coverage detected