.\" Copyright 2000 Sam Varshavchik .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References: RFC 2553 .\" .\" Traducido por Miguel Pérez Ibars el 6-agosto-2004 .\" .TH inet_ntop 3 "18 diciembre 2000" "Linux Man Page" "Manual del Programador de Linux" .SH NOMBRE inet_ntop \- Analiza estructuras de dirección de red .SH SINOPSIS .nf .B #include .B #include .B #include .sp .BI "const char *inet_ntop(int " "af" ", const void *" "src" , .BI " char *" "dst" ", size_t " "cnt" ); .SH DESCRIPCIÓN Esta función convierte la estructura de dirección de red .I src en la familia de direcciones .I af en una cadena de caracteres, que es copiada a un buffer de caracteres .IR dst , el cual tiene .I cnt bytes de longitud. .PP .BR inet_ntop (3) extiende la función .BR inet_ntoa (3) para soportar múltiples familias de direcciones, .BR inet_ntoa (3) es considerada obsoleta en la actualidad en favor de .BR inet_ntop (3). Las siguientes familias de direcciones de red están actualmente soportadas: .TP .B AF_INET .I src apunta a una estructura .I in_addr (en orden de bytes de la red) que es convertida a una dirección de red IPv4 en el formato decimal con puntos, "\fIddd.ddd.ddd.ddd\fP". El buffer .I dst debe tener al menos .B INET_ADDRSTRLEN bytes de longitud. .TP .B AF_INET6 .I src apunta a una estructura .I struct in6_addr (en orden de bytes de la red) que es convertida a una representación de esta dirección en el formato de dirección de red IPv6 más apropiado para dicha dirección. El buffer .I dst debe tener al menos .B INET6_ADDRSTRLEN bytes de longitud. .SH "VALOR DEVUELTO" .B inet_ntop devuelve un puntero distinto de null a .IR dst . Se devuelve NULL cuando hubo un error, y se asigna a .I errno el valor .B EAFNOSUPPORT si .I af no contiene una familia de direcciones válida, o el valor .B ENOSPC si la cadena con la dirección convertida sobrepasa el tamaño de .IR dst dado por el argumento .I cnt. .SH "VÉASE TAMBIÉN" .BR inet_pton (3) .SH FALLOS .B AF_INET6 convierte direcciones IPv4 traducidas a IPv6 a un formato IPv6.