net-snmp 5.7
|
00001 /* Portions of this file are subject to the following copyright(s). See 00002 * the Net-SNMP's COPYING file for more details and other copyrights 00003 * that may apply: 00004 */ 00005 /* 00006 * Portions of this file are copyrighted by: 00007 * Copyright (C) 2007 Apple, Inc. All rights reserved. 00008 * Use is subject to license terms specified in the COPYING file 00009 * distributed with the Net-SNMP package. 00010 */ 00011 #ifndef NETSNMP_DIR_UTILS_H 00012 #define NETSNMP_DIR_UTILS_H 00013 00014 #ifdef __cplusplus 00015 extern "C" { 00016 #endif 00017 00018 /* 00019 * filter function; return 1 to include file, 0 to exclude 00020 */ 00021 #define NETSNMP_DIR_EXCLUDE 0 00022 #define NETSNMP_DIR_INCLUDE 1 00023 typedef int (netsnmp_directory_filter)(const void *text, void *ctx); 00024 00025 00026 /*------------------------------------------------------------------ 00027 * 00028 * Prototypes 00029 */ 00030 netsnmp_container * 00031 netsnmp_directory_container_read_some(netsnmp_container *user_container, 00032 const char *dirname, 00033 netsnmp_directory_filter *filter, 00034 void *filter_ctx, u_int flags); 00035 00036 #define netsnmp_directory_container_read(c,d,f) \ 00037 netsnmp_directory_container_read_some(c,d,NULL,NULL,f); 00038 00039 void netsnmp_directory_container_free(netsnmp_container *c); 00040 00041 00042 00043 /*------------------------------------------------------------------ 00044 * 00045 * flags 00046 */ 00047 #define NETSNMP_DIR_RECURSE 0x0001 00048 #define NETSNMP_DIR_RELATIVE_PATH 0x0002 00049 #define NETSNMP_DIR_SORTED 0x0004 00050 00051 #define NETSNMP_DIR_EMPTY_OK 0x0008 00052 00053 #define NETSNMP_DIR_NSFILE 0x0010 00054 00055 #define NETSNMP_DIR_NSFILE_STATS 0x0020 00056 00057 00058 00059 #ifdef __cplusplus 00060 } 00061 #endif 00062 00063 #endif /* NETSNMP_DIR_UTILS_H */