'\" te .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. .TH SLPUnescape 3SLP "16 Jan 2003" "SunOS 5.11" "Service Location Protocol Library Functions" .SH NAME SLPUnescape \- translate escaped characters into UTF-8 .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lslp\fR [ \fIlibrary\fR... ] #include \fBSLPError\fR \fBSLPUnescape\fR(\fBconst char *\fR\fIpcInBuf\fR, \fBchar**\fR \fIppcOutBuf\fR, \fBSLPBoolean\fR \fIisTag\fR); .fi .SH DESCRIPTION .sp .LP The \fBSLPUnescape()\fR function processes the input string in \fIpcInbuf\fR and unescapes any \fBSLP\fR reserved characters. If the \fIisTag\fR parameter is \fBSLPTrue\fR, then look for bad tag characters and signal an error if any are found with the \fBSLP_PARSE_ERROR\fR code. No transformation is performed if the input string is an opaque. The results are put into a buffer allocated by the \fBAPI\fR library and returned in the \fIppcOutBuf\fR parameter. This buffer should be deallocated using \fBSLPFree\fR(3SLP) when the memory is no longer needed. .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIpcInBuf\fR\fR .ad .RS 13n .rt Pointer to the input buffer to process for escape characters. .RE .sp .ne 2 .mk .na \fB\fIppcOutBuf\fR\fR .ad .RS 13n .rt Pointer to a pointer for the output buffer with the \fBSLP\fR reserved characters escaped. Must be freed using \fBSLPFree\fR(3SLP) when the memory is no longer needed. .RE .sp .ne 2 .mk .na \fB\fIisTag\fR\fR .ad .RS 13n .rt When true, the input buffer is checked for bad tag characters. .RE .SH ERRORS .sp .LP This function or its callback may return any \fBSLP\fR error code. See the ERRORS section in \fBslp_api\fR(3SLP). .SH EXAMPLES .LP \fBExample 1 \fRUsing \fBSLPUnescape()\fR .sp .LP The following example decodes the representation for \fB",tag,"\fR: .sp .in +2 .nf char* pcOutBuf; SLPError err; err = SLPUnescape("\e\e2c tag\e\e2c", &pcOutbuf, SLP_TRUE); .fi .in -2 .SH ENVIRONMENT VARIABLES .sp .ne 2 .mk .na \fB\fBSLP_CONF_FILE\fR\fR .ad .RS 17n .rt When set, use this file for configuration. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilityservice/network/slp .TE .SH SEE ALSO .sp .LP \fBslpd\fR(1M),\fBSLPFree\fR(3SLP), \fBslp_api\fR(3SLP), \fBslp.conf\fR(4), \fBslpd.reg\fR(4), \fBattributes\fR(5) .sp .LP \fIManaging Service Location Protocol Services in Oracle Solaris 11.3\fR .sp .LP Guttman, E., Perkins, C., Veizades, J., and Day, M.\fIRFC 2608, Service Location Protocol, Version 2\fR. The Internet Society. June 1999. .sp .LP Kempf, J. and Guttman, E. \fIRFC 2614, An API for Service Location\fR. The Internet Society. June 1999.