1SLPUnescape(3SLP) Service Location Protocol Library FunctionsSLPUnescape(3SLP)
2
3
4

NAME

6       SLPUnescape - translate escaped characters into UTF-8
7

SYNOPSIS

9       cc [ flag... ] file... -lslp [ library... ]
10       #include <slp.h>
11
12       SLPError SLPUnescape(const char *pcInBuf, char** ppcOutBuf,
13            SLPBoolean isTag);
14
15

DESCRIPTION

17       The  SLPUnescape()  function  processes the input string in pcInbuf and
18       unescapes any SLP reserved characters.  If the isTag parameter is  SLP‐
19       True,  then  look for bad tag characters and signal an error if any are
20       found with the SLP_PARSE_ERROR code.  No transformation is performed if
21       the input string is an opaque.  The results are put into a buffer allo‐
22       cated by the API library and returned in the ppcOutBuf parameter.  This
23       buffer  should be deallocated using SLPFree(3SLP) when the memory is no
24       longer needed.
25

PARAMETERS

27       pcInBuf      Pointer to the input buffer to process for escape  charac‐
28                    ters.
29
30
31       ppcOutBuf    Pointer  to  a  pointer for the output buffer with the SLP
32                    reserved  characters  escaped.   Must   be   freed   using
33                    SLPFree(3SLP) when the memory is no longer needed.
34
35
36       isTag        When true, the input buffer is checked for bad tag charac‐
37                    ters.
38
39

ERRORS

41       This function or its callback may return any SLP error  code.  See  the
42       ERRORS section in slp_api(3SLP).
43

EXAMPLES

45       Example 1 Using SLPUnescape()
46
47
48       The following example decodes the representation for ",tag,":
49
50
51         char* pcOutBuf;
52         SLPError err;
53
54         err = SLPUnescape("\2c tag\2c", &pcOutbuf, SLP_TRUE);
55
56

ENVIRONMENT VARIABLES

58       SLP_CONF_FILE    When set, use this file for configuration.
59
60

ATTRIBUTES

62       See attributes(5)  for descriptions of the following attributes:
63
64
65
66
67       ┌─────────────────────────────┬─────────────────────────────┐
68       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
69       ├─────────────────────────────┼─────────────────────────────┤
70       │Availability                 │SUNWslpu                     │
71       └─────────────────────────────┴─────────────────────────────┘
72

SEE ALSO

74       slpd(1M),SLPFree(3SLP),    slp_api(3SLP),   slp.conf(4),   slpd.reg(4),
75       attributes(5)
76
77
78       System Administration Guide: Network Services
79
80
81       Guttman, E.,  Perkins, C., Veizades, J., and Day, M.RFC  2608,  Service
82       Location Protocol, Version 2. The Internet Society. June 1999.
83
84
85       Kempf,  J.  and  Guttman, E. RFC 2614, An API for Service Location. The
86       Internet Society. June 1999.
87
88
89
90SunOS 5.11                        16 Jan 2003                SLPUnescape(3SLP)
Impressum