SLPFindAttrs.c revision 2
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 packer and unpacker for DA and SA solicitations */ 2N/A /* normal service request */ 2N/A /* format params into msgBuf */ 2N/A /* no more results */ 2N/A /* parse reply into params */ 2N/A /* internal errors should have been filtered out by the net code */ 2N/A /* number of attr auths */ 2N/A /* get and verify auth blocks */ 2N/A /* async: invoke cb */ 2N/A /* check maxResults */ 2N/A * unpackDAAdvert_attr follows the same logic stream as UnpackAttrReply, 2N/A * except that reply contains a DAAdvert. 2N/A /* no more results */ 2N/A /* async: invoke cb */ 2N/A /* check maxResults */ 2N/A * unpackSAAdvert_attr follows the same logic stream as UnpackAttrReply, 2N/A * except that reply contains an SAAdvert. 2N/A /* no more results */ 2N/A /* async: invoke cb */ 2N/A /* check maxResults */ 2N/A * Allocate iovec for the messge. An AttrRqst is layed out thus: 2N/A * 2: prlist (filled in later by networking code) 2N/A * 5: scopes (filled in later by networking code) 2N/A * 6: tag list 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 URL string */ 2N/A 2;
/* No SPI string for internal calls */ 2N/A return;
/* skip bad attr list */ 2N/A /* not found; populate new attr node */ 2N/A /* form of (tag=val,val) */ 2N/A return;
/* skip bad attr */ 2N/A /* create a new node with the tag only */ 2N/A /* already in the tree, so just free resources */ 2N/A /* no values, so no parens */ 2N/A /* build attr string */