2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A * Public utilities and convenience calls (from the API spec): 2N/A * SLPFindScopes (queries for all known scopes) 2N/A * SLPEscape / Unescape 2N/A * Finds scopes according the the user administrative model. 2N/A /* first try administratively configured scopes */ 2N/A /* DAs from active and passive discovery */ 2N/A /* Unpack the reply */ 2N/A /* tag call as internal */ 2N/A /* invoke last call */ 2N/A /* revert internal call tag */ 2N/A /* Finally, if no results yet, try SA discovery */ 2N/A /* found none, so just return "default" */ 2N/A /* we now have a btree, each leaf of which is a unique scope */ 2N/A /* unescape scopes list */ 2N/A * Finds scopes according to the adminstrative scoping model. A 2N/A * comma-separated list of scopes is returned in *ppcScopes; the 2N/A * caller must free *ppcScopes. 2N/A * If the return_default parameter is true, and no scopes are found, 2N/A * *ppcScopes will be set to 'default', otherwise, *ppcScopes will 2N/A * be NULL. This helps simplify internal memory management. 2N/A /* @@@ first try DHCP */ 2N/A /* next try the useScopes property */ 2N/A /* found none, so just return "default" */ 2N/A * This function operates on the same btree as the collate_scopes(). 2N/A * The difference is that this one is called for each 2N/A * SAAdvert recieved. 2N/A /* scope is already in there, so just free ascope */ 2N/A * Generates an SAAdvert solicitation, and returns any scopes found 2N/A * from all recieved SAAdverts in stree. stree must be a btree 2N/A /* get type hint, if set */ 2N/A /* No callback for SLPFindScopes, so force synchronous mode only */ 2N/A /* restore sync state */ 2N/A * Unpack an SAAdvert and pass each set of scopes into cb. 2N/A /* tag call as internal; gets all scopes, regardless of maxResults */ 2N/A /* revert internal_call tag */ 2N/A * Creates a service request for finding DAs or SAs (based on 'filter'), 2N/A * and sends it to slpd, returning the reply in 'reply'. 2N/A /* Try the cache first */ 2N/A * create a find scopes message: 2N/A /* use the local host's name for the scope */ 2N/A /* Add the reply to the cache */ 2N/A * This is called for each URL entry in the DA service reply (sun private). 2N/A * Contained within the cookie is a btree, to which it adds new 2N/A * scopes from the URL entry. The scopes are retrieved from the btree 2N/A * by traversing the tree in SLPFindScopes(). 2N/A * SLPHandle h is NULL, so don't touch it! 2N/A /* dup url so as not to corrupt da cache */ 2N/A /* parse url into a SLPSrvURL struct */ 2N/A /* collate the scopes using the btree stree->scopes: */ 2N/A /* skip the 'scopes=' part */ 2N/A /* scope is already in there, so just free ascope */ 2N/A * Each time we visit a node for the last time, copy that scope into 2N/A * the scope collection and free the scope string and the node. 2N/A (c) ==
'\n' || (c) ==
'\t' || (c) ==
'\r')
2N/A (c) ==
',' || (c) ==
'\\' || (c) ==
'!' || \
2N/A (c) ==
'<' || (c) ==
'=' || (c) ==
'>' || \
2N/A /* If char is start of multibyte char, just copy it in */ 2N/A /* check for bad tag */ 2N/A * The actual unescaping routine; allows for different escape chars. 2N/A /* If char is start of multibyte char, just copy it in */ 2N/A * All properties are stored in a global tree (prop_table). This 2N/A * tree is created and accessed by slp_tsearch and slp_tfind. 2N/A/* Global properties table */ 2N/A /* place the strings under library ownership */ 2N/A /* is pcName already set? */ 2N/A /* this prop is already set; overwrite the old value */ 2N/A "Language not supported",
/* -1 */ 2N/A "Parse error",
/* -2 */ 2N/A "Invalid registration",
/* -3 */ 2N/A "Scope not supported",
/* -4 */ 2N/A "Invalid error number",
/* -5 */ 2N/A "Authentication absent",
/* -6 */ 2N/A "Authentication failed",
/* -7 */ 2N/A "Invalid error number",
/* -8 */ 2N/A "Invalid error number",
/* -9 */ 2N/A "Invalid error number",
/* -10 */ 2N/A "Invalid error number",
/* -11 */ 2N/A "Invalid error number",
/* -12 */ 2N/A "Invalid update",
/* -13 */ 2N/A "Invalid error number",
/* -14 */ 2N/A "Invalid error number",
/* -15 */ 2N/A "Invalid error number",
/* -16 */ 2N/A "Not implemented",
/* -17 */ 2N/A "Buffer overflow",
/* -18 */ 2N/A "Network timed out",
/* -19 */ 2N/A "Network init failed",
/* -20 */ 2N/A "Memory alloc failed",
/* -21 */ 2N/A "Parameter bad",
/* -22 */ 2N/A "Network error",
/* -23 */ 2N/A "Internal system error",
/* -24 */ 2N/A "Handle in use",
/* -25 */ 2N/A "Type error" /* -26 */ 2N/A str =
"Security Implementation Unavailable";