~ubuntu-branches/debian/lenny/netatalk/lenny

« back to all changes in this revision

Viewing changes to man/man3/nbp_name.3

  • Committer: Bazaar Package Importer
  • Author(s): Ante Karamatic
  • Date: 2005-10-07 13:46:11 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051007134611-r07qa2g67xwkp2if
Tags: 2.0.3-1ubuntu1
* debian/netatalk.init
  - run cnid_metad if CNID_METAD_RUN=yes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH NBP_NAME 3 "12 Jan 1994" "netatalk 1.3"
 
1
.TH nbp_name 3 "12 Jan 1994" 2.0.3 Netatalk 
2
2
.SH NAME
3
3
nbp_name \- NBP name parsing
4
4
.SH SYNOPSIS
5
 
.nf
6
 
nbp_name( name, obj, type, zone )
7
 
char *name, **obj, **type, **zone;
8
 
.fi
 
5
int \fInbp_name\fR(char *\fIname\fR, char **\fIobj\fR, char **\fItype\fR, char **\fIzone\fR);
9
6
.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 ` @ '.
 
7
nbp_name() parses user supplied names into
 
8
their component object, type, and zone. \fIobj\fR,
 
9
\fItype\fR, and zone
 
10
should be passed by reference, and should point to the caller's
 
11
default values. nbp_name() will change the pointers
 
12
to the parsed\-out values. \fIname\fR is of the
 
13
form \fIobject\fR\fI:\fR\fI\fR\fItype\fR\fI@\fR\fI\fRzone, where each of \fIobject\fR,
 
14
\fI:\fR\fItype\fR\fI,\fR and \fI@\fRzone replace \fIobj\fR,
 
15
\fItype\fR, and \fIzone,\fR
 
16
respectively. \fItype\fR must be proceeded by `\fI:\fR', and zone
 
17
must be preceded by `\fI@\fR'.
44
18
.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
 
19
The argument of \fBafpd\fR(8)'s
 
20
\fB\-n\fR option is parsed with nbp_name().
 
21
The default value of \fIobj\fR is the first
 
22
component of the machine's hostname (as returned by
 
23
\fBgethostbyname\fR(3)).
 
24
The default value of \fItype\fR is
 
25
``AFPServer'', and of zone is
 
26
``*'', the default zone. To cause \fIafpd\fR
 
27
to register itself in some zone other than the default, one would invoke
 
28
it as
 
29
.PP
64
30
.nf
65
 
afpd -n @some-other-zone
 
31
afpd \-n @some\-other\-zone
66
32
.fi
67
 
.RE
68
 
.sp
69
 
.B obj
70
 
and
71
 
.B type
 
33
.PP
 
34
\fIobj\fR and \fItype\fR
72
35
would retain their default values.
73
36
.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.
 
37
\fIobj\fR, \fItype\fR,
 
38
and zone return pointers into static
 
39
area which may be over\-written on each call.
 
40