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 2006 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/* netmasks attributes filters */ 2N/A * _nss_ldap_netmasks2str is the data marshaling method for the netmasks 2N/A * getXbyY * (e.g., getnetmaskby[net|addr]()) backend processes. 2N/A * This method is called after a successful ldap search has been performed. 2N/A * This method will parse the ldap search values into the file format. 2N/A * getnetmaskbykey set argp->buf.buffer to NULL and argp->buf.buflen to 0 2N/A * and argp->buf.result to non-NULL. 2N/A * The front end marshaller str2add expects "netmask" only 2N/A /* Add a trailing null for debugging purpose */ 2N/A * getbynet gets a network mask by address. This function constructs an 2N/A * ldap search filter using the netmask name invocation parameter and the 2N/A * getmaskbynet search filter defined. Once the filter is constructed, we 2N/A * search for a matching entry and marshal the data results into struct 2N/A * in_addr for the frontend process. The function _nss_ldap_netmasks2ent 2N/A * performs the data marshaling. 2N/A * _nss_ldap_netmasks_constr is where life begins. This function calls 2N/A * the generic ldap constructor function to define and build the abstract 2N/A * data types required to support ldap operations.