summaryrefslogtreecommitdiff
path: root/xpp/zap_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/zap_debug.c')
-rw-r--r--xpp/zap_debug.c73
1 files changed, 2 insertions, 71 deletions
diff --git a/xpp/zap_debug.c b/xpp/zap_debug.c
index a5d7915..f20e14d 100644
--- a/xpp/zap_debug.c
+++ b/xpp/zap_debug.c
@@ -1,6 +1,6 @@
/*
* Written by Oron Peled <oron@actcom.co.il>
- * Copyright (C) 2004-2005, Xorcom
+ * Copyright (C) 2004-2006, Xorcom
*
* All rights reserved.
*
@@ -28,7 +28,7 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/module.h>
-#include <zaptel.h>
+#include "zaptel.h"
#include "zap_debug.h"
static const char rcsid[] = "$Id$";
@@ -63,74 +63,5 @@ void dump_poll(int print_dbg, const char *msg, int poll)
}
}
-#define E_(x) [ x ] = { .value = x, .name = #x, }
-static struct {
- int value;
- char *name;
-} zt_event_names[] = {
- E_(ZT_EVENT_NONE),
- E_(ZT_EVENT_ONHOOK),
- E_(ZT_EVENT_RINGOFFHOOK),
- E_(ZT_EVENT_WINKFLASH),
- E_(ZT_EVENT_ALARM),
- E_(ZT_EVENT_NOALARM),
- E_(ZT_EVENT_ABORT),
- E_(ZT_EVENT_OVERRUN),
- E_(ZT_EVENT_BADFCS),
- E_(ZT_EVENT_DIALCOMPLETE),
- E_(ZT_EVENT_RINGERON),
- E_(ZT_EVENT_RINGEROFF),
- E_(ZT_EVENT_HOOKCOMPLETE),
- E_(ZT_EVENT_BITSCHANGED),
- E_(ZT_EVENT_PULSE_START),
- E_(ZT_EVENT_TIMER_EXPIRED),
- E_(ZT_EVENT_TIMER_PING),
- E_(ZT_EVENT_POLARITY)
-};
-#undef E_
-
-char *event2str(int event)
-{
- BUG_ON(event > ARRAY_SIZE(zt_event_names));
- return zt_event_names[event].name;
-}
-
-#define S_(x) [ x ] = { .value = x, .name = #x, }
-static struct {
- int value;
- char *name;
-} zt_sig_types[] = {
- S_(ZT_SIG_NONE),
- S_(ZT_SIG_FXSLS),
- S_(ZT_SIG_FXSGS),
- S_(ZT_SIG_FXSKS),
- S_(ZT_SIG_FXOLS),
- S_(ZT_SIG_FXOGS),
- S_(ZT_SIG_FXOKS),
- S_(ZT_SIG_EM),
- S_(ZT_SIG_CLEAR),
- S_(ZT_SIG_HDLCRAW),
- S_(ZT_SIG_HDLCFCS),
- S_(ZT_SIG_HDLCNET),
- S_(ZT_SIG_SLAVE),
- S_(ZT_SIG_SF),
- S_(ZT_SIG_CAS),
- S_(ZT_SIG_DACS),
- S_(ZT_SIG_EM_E1),
- S_(ZT_SIG_DACS_RBS)
-};
-#undef S_
-
-void dump_sigtype(int print_dbg, const char *msg, int sigtype)
-{
- int i;
-
- for(i = 0; i < ARRAY_SIZE(zt_sig_types); i++) {
- if(sigtype == zt_sig_types[i].value)
- DBG("%s: %s\n", msg, zt_sig_types[i].name);
- }
-}
EXPORT_SYMBOL(dump_poll);
-EXPORT_SYMBOL(event2str);
-EXPORT_SYMBOL(dump_sigtype);