diff options
author | mpi <> | 2015-09-10 08:55:03 +0000 |
---|---|---|
committer | mpi <> | 2015-09-10 08:55:03 +0000 |
commit | f4a4d0ccce6152a6e48d345c33b3db9dbdaad529 (patch) | |
tree | ea9141da77f5fe91ab8c243446511127e8420f6b /src/lib/libc/net/link_addr.3 | |
parent | a57a02cff3b4a8e50efcf63a01ff0b7176072766 (diff) | |
download | openbsd-f4a4d0ccce6152a6e48d345c33b3db9dbdaad529.tar.gz openbsd-f4a4d0ccce6152a6e48d345c33b3db9dbdaad529.tar.bz2 openbsd-f4a4d0ccce6152a6e48d345c33b3db9dbdaad529.zip |
Remove link_addr(3). A function to encode the name of an interface in
a sockaddr_dl is a questionnable interface. But now it makes it harder
to properly reference ifp becauses of this.
Set sdl_index to the index of the corresponding interface when
constructing a routing message.
Ridding previous libc crank.
ok guenther@, deraadt@, dlg@
Diffstat (limited to 'src/lib/libc/net/link_addr.3')
-rw-r--r-- | src/lib/libc/net/link_addr.3 | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/src/lib/libc/net/link_addr.3 b/src/lib/libc/net/link_addr.3 deleted file mode 100644 index f234fe84cc..0000000000 --- a/src/lib/libc/net/link_addr.3 +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | .\" $OpenBSD: link_addr.3,v 1.13 2013/06/05 03:39:23 tedu Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 1993 | ||
4 | .\" The Regents of the University of California. All rights reserved. | ||
5 | .\" | ||
6 | .\" This code is derived from software contributed to Berkeley by | ||
7 | .\" Donn Seeley at BSDI. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in the | ||
16 | .\" documentation and/or other materials provided with the distribution. | ||
17 | .\" 3. Neither the name of the University nor the names of its contributors | ||
18 | .\" may be used to endorse or promote products derived from this software | ||
19 | .\" without specific prior written permission. | ||
20 | .\" | ||
21 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
22 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
23 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
24 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
25 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
26 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
27 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
28 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
29 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
30 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
31 | .\" SUCH DAMAGE. | ||
32 | .\" | ||
33 | .Dd $Mdocdate: June 5 2013 $ | ||
34 | .Dt LINK_ADDR 3 | ||
35 | .Os | ||
36 | .Sh NAME | ||
37 | .Nm link_addr , | ||
38 | .Nm link_ntoa | ||
39 | .Nd elementary address specification routines for link level access | ||
40 | .Sh SYNOPSIS | ||
41 | .In sys/types.h | ||
42 | .In sys/socket.h | ||
43 | .In net/if_dl.h | ||
44 | .Ft void | ||
45 | .Fn link_addr "const char *addr" "struct sockaddr_dl *sdl" | ||
46 | .Ft char * | ||
47 | .Fn link_ntoa "const struct sockaddr_dl *sdl" | ||
48 | .Sh DESCRIPTION | ||
49 | The | ||
50 | .Fn link_addr | ||
51 | function interprets character strings representing | ||
52 | link-level addresses, returning binary information suitable | ||
53 | for use in system calls. | ||
54 | .Fn link_ntoa | ||
55 | takes | ||
56 | a link-level | ||
57 | address and returns an | ||
58 | .Tn ASCII | ||
59 | string representing some of the information present, | ||
60 | including the link level address itself, and the interface name | ||
61 | or number, if present. | ||
62 | This facility is experimental and is | ||
63 | still subject to change. | ||
64 | .Pp | ||
65 | For | ||
66 | .Fn link_addr , | ||
67 | the string | ||
68 | .Fa addr | ||
69 | may contain | ||
70 | an optional network interface identifier of the form | ||
71 | .Dq name unit-number , | ||
72 | suitable for the first argument to | ||
73 | .Xr ifconfig 8 , | ||
74 | followed in all cases by a colon and | ||
75 | an interface address in the form of | ||
76 | groups of hexadecimal digits | ||
77 | separated by periods. | ||
78 | Each group represents a byte of address; | ||
79 | address bytes are filled left to right from | ||
80 | low order bytes through high order bytes. | ||
81 | .Pp | ||
82 | .\" A regular expression may make this format clearer: | ||
83 | .\" .Bd -literal -offset indent | ||
84 | .\" ([a-z]+[0-9]+:)?[0-9a-f]+(\e.[0-9a-f]+)* | ||
85 | .\" .Ed | ||
86 | .\" .Pp | ||
87 | Thus | ||
88 | .Li le0:8.0.9.13.d.30 | ||
89 | represents an Ethernet address | ||
90 | to be transmitted on the first Lance Ethernet interface. | ||
91 | .Sh RETURN VALUES | ||
92 | .Fn link_ntoa | ||
93 | always returns a NUL-terminated string. | ||
94 | .Fn link_addr | ||
95 | has no return value. | ||
96 | (See | ||
97 | .Sx BUGS . ) | ||
98 | .Sh SEE ALSO | ||
99 | .Xr ifconfig 8 | ||
100 | .Sh HISTORY | ||
101 | The | ||
102 | .Fn link_addr | ||
103 | and | ||
104 | .Fn link_ntoa | ||
105 | functions appeared in | ||
106 | .Bx 4.3 Reno . | ||
107 | .Sh BUGS | ||
108 | The returned values for | ||
109 | .Fn link_ntoa | ||
110 | reside in a static memory area. | ||
111 | .Pp | ||
112 | The function | ||
113 | .Fn link_addr | ||
114 | should diagnose improperly formed input, and there should be an unambiguous | ||
115 | way to recognize this. | ||
116 | .Pp | ||
117 | If the | ||
118 | .Fa sdl_len | ||
119 | field of the link socket address | ||
120 | .Fa sdl | ||
121 | is 0, | ||
122 | .Fn link_ntoa | ||
123 | will not insert a colon before the interface address bytes. | ||
124 | If this translated address is given to | ||
125 | .Fn link_addr | ||
126 | without inserting an initial colon, | ||
127 | the latter will not interpret it correctly. | ||