Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/ethers.3c
Real path: /usr/share/man/man3c/ethers.3c
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Portions Copyright (c) 2004, 2021, Oracle and/or its affiliates. .TH ethers 3C "2 Feb 2021" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME ethers, ether_ntoa, ether_aton, ether_ntohost, ether_hostton, ether_line \- Ethernet address mapping operations .SH SYNOPSIS .LP .nf #include <sys/types.h> #include <sys/ethernet.h> \fBchar *\fR\fBether_ntoa\fR(\fBconst struct ether_addr *\fR\fIe\fR); .fi .LP .nf \fBstruct ether_addr *\fR\fBether_aton\fR(\fBconst char *\fR\fIs\fR); .fi .LP .nf \fBint\fR \fBether_ntohost\fR(\fBchar *\fR\fIhostname\fR, \fBconst struct ether_addr *\fR\fIe\fR); .fi .LP .nf \fBint\fR \fBether_hostton\fR(\fBconst char *\fR\fIhostname\fR, \fBstruct ether_addr *\fR\fIe\fR); .fi .LP .nf \fBint\fR \fBether_line\fR(\fBconst char *\fR\fIl\fR, \fBstruct ether_addr *\fR\fIe\fR, \fBchar *\fR\fIhostname\fR); .fi .SH DESCRIPTION .sp .LP These routines are useful for mapping 48 bit Ethernet addresses to their \fBASCII\fR representations or their corresponding host names, and vice versa. .sp .LP The function \fBether_ntoa()\fR converts a 48 bit Ethernet address pointed to by \fIe\fR to its standard \fBASCII\fR representation; it returns a pointer to the \fBASCII\fR string. The representation is of the form \fIx\fR\|:\|\fIx\fR\|:\|\fIx\fR\|:\|\fIx\fR\|:\|\fIx\fR\|:\|\fIx\fR where each \fIx\fR is a hexadecimal number between \fB0\fR and \fBff\fR. .sp .LP The function \fBether_aton()\fR converts an \fBASCII\fR string in the standard representation back to a 48 bit Ethernet address; the function returns \fBNULL\fR if the string cannot be scanned successfully. .sp .LP The function \fBether_ntohost()\fR maps an Ethernet address (pointed to by \fIe\fR) to its associated hostname. The string pointed to by hostname must be long enough to hold the hostname and a null character. The function returns zero upon success and non-zero upon failure. Inversely, the function \fBether_hostton()\fR maps a hostname string to its corresponding Ethernet address; the function modifies the Ethernet address pointed to by \fIe\fR. The function also returns zero upon success and non-zero upon failure. In order to do the mapping, both these functions may lookup one or more of the following sources: the ethers file, and the \fBNIS\fR maps \fBethers.byname\fR and \fBethers.byaddr\fR. The sources and their lookup order are specified in the \fBnsswitch.conf\fR(5) configuration. .sp .LP The function \fBether_line()\fR scans a line, pointed to by \fIl\fR, and sets the hostname and the Ethernet address, pointed to by \fIe\fR. The string pointed to by hostname must be long enough to hold the hostname and a null character. The function returns zero upon success and non-zero upon failure. The format of the scanned line is described by \fBethers\fR(5). .SH USAGE .sp .LP Few systems other than boot servers have other machines listed in their \fBethers\fR file, making it unlikely that host names will be able to be retrieved for a given Ethernet address. Most systems instead rely on \fBarp\fR(4P) to map between Ethernet addresses and IP addresses on their local network. .SH FILES .sp .ne 2 .mk .na \fB\fB/etc/ethers\fR\fR .ad .RS 15n .rt Ethernet address to hostname database .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level MT-Safe .TE .sp .SH SEE ALSO .sp .LP \fBarp\fR(4P), \fBethers\fR(5), \fBnsswitch.conf\fR(5), \fBattributes\fR(7) .SH HISTORY .sp .LP These functions have been present since the initial release of Solaris.