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),
> +
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
2 matches
Mail list logo