Re: [PATCH] inet_pton.3: Mention byte order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Stefan,

On 05/12/2016 09:16 AM, Stefan Puiu wrote:
> Hi,
> 
> I was a bit stumped recently to realize that both inet_ntop() and
> inet_pton() work with addresses in network byte order.

Yes, that's correct.

> inet_ntop.3
> mentions that, and the example from inet_pton(), as far as I can tell,
> implies that you can call inet_ntop() on the result of inet_pton(), so
> the byte order needs to match, but I think it's better to mention this
> explicitly in the man page text. 

Yes, it should be mentioned.

> How about this (patch against git)?

Following up in next mail...

Cheers,

Michael


> diff --git a/man3/inet_pton.3 b/man3/inet_pton.3
> index 4ff16b9..8b1017e 100644
> --- a/man3/inet_pton.3
> +++ b/man3/inet_pton.3
> @@ -64,6 +64,8 @@ and copied to
>  which must be
>  .I sizeof(struct in_addr)
>  (4) bytes (32 bits) long.
> +.IR dst
> +is written in network byte order.
>  .TP
>  .B AF_INET6
>  .I src
> 
> Thanks,
> Stefan.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-man" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> .
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux