locking.9: more updates
[dragonfly.git] / share / man / man9 / kether_ntoa.9
1 .\"
2 .\" Copyright (c) 2013 The DragonFly Project.  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 .\"
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in
12 .\"    the documentation and/or other materials provided with the
13 .\"    distribution.
14 .\" 3. Neither the name of The DragonFly Project nor the names of its
15 .\"    contributors may be used to endorse or promote products derived
16 .\"    from this software without specific, prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
22 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
28 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .Dd February 7, 2012
32 .Dt KETHER_NTOA 9
33 .Os
34 .Sh NAME
35 .Nm kether_ntoa ,
36 .Nm kether_aton
37 .Nd ethernet address conversion routines
38 .Sh SYNOPSIS
39 .In net/if_var.h
40 .Ft char *
41 .Fn kether_ntoa "const u_char *addr" "char *buf"
42 .Ft u_char *
43 .Fn kether_aton "const char *macstr" "u_char *addr"
44 .Sh DESCRIPTION
45 The
46 .Fn kether_ntoa
47 function converts the ethernet address specified in
48 .Fa addr
49 to its corresponding hexadecimal ASCII representation.
50 Likewise, the
51 .Fn kether_aton
52 function converts an ASCII
53 string specified in
54 .Fa macstr
55 to an ethernet address.
56 .Pp
57 .Fn kether_ntoa
58 serves a similar purpose as the former, non-standard
59 .Cm D
60 conversion of
61 .Xr kprintf 9
62 (as in,
63 .Dq %6D )
64 which some
65 .Bx Ns s
66 still have.
67 .Pp
68 Notational conventions for hexadecimal ASCII
69 representation of a MAC
70 address are specified in IEEE 802.
71 .Sh RETURN VALUES
72 The
73 .Fn kether_ntoa
74 function returns a pointer to the string containing the hexadecimal ASCII
75 representation of the ethernet address passed in
76 .Fa addr ,
77 or NULL in the case of failure.
78 .Pp
79 The
80 .Fn kether_aton
81 function returns a pointer to a block of bytes containing the conversion
82 of the specified ASCII
83 string in
84 .Fa macstr ,
85 or NULL in the case of failure.
86 .Sh SEE ALSO
87 .Xr ascii 7 ,
88 .Xr hexdump 9 ,
89 .Xr hexncpy 9
90 .Sh HISTORY
91 The
92 .Fn kether_ntoa
93 and
94 .Fn kether_aton
95 functions first appeared in
96 .Dx 3.3 .