aboutsummaryrefslogtreecommitdiffstats
path: root/src/libopm/src/opm_error.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libopm/src/opm_error.h')
-rw-r--r--src/libopm/src/opm_error.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libopm/src/opm_error.h b/src/libopm/src/opm_error.h
new file mode 100644
index 0000000..ec55793
--- /dev/null
+++ b/src/libopm/src/opm_error.h
@@ -0,0 +1,26 @@
+#ifndef LIBOPM_ERROR_H
+#define LIBOPM_ERROR_H
+
+/* Success */
+#define OPM_SUCCESS 1
+
+/* Configuration Errors */
+#define OPM_ERR_BADKEY 2 /* Unknown or bad key value */
+#define OPM_ERR_BADVALUE 3 /* Bad value matching key */
+#define OPM_ERR_BADPROTOCOL 4 /* Unknown protocol in config */
+
+/* Read Errors */
+#define OPM_ERR_MAX_READ 5 /* Socket reached MAX_READ */
+
+/* Callback Registration Errors */
+#define OPM_ERR_CBNOTFOUND 6 /* Callback is out of range */
+
+/* opm_scan errors */
+#define OPM_ERR_BADADDR 7 /* IP in remote struct is bad */
+#define OPM_ERR_NOPROTOCOLS 8 /* No protocols to scan! */
+
+/* bind/connect errors */
+#define OPM_ERR_BIND 9 /* Error binding to BIND_IP */
+#define OPM_ERR_NOFD 10 /* Unable to allocate file descriptor */
+
+#endif /* LIBOPM_ERROR_H */