1SLPEscape(3SLP) Service Location Protocol Library Functions SLPEscape(3SLP)
2
3
4
6 SLPEscape - escapes SLP reserved characters
7
9 cc [ flag... ] file... -lslp [ library... ]
10 #include <slp.h>
11
12 SLPError SLPEscape(const char *pcInBuf, char** ppcOutBuf,
13 SLPBoolean isTag);
14
15
17 The SLPEscape() function processes the input string in pcInbuf and
18 escapes any SLP reserved characters. If the isTag parameter is SLP‐
19 True, it then looks for bad tag characters and signals an error if any
20 are found by returning the SLP_PARSE_ERROR code. The results are put
21 into a buffer allocated by the API library and returned in the ppcOut‐
22 Buf parameter. This buffer should be deallocated using SLPFree(3SLP)
23 when the memory is no longer needed.
24
26 pcInBuf Pointer to the input buffer to process for escape charac‐
27 ters.
28
29
30 ppcOutBuf Pointer to a pointer for the output buffer with the SLP
31 reserved characters escaped. It must be freed using
32 SLPFree() when the memory is no longer needed.
33
34
35 isTag When true, checks the input buffer for bad tag characters.
36
37
39 This function or its callback may return any SLP error code. See the
40 ERRORS section in slp_api(3SLP).
41
43 Example 1 Converting Attribute Tags
44
45
46 The following example shows how to convert the attribute tag ,tag-exam‐
47 ple, to on the wire format:
48
49
50 SLPError err;
51 char* escaped Chars;
52
53 err = SLPEscape(",tag-example,", &escapedChars, SLP_TRUE);
54
55
57 SLP_CONF_FILE When set, use this file for configuration.
58
59
61 See attributes(5) for descriptions of the following attributes:
62
63
64
65
66 ┌─────────────────────────────┬─────────────────────────────┐
67 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
68 ├─────────────────────────────┼─────────────────────────────┤
69 │Availability │SUNWslpu │
70 └─────────────────────────────┴─────────────────────────────┘
71
73 slpd(1M), slp_api(3SLP), SLPFree(3SLP), slp.conf(4), slpd.reg(4),
74 attributes(5)
75
76
77 System Administration Guide: Network Services
78
79
80 Guttman, E., Perkins, C., Veizades, J., and Day, M. RFC 2608, Service
81 Location Protocol, Version 2. The Internet Society. June 1999.
82
83
84 Kempf, J. and Guttman, E. RFC 2614, An API for Service Location. The
85 Internet Society. June 1999.
86
87
88
89SunOS 5.11 16 Jan 2003 SLPEscape(3SLP)