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/* ether attributes filters */ 2N/A * _nss_ldap_ethers2str is the data marshaling method for the ethers 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 * 8:0:20:8e:eb:8a8 borealis 2N/A * The front end marshaller str2ether uses argp->buf.result for a different 2N/A * purpose so a flag be->db_type is set to work around this oddity. 2N/A /* Add a trailing null for easy debug */ 2N/A * getbyhost gets an ethernet address by hostname. This function 2N/A * constructs an ldap search filter using the hostname invocation 2N/A * parameter and the getetherbyhost search filter defined. Once 2N/A * the filter is constructed, we search for a matching entry and 2N/A * marshal the data results into uchar_t *ether for the frontend 2N/A * process. The function _nss_ldap_ethers2ent performs the data 2N/A * RFC 2307, An Approach for Using LDAP as a Network Information Service, 2N/A * indicates that dn's be fully qualified. Host name searches will be on 2N/A * getbyether gets an ethernet address by ethernet address. This 2N/A * function constructs an ldap search filter using the ASCII 2N/A * ethernet address invocation parameter and the getetherbyether 2N/A * search filter defined. Once the filter is constructed, we 2N/A * search for a matching entry and marshal the data results into 2N/A * uchar_t *ether for the frontend process. The function 2N/A * _nss_ldap_ethers2ent performs the data marshaling. 2N/A *e, *(e +
1), *(e +
2), *(e +
3), *(e +
4), *(e +
5));
2N/A * _nss_ldap_ethers_constr is where life begins. This function calls the 2N/A * generic ldap constructor function to define and build the abstract 2N/A * data types required to support ldap operations.