2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 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 2004 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A /* Special unpacker for DA and SA solicitations */ 2N/A /* normal service request */ 2N/A /* no more results */ 2N/A /* traverse_surls:invoke cb for sync case,and free resources */ 2N/A /* internal errors should have been filtered out by the net code */ 2N/A /* url entry count */ 2N/A /* for each srvRply, unpack and pass to CB */ 2N/A /* parse URL entry into params */ 2N/A off++;
/* skip reserved byte */ 2N/A /* URL itself; keep track of it in case we need to verify */ 2N/A /* number of url auths */ 2N/A /* get and verify auth blocks */ 2N/A /* collate the srv urls for sync behavior */ 2N/A /* check maxResults */ 2N/A * unpackDAAdvert_srv follows the same same logic flow as slp_unpackSrvReply 2N/A * with two differences: the message in reply is a DAAdvert, and 2N/A * this function is not used internally, so hp is never NULL. Although 2N/A * all info from a DAAdvert is returned by slp_unpackDAAdvert, here 2N/A * the recipient (the user-supplied SLPSrvURLCallback) is interested 2N/A * only in the DA service URL. 2N/A /* no more results */ 2N/A /* traverse_surls:invoke cb for sync case,and free resources */ 2N/A /* collate the urls */ 2N/A /* check maxResults */ 2N/A * unpackSAAdvert_srv follows the same same logic flow as slp_unpackSrvReply 2N/A * with two differences: the message in reply is a SAAdvert, and 2N/A * this function is not used internally, so hp is never NULL. Although 2N/A * all info from an SAAdvert is returned by slp_unpackSAAdvert, here 2N/A * the recipient (the user-supplied SLPSrvURLCallback) is interested 2N/A * only in the SA service URL. 2N/A /* no more results */ 2N/A /* traverse_surls:invoke cb for sync case,and free resources */ 2N/A /* collate the urls */ 2N/A /* check maxResults */ 2N/A * Allocate iovec for the messge. A SrvRqst is layed out thus: 2N/A * 2: prlist (filled in later by networking code) 2N/A * 3: service type string 2N/A * 5: scopes (filled in later by networking code) 2N/A * 6: predicate string and SPI string 2N/A /* calculate msg length */ 2N/A 2 +
/* scope list length */ 2N/A /* set pointer to PR list and scope list length spaces */ 2N/A /* set up the scopes and prlist pointers into iov */ 2N/A /* Add type string */ 2N/A /* Add search filter */ 2N/A * Caller must free msg 2N/A 2;
/* No SPI string for internal calls */ 2N/A /* empty SPI string */ 2N/A * Using the collator, determine if this URL has already been processed. 2N/A * If so, free surl and return NULL, else return the URL. 2N/A /* first time we've encountered this url */ 2N/A /* else already in tree */