alk
alk

Reputation: 70971

Why does inet_ntop() use socklen_t to describe size of textual 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 in the af address family into a character string.

size describes the size of memory dst points to.

I understand the use of socklen_t in other functions like connect() or accept().

But why is socklen_t used here?-S

This should be size_t!

Upvotes: 2

Views: 84

Answers (0)

Related Questions