.TH NBP_NAME 3 "12 Jan 1994" "netatalk 1.3" .SH NAME nbp_name \- NBP name parsing .SH SYNOPSIS .nf nbp_name( name, obj, type, zone ) char *name, **obj, **type, **zone; .fi .SH DESCRIPTION .B nbp_name() parses user supplied names into their component object, type, and zone. .BR obj , .BR type , and .B zone should be passed by reference, and should point to the caller's default values. .B nbp_name() will change the pointers to the parsed-out values. .B name is of the form .IB object : \c .IB type @ \c .IR zone , where each of .IR object , .BI : type , and .BI @ zone replace .BR obj , .BR type , and .BR zone, respectively. .I type must be proceeded by .RB ` : ', and .I zone must be preceded by .RB ` @ '. .SH EXAMPLE The argument of .BR afpd (8)'s .B -n option is parsed with .BR nbp_name() . The default value of .B obj is the first component of the machine's hostname (as returned by .BR gethostbyname (3)). The default value of .B type is ``AFPServer'', and of .B zone is ``*'', the default zone. To cause .B afpd to register itself in some zone other than the default, one would invoke it as .sp .RS .nf afpd -n @some-other-zone .fi .RE .sp .B obj and .B type would retain their default values. .SH BUGS .BR obj , .BR type , and .B zone return pointers into static area which may be over-written on each call.