mhulden / foma

Automatically exported from code.google.com/p/foma
117 stars 90 forks source link

Avoid using deprecated inet_* functions. #126

Closed mike-fabian closed 3 months ago

mike-fabian commented 3 years ago

From “man inet_ntop”:

 inet_ntop()  extends the  inet_ntoa(3)  function to  support
 multiple address families, inet_ntoa(3) is now considered to
 be  deprecated  in  favor  of  inet_ntop().

From “man inet_pton”:

 Unlike inet_aton(3)  and inet_addr(3),  inet_pton() supports
 IPv6 addresses.  On the other hand, inet_pton() accepts only
 IPv4   addresses   in   dotted-decimal   notation,   whereas
 inet_aton(3)  and   inet_addr(3)  allow  the   more  general
 numbers-and-dots  notation  (hexadecimal  and  octal  number
 formats, and formats that don't require all four bytes to be
 explicitly  written).  For  an interface  that handles  both
 IPv6  addresses,  and  IPv4  addresses  in  numbers-and-dots
 notation, see getaddrinfo(3).
mike-fabian commented 3 months ago

@mhulden ping 🏓