Bash-Linux.com : Le SHELL pour les nuls

  Actuellement 50 lignes de commande et 1472 man disponibles
login as: root
root@213.186.33.18's password:
Last login: Mon May 28 15:50:29 2012 from 38.107.179.229
[root@bash-linux ~] # echo "Bienvenue sur Bash-Linux.com"_
 Manuel des commandes UNIX (man) Version anglaise

Indiquez la fonction :

Man Freehostent en anglais

GETIPNODEBYNAME(3) Linux Programmer's Manual GETIPNODEBYNAME(3)
 
NAME


getipnodebyname, getipnodebyaddr, freehostent - get network hostnames and addresses
 
SYNOPSIS


#include #include #include struct hostent *getipnodebyname(const char *name, int af, int flags, int *error_num); struct hostent *getipnodebyaddr(const void *addr, size_t len, int af, int *error_num); void freehostent(struct hostent *ip);
 
DESCRIPTION


These functions are deprecated (and unavailable in glibc). Use getad- drinfo(3) and getnameinfo(3) instead. The getipnodebyname() and getipnodebyaddr() functions return the names and addresses of a network host. These functions return a pointer to the following structure: struct hostent { char *h_name; char **h_aliases; int h_addrtype; int h_length; char **h_addr_list; }; These functions replace the gethostbyname(3) and gethostbyaddr(3) func- tions, which could only access the IPv4 network address family. The getipnodebyname() and getipnodebyaddr() functions can access multiple network address families. Unlike the gethostby functions, these functions return pointers to dynamically allocated memory. The freehostent() function is used to release the dynamically allocated memory after the caller no longer needs the hostent structure. getipnodebyname() arguments The getipnodebyname() function looks up network addresses for the host specified by the name argument. The af argument specifies one of the following values: AF_INET The name argument points to a dotted-quad IPv4 address or a name of an IPv4 network host. AF_INET6 The name argument points to a hexadecimal IPv6 address or a name of an IPv6 network host. The flags argument specifies additional options. More than one option can be specified by logically OR-ing them together. flags should be set to 0 if no options are desired. AI_V4MAPPED This flag is used with AF_INET6 to request a query for IPv4 addresses instead of IPv6 addresses; the IPv4 addresses will be mapped to IPv6 addresses. AI_ALL This flag is used with AI_V4MAPPED to request a query for both IPv4 and IPv6 addresses. Any IPv4 address found will be mapped to an IPv6 address. AI_ADDRCONFIG This flag is used with AF_INET6 to further request that queries for IPv6 addresses should not be made unless the system has at least one IPv6 address assigned to a network interface, and that queries for IPv4 addresses should not be made unless the system has at least one IPv4 address assigned to a network interface. This flag may be used by itself or with the AI_V4MAPPED flag. AI_DEFAULT This flag is equivalent to (AI_ADDRCONFIG | AI_V4MAPPED). getipnodebyaddr() arguments The getipnodebyaddr() function looks up the name of the host whose net- work address is specified by the addr argument. The af argument speci- fies one of the following values: AF_INET The addr argument points to a struct in_addr and len must be set to sizeof(struct in_addr). AF_INET6 The addr argument points to a struct in6_addr and len must be set to sizeof(struct in6_addr).
 
RETURN VALUE


A null pointer is returned if an error occurred, and error_num will contain an error code from the following list: HOST_NOT_FOUND The hostname or network address was not found. NO_ADDRESS The domain name server recognized the network address or name, but no answer was returned. This can happen if the network host has only IPv4 addresses and a request has been made for IPv6 information only, or vice versa. NO_RECOVERY The domain name server returned a permanent failure response. TRY_AGAIN The domain name server returned a temporary failure response. You might have better luck next time. A successful query returns a pointer to a hostent structure that con- tains the following fields: h_name This is the official name of this network host. h_aliases This is an array of pointers to unofficial aliases for the same host. The array is terminated by a null pointer. h_addrtype This is a copy of the af argument to getipnodebyname() or getipnodebyaddr(). h_addrtype will always be AF_INET if the af argument was AF_INET. h_addrtype will always be AF_INET6 if the af argument was AF_INET6. h_length This field will be set to sizeof(struct in_addr) if h_addrtype is AF_INET, and to sizeof(struct in6_addr) if h_addrtype is AF_INET6. h_addr_list This is an array of one or more pointers to network address structures for the network host. The array is terminated by a null pointer.
 
CONFORMING TO


RFC 2553.
 
NOTES


These functions were present in glibc 2.1.91-95, but were removed again. Several Unix-like systems support them, but all call them dep- recated.
 
SEE ALSO


getaddrinfo(3), getnameinfo(3), inet_ntop(3), inet_pton(3)
 
COLOPHON


This page is part of release 3.05 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2007-11-15 GETIPNODEBYNAME(3)


 Dernières recherches
Man  en anglais Man freehostent en anglaisMan  en français Man freehostent en français
Man  en anglais Man freeaddrinfo en anglaisMan  en français Man freeaddrinfo en français
Man  en anglais Man filesystems en anglaisMan  en français Man filesystems en français
Man  en anglais Man fileno en anglaisMan  en français Man fileno en français
Man  en anglais Man free_hugepages en anglaisMan  en français Man free_hugepages en français
Man  en anglais Man file en anglaisMan  en français Man file en français
Man  en anglais Man fputws en anglaisMan  en français Man fputws en français
Man  en anglais Man fifo en anglaisMan  en français Man fifo en français
Man  en anglais Man fputwc en anglaisMan  en français Man fputwc en français
Man  en anglais Man fgrep en anglaisMan  en français Man fgrep en français
Man  en anglais Man fputs en anglaisMan  en français Man fputs en français
Man  en anglais Man fputc en anglaisMan  en français Man fputc en français
Man  en anglais Man fgetws en anglaisMan  en français Man fgetws en français
Man  en anglais Man fgetwc en anglaisMan  en français Man fgetwc en français
Man  en anglais Man fpurge en anglaisMan  en français Man fpurge en français

 Recherche

Dans ce moteur de recherche, vous pouvez taper directement votre besoin, en une phrase normale, humaine.
Exemple : vous cherchez comment remplacer un mot par un autre dans tous les fichiers d'un certain dossier. Vous pouvez écrire "Comment remplacer un mot par un autre dans tous les fichiers d'un dossier". Le moteur vous ramenera les résultats en fonction de leur pertinence.
Vous pouvez bien sûr ne chercher qu'un seul mot-clé, par exemple "find".
 Toutes les lignes de code
Par popularité
Par fonction
Recherche avancée
 Les logiciels SHELL/SSH
Putty
Astuces Bash
Faire du SHELL avec PHP!
 La doc officielle
Les man Linux en français
Les man Linux en anglais
 Proposer vos bash
Partagez vos lignes!
 Les requêtes
Déposer une requête
Voir/répondre à une requête
 Quelques sites interessants
Bons sites pour apprendre
 Rechercher