'\" t .\" Title: nbp_name .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 12 Jan 1994 .\" Manual: Netatalk 2.2 .\" Source: Netatalk 2.2 .\" Language: English .\" .TH "NBP_NAME" "3" "12 Jan 1994" "Netatalk 2.2" "Netatalk 2.2" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" nbp_name \- NBP name parsing .SH "SYNOPSIS" .HP \w'int\ nbp_name('u .BI "int nbp_name(char\ *" "name" ", char\ **" "obj" ", char\ **" "type" ", char\ **" "zone" ");" .SH "DESCRIPTION" .PP \fBnbp_name()\fR parses user supplied names into their component object, type, and zone\&. \fBobj\fR, \fBtype\fR, and \fIzone\fR should be passed by reference, and should point to the caller\'s default values\&. \fBnbp_name()\fR will change the pointers to the parsed\-out values\&. \fBname\fR is of the form \fIobject\fR\fB:\fR\fItype\fR\fB@\fR\fIzone\fR, where each of \fIobject\fR, \fB:\fR\fItype\fR\fB,\fR and \fB@\fR\fIzone\fR replace \fBobj\fR, \fBtype\fR, and \fBzone,\fR respectively\&. \fItype\fR must be proceeded by `\fB:\fR\', and \fIzone\fR must be preceded by `\fB@\fR\'\&. .SH "EXAMPLE" .PP The argument of \fBafpd\fR(8)\'s \fB\-n\fR option is parsed with \fBnbp_name()\fR\&. The default value of \fBobj\fR is the first component of the machine\'s hostname (as returned by \fBgethostbyname\fR(3))\&. The default value of \fBtype\fR is ``AFPServer\'\', and of \fIzone\fR is ``*\'\', the default zone\&. To cause \fBafpd\fR to register itself in some zone other than the default, one would invoke it as .sp .if n \{\ .RS 4 .\} .nf afpd \-n @some\-other\-zone .fi .if n \{\ .RE .\} .PP \fBobj\fR and \fBtype\fR would retain their default values\&. .SH "BUGS" .PP \fBobj\fR, \fBtype\fR, and \fIzone\fR return pointers into static area which may be over\-written on each call\&.