File: nbp_name.3

package info (click to toggle)
netatalk 2.0.3-11%2Blenny1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,428 kB
  • ctags: 6,161
  • sloc: ansic: 67,633; sh: 8,393; perl: 1,187; makefile: 1,060
file content (40 lines) | stat: -rw-r--r-- 1,375 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.TH nbp_name 3 "12 Jan 1994" 2.0.3 Netatalk 
.SH NAME
nbp_name \- NBP name parsing
.SH SYNOPSIS
int \fInbp_name\fR(char *\fIname\fR, char **\fIobj\fR, char **\fItype\fR, char **\fIzone\fR);
.SH DESCRIPTION
nbp_name() parses user supplied names into
their component object, type, and zone. \fIobj\fR,
\fItype\fR, and zone
should be passed by reference, and should point to the caller's
default values. nbp_name() will change the pointers
to the parsed\-out values. \fIname\fR is of the
form \fIobject\fR\fI:\fR\fI\fR\fItype\fR\fI@\fR\fI\fRzone, where each of \fIobject\fR,
\fI:\fR\fItype\fR\fI,\fR and \fI@\fRzone replace \fIobj\fR,
\fItype\fR, and \fIzone,\fR
respectively. \fItype\fR must be proceeded by `\fI:\fR', and zone
must be preceded by `\fI@\fR'.
.SH EXAMPLE
The argument of \fBafpd\fR(8)'s
\fB\-n\fR option is parsed with nbp_name().
The default value of \fIobj\fR is the first
component of the machine's hostname (as returned by
\fBgethostbyname\fR(3)).
The default value of \fItype\fR is
``AFPServer'', and of zone is
``*'', the default zone. To cause \fIafpd\fR
to register itself in some zone other than the default, one would invoke
it as
.PP
.nf
afpd \-n @some\-other\-zone
.fi
.PP
\fIobj\fR and \fItype\fR
would retain their default values.
.SH BUGS
\fIobj\fR, \fItype\fR,
and zone return pointers into static
area which may be over\-written on each call.