Re: [PATCH v2 02/15] net: add function to pretty print IPv4

2022-01-21 Thread Stephen Hemminger
On Fri, 21 Jan 2022 10:31:09 + Ronan Randles wrote: > +int32_t > +rte_ip_print_addr(uint32_t ip_addr, char *buffer, uint32_t buffer_size) > +{ > + if (buffer == NULL) > + return -1; > + > + snprintf(buffer, buffer_size, "%u.%u.%u.%u", > + (ip_addr >> 24), > +

[PATCH v2 02/15] net: add function to pretty print IPv4

2022-01-21 Thread Ronan Randles
This function accepts an uint32_t representation of an IP address and produces a string representation stored in a char * buffer. Realavent unit tests also included. Signed-off-by: Ronan Randles --- app/test/test_net.c | 26 ++ lib/net/rte_ip.c| 15 +++ li