]> arthur.barton.de Git - netatalk.git/blob - man/man3/nbp_name.3
Compile afppasswd only if USE_DHX is turned on.
[netatalk.git] / man / man3 / nbp_name.3
1 .TH NBP_NAME 3 "12 Jan 1994" "netatalk 1.3"
2 .SH NAME
3 nbp_name \- NBP name parsing
4 .SH SYNOPSIS
5 .nf
6 nbp_name( name, obj, type, zone )
7 char *name, **obj, **type, **zone;
8 .fi
9 .SH DESCRIPTION
10 .B nbp_name()
11 parses user supplied names into their component object, type, and
12 zone.
13 .BR obj ,
14 .BR type ,
15 and
16 .B zone
17 should be passed by reference, and should point to the caller's default
18 values.
19 .B nbp_name()
20 will change the pointers to the parsed-out values.
21 .B name
22 is of the form
23 .IB object : \c
24 .IB type @ \c
25 .IR zone ,
26 where each of
27 .IR object ,
28 .BI : type ,
29 and
30 .BI @ zone
31 replace
32 .BR obj ,
33 .BR type ,
34 and
35 .BR zone,
36 respectively.
37 .I type
38 must be proceeded by
39 .RB ` : ',
40 and
41 .I zone
42 must be preceded by
43 .RB ` @ '.
44 .SH EXAMPLE
45 The argument of
46 .BR afpd (8)'s
47 .B -n
48 option is parsed with
49 .BR nbp_name() .
50 The default value of
51 .B obj
52 is the first component of the machine's hostname (as returned by
53 .BR gethostbyname (3)).
54 The default value of
55 .B type
56 is ``AFPServer'', and of
57 .B zone
58 is ``*'', the default zone.  To cause
59 .B afpd
60 to register itself in some zone other than the default, one would
61 invoke it as
62 .sp
63 .RS
64 .nf
65 afpd -n @some-other-zone
66 .fi
67 .RE
68 .sp
69 .B obj
70 and
71 .B type
72 would retain their default values.
73 .SH BUGS
74 .BR obj ,
75 .BR type ,
76 and
77 .B zone
78 return pointers into static area which may be over-written on each
79 call.