This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 2773
  socklen_t type buffer lengths in inet_ntop() functions Last modified: 2006-06-15 00:17:58
     Query page      Enter new bug
Bug#: 2773   Hardware:   Reporter: &#321;ukasz Stelmach <stlman@poczta.fm>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: INVALID   Severity:  
Assigned To: Ulrich Drepper <drepper@redhat.com>   Target Milestone:  
Flags: Requestee:
  backport ()
  examined ()
  testsuite ()
Summary:
Keywords:

Attachment Description Type Created Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 2773 depends on: Show dependency tree
Show dependency graph
Bug 2773 blocks:

Additional Comments:


Leave as RESOLVED INVALID
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2006-06-14 20:49
Why are the size variables in libc/resolv/inet_ntop.c of type socklen_t instead
of size_t while in fact they have nothing to do with any socket structures?

I ask about this because I just had a proble when I read the header file and the
manual (*not* carefuly enough) and put *thoughtlessly* sizeof(struct sockaddr)
as fourth argument.  Of course it didn't work.

Indeed now for me this is only a matter of clarity but please answer.

------- Additional Comment #1 From Jakub Jelinek 2006-06-14 21:04 -------
See http://www.opengroup.org/onlinepubs/009695399/functions/inet_ntop.html

------- Additional Comment #2 From Michael Kerrisk 2006-06-15 00:17 -------
Note that the info page for inet_ntop() shows the wrong prototype.  The last
argument should be shown with the type socklen_t, not size_t.  The info page
should be fixed.

Cheers,

Michael

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In