From ab656f2366c3ec4e34963f6774216431cf64dbbb Mon Sep 17 00:00:00 2001 From: Russ Meyerriecks Date: Fri, 19 Nov 2010 17:34:31 +0000 Subject: dahdi: Moved the channel mirroring interface behind a build flag It can now be enabled by un-commenting the CONFIG_DAHDI_MIRROR define in include/dahdi/dahdi_config.h Signed-off-by: Russ Meyerriecks Acked-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9492 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- include/dahdi/dahdi_config.h | 5 +++++ include/dahdi/kernel.h | 2 ++ include/dahdi/user.h | 3 +++ 3 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/dahdi/dahdi_config.h b/include/dahdi/dahdi_config.h index 9c50730..032a9d7 100644 --- a/include/dahdi/dahdi_config.h +++ b/include/dahdi/dahdi_config.h @@ -184,4 +184,9 @@ */ /* #define DAHDI_AUDIO_NOTIFY */ +/* + * Creates an interface for mirroring the raw channel data out to a pseudo-chan + */ +/*#define CONFIG_DAHDI_MIRROR*/ + #endif diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index e1c8927..d7b5ba1 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -444,9 +444,11 @@ struct dahdi_chan { struct file *file; /*!< File structure */ +#ifdef CONFIG_DAHDI_MIRROR struct dahdi_chan *rxmirror; /*!< channel we mirror reads to */ struct dahdi_chan *txmirror; /*!< channel we mirror writes to */ struct dahdi_chan *srcmirror; /*!< channel we mirror from */ +#endif /* CONFIG_DAHDI_MIRROR */ struct dahdi_span *span; /*!< Span we're a member of */ int sig; /*!< Signalling */ int sigcap; /*!< Capability for signalling */ diff --git a/include/dahdi/user.h b/include/dahdi/user.h index fe4be66..e743cad 100644 --- a/include/dahdi/user.h +++ b/include/dahdi/user.h @@ -37,6 +37,7 @@ #include #include +#include #ifndef ELAST #define ELAST 500 @@ -1079,8 +1080,10 @@ struct dahdi_vmwi_info { /* * Defines which channel to receive mirrored traffic from */ +#ifdef CONFIG_DAHDI_MIRROR #define DAHDI_RXMIRROR _IOW(DAHDI_CODE, 103, int) #define DAHDI_TXMIRROR _IOW(DAHDI_CODE, 104, int) +#endif /* CONFIG_DAHDI_MIRROR */ /* Get current status IOCTL */ /* Defines for Radio Status (dahdi_radio_stat.radstat) bits */ -- cgit v1.2.3