Why does inet_ntop () use socklen_t to describe the size of the text buffer?

From a recent Linux man page:

  const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);

This function converts the network address structure src into a family of af addresses in a character string.

sizedescribes the size of the memory dst.

I understand the use of socklen_t in other functions, such as connect()or accept().

But why is it used here socklen_t? -S

It must be size_t!

+2
source share

Source: https://habr.com/ru/post/1743975/


All Articles