diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/net/ethers.3 | 34 |
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 |
| 29 | Ethernet addresses are represented by the | 29 | Ethernet addresses are represented by the |
| 30 | following structure: | 30 | following structure: |
| 31 | .Bd -literal -offset indent | 31 | .Bd -literal -offset indent |
| 32 | struct ether_addr { | 32 | struct ether_addr { |
| @@ -36,13 +36,18 @@ struct ether_addr { | |||
| 36 | .Pp | 36 | .Pp |
| 37 | The | 37 | The |
| 38 | .Fn ether_ntoa | 38 | .Fn ether_ntoa |
| 39 | function converts this structure into an ASCII string of the form | 39 | function converts this structure into an |
| 40 | ``xx:xx:xx:xx:xx:xx'', consisting of 6 hexadecimal numbers separated | 40 | .Tn ASCII |
| 41 | string of the form | ||
| 42 | .Dq xx:xx:xx:xx:xx:xx , | ||
| 43 | consisting of 6 hexadecimal numbers separated | ||
| 41 | by colons. It returns a pointer to a static buffer that is reused for | 44 | by colons. It returns a pointer to a static buffer that is reused for |
| 42 | each call. | 45 | each call. |
| 43 | The | 46 | The |
| 44 | .Fn ether_aton | 47 | .Fn ether_aton |
| 45 | converts an ASCII string of the same form and to a structure | 48 | converts an |
| 49 | .Tn ASCII | ||
| 50 | string of the same form and to a structure | ||
| 46 | containing the 6 octets of the address. It returns a pointer to a | 51 | containing the 6 octets of the address. It returns a pointer to a |
| 47 | static structure that is reused for each call. | 52 | static structure that is reused for each call. |
| 48 | .Pp | 53 | .Pp |
| @@ -57,17 +62,19 @@ The | |||
| 57 | .Fn ether_ntohost | 62 | .Fn ether_ntohost |
| 58 | function looks up the given Ethernet address and writes the associated | 63 | function looks up the given Ethernet address and writes the associated |
| 59 | host name into the character buffer passed. This buffer should be | 64 | host name into the character buffer passed. This buffer should be |
| 60 | .Ev MAXHOSTNAMELEN | 65 | .Dv MAXHOSTNAMELEN |
| 61 | characters in size. | 66 | characters in size. |
| 62 | The | 67 | The |
| 63 | .Fn ether_hostton | 68 | .Fn ether_hostton |
| 64 | function looks up the given host name and writes the associated | 69 | function looks up the given host name and writes the associated |
| 65 | Ethernet address into the structure passed. Both functions return | 70 | Ethernet address into the structure passed. Both functions return |
| 66 | zero if they find the requested host name or address, and -1 if not. | 71 | zero if they find the requested host name or address, and \-1 if not. |
| 67 | .Pp | 72 | .Pp |
| 68 | Each call reads | 73 | Each call reads |
| 69 | .Pa /etc/ethers | 74 | .Pa /etc/ethers |
| 70 | from the beginning; if a + appears alone on a line in the file, then | 75 | from the beginning; if a |
| 76 | .Ql + | ||
| 77 | appears alone on a line in the file, then | ||
| 71 | .Fn ether_hostton | 78 | .Fn ether_hostton |
| 72 | will consult the | 79 | will consult the |
| 73 | .Pa ethers.byname | 80 | .Pa ethers.byname |
| @@ -81,11 +88,12 @@ The | |||
| 81 | .Fn ether_line | 88 | .Fn ether_line |
| 82 | function parses a line from the | 89 | function parses a line from the |
| 83 | .Pa /etc/ethers | 90 | .Pa /etc/ethers |
| 84 | file and fills in the passed ``struct ether_addr'' and character | 91 | file and fills in the passed |
| 85 | buffer with the Ethernet address and host name on the line. It | 92 | .Li struct ether_addr |
| 86 | returns zero if the line was successfully parsed and -1 if not. | 93 | and character buffer with the Ethernet address and host name on the line. It |
| 94 | returns zero if the line was successfully parsed and \-1 if not. | ||
| 87 | The character buffer should be | 95 | The character buffer should be |
| 88 | .Ev MAXHOSTNAMELEN | 96 | .Dv MAXHOSTNAMELEN |
| 89 | characters in size. | 97 | characters in size. |
| 90 | .Sh FILES | 98 | .Sh FILES |
| 91 | .Bl -tag -width /etc/ethers -compact | 99 | .Bl -tag -width /etc/ethers -compact |
