summaryrefslogtreecommitdiff
path: root/xpp/xdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/xdefs.h')
-rw-r--r--xpp/xdefs.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/xpp/xdefs.h b/xpp/xdefs.h
index d4d0573..e6e48f6 100644
--- a/xpp/xdefs.h
+++ b/xpp/xdefs.h
@@ -22,20 +22,19 @@
*
*/
+#include "xpp_version.h"
+
#ifdef __KERNEL__
#include <linux/kernel.h>
#include <linux/version.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-#define LINUX26
-#endif
-
#else
/* This is to enable user-space programs to include this. */
#include <stdint.h>
+typedef uint8_t __u8;
typedef uint32_t __u32;
#include <stdio.h>
@@ -77,6 +76,7 @@ struct list_head { struct list_head *next; struct list_head *prev; };
#define MAX_UNIT BIT(UNIT_BITS) /* 1 FXS + 3 FXS/FXO | 1 BRI + 3 FXS/FXO */
#define MAX_SUBUNIT BIT(SUBUNIT_BITS) /* 8 port BRI */
+#define SUBUNIT_PCM_SHIFT 4 /* shift in PCM highway */
/*
* Compile time sanity checks
@@ -100,12 +100,16 @@ struct list_head { struct list_head *next; struct list_head *prev; };
typedef char *charp;
typedef unsigned char byte;
+#ifdef __KERNEL__
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
typedef int bool;
#endif
+#else
+typedef int bool;
+#endif
typedef struct xbus xbus_t;
typedef struct xpd xpd_t;
-typedef struct xpacket_raw xpacket_raw_t;
+typedef struct xframe xframe_t;
typedef struct xpacket xpacket_t;
typedef struct xops xops_t;
typedef __u32 xpp_line_t; /* at most 31 lines for E1 */