1.\" Copyright (c) 1995 2.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 14 unchanged lines hidden (view full) --- 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" |
31.\" $FreeBSD: head/lib/libc/net/ethers.3 57686 2000-03-02 09:14:21Z sheldonh $ |
32.\" 33.Dd April 12, 1995 34.Dt ETHERS 3 35.Os FreeBSD 2.1 36.Sh NAME 37.Nm ethers , 38.Nm ether_line , 39.Nm ether_aton , --- 41 unchanged lines hidden (view full) --- 81an 82.Tn ASCII 83string in 84.Xr ethers 5 85format and sets 86.Ar e 87to the ethernet address specified in the string and 88.Ar h |
89to the hostname. 90This function is used to parse lines from |
91.Pa /etc/ethers 92into their component parts. 93.Pp 94The 95.Fn ether_aton 96function converts an 97.Tn ASCII 98representation of an ethernet address into an 99.Ar ether_addr |
100structure. 101Likewise, |
102.Fn ether_ntoa 103converts an ethernet address specified as an 104.Ar ether_addr 105structure into an 106.Tn ASCII 107string. 108.Pp 109The --- 19 unchanged lines hidden (view full) --- 129.Ar e 130and the hostname in the supplied string 131.Ar h . 132.Pp 133On success, 134.Fn ether_ntoa 135returns a pointer to a string containing an 136.Tn ASCII |
137representation of an ethernet address. 138If it is unable to convert |
139the supplied 140.Ar ether_addr 141structure, it returns a 142.Dv NULL |
143pointer. 144Likewise, |
145.Fn ether_aton 146returns a pointer to an 147.Ar ether_addr 148structure on success and a 149.Dv NULL 150pointer on failure. 151.Pp 152The --- 44 unchanged lines hidden --- |