summaryrefslogtreecommitdiff
path: root/zaptel.h
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-01-10 22:06:29 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-01-10 22:06:29 +0000
commit46962b1907b7c476a969e898f682e82405ef317e (patch)
tree26df36eae566ccde4c3f71897e0951463038d822 /zaptel.h
parent55dd99f511d3d3aa8e91c013b18c5771c319fcf5 (diff)
Commits for HardHDLC API in zaptel (#5313)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@887 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.h')
-rw-r--r--zaptel.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/zaptel.h b/zaptel.h
index 36e761e..a77c0a3 100644
--- a/zaptel.h
+++ b/zaptel.h
@@ -115,6 +115,7 @@
#define ZT_SIG_DACS (__ZT_SIG_DACS | ZT_SIG_CLEAR) /* Cross connect */
#define ZT_SIG_EM_E1 (1 << 17) /* E1 E&M Variation */
#define ZT_SIG_DACS_RBS ((1 << 18) | __ZT_SIG_DACS) /* Cross connect w/ RBS */
+#define ZT_SIG_HARDHDLC ((1 << 19) | ZT_SIG_CLEAR)
/* tone flag values */
#define ZT_REVERSE_RXTONE 1 /* reverse polarity rx tone logic */
@@ -1209,6 +1210,7 @@ typedef enum {
#define ZT_FLAG_PPP (1 << 14) /* PPP is available */
#define ZT_FLAG_T1PPP (1 << 15)
#define ZT_FLAG_SIGFREEZE (1 << 16) /* Freeze signalling */
+#define ZT_FLAG_NOSTDTXRX (1 << 17) /* Do NOT do standard transmit and receive on every interrupt */
struct zt_span {
spinlock_t lock;
@@ -1295,6 +1297,9 @@ struct zt_span {
/* Opt: Dacs the contents of chan2 into chan1 if possible */
int (*dacs)(struct zt_chan *chan1, struct zt_chan *chan2);
+ /* Opt: Used to tell an onboard HDLC controller that there is data ready to transmit */
+ void (*hdlc_hard_xmit)(struct zt_chan *chan);
+
/* Used by zaptel only -- no user servicable parts inside */
int spanno; /* Span number for zaptel */
int offset; /* Offset within a given card */
@@ -1357,6 +1362,20 @@ extern int zt_receive(struct zt_span *span);
/* Prepare writechunk buffers on all channels for this span */
extern int zt_transmit(struct zt_span *span);
+/* Abort the buffer currently being receive with event "event" */
+extern void zt_hdlc_abort(struct zt_chan *ss, int event);
+
+/* Indicate to zaptel that the end of frame was received and rotate buffers */
+extern void zt_hdlc_finish(struct zt_chan *ss);
+
+/* Put a chunk of data into the current receive buffer */
+extern void zt_hdlc_putbuf(struct zt_chan *ss, unsigned char *rxb, int bytes);
+
+/* Get a chunk of data from the current transmit buffer. Returns -1 if no data
+ * is left to send, 0 if there is data remaining in the current message to be sent
+ * and 1 if the currently transmitted message is now done */
+extern int zt_hdlc_getbuf(struct zt_chan *ss, unsigned char *bufptr, unsigned int *size);
+
/* Register a span. Returns 0 on success, -1 on failure. Pref-master is non-zero if
we should have preference in being the master device */