1 2 /* 3 * kadmin/ldap_util/kdb5_ldap_list.h 4 */ 5 6 /* Copyright (c) 2004-2005, Novell, Inc. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * * The copyright holder's name is not used to endorse or promote products 18 * derived from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33 #ifndef _KDB5_LDAP_LIST_H_ 34 #define _KDB5_LDAP_LIST_H_ 35 36 #define MAX_LIST_ENTRIES 64 37 #define END_OF_LIST -1 /* End of List */ 38 #define LIST_DELIMITER ":" /* List entry separator */ 39 #define LIST_MODE_ADD 0x701 /* Add to the List */ 40 #define LIST_MODE_DELETE 0x702 /* Delete from the list */ 41 #define MAX_LEN_LIST_ENTRY 512 /* Max len of an entry */ 42 43 extern krb5_error_code krb5_parse_list(char *buffer, char *delimiter, char **list); 44 extern void krb5_free_list_entries(char **list); 45 extern void list_modify_str_array(char ***destlist, const char **sourcelist, int mode); 46 extern int list_modify_int_array(int *destlist, const int *sourcelist, int mode); 47 extern int list_count_str_array(char **list); 48 extern int list_count_int_array(int *list); 49 extern int compare_int(const void*, const void *); 50 51 #endif /* _KDB5_LDAP_LIST_H_ */ 52