summaryrefslogtreecommitdiff
path: root/zaptel.h
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-05-15 01:30:02 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-05-15 01:30:02 +0000
commit5b864019c5aeccf32d5ab83a856360e46e1436d9 (patch)
tree8180720fcf1be92ca1f006be535baed4f3b75861 /zaptel.h
parent58d72a7794acc5d64a4d0580fca22aae04c149ca (diff)
Initial "watchdog" support
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@180 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.h')
-rwxr-xr-xzaptel.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/zaptel.h b/zaptel.h
index b91573a..a7a0ff2 100755
--- a/zaptel.h
+++ b/zaptel.h
@@ -1161,8 +1161,25 @@ struct zt_span {
#ifdef CONFIG_DEVFS_FS
devfs_handle_t dhandle; /* Directory name */
#endif
+ /* If the watchdog detects no received data, it will call the
+ watchdog routine */
+ int (*watchdog)(struct zt_span *span, int cause);
+#ifdef CONFIG_ZAPTEL_WATCHDOG
+ int watchcounter;
+ int watchstate;
+#endif
};
+#define ZT_WATCHDOG_NOINTS (1 << 0)
+
+#define ZT_WATCHDOG_INIT 1000
+
+#define ZT_WATCHSTATE_UNKNOWN 0
+#define ZT_WATCHSTATE_OK 1
+#define ZT_WATCHSTATE_RECOVERING 2
+#define ZT_WATCHSTATE_FAILED 3
+
+
struct zt_dynamic_driver {
/* Driver name (e.g. Eth) */
char name[20];