summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus/voicebus.h
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-02-26 16:40:41 +0000
committerShaun Ruffell <sruffell@digium.com>2010-02-26 16:40:41 +0000
commit2e9c5b03752de6db1cb54cc6da43d648c83165b6 (patch)
tree47b1b93dd7ec3615e60fd14a64e09aa7b921ef68 /drivers/dahdi/voicebus/voicebus.h
parent0e66db059265bf2085413fe93f76957abf945e95 (diff)
voicebus: Add optional network debugging interface.
This interface is only used to facilitate debugging. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8118 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/voicebus/voicebus.h')
-rw-r--r--drivers/dahdi/voicebus/voicebus.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/dahdi/voicebus/voicebus.h b/drivers/dahdi/voicebus/voicebus.h
index ac7e398..a58e4ca 100644
--- a/drivers/dahdi/voicebus/voicebus.h
+++ b/drivers/dahdi/voicebus/voicebus.h
@@ -31,6 +31,12 @@
#include <linux/interrupt.h>
+
+#ifdef VOICEBUS_NET_DEBUG
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#endif
+
#define VOICEBUS_DEFAULT_LATENCY 3
#define VOICEBUS_DEFAULT_MAXLATENCY 25
#define VOICEBUS_MAXLATENCY_BUMP 6
@@ -49,6 +55,9 @@
/* Do not generate interrupts on this interface, but instead just poll it */
#undef CONFIG_VOICEBUS_TIMER
+/* Define this in order to create a debugging network interface. */
+#undef VOICEBUS_NET_DEBUG
+
struct voicebus;
struct vbb {
@@ -103,6 +112,17 @@ struct voicebus {
unsigned int min_tx_buffer_count;
unsigned int max_latency;
struct list_head tx_complete;
+
+#ifdef VOICEBUS_NET_DEBUG
+ struct sk_buff_head captured_packets;
+ struct net_device *netdev;
+ struct net_device_stats net_stats;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
+ struct napi_struct napi;
+#endif
+ atomic_t tx_seqnum;
+ atomic_t rx_seqnum;
+#endif
};
int voicebus_init(struct voicebus *vb, const char *board_name);
@@ -116,5 +136,5 @@ int voicebus_current_latency(struct voicebus *vb);
void voicebus_lock_latency(struct voicebus *vb);
void voicebus_unlock_latency(struct voicebus *vb);
int voicebus_is_latency_locked(const struct voicebus *vb);
-
+
#endif /* __VOICEBUS_H__ */