summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/ethers.3
diff options
context:
space:
mode:
authoraaron <>1999-07-05 04:41:00 +0000
committeraaron <>1999-07-05 04:41:00 +0000
commitc47037b066169c61c5eefad3368f2da73ca4be54 (patch)
treefa80157fecd0fbb57811f82d8f3ce1366b44a203 /src/lib/libc/net/ethers.3
parent5f78a44df1a8e524a82445f2fedb382128869a2a (diff)
downloadopenbsd-c47037b066169c61c5eefad3368f2da73ca4be54.tar.gz
openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.tar.bz2
openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.zip
repairs; better English, formatting, etc.
Diffstat (limited to 'src/lib/libc/net/ethers.3')
-rw-r--r--src/lib/libc/net/ethers.334
1 files changed, 21 insertions, 13 deletions
diff --git a/src/lib/libc/net/ethers.3 b/src/lib/libc/net/ethers.3
index 74d153fce6..39968f3e65 100644
--- a/src/lib/libc/net/ethers.3
+++ b/src/lib/libc/net/ethers.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ethers.3,v 1.10 1999/03/18 11:09:15 aaron Exp $ 1.\" $OpenBSD: ethers.3,v 1.11 1999/07/05 04:40:59 aaron Exp $
2.\" 2.\"
3.\" Written by roland@frob.com. Public domain. 3.\" Written by roland@frob.com. Public domain.
4.\" 4.\"
@@ -26,7 +26,7 @@
26.Ft int 26.Ft int
27.Fn ether_line "char *l" "struct ether_addr *e" "char *hostname" 27.Fn ether_line "char *l" "struct ether_addr *e" "char *hostname"
28.Sh DESCRIPTION 28.Sh DESCRIPTION
29Ethernet addresses are represented by the 29Ethernet addresses are represented by the
30following structure: 30following structure:
31.Bd -literal -offset indent 31.Bd -literal -offset indent
32struct ether_addr { 32struct ether_addr {
@@ -36,13 +36,18 @@ struct ether_addr {
36.Pp 36.Pp
37The 37The
38.Fn ether_ntoa 38.Fn ether_ntoa
39function converts this structure into an ASCII string of the form 39function converts this structure into an
40``xx:xx:xx:xx:xx:xx'', consisting of 6 hexadecimal numbers separated 40.Tn ASCII
41string of the form
42.Dq xx:xx:xx:xx:xx:xx ,
43consisting of 6 hexadecimal numbers separated
41by colons. It returns a pointer to a static buffer that is reused for 44by colons. It returns a pointer to a static buffer that is reused for
42each call. 45each call.
43The 46The
44.Fn ether_aton 47.Fn ether_aton
45converts an ASCII string of the same form and to a structure 48converts an
49.Tn ASCII
50string of the same form and to a structure
46containing the 6 octets of the address. It returns a pointer to a 51containing the 6 octets of the address. It returns a pointer to a
47static structure that is reused for each call. 52static structure that is reused for each call.
48.Pp 53.Pp
@@ -57,17 +62,19 @@ The
57.Fn ether_ntohost 62.Fn ether_ntohost
58function looks up the given Ethernet address and writes the associated 63function looks up the given Ethernet address and writes the associated
59host name into the character buffer passed. This buffer should be 64host name into the character buffer passed. This buffer should be
60.Ev MAXHOSTNAMELEN 65.Dv MAXHOSTNAMELEN
61characters in size. 66characters in size.
62The 67The
63.Fn ether_hostton 68.Fn ether_hostton
64function looks up the given host name and writes the associated 69function looks up the given host name and writes the associated
65Ethernet address into the structure passed. Both functions return 70Ethernet address into the structure passed. Both functions return
66zero if they find the requested host name or address, and -1 if not. 71zero if they find the requested host name or address, and \-1 if not.
67.Pp 72.Pp
68Each call reads 73Each call reads
69.Pa /etc/ethers 74.Pa /etc/ethers
70from the beginning; if a + appears alone on a line in the file, then 75from the beginning; if a
76.Ql +
77appears alone on a line in the file, then
71.Fn ether_hostton 78.Fn ether_hostton
72will consult the 79will consult the
73.Pa ethers.byname 80.Pa ethers.byname
@@ -81,11 +88,12 @@ The
81.Fn ether_line 88.Fn ether_line
82function parses a line from the 89function parses a line from the
83.Pa /etc/ethers 90.Pa /etc/ethers
84file and fills in the passed ``struct ether_addr'' and character 91file and fills in the passed
85buffer with the Ethernet address and host name on the line. It 92.Li struct ether_addr
86returns zero if the line was successfully parsed and -1 if not. 93and character buffer with the Ethernet address and host name on the line. It
94returns zero if the line was successfully parsed and \-1 if not.
87The character buffer should be 95The character buffer should be
88.Ev MAXHOSTNAMELEN 96.Dv MAXHOSTNAMELEN
89characters in size. 97characters in size.
90.Sh FILES 98.Sh FILES
91.Bl -tag -width /etc/ethers -compact 99.Bl -tag -width /etc/ethers -compact