Commit | Line | Data |
---|---|---|
8bb980a3 C |
1 | LINK_ADDR(3) BSD Programmer's Manual LINK_ADDR(3) |
2 | ||
3 | N\bNA\bAM\bME\bE | |
4 | l\bli\bin\bnk\bk_\b_a\bad\bdd\bdr\br, l\bli\bin\bnk\bk_\b_n\bnt\bto\boa\ba - elementary address specification routines for link | |
5 | level access | |
6 | ||
7 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
8 | #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/t\bty\byp\bpe\bes\bs.\b.h\bh>\b> | |
9 | #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsy\bys\bs/\b/s\bso\boc\bck\bke\bet\bt.\b.h\bh>\b> | |
10 | #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<n\bne\bet\bt/\b/i\bif\bf_\b_d\bdl\bl.\b.h\bh>\b> | |
11 | ||
12 | _\bv_\bo_\bi_\bd | |
13 | l\bli\bin\bnk\bk_\b_a\bad\bdd\bdr\br(_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\ba_\bd_\bd_\br, _\bs_\bt_\br_\bu_\bc_\bt _\bs_\bo_\bc_\bk_\ba_\bd_\bd_\br_\b__\bd_\bl _\b*_\bs_\bd_\bl); | |
14 | ||
15 | _\bc_\bh_\ba_\br _\b* | |
16 | l\bli\bin\bnk\bk_\b_n\bnt\bto\boa\ba(_\bc_\bo_\bn_\bs_\bt _\bs_\bt_\br_\bu_\bc_\bt _\bs_\bo_\bc_\bk_\ba_\bd_\bd_\br_\b__\bd_\bl _\b*_\bs_\bd_\bl); | |
17 | ||
18 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
19 | The routine l\bli\bin\bnk\bk_\b_a\bad\bdd\bdr\br() interprets character strings representing link- | |
20 | level addresses, returning binary information suitable for use in system | |
21 | calls. The routine l\bli\bin\bnk\bk_\b_n\bnt\bto\boa\ba() takes a link-level address and returns an | |
22 | ASCII string representing some of the information present, including the | |
23 | link level address itself, and the interface name or number, if present. | |
24 | This facility is experimental and is still subject to change. | |
25 | ||
26 | For l\bli\bin\bnk\bk_\b_a\bad\bdd\bdr\br(), the string _\ba_\bd_\bd_\br may contain an optional network inter- | |
27 | face identifier of the form ``name unit-number'', suitable for the first | |
28 | argument to ifconfig(4), followed in all cases by a colon and an inter- | |
29 | face address in the form of groups of hexadecimal digits separated by pe- | |
30 | riods. Each group represents a byte of address; address bytes are filled | |
31 | left to right from low order bytes through high order bytes. | |
32 | ||
33 | Thus le0:8.0.9.13.d.30 represents an ethernet address to be transmitted | |
34 | on the first Lance ethernet interface. | |
35 | ||
36 | R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bES\bS | |
37 | l\bli\bin\bnk\bk_\b_n\bnt\bto\boa\ba() always returns a null terminated string. l\bli\bin\bnk\bk_\b_a\bad\bdd\bdr\br() has no | |
38 | return value. (See _\bB_\bU_\bG_\bS.) | |
39 | ||
40 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
41 | iso(4), | |
42 | ||
43 | H\bHI\bIS\bST\bTO\bOR\bRY\bY | |
44 | The l\bli\bin\bnk\bk_\b_a\bad\bdd\bdr\br() and l\bli\bin\bnk\bk_\b_n\bnt\bto\boa\ba() functions appeared in 4.3BSD-Reno. | |
45 | ||
46 | B\bBU\bUG\bGS\bS | |
47 | The returned values for link_ntoa reside in a static memory area. | |
48 | ||
49 | The function l\bli\bin\bnk\bk_\b_a\bad\bdd\bdr\br() should diagnose improperly formed input, and | |
50 | there should be an unambiguous way to recognize this. | |
51 | ||
52 | If the _\bs_\bd_\bl_\b__\bl_\be_\bn field of the link socket address _\bs_\bd_\bl is 0, l\bli\bin\bnk\bk_\b_n\bnt\bto\boa\ba() | |
53 | will not insert a colon before the interface address bytes. If this | |
54 | translated address is given to l\bli\bin\bnk\bk_\b_a\bad\bdd\bdr\br() without inserting an initial | |
55 | colon, the latter will not interpret it correctly. | |
56 | ||
57 | 4.4BSD June 4, 1993 1 |