about summary refs log tree commit diff
path: root/src/network/inet_ntop.c
Commit message (Collapse)AuthorAgeFilesLines
* inet_ntop: do not compress single zeros in IPv6Arthur Jones2018-06-261-1/+1
| | | | | | | | | maintainer's note: this change is for conformance with RFC 5952, 4.2.2, which explicitly forbids use of :: to shorten a single 16-bit 0 field when producing the canonical text representation for an IPv6 address. fixes a test failure reported by Philip Homburg, who also submitted a patch, but this fix is simpler and should produce smaller code.
* include cleanups: remove unused headers and add feature test macrosSzabolcs Nagy2013-12-121-2/+0
|
* fix undefined strcpy call in inet_ntopRich Felker2013-07-251-1/+1
| | | | | source and dest arguments for strcpy cannot overlap, so memmove must be used here. the length is already known from the above loop.
* make inet_ntop format v4-mapped ipv6 addresses properlyRich Felker2013-07-251-8/+14
| | | | | | | | | | | | | | based on a patch by orc. POSIX actually fails to specify the format of the ntop conversion; presumably, any output that will correctly round-trip back via the (well-specified) pton operation is acceptable. the new behavior is much more convenient than the old, however. this patch also affects getnameinfo, which is implemented in terms of inet_ntop and which is the preferred interface for performing this conversion. I've also removed some inexplicable cruft (filling the buffer with 'x' before doing anything) whose origin I was unable to track down.
* use restrict everywhere it's required by c99 and/or posix 2008Rich Felker2012-09-061-1/+1
| | | | | | | | to deal with the fact that the public headers may be used with pre-c99 compilers, __restrict is used in place of restrict, and defined appropriately for any supported compiler. we also avoid the form [restrict] since older versions of gcc rejected it due to a bug in the original c99 standard, and instead use the form *restrict.
* remove some stray trailing space charactersRich Felker2011-09-131-1/+1
|
* fix ipv6 address printing: 2001 appeared as 201, etc.Rich Felker2011-04-081-3/+5
|
* initial check-in, version 0.5.0 v0.5.0Rich Felker2011-02-121-0/+48