OpenDNSSEC-signer 1.3.0rc3
|
00001 /* 00002 * $Id$ 00003 * 00004 * Copyright (c) 2010-2011 NLNet Labs. All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 1. Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 2. Redistributions in binary form must reproduce the above copyright 00012 * notice, this list of conditions and the following disclaimer in the 00013 * documentation and/or other materials provided with the distribution. 00014 * 00015 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00016 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00017 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00018 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 00019 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00020 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00021 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00022 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00023 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00024 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 00025 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 * 00027 */ 00028 00034 #ifndef UTIL_STATUS_H 00035 #define UTIL_STATUS_H 00036 00037 #include "config.h" 00038 00039 enum ods_enum_status { 00040 ODS_STATUS_OK, 00041 ODS_STATUS_ASSERT_ERR, 00042 ODS_STATUS_CFG_ERR, 00043 ODS_STATUS_CHDIR_ERR, 00044 ODS_STATUS_CHROOT_ERR, 00045 ODS_STATUS_CMDHANDLER_ERR, 00046 ODS_STATUS_CONFLICT_ERR, 00047 ODS_STATUS_ERR, 00048 ODS_STATUS_FOPEN_ERR, 00049 ODS_STATUS_FORK_ERR, 00050 ODS_STATUS_HSM_ERR, 00051 ODS_STATUS_INSECURE, 00052 ODS_STATUS_MALLOC_ERR, 00053 ODS_STATUS_PARSE_ERR, 00054 ODS_STATUS_PRIVDROP_ERR, 00055 ODS_STATUS_RNG_ERR, 00056 ODS_STATUS_SETSID_ERR, 00057 ODS_STATUS_UNCHANGED, 00058 ODS_STATUS_WRITE_PIDFILE_ERR, 00059 ODS_STATUS_XML_ERR 00060 }; 00061 typedef enum ods_enum_status ods_status; 00062 00063 typedef struct ods_struct_lookup_table ods_lookup_table; 00064 struct ods_struct_lookup_table { 00065 int id; 00066 const char* name; 00067 }; 00068 00069 extern ods_lookup_table ods_status_str[]; 00070 00071 00078 ods_lookup_table* ods_lookup_by_id(ods_lookup_table *table, int id); 00079 00086 const char *ods_status2str(ods_status status); 00087 00088 #endif /* UTIL_STATUS_H */