.\" -*- coding: UTF-8 -*- .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" .\" Updated with additions from Mitchum DSouza .\" Portions Copyright 1993 Mitchum DSouza .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\" .\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH GETHOSTID 3 "15 septembre 2017" Linux "Manuel du programmeur Linux" .SH NOM gethostid, sethostid \- Lire/écrire l'identifiant unique de l'hôte .SH SYNOPSIS \fB#include \fP .PP \fBlong gethostid(void);\fP .br \fBint sethostid(long \fP\fIhostid\fP\fB);\fP .PP .RS -4 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7))\ : .RE .PP .ad l \fBgethostid\fP()\ : .RS 4 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 .RE \fBsethostid\fP()\ : .nf .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 Depuis la glibc 2.21 : _DEFAULT_SOURCE Pour la glibc 2.19 et 2.20 : _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) Pour la glibc antérieure et égale à 2.19 : _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .fi .ad b .SH DESCRIPTION \fBgethostid\fP() and \fBsethostid\fP() respectively get or set a unique 32\-bit identifier for the current machine. The 32\-bit identifier was intended to be unique among all UNIX systems in existence. This normally resembles the Internet address for the local machine, as returned by \fBgethostbyname\fP(3), and thus usually never needs to be set. .PP L'appel de \fBsethostid\fP() est bien sûr limité au superutilisateur. .SH "VALEUR RENVOYÉE" \fBgethostid\fP() retourne l'identifiant sur 32 bits de l'hôte, tel qu'il a été positionné par \fBsethostid\fP(). .PP Si elle réussit, \fBsethostid\fP() renvoie 0. En cas d'erreur, elle renvoie \-1 et remplit \fIerrno\fP en conséquence. .SH ERREURS \fBsethostid\fP() peut échouer pour les raisons suivantes\ : .TP \fBEACCES\fP L'appelant n'a pas les permissions d'écrire dans le fichier utilisé pour sauvegarder l'ID de l'hôte. .TP \fBEPERM\fP L'ID de l'utilisateur ou du groupe effectif du processus appelant ne correspond pas à l'ID réel. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lbw25 l l l. Interface Attribut Valeur T{ \fBgethostid\fP() T} Sécurité des threads MT\-Safe hostid env locale T{ \fBsethostid\fP() T} Sécurité des threads MT\-Unsafe const:hostid .TE .sp 1 .SH CONFORMITÉ 4.2BSD; these functions were dropped in 4.4BSD. SVr4 includes \fBgethostid\fP() but not \fBsethostid\fP(). .PP POSIX.1\-2001 and POSIX.1\-2008 specify \fBgethostid\fP() but not \fBsethostid\fP(). .SH NOTES .\" libc5 used /etc/hostid; libc4 didn't have these functions Dans l'implémentation de la glibc, \fIhostid\fP est sauvegardé dans le fichier \fI/etc/hostid\fP (pour les versions antérieures à la glibc\ 2.2, \fI/var/adm/hostid\fP était utilisé). .PP Dans l'implémentation de la glibc, si \fBgethostid\fP() ne peut pas ouvrir le fichier contenant l'ID de l'hôte, alors elle obtient le nom d'hôte avec \fBgethostname\fP(2), passe ce nom d'hôte à \fBgethostbyname_r\fP(3) de façon à obtenir l'adresse IPv4 de l'hôte, et renvoie l'adresse IPv4 modifée par manipulation de bits («\ bit\-twilling\ ») (cette valeur peut ne pas être unique). .SH BOGUES Il est impossible de s'assurer que l'identifiant est globalement unique. .SH "VOIR AUSSI" \fBhostid\fP(1), \fBgethostbyname\fP(3). .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier et David Prévot . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .