diff --git a/libs/openzap/src/Makefile b/libs/openzap/src/Makefile index 3cb6bad5d2..8041ea3a7d 100644 --- a/libs/openzap/src/Makefile +++ b/libs/openzap/src/Makefile @@ -53,8 +53,9 @@ isdn/Q931StateNT.o \ isdn/Q931StateTE.o \ isdn/Q932mes.o - -CFLAGS=$(ZAP_CFLAGS) -I`pwd`/include -I`pwd`/isdn/include +PWD=$(shell pwd) +INCS=-I$(PWD)/include -I$(PWD)/isdn/include +CFLAGS=$(ZAP_CFLAGS) $(INCS) MYLIB=libopenzap.a TMP=-I../../libpri-1.2.4 -Iinclude -I. -w @@ -67,14 +68,16 @@ $(MYLIB): $(OBJS) ranlib $(MYLIB) testapp: testapp.c $(MYLIB) - $(CC) -L. -Iinclude testapp.c -o testapp -lopenzap -lm -lpthread + $(CC) $(INCS) -L. testapp.c -o testapp -lopenzap -lm -lpthread +testisdn: testisdn.c $(MYLIB) + $(CC) $(INCS) -L. testisdn.c -o testisdn -lopenzap -lm -lpthread priserver.o: priserver.c - $(CC) $(TMP) -c priserver.c -o priserver.o + $(CC) $(INCS) $(TMP) -c priserver.c -o priserver.o sangoma_pri.o: sangoma_pri.c - $(CC) $(TMP) -c sangoma_pri.c -o sangoma_pri.o + $(CC) $(INCS) $(TMP) -c sangoma_pri.c -o sangoma_pri.o priserver: $(MYLIB) priserver.o sangoma_pri.o $(CC) sangoma_pri.o priserver.o -L. -o priserver -lopenzap -lm -lpthread ../../libpri-1.2.4/libpri.a diff --git a/libs/openzap/src/include/openzap.h b/libs/openzap/src/include/openzap.h index 29e23b14cf..5a0f74fafa 100644 --- a/libs/openzap/src/include/openzap.h +++ b/libs/openzap/src/include/openzap.h @@ -88,6 +88,8 @@ #include "libteletone.h" #include "zap_buffer.h" #include "zap_threadmutex.h" +#include "Q931.h" +#include "Q921.h" #ifdef NDEBUG #undef assert @@ -185,6 +187,26 @@ struct zap_channel { }; +struct zap_sigmsg { + zap_signal_event_t event_id; + uint32_t chan_id; + char cid_name[80]; + char ani[25]; + char aniII[25]; + char dnis[25]; +}; + + +struct zap_isdn_data { + Q921Data_t q921; + Q931_TrunkInfo_t q931; + zap_channel_t *dchan; + zap_channel_t *dchans[2]; + struct zap_sigmsg sigmsg; + zio_signal_cb_t sig_cb; + uint32_t flags; +}; + struct zap_span { uint32_t span_id; uint32_t chan_count; @@ -192,7 +214,10 @@ struct zap_span { struct zap_io_interface *zio; zio_event_cb_t event_callback; zap_mutex_t *mutex; + zap_trunk_type_t trunk_type; zap_signal_type_t signal_type; + struct zap_isdn_data *isdn_data; + char last_error[256]; zap_channel_t channels[ZAP_MAX_CHANNELS_SPAN]; }; @@ -212,6 +237,8 @@ struct zap_io_interface { struct zap_span spans[ZAP_MAX_SPANS_INTERFACE]; }; +zap_trunk_type_t str2zap_trunk_type(char *name); +char *zap_trunk_type2str(zap_trunk_type_t type); zap_status_t zap_span_find(const char *name, uint32_t id, zap_span_t **span); zap_status_t zap_span_create(zap_io_interface_t *zio, zap_span_t **span); zap_status_t zap_span_close_all(zap_io_interface_t *zio); @@ -230,5 +257,7 @@ zap_status_t zap_global_destroy(void); void zap_global_set_logger(zap_logger_t logger); void zap_global_set_default_logger(int level); uint32_t zap_separate_string(char *buf, char delim, char **array, int arraylen); +void print_bits(uint8_t *b, int bl, char *buf, int blen, int e); + #endif diff --git a/libs/openzap/src/include/zap_isdn.h b/libs/openzap/src/include/zap_isdn.h new file mode 100644 index 0000000000..7117304a03 --- /dev/null +++ b/libs/openzap/src/include/zap_isdn.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2007, Anthony Minessale II + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of the original author; nor the names of any contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ZAP_ISDN_H +#define ZAP_ISDN_H +#include "openzap.h" + +typedef enum { + ZAP_ISDN_RUNNING = (1 << 0) +} zap_isdn_flag_t; + + +typedef struct zap_isdn_data zap_isdn_data_t; + +zap_status_t zap_isdn_start(zap_span_t *span); +zap_status_t zap_isdn_init(void); +zap_status_t zap_isdn_configure_span(zap_span_t *span, Q921NetUser_t mode, Q931Dialect_t dialect, zio_signal_cb_t sig_cb); + +#endif diff --git a/libs/openzap/src/include/zap_types.h b/libs/openzap/src/include/zap_types.h index 0cfa2e9468..ee958c6bfb 100644 --- a/libs/openzap/src/include/zap_types.h +++ b/libs/openzap/src/include/zap_types.h @@ -50,6 +50,14 @@ struct zap_io_interface; #define ZAP_COMMAND_OBJ_INT *((int *)obj) #define ZAP_COMMAND_OBJ_CHAR_P (char *)obj +typedef enum { + ZAP_TRUNK_E1, + ZAP_TRUNK_T1, + ZAP_TRUNK_J1, + ZAP_TRUNK_BRI, + ZAP_TRUNK_NONE +} zap_trunk_type_t; + typedef enum { ZAP_SIGTYPE_NONE, ZAP_SIGTYPE_ISDN, @@ -71,7 +79,6 @@ typedef enum { typedef enum { ZAP_EVENT_NONE, ZAP_EVENT_DTMF, - ZAP_EVENT_COUNT } zap_event_type_t; @@ -158,7 +165,10 @@ typedef enum { typedef struct zap_channel zap_channel_t; typedef struct zap_event zap_event_t; +typedef struct zap_sigmsg zap_sigmsg_t; +typedef struct zap_span zap_span_t; +#define ZIO_SIGNAL_CB_ARGS (zap_span_t *span, zap_sigmsg_t *sigmsg, void *raw_data, uint32_t raw_data_len) #define ZIO_EVENT_CB_ARGS (zap_channel_t *zchan, zap_event_t *event) #define ZIO_CODEC_ARGS (void *data, zap_size_t max, zap_size_t *datalen) #define ZIO_CONFIGURE_ARGS (struct zap_io_interface *zio) @@ -169,6 +179,7 @@ typedef struct zap_event zap_event_t; #define ZIO_READ_ARGS (zap_channel_t *zchan, void *data, zap_size_t *datalen) #define ZIO_WRITE_ARGS (zap_channel_t *zchan, void *data, zap_size_t *datalen) +typedef zap_status_t (*zio_signal_cb_t) ZIO_SIGNAL_CB_ARGS ; typedef zap_status_t (*zio_event_cb_t) ZIO_EVENT_CB_ARGS ; typedef zap_status_t (*zio_codec_t) ZIO_CODEC_ARGS ; typedef zap_status_t (*zio_configure_t) ZIO_CONFIGURE_ARGS ; @@ -179,6 +190,7 @@ typedef zap_status_t (*zio_wait_t) ZIO_WAIT_ARGS ; typedef zap_status_t (*zio_read_t) ZIO_READ_ARGS ; typedef zap_status_t (*zio_write_t) ZIO_WRITE_ARGS ; +#define ZIO_SIGNAL_CB_FUNCTION(name) zap_status_t name ZIO_SIGNAL_CB_ARGS #define ZIO_EVENT_CB_FUNCTION(name) zap_status_t name ZIO_EVENT_CB_ARGS #define ZIO_CODEC_FUNCTION(name) zap_status_t name ZIO_CODEC_ARGS #define ZIO_CONFIGURE_FUNCTION(name) zap_status_t name ZIO_CONFIGURE_ARGS @@ -217,7 +229,7 @@ typedef zap_status_t (*zio_write_t) ZIO_WRITE_ARGS ; #define ZAP_LOG_ALERT ZAP_PRE, ZAP_LOG_LEVEL_ALERT #define ZAP_LOG_EMERG ZAP_PRE, ZAP_LOG_LEVEL_EMERG -typedef struct zap_span zap_span_t; + typedef void (*zap_logger_t)(char *file, const char *func, int line, int level, char *fmt, ...); typedef struct zap_io_interface zap_io_interface_t; typedef struct hashtable zap_hash_t; diff --git a/libs/openzap/src/isdn/Q921.c b/libs/openzap/src/isdn/Q921.c index 956a9e180c..afabf833ad 100644 --- a/libs/openzap/src/isdn/Q921.c +++ b/libs/openzap/src/isdn/Q921.c @@ -1,438 +1,441 @@ -/***************************************************************************** - - FileName: q921.c - - Description: Contains the implementation of a Q.921 protocol - - Created: 27.dec.2000/JVB - - License/Copyright: - - Copyright (c) 2007, Jan Vidar Berger, Case Labs, Ltd. All rights reserved. - email:janvb@caselaboratories.com - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Case Labs, Ltd nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*****************************************************************************/ -#include "Q921.h" -#include -#include "mfifo.h" - -/***************************************************************************** - - Function: Q921_InitTrunk - - Decription: Initialize a Q.921 trunk so it is ready for use. This - function MUST be called before you call any other functions. - -*****************************************************************************/ -void Q921_InitTrunk(L2TRUNK trunk, - L2UCHAR sapi, - L2UCHAR tei, - Q921NetUser_t NetUser, - L2INT hsize, - Q921TxCB_t cb21, - Q921TxCB_t cb23, - void *priv21, - void *priv23) -{ - if (trunk->initialized != INITIALIZED_MAGIC) { - MFIFOCreate(trunk->HDLCInQueue, Q921MAXHDLCSPACE, 10); - trunk->initialized = INITIALIZED_MAGIC; - } - trunk->vr = 0; - trunk->vs = 0; - trunk->state = 0; - trunk->sapi = sapi; - trunk->tei = tei; - trunk->NetUser = NetUser; - trunk->Q921Tx21Proc = cb21; - trunk->Q921Tx23Proc = cb23; - trunk->PrivateData21 = priv21; - trunk->PrivateData23 = priv23; - trunk->Q921HeaderSpace = hsize; -} - -static int Q921Tx21Proc(L2TRUNK trunk, L2UCHAR *Msg, L2INT size) -{ - return trunk->Q921Tx21Proc(trunk->PrivateData21, Msg, size); -} - -int Q921Tx23Proc(L2TRUNK trunk, L2UCHAR *Msg, L2INT size) -{ - return trunk->Q921Tx23Proc(trunk->PrivateData23, Msg, size); - -} - -/***************************************************************************** - - Function: Q921QueueHDLCFrame - - Description: Called to receive and queue an incoming HDLC frame. Will - queue this in Q921HDLCInQueue. The called must either call - Q921Rx12 directly afterwards or signal Q921Rx12 to be called - later. Q921Rx12 will read from the same queue and process - the frame. - - This function assumes that the message contains header - space. This is removed for internal Q921 processing, but - must be keept for I frames. - - Parameters: trunk trunk # - b ptr to frame; - size size of frame in bytes - -*****************************************************************************/ -int Q921QueueHDLCFrame(L2TRUNK trunk, L2UCHAR *b, L2INT size) -{ - return MFIFOWriteMes(trunk->HDLCInQueue, b, size); -} - -/***************************************************************************** - - Function: Q921SendI - - Description: Compose and Send I Frame to layer. Will receive an I frame - with space for L2 header and fill out that header before - it call Q921Tx21Proc. - - Parameters: trunk trunk # - Sapi Sapi - cr C/R field. - Tei Tei. - pf P fiels octet 5 - mes ptr to I frame message. - size size of message in bytes. - - Return Value: 0 if failed, 1 if Send. - -*****************************************************************************/ -int Q921SendI(L2TRUNK trunk, L2UCHAR Sapi, char cr, L2UCHAR Tei, char pf, L2UCHAR *mes, L2INT size) -{ - mes[trunk->Q921HeaderSpace+0] = (Sapi&0xfc) | ((cr<<1)&0x02); - mes[trunk->Q921HeaderSpace+1] = (Tei<<1) | 0x01; - mes[trunk->Q921HeaderSpace+2] = trunk->vs<<1; - mes[trunk->Q921HeaderSpace+3] = (trunk->vr<<1) | (pf & 0x01); - trunk->vs++; - - return Q921Tx21Proc(trunk, mes, size); -} - -int Q921Rx32(L2TRUNK trunk, L2UCHAR * Mes, L2INT Size) -{ - return Q921SendI(trunk, - trunk->sapi, - trunk->NetUser == Q921_TE ? 0 : 1, - trunk->tei, - 0, - Mes, - Size); -} -/***************************************************************************** - - Function: Q921SendRR - - Description: Compose and send Receive Ready. - - Parameters: trunk trunk # - Sapi Sapi - cr C/R field. - Tei Tei. - pf P/F fiels octet 5 - - Return Value: 0 if failed, 1 if Send. - -*****************************************************************************/ - -int Q921SendRR(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) -{ - L2UCHAR mes[400]; - - mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); - mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); - mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)0x01; - mes[trunk->Q921HeaderSpace+3] = (L2UCHAR)((trunk->vr<<1) | (pf & 0x01)); - - return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+4); -} - -/***************************************************************************** - - Function: Q921SendRNR - - Description: Compose and send Receive Nor Ready - - Parameters: trunk trunk # - Sapi Sapi - cr C/R field. - Tei Tei. - pf P/F fiels octet 5 - - Return Value: 0 if failed, 1 if Send. - -*****************************************************************************/ -int Q921SendRNR(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) -{ - L2UCHAR mes[400]; - - mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); - mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); - mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)0x05; - mes[trunk->Q921HeaderSpace+3] = (L2UCHAR)((trunk->vr<<1) | (pf & 0x01)); - - return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+4); -} - -/***************************************************************************** - - Function: Q921SendREJ - - Description: Compose and Send Reject. - - Parameters: trunk trunk # - Sapi Sapi - cr C/R field. - Tei Tei. - pf P/F fiels octet 5 - - Return Value: 0 if failed, 1 if Send. - -*****************************************************************************/ -int Q921SendREJ(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) -{ - L2UCHAR mes[400]; - - mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); - mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); - mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)0x09; - mes[trunk->Q921HeaderSpace+3] = (L2UCHAR)((trunk->vr<<1) | (pf & 0x01)); - - return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+4); -} - -/***************************************************************************** - - Function: Q921SendSABME - - Description: Compose and send SABME - - Parameters: trunk trunk # - Sapi Sapi - cr C/R field. - Tei Tei. - pf P fiels octet 4 - - Return Value: 0 if failed, 1 if Send. - -*****************************************************************************/ -int Q921SendSABME(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) -{ - L2UCHAR mes[400]; - - mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); - mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); - mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)(0x6f | ((pf<<4)&0x10)); - - return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+3); -} - -int Q921Start(L2TRUNK trunk) -{ - return Q921SendSABME(trunk, - trunk->sapi, - trunk->NetUser == Q921_TE ? 0 : 1, - trunk->tei, - 0); -} - -/***************************************************************************** - - Function: Q921SendDM - - Description: Comose and Send DM (Disconnected Mode) - - Parameters: trunk trunk # - Sapi Sapi - cr C/R field. - Tei Tei. - pf F fiels octet 4 - - Return Value: 0 if failed, 1 if Send. - -*****************************************************************************/ -int Q921SendDM(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) -{ - L2UCHAR mes[400]; - - mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); - mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); - mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)(0x0f | ((pf<<4)&0x10)); - - return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+3); -} - -/***************************************************************************** - - Function: Q921SendDISC - - Description: Compose and Send Disconnect - - Parameters: trunk trunk # - Sapi Sapi - cr C/R field. - Tei Tei. - pf P fiels octet 4 - - Return Value: 0 if failed, 1 if Send. - -*****************************************************************************/ -int Q921SendDISC(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) -{ - L2UCHAR mes[400]; - - mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); - mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); - mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)(0x43 | ((pf<<4)&0x10)); - - return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+3); -} - -/***************************************************************************** - - Function: Q921SendUA - - Description: Compose and Send UA - - Parameters: trunk trunk # - Sapi Sapi - cr C/R field. - Tei Tei. - pf F fiels octet 4 - - Return Value: 0 if failed, 1 if Send. - -*****************************************************************************/ -int Q921SendUA(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) -{ - L2UCHAR mes[400]; - - mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); - mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); - mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)(0x63 | ((pf<<4)&0x10)); - - return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+3); -} - -int Q921ProcSABME(L2TRUNK trunk, L2UCHAR *mes, L2INT size) -{ - /* TODO: Do we need these paramaters? */ - (void)mes; - (void)size; - - trunk->vr=0; - trunk->vs=0; - - return 1; -} - -/***************************************************************************** - - Function: Q921Rx12 - - Description: Called to process a message frame from layer 1. Will - identify the message and call the proper 'processor' for - layer 2 messages and forward I frames to the layer 3 entity. - - Q921Rx12 will check the input fifo for a message, and if a - message exist process one message before it exits. The caller - must either call Q921Rx12 polling or keep track on # - messages in the queue. - - Parameters: trunk trunk #. - - Return Value: # messages processed (always 1 or 0). - -*****************************************************************************/ -int Q921Rx12(L2TRUNK trunk) -{ - L2UCHAR *mes; - L2INT rs,size; /* receive size & Q921 frame size*/ - L2UCHAR *smes = MFIFOGetMesPtr(trunk->HDLCInQueue, &size); - if(smes != NULL) - { - rs = size - trunk->Q921HeaderSpace; - mes = &smes[trunk->Q921HeaderSpace]; - /* check for I frame */ - if((mes[2] & 0x01) == 0) - { - if(Q921Tx23Proc(trunk, smes, size-2)) /* -2 to clip away CRC */ - { - trunk->vr++; - Q921SendRR(trunk, (mes[0]&0xfc)>>2, (mes[0]>>1)&0x01,mes[1]>>1, mes[3]&0x01); - } - else - { - /* todo: whatever*/ - } - } - - /* check for RR */ - else if(mes[2] ==0x01) - { - /* todo: check if RR is responce to I */ - Q921SendRR(trunk, (mes[0]&0xfc)>>2, (mes[0]>>1)&0x01,mes[1]>>1, mes[2]&0x01); - } - - /* check for RNR */ - /* check for REJ */ - /* check for SABME */ - else if((mes[2] & 0xef) == 0x6f) - { - Q921ProcSABME(trunk, mes, rs); - Q921SendUA(trunk, (mes[0]&0xfc)>>2, (mes[0]>>1)&0x01,mes[1]>>1, (mes[2]&0x10)>>4); - } - - /* check for DM */ - /* check for UI */ - /* check for DISC */ - /* check for UA */ - /* check for FRMR */ - /* check for XID */ - - else - { - /* what the ? Issue an error */ - /* Q921ErrorProc(trunk, Q921_UNKNOWNFRAME, mes, rs); */ - /* todo: REJ or FRMR */ - } - - MFIFOKillNext(trunk->HDLCInQueue); - - return 1; - } - return 0; -} - +/***************************************************************************** + + FileName: q921.c + + Description: Contains the implementation of a Q.921 protocol + + Created: 27.dec.2000/JVB + + License/Copyright: + + Copyright (c) 2007, Jan Vidar Berger, Case Labs, Ltd. All rights reserved. + email:janvb@caselaboratories.com + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Case Labs, Ltd nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*****************************************************************************/ +#include "Q921.h" +#include +#include +#include "mfifo.h" + +/***************************************************************************** + + Function: Q921_InitTrunk + + Decription: Initialize a Q.921 trunk so it is ready for use. This + function MUST be called before you call any other functions. + +*****************************************************************************/ +void Q921_InitTrunk(L2TRUNK trunk, + L2UCHAR sapi, + L2UCHAR tei, + Q921NetUser_t NetUser, + L2INT hsize, + Q921TxCB_t cb21, + Q921TxCB_t cb23, + void *priv21, + void *priv23) +{ + if (trunk->initialized != INITIALIZED_MAGIC) { + MFIFOCreate(trunk->HDLCInQueue, Q921MAXHDLCSPACE, 10); + trunk->initialized = INITIALIZED_MAGIC; + } + trunk->vr = 0; + trunk->vs = 0; + trunk->state = 0; + trunk->sapi = sapi; + trunk->tei = tei; + trunk->NetUser = NetUser; + trunk->Q921Tx21Proc = cb21; + trunk->Q921Tx23Proc = cb23; + trunk->PrivateData21 = priv21; + trunk->PrivateData23 = priv23; + trunk->Q921HeaderSpace = hsize; +} + +static int Q921Tx21Proc(L2TRUNK trunk, L2UCHAR *Msg, L2INT size) +{ + return trunk->Q921Tx21Proc(trunk->PrivateData21, Msg, size); +} + +int Q921Tx23Proc(L2TRUNK trunk, L2UCHAR *Msg, L2INT size) +{ + return trunk->Q921Tx23Proc(trunk->PrivateData23, Msg, size); + +} + +/***************************************************************************** + + Function: Q921QueueHDLCFrame + + Description: Called to receive and queue an incoming HDLC frame. Will + queue this in Q921HDLCInQueue. The called must either call + Q921Rx12 directly afterwards or signal Q921Rx12 to be called + later. Q921Rx12 will read from the same queue and process + the frame. + + This function assumes that the message contains header + space. This is removed for internal Q921 processing, but + must be keept for I frames. + + Parameters: trunk trunk # + b ptr to frame; + size size of frame in bytes + +*****************************************************************************/ +int Q921QueueHDLCFrame(L2TRUNK trunk, L2UCHAR *b, L2INT size) +{ + return MFIFOWriteMes(trunk->HDLCInQueue, b, size); +} + +/***************************************************************************** + + Function: Q921SendI + + Description: Compose and Send I Frame to layer. Will receive an I frame + with space for L2 header and fill out that header before + it call Q921Tx21Proc. + + Parameters: trunk trunk # + Sapi Sapi + cr C/R field. + Tei Tei. + pf P fiels octet 5 + mes ptr to I frame message. + size size of message in bytes. + + Return Value: 0 if failed, 1 if Send. + +*****************************************************************************/ +int Q921SendI(L2TRUNK trunk, L2UCHAR Sapi, char cr, L2UCHAR Tei, char pf, L2UCHAR *mes, L2INT size) +{ + mes[trunk->Q921HeaderSpace+0] = (Sapi&0xfc) | ((cr<<1)&0x02); + mes[trunk->Q921HeaderSpace+1] = (Tei<<1) | 0x01; + mes[trunk->Q921HeaderSpace+2] = trunk->vs<<1; + mes[trunk->Q921HeaderSpace+3] = (trunk->vr<<1) | (pf & 0x01); + trunk->vs++; + + return Q921Tx21Proc(trunk, mes, size); +} + +int Q921Rx32(L2TRUNK trunk, L2UCHAR * Mes, L2INT Size) +{ + return Q921SendI(trunk, + trunk->sapi, + trunk->NetUser == Q921_TE ? 0 : 1, + trunk->tei, + 0, + Mes, + Size); +} +/***************************************************************************** + + Function: Q921SendRR + + Description: Compose and send Receive Ready. + + Parameters: trunk trunk # + Sapi Sapi + cr C/R field. + Tei Tei. + pf P/F fiels octet 5 + + Return Value: 0 if failed, 1 if Send. + +*****************************************************************************/ + +int Q921SendRR(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) +{ + L2UCHAR mes[400]; + + mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); + mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); + mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)0x01; + mes[trunk->Q921HeaderSpace+3] = (L2UCHAR)((trunk->vr<<1) | (pf & 0x01)); + + return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+4); +} + +/***************************************************************************** + + Function: Q921SendRNR + + Description: Compose and send Receive Nor Ready + + Parameters: trunk trunk # + Sapi Sapi + cr C/R field. + Tei Tei. + pf P/F fiels octet 5 + + Return Value: 0 if failed, 1 if Send. + +*****************************************************************************/ +int Q921SendRNR(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) +{ + L2UCHAR mes[400]; + + mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); + mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); + mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)0x05; + mes[trunk->Q921HeaderSpace+3] = (L2UCHAR)((trunk->vr<<1) | (pf & 0x01)); + + return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+4); +} + +/***************************************************************************** + + Function: Q921SendREJ + + Description: Compose and Send Reject. + + Parameters: trunk trunk # + Sapi Sapi + cr C/R field. + Tei Tei. + pf P/F fiels octet 5 + + Return Value: 0 if failed, 1 if Send. + +*****************************************************************************/ +int Q921SendREJ(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) +{ + L2UCHAR mes[400]; + + mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); + mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); + mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)0x09; + mes[trunk->Q921HeaderSpace+3] = (L2UCHAR)((trunk->vr<<1) | (pf & 0x01)); + + return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+4); +} + +/***************************************************************************** + + Function: Q921SendSABME + + Description: Compose and send SABME + + Parameters: trunk trunk # + Sapi Sapi + cr C/R field. + Tei Tei. + pf P fiels octet 4 + + Return Value: 0 if failed, 1 if Send. + +*****************************************************************************/ +int Q921SendSABME(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) +{ + L2UCHAR mes[400]; + + mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); + mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); + mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)(0x6f | ((pf<<4)&0x10)); + + return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+3); +} + +int Q921Start(L2TRUNK trunk) +{ + return Q921SendSABME(trunk, + trunk->sapi, + trunk->NetUser == Q921_TE ? 0 : 1, + trunk->tei, + 1); +} + +/***************************************************************************** + + Function: Q921SendDM + + Description: Comose and Send DM (Disconnected Mode) + + Parameters: trunk trunk # + Sapi Sapi + cr C/R field. + Tei Tei. + pf F fiels octet 4 + + Return Value: 0 if failed, 1 if Send. + +*****************************************************************************/ +int Q921SendDM(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) +{ + L2UCHAR mes[400]; + + mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); + mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); + mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)(0x0f | ((pf<<4)&0x10)); + + return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+3); +} + +/***************************************************************************** + + Function: Q921SendDISC + + Description: Compose and Send Disconnect + + Parameters: trunk trunk # + Sapi Sapi + cr C/R field. + Tei Tei. + pf P fiels octet 4 + + Return Value: 0 if failed, 1 if Send. + +*****************************************************************************/ +int Q921SendDISC(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) +{ + L2UCHAR mes[400]; + + mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); + mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); + mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)(0x43 | ((pf<<4)&0x10)); + + return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+3); +} + +/***************************************************************************** + + Function: Q921SendUA + + Description: Compose and Send UA + + Parameters: trunk trunk # + Sapi Sapi + cr C/R field. + Tei Tei. + pf F fiels octet 4 + + Return Value: 0 if failed, 1 if Send. + +*****************************************************************************/ +int Q921SendUA(L2TRUNK trunk, int Sapi, int cr, int Tei, int pf) +{ + L2UCHAR mes[400]; + + mes[trunk->Q921HeaderSpace+0] = (L2UCHAR)((Sapi&0xfc) | ((cr<<1)&0x02)); + mes[trunk->Q921HeaderSpace+1] = (L2UCHAR)((Tei<<1) | 0x01); + mes[trunk->Q921HeaderSpace+2] = (L2UCHAR)(0x63 | ((pf<<4)&0x10)); + + return Q921Tx21Proc(trunk, mes, trunk->Q921HeaderSpace+3); +} + +int Q921ProcSABME(L2TRUNK trunk, L2UCHAR *mes, L2INT size) +{ + /* TODO: Do we need these paramaters? */ + (void)mes; + (void)size; + + trunk->vr=0; + trunk->vs=0; + + return 1; +} + +/***************************************************************************** + + Function: Q921Rx12 + + Description: Called to process a message frame from layer 1. Will + identify the message and call the proper 'processor' for + layer 2 messages and forward I frames to the layer 3 entity. + + Q921Rx12 will check the input fifo for a message, and if a + message exist process one message before it exits. The caller + must either call Q921Rx12 polling or keep track on # + messages in the queue. + + Parameters: trunk trunk #. + + Return Value: # messages processed (always 1 or 0). + +*****************************************************************************/ +int Q921Rx12(L2TRUNK trunk) +{ + L2UCHAR *mes; + L2INT rs,size; /* receive size & Q921 frame size*/ + L2UCHAR *smes = MFIFOGetMesPtr(trunk->HDLCInQueue, &size); + + if(smes != NULL) + { + rs = size - trunk->Q921HeaderSpace; + mes = &smes[trunk->Q921HeaderSpace]; + + /* check for I frame */ + if((mes[2] & 0x01) == 0) + { + if(Q921Tx23Proc(trunk, smes, size-2)) /* -2 to clip away CRC */ + { + trunk->vr++; + Q921SendRR(trunk, (mes[0]&0xfc)>>2, (mes[0]>>1)&0x01,mes[1]>>1, mes[3]&0x01); + } + else + { + /* todo: whatever*/ + } + } + + /* check for RR */ + else if(mes[2] ==0x01) + { + /* todo: check if RR is responce to I */ + Q921SendRR(trunk, (mes[0]&0xfc)>>2, (mes[0]>>1)&0x01,mes[1]>>1, mes[2]&0x01); + } + + /* check for RNR */ + /* check for REJ */ + /* check for SABME */ + else if((mes[2] & 0xef) == 0x6f) + { + Q921ProcSABME(trunk, mes, rs); + Q921SendUA(trunk, (mes[0]&0xfc)>>2, (mes[0]>>1)&0x01,mes[1]>>1, (mes[2]&0x10)>>4); + } + + /* check for DM */ + /* check for UI */ + /* check for DISC */ + /* check for UA */ + /* check for FRMR */ + /* check for XID */ + + else + { + /* what the ? Issue an error */ + /* Q921ErrorProc(trunk, Q921_UNKNOWNFRAME, mes, rs); */ + /* todo: REJ or FRMR */ + } + + MFIFOKillNext(trunk->HDLCInQueue); + + return 1; + } + return 0; +} + diff --git a/libs/openzap/src/isdn/Q931.c b/libs/openzap/src/isdn/Q931.c index 1b0650f8e2..8976924b72 100644 --- a/libs/openzap/src/isdn/Q931.c +++ b/libs/openzap/src/isdn/Q931.c @@ -55,13 +55,13 @@ these table entries during system inititialization of a stack. *****************************************************************************/ -L3INT (*Q931Proc [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo *pTrunk, L3UCHAR *,L3INT); +L3INT (*Q931Proc [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo_t *pTrunk, L3UCHAR *,L3INT); -L3INT (*Q931Umes [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size); -L3INT (*Q931Pmes [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT (*Q931Umes [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size); +L3INT (*Q931Pmes [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT (*Q931Uie [Q931MAXDLCT][Q931MAXIE]) (Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT (*Q931Pie [Q931MAXDLCT][Q931MAXIE]) (Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT (*Q931Uie [Q931MAXDLCT][Q931MAXIE]) (Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT (*Q931Pie [Q931MAXDLCT][Q931MAXIE]) (Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); void (*Q931CreateDialectCB[Q931MAXDLCT]) (L3UCHAR iDialect)= { @@ -130,7 +130,7 @@ void Q931SetL2HeaderSpace(L3INT space) Description: Dummy function for message processing. *****************************************************************************/ -L3INT Q931ProcDummy(Q931_TrunkInfo *pTrunk, L3UCHAR * b,L3INT c) +L3INT Q931ProcDummy(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b,L3INT c) { return Q931E_INTERNAL; } @@ -142,7 +142,7 @@ L3INT Q931ProcDummy(Q931_TrunkInfo *pTrunk, L3UCHAR * b,L3INT c) Description: Dummy function for message processing *****************************************************************************/ -L3INT Q931UmesDummy(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931UmesDummy(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { return Q931E_UNKNOWN_MESSAGE; } @@ -154,7 +154,7 @@ L3INT Q931UmesDummy(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT I Description: Dummy function for message processing *****************************************************************************/ -L3INT Q931UieDummy(Q931_TrunkInfo *pTrunk,ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931UieDummy(Q931_TrunkInfo_t *pTrunk,ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { return Q931E_UNKNOWN_IE; } @@ -166,7 +166,7 @@ L3INT Q931UieDummy(Q931_TrunkInfo *pTrunk,ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf Description: Dummy function for message processing *****************************************************************************/ -L3INT Q931PmesDummy(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931PmesDummy(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { return Q931E_UNKNOWN_MESSAGE; } @@ -178,7 +178,7 @@ L3INT Q931PmesDummy(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR * Description: Dummy function for message processing *****************************************************************************/ -L3INT Q931PieDummy(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931PieDummy(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { return Q931E_UNKNOWN_IE; } @@ -190,7 +190,7 @@ L3INT Q931PieDummy(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *O Description: Dummy function for message processing *****************************************************************************/ -L3INT Q931TxDummy(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT n) +L3INT Q931TxDummy(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT n) { return Q931E_MISSING_CB; } @@ -275,7 +275,7 @@ void Q931Initialize() Return Value: none *****************************************************************************/ -void Q931TimeTick(Q931_TrunkInfo *pTrunk, L3ULONG ms) +void Q931TimeTick(Q931_TrunkInfo_t *pTrunk, L3ULONG ms) { (void)pTrunk; ms=ms; /* avoid warning for now. */ @@ -308,26 +308,27 @@ void Q931TimeTick(Q931_TrunkInfo *pTrunk, L3ULONG ms) see q931errors.h for details. *****************************************************************************/ -L3INT Q931Rx23(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT Size) +L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT Size) { L3UCHAR *Mes = &buf[Q931L2HeaderSpace]; L3INT RetCode = Q931E_NO_ERROR; - - Q931mes_Alerting * m = (Q931mes_Alerting*)Mes; + Q931mes_Alerting *m = (Q931mes_Alerting *) pTrunk->L3Buf; L3INT ISize; + L3INT IOff = 0; /* Protocol Discriminator */ m->ProtDisc = Mes[IOff++]; /* CRV */ - m->CRV = Q931Uie_CRV(pTrunk, Mes,m->buf, &IOff, &ISize); + m->CRV = Q931Uie_CRV(pTrunk, Mes, m->buf, &IOff, &ISize); /* Message Type */ m->MesType = Mes[IOff++]; /* Call table proc to unpack codec message */ - RetCode = Q931Umes[pTrunk->Dialect][m->MesType](pTrunk, Mes, pTrunk->L3Buf,Q931L4HeaderSpace,Size- Q931L4HeaderSpace); + RetCode = Q931Umes[pTrunk->Dialect][m->MesType](pTrunk, Mes, pTrunk->L3Buf, Q931L4HeaderSpace, Size - Q931L4HeaderSpace); + if(RetCode >= Q931E_NO_ERROR) { RetCode=Q931Proc[pTrunk->Dialect][m->MesType](pTrunk, pTrunk->L3Buf, 2); @@ -349,7 +350,7 @@ L3INT Q931Rx23(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT Size) see q931errors.h for details. *****************************************************************************/ -L3INT Q931Tx34(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size) +L3INT Q931Tx34(Q931_TrunkInfo_t *pTrunk, L3UCHAR * Mes, L3INT Size) { if (pTrunk->Q931Tx34CBProc) { return pTrunk->Q931Tx34CBProc(pTrunk->PrivateData34, Mes, Size); @@ -371,7 +372,7 @@ L3INT Q931Tx34(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size) see q931errors.h for details. *****************************************************************************/ -L3INT Q931Rx43(Q931_TrunkInfo *pTrunk,L3UCHAR * buf, L3INT Size) +L3INT Q931Rx43(Q931_TrunkInfo_t *pTrunk,L3UCHAR * buf, L3INT Size) { Q931mes_Header *ptr = (Q931mes_Header*)&buf[Q931L4HeaderSpace]; L3INT RetCode = Q931E_NO_ERROR; @@ -398,7 +399,7 @@ L3INT Q931Rx43(Q931_TrunkInfo *pTrunk,L3UCHAR * buf, L3INT Size) see q931errors.h for details. *****************************************************************************/ -L3INT Q931Tx32(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size) +L3INT Q931Tx32(Q931_TrunkInfo_t *pTrunk, L3UCHAR * Mes, L3INT Size) { L3INT OSize; Q931mes_Alerting *ptr = (Q931mes_Alerting*)Mes; @@ -432,7 +433,7 @@ L3INT Q931Tx32(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size) *****************************************************************************/ -void Q931SetError(Q931_TrunkInfo *pTrunk,L3INT ErrID, L3INT ErrPar1, L3INT ErrPar2) +void Q931SetError(Q931_TrunkInfo_t *pTrunk,L3INT ErrID, L3INT ErrPar1, L3INT ErrPar2) { if (pTrunk->Q931ErrorCBProc) { pTrunk->Q931ErrorCBProc(pTrunk->PrivateData34, ErrID, ErrPar1, ErrPar2); @@ -461,7 +462,7 @@ void Q931SetDefaultErrorCB(Q931ErrorCB_t Q931ErrorPar) see q931errors.h for details. *****************************************************************************/ -L3INT Q931CreateCRV(Q931_TrunkInfo *pTrunk, L3INT * callIndex) +L3INT Q931CreateCRV(Q931_TrunkInfo_t *pTrunk, L3INT * callIndex) { L3INT CRV = Q931GetUniqueCRV(pTrunk); @@ -483,7 +484,7 @@ L3INT Q931CreateCRV(Q931_TrunkInfo *pTrunk, L3INT * callIndex) see q931errors.h for details. *****************************************************************************/ -L3INT Q931AllocateCRV(Q931_TrunkInfo *pTrunk, L3INT iCRV, L3INT * callIndex) +L3INT Q931AllocateCRV(Q931_TrunkInfo_t *pTrunk, L3INT iCRV, L3INT * callIndex) { L3INT x; for(x=0; x < Q931MAXCALLPERTRUNK; x++) @@ -516,7 +517,7 @@ L3INT Q931AllocateCRV(Q931_TrunkInfo *pTrunk, L3INT iCRV, L3INT * callIndex) Return Value: Call State. *****************************************************************************/ -L3INT Q931GetCallState(Q931_TrunkInfo *pTrunk, L3INT iCRV) +L3INT Q931GetCallState(Q931_TrunkInfo_t *pTrunk, L3INT iCRV) { L3INT x; for(x=0; x < Q931MAXCALLPERTRUNK; x++) @@ -542,21 +543,21 @@ L3INT Q931GetCallState(Q931_TrunkInfo *pTrunk, L3INT iCRV) callindex call index. iTimer timer id *****************************************************************************/ -L3INT Q931StartTimer(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3USHORT iTimerID) +L3INT Q931StartTimer(Q931_TrunkInfo_t *pTrunk, L3INT callIndex, L3USHORT iTimerID) { pTrunk->call[callIndex].Timer = Q931GetTime(); pTrunk->call[callIndex].TimerID = iTimerID; return 0; } -L3INT Q931StopTimer(Q931_TrunkInfo *pTrunk, L3INT callindex, L3USHORT iTimerID) +L3INT Q931StopTimer(Q931_TrunkInfo_t *pTrunk, L3INT callindex, L3USHORT iTimerID) { if(pTrunk->call[callindex].TimerID == iTimerID) pTrunk->call[callindex].TimerID = 0; return 0; } -L3INT Q931SetState(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3INT iState) +L3INT Q931SetState(Q931_TrunkInfo_t *pTrunk, L3INT callIndex, L3INT iState) { pTrunk->call[callIndex].State = iState; @@ -584,7 +585,7 @@ void Q931SetGetTimeCB(L3ULONG (*callback)()) Q931GetTimeProc = callback; } -L3INT Q931FindCRV(Q931_TrunkInfo *pTrunk, L3INT crv, L3INT *callindex) +L3INT Q931FindCRV(Q931_TrunkInfo_t *pTrunk, L3INT crv, L3INT *callindex) { L3INT x; for(x=0; x < Q931MAXCALLPERTRUNK; x++) diff --git a/libs/openzap/src/isdn/Q931StateNT.c b/libs/openzap/src/isdn/Q931StateNT.c index 2d2a3c5671..55857c7268 100644 --- a/libs/openzap/src/isdn/Q931StateNT.c +++ b/libs/openzap/src/isdn/Q931StateNT.c @@ -128,7 +128,7 @@ void Q931CreateNT(L3UCHAR i) Function: Q931ProcAlertingNT *****************************************************************************/ -L3INT Q931ProcAlertingNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcAlertingNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -157,7 +157,7 @@ L3INT Q931ProcAlertingNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcCallProceedingNT *****************************************************************************/ -L3INT Q931ProcCallProceedingNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcCallProceedingNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -190,7 +190,7 @@ L3INT Q931ProcCallProceedingNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFro Function: Q931ProcConnectNT *****************************************************************************/ -L3INT Q931ProcConnectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcConnectNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -223,7 +223,7 @@ L3INT Q931ProcConnectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcConnectAckNT *****************************************************************************/ -L3INT Q931ProcConnectAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcConnectAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -256,7 +256,7 @@ L3INT Q931ProcConnectAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcProgressNT *****************************************************************************/ -L3INT Q931ProcProgressNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcProgressNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -291,7 +291,7 @@ L3INT Q931ProcProgressNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Description: Process a SETUP message. *****************************************************************************/ -L3INT Q931ProcSetupNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSetupNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT rc=0; Q931mes_Setup *pMes = (Q931mes_Setup *)&buf[Q931L4HeaderSpace]; @@ -371,7 +371,7 @@ L3INT Q931ProcSetupNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) NT side. *****************************************************************************/ -L3INT Q931ProcSetupAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSetupAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -404,7 +404,7 @@ L3INT Q931ProcSetupAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcResumeNT *****************************************************************************/ -L3INT Q931ProcResumeNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcResumeNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -437,7 +437,7 @@ L3INT Q931ProcResumeNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcResumeAckNT *****************************************************************************/ -L3INT Q931ProcResumeAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcResumeAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -470,7 +470,7 @@ L3INT Q931ProcResumeAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcResumeRejectNT *****************************************************************************/ -L3INT Q931ProcResumeRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcResumeRejectNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -503,7 +503,7 @@ L3INT Q931ProcResumeRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcSuspendNT *****************************************************************************/ -L3INT Q931ProcSuspendNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSuspendNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -536,7 +536,7 @@ L3INT Q931ProcSuspendNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcSuspendAckNT *****************************************************************************/ -L3INT Q931ProcSuspendAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSuspendAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -569,7 +569,7 @@ L3INT Q931ProcSuspendAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcSuspendRejectNT *****************************************************************************/ -L3INT Q931ProcSuspendRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSuspendRejectNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -602,7 +602,7 @@ L3INT Q931ProcSuspendRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom Function: Q931ProcInformationNT *****************************************************************************/ -L3INT Q931ProcUserInformationNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcUserInformationNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -635,7 +635,7 @@ L3INT Q931ProcUserInformationNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFr Function: Q931ProcDisconnectNT *****************************************************************************/ -L3INT Q931ProcDisconnectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcDisconnectNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -668,7 +668,7 @@ L3INT Q931ProcDisconnectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcReleaseNT *****************************************************************************/ -L3INT Q931ProcReleaseNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcReleaseNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -701,7 +701,7 @@ L3INT Q931ProcReleaseNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcReleaseCompleteNT *****************************************************************************/ -L3INT Q931ProcReleaseCompleteNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcReleaseCompleteNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -734,7 +734,7 @@ L3INT Q931ProcReleaseCompleteNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFr Function: Q931ProcRestartNT *****************************************************************************/ -L3INT Q931ProcRestartNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcRestartNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -767,7 +767,7 @@ L3INT Q931ProcRestartNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcRestartAckNT *****************************************************************************/ -L3INT Q931ProcRestartAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcRestartAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -800,7 +800,7 @@ L3INT Q931ProcRestartAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcCongestionControlNT *****************************************************************************/ -L3INT Q931ProcCongestionControlNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcCongestionControlNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -833,7 +833,7 @@ L3INT Q931ProcCongestionControlNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT i Function: Q931ProcInformationNT *****************************************************************************/ -L3INT Q931ProcInformationNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcInformationNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -866,7 +866,7 @@ L3INT Q931ProcInformationNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcNotifyNT *****************************************************************************/ -L3INT Q931ProcNotifyNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcNotifyNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -899,7 +899,7 @@ L3INT Q931ProcNotifyNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcStatusNT *****************************************************************************/ -L3INT Q931ProcStatusNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcStatusNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -932,7 +932,7 @@ L3INT Q931ProcStatusNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcStatusEnquiryNT *****************************************************************************/ -L3INT Q931ProcStatusEnquiryNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcStatusEnquiryNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -965,7 +965,7 @@ L3INT Q931ProcStatusEnquiryNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom Function: Q931ProcSegmentNT *****************************************************************************/ -L3INT Q931ProcSegmentNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSegmentNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1002,7 +1002,7 @@ L3INT Q931ProcSegmentNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcFacilityNT *****************************************************************************/ -L3INT Q932ProcFacilityNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcFacilityNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1035,7 +1035,7 @@ L3INT Q932ProcFacilityNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcHoldNT *****************************************************************************/ -L3INT Q932ProcHoldNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcHoldNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1068,7 +1068,7 @@ L3INT Q932ProcHoldNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcHoldAckNT *****************************************************************************/ -L3INT Q932ProcHoldAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcHoldAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1101,7 +1101,7 @@ L3INT Q932ProcHoldAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcHoldRejectNT *****************************************************************************/ -L3INT Q932ProcHoldRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcHoldRejectNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1134,7 +1134,7 @@ L3INT Q932ProcHoldRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcRegisterTE *****************************************************************************/ -L3INT Q932ProcRegisterNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcRegisterNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1167,7 +1167,7 @@ L3INT Q932ProcRegisterNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcRetrieveNT *****************************************************************************/ -L3INT Q932ProcRetrieveNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcRetrieveNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1200,7 +1200,7 @@ L3INT Q932ProcRetrieveNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcRetrieveAckNT *****************************************************************************/ -L3INT Q932ProcRetrieveAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcRetrieveAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1233,7 +1233,7 @@ L3INT Q932ProcRetrieveAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcRetrieveRejectNT *****************************************************************************/ -L3INT Q932ProcRetrieveRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcRetrieveRejectNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; diff --git a/libs/openzap/src/isdn/Q931StateTE.c b/libs/openzap/src/isdn/Q931StateTE.c index 7941326b05..e0653b125d 100644 --- a/libs/openzap/src/isdn/Q931StateTE.c +++ b/libs/openzap/src/isdn/Q931StateTE.c @@ -212,7 +212,7 @@ void Q931CreateTE(L3UCHAR i) Function: Q931ProcAlertingTE *****************************************************************************/ -L3INT Q931ProcAlertingTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcAlertingTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -241,7 +241,7 @@ L3INT Q931ProcAlertingTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcCallProceedingTE *****************************************************************************/ -L3INT Q931ProcCallProceedingTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcCallProceedingTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -274,7 +274,7 @@ L3INT Q931ProcCallProceedingTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFro Function: Q931ProcConnectTE *****************************************************************************/ -L3INT Q931ProcConnectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcConnectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -307,7 +307,7 @@ L3INT Q931ProcConnectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcConnectAckTE *****************************************************************************/ -L3INT Q931ProcConnectAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcConnectAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -340,7 +340,7 @@ L3INT Q931ProcConnectAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcProgressTE *****************************************************************************/ -L3INT Q931ProcProgressTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcProgressTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -373,7 +373,7 @@ L3INT Q931ProcProgressTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcSetupTE *****************************************************************************/ -L3INT Q931ProcSetupTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSetupTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT rc=0; Q931mes_Setup *pMes = (Q931mes_Setup *)&buf[Q931L4HeaderSpace]; @@ -453,7 +453,7 @@ L3INT Q931ProcSetupTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) NT side. *****************************************************************************/ -L3INT Q931ProcSetupAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSetupAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -480,7 +480,7 @@ L3INT Q931ProcSetupAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcResumeTE *****************************************************************************/ -L3INT Q931ProcResumeTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcResumeTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { Q931mes_Resume * pMes = (Q931mes_Resume *)&buf[Q931L4HeaderSpace]; L3INT callIndex; @@ -517,7 +517,7 @@ L3INT Q931ProcResumeTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcResumeAckTE *****************************************************************************/ -L3INT Q931ProcResumeAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcResumeAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -550,7 +550,7 @@ L3INT Q931ProcResumeAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcResumeRejectTE *****************************************************************************/ -L3INT Q931ProcResumeRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcResumeRejectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -583,7 +583,7 @@ L3INT Q931ProcResumeRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcSuspendTE *****************************************************************************/ -L3INT Q931ProcSuspendTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSuspendTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -616,7 +616,7 @@ L3INT Q931ProcSuspendTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcSuspendAckTE *****************************************************************************/ -L3INT Q931ProcSuspendAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSuspendAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -649,7 +649,7 @@ L3INT Q931ProcSuspendAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcSuspendRejectTE *****************************************************************************/ -L3INT Q931ProcSuspendRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSuspendRejectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -682,7 +682,7 @@ L3INT Q931ProcSuspendRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom Function: Q931ProcInformationTE *****************************************************************************/ -L3INT Q931ProcUserInformationTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcUserInformationTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -715,7 +715,7 @@ L3INT Q931ProcUserInformationTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFr Function: Q931ProcDisconnectTE *****************************************************************************/ -L3INT Q931ProcDisconnectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcDisconnectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -748,7 +748,7 @@ L3INT Q931ProcDisconnectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcReleaseTE *****************************************************************************/ -L3INT Q931ProcReleaseTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcReleaseTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { Q931mes_Release *pMes = (Q931mes_Release *)&buf[Q931L4HeaderSpace]; L3INT state = Q931GetCallState(pTrunk, pMes->CRV); @@ -770,7 +770,7 @@ L3INT Q931ProcReleaseTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcReleaseCompleteTE *****************************************************************************/ -L3INT Q931ProcReleaseCompleteTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcReleaseCompleteTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { Q931mes_ReleaseComplete *pMes = (Q931mes_ReleaseComplete *)&buf[Q931L4HeaderSpace]; L3INT state = Q931GetCallState(pTrunk, pMes->CRV); @@ -787,7 +787,7 @@ L3INT Q931ProcReleaseCompleteTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFr Function: Q931ProcRestartTE *****************************************************************************/ -L3INT Q931ProcRestartTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcRestartTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -820,7 +820,7 @@ L3INT Q931ProcRestartTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcRestartAckTE *****************************************************************************/ -L3INT Q931ProcRestartAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcRestartAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -853,7 +853,7 @@ L3INT Q931ProcRestartAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcCongestionControlTE *****************************************************************************/ -L3INT Q931ProcCongestionControlTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcCongestionControlTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -886,7 +886,7 @@ L3INT Q931ProcCongestionControlTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT i Function: Q931ProcInformationTE *****************************************************************************/ -L3INT Q931ProcInformationTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcInformationTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -919,7 +919,7 @@ L3INT Q931ProcInformationTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcNotifyTE *****************************************************************************/ -L3INT Q931ProcNotifyTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcNotifyTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -952,7 +952,7 @@ L3INT Q931ProcNotifyTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcStatusTE *****************************************************************************/ -L3INT Q931ProcStatusTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcStatusTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -985,7 +985,7 @@ L3INT Q931ProcStatusTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcStatusEnquiryTE *****************************************************************************/ -L3INT Q931ProcStatusEnquiryTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcStatusEnquiryTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1018,7 +1018,7 @@ L3INT Q931ProcStatusEnquiryTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom Function: Q931ProcSegmentTE *****************************************************************************/ -L3INT Q931ProcSegmentTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q931ProcSegmentTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1055,7 +1055,7 @@ L3INT Q931ProcSegmentTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcRetrieveTE *****************************************************************************/ -L3INT Q932ProcFacilityTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcFacilityTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1088,7 +1088,7 @@ L3INT Q932ProcFacilityTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcRetrieveTE *****************************************************************************/ -L3INT Q932ProcHoldTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcHoldTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1121,7 +1121,7 @@ L3INT Q932ProcHoldTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcRetrieveTE *****************************************************************************/ -L3INT Q932ProcHoldAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcHoldAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1154,7 +1154,7 @@ L3INT Q932ProcHoldAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcRetrieveTE *****************************************************************************/ -L3INT Q932ProcHoldRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcHoldRejectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1187,7 +1187,7 @@ L3INT Q932ProcHoldRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcRegisterTE *****************************************************************************/ -L3INT Q932ProcRegisterTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcRegisterTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1220,7 +1220,7 @@ L3INT Q932ProcRegisterTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q932ProcRetrieveTE *****************************************************************************/ -L3INT Q932ProcRetrieveTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcRetrieveTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1253,7 +1253,7 @@ L3INT Q932ProcRetrieveTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcRetrieveAckTE *****************************************************************************/ -L3INT Q932ProcRetrieveAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcRetrieveAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -1286,7 +1286,7 @@ L3INT Q932ProcRetrieveAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) Function: Q931ProcRetrieveRejectTE *****************************************************************************/ -L3INT Q932ProcRetrieveRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * buf, L3INT iFrom) +L3INT Q932ProcRetrieveRejectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { L3INT callIndex; L3INT ret=Q931E_NO_ERROR; diff --git a/libs/openzap/src/isdn/Q931api.c b/libs/openzap/src/isdn/Q931api.c index 780c29fb15..c2662dbefa 100644 --- a/libs/openzap/src/isdn/Q931api.c +++ b/libs/openzap/src/isdn/Q931api.c @@ -68,7 +68,7 @@ L3INT Q931CreateIEIndex(L3INT iec) } */ -L3INT Q931Api_InitTrunk(Q931_TrunkInfo *pTrunk, +L3INT Q931Api_InitTrunk(Q931_TrunkInfo_t *pTrunk, Q931Dialect_t Dialect, Q931NetUser_t NetUser, Q931_TrunkType_t TrunkType, @@ -146,9 +146,9 @@ L3INT Q931Api_InitTrunk(Q931_TrunkInfo *pTrunk, } void Q931SetMesProc(L3UCHAR mes, L3UCHAR dialect, - L3INT (*Q931ProcFunc)(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom), - L3INT (*Q931UmesFunc)(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size), - L3INT (*Q931PmesFunc)(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) + L3INT (*Q931ProcFunc)(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom), + L3INT (*Q931UmesFunc)(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size), + L3INT (*Q931PmesFunc)(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) ) { if(Q931ProcFunc != NULL) @@ -160,8 +160,8 @@ void Q931SetMesProc(L3UCHAR mes, L3UCHAR dialect, } void Q931SetIEProc(L3UCHAR iec, L3UCHAR dialect, - L3INT (*Q931PieProc)(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet), - L3INT (*Q931UieProc)(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) + L3INT (*Q931PieProc)(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet), + L3INT (*Q931UieProc)(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) ) { if(Q931PieProc != NULL) @@ -357,7 +357,7 @@ ie Q931AppendIE( L3UCHAR *pm, L3UCHAR *pi) /***************************************************************************** *****************************************************************************/ -L3INT Q931GetUniqueCRV(Q931_TrunkInfo *pTrunk) +L3INT Q931GetUniqueCRV(Q931_TrunkInfo_t *pTrunk) { static L3INT crv={1}; return crv++; @@ -640,7 +640,7 @@ L3INT Q931InitIEHLComp(Q931ie_HLComp * pIE) return 0; } -L3INT Q931ProcUnknownMessage(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom) +L3INT Q931ProcUnknownMessage(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom) { /* TODO: Unhandled paramaters */ (void)pTrunk; @@ -650,7 +650,7 @@ L3INT Q931ProcUnknownMessage(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom) return 0; } -L3INT Q931ProcUnexpectedMessage(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom) +L3INT Q931ProcUnexpectedMessage(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom) { /* TODO: Unhandled paramaters */ (void)pTrunk; @@ -660,7 +660,7 @@ L3INT Q931ProcUnexpectedMessage(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom) return 0; } -L3INT Q931Disconnect(Q931_TrunkInfo *pTrunk, L3INT iTo, L3INT iCRV, L3INT iCause) +L3INT Q931Disconnect(Q931_TrunkInfo_t *pTrunk, L3INT iTo, L3INT iCRV, L3INT iCause) { /* TODO: Unhandled paramaters */ (void)pTrunk; @@ -671,7 +671,7 @@ L3INT Q931Disconnect(Q931_TrunkInfo *pTrunk, L3INT iTo, L3INT iCRV, L3INT iCause return 0; } -L3INT Q931ReleaseComplete(Q931_TrunkInfo *pTrunk, L3INT iTo) +L3INT Q931ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3INT iTo) { /* TODO: Unhandled paramaters */ (void)pTrunk; diff --git a/libs/openzap/src/isdn/Q931ie.c b/libs/openzap/src/isdn/Q931ie.c index 15e93bfee8..0f89459360 100644 --- a/libs/openzap/src/isdn/Q931ie.c +++ b/libs/openzap/src/isdn/Q931ie.c @@ -126,7 +126,7 @@ L3INT Q931ReadExt(L3UCHAR * IBuf, L3INT Off) *****************************************************************************/ -L3INT Q931Uie_BearerCap(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_BearerCap(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_BearerCap * pie = (Q931ie_BearerCap*)OBuf; L3INT Off = 0; @@ -310,7 +310,7 @@ L3INT Q931Uie_BearerCap(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR *****************************************************************************/ -L3INT Q931Pie_BearerCap(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_BearerCap(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_BearerCap * pIE = (Q931ie_BearerCap*)IBuf; L3INT rc=0; @@ -431,7 +431,7 @@ L3INT Q931Pie_BearerCap(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_CallID(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_CallID(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_CallID * pie = (Q931ie_CallID*)OBuf; L3INT Off = 0; @@ -478,7 +478,7 @@ L3INT Q931Uie_CallID(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * *****************************************************************************/ -L3INT Q931Pie_CallID(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_CallID(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_CallID * pIE = (Q931ie_CallID*)IBuf; L3INT rc=0; @@ -517,7 +517,7 @@ L3INT Q931Pie_CallID(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_CallState(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_CallState(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_CallState * pie = (Q931ie_CallState*)OBuf; L3INT Off = 0; @@ -562,7 +562,7 @@ L3INT Q931Uie_CallState(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_CallState(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_CallState(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_CallState * pIE = (Q931ie_CallState*)IBuf; L3INT rc=0; @@ -594,7 +594,7 @@ L3INT Q931Pie_CallState(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_CalledSub(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_CalledSub(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_CalledSub * pie = (Q931ie_CalledSub*)OBuf; L3INT Off = 0; @@ -646,7 +646,7 @@ L3INT Q931Uie_CalledSub(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_CalledSub(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_CalledSub(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_CalledSub * pIE = (Q931ie_CalledSub*)IBuf; L3INT rc=0; @@ -690,7 +690,7 @@ L3INT Q931Pie_CalledSub(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_CalledNum(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_CalledNum(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_CalledNum * pie = (Q931ie_CalledNum*)OBuf; L3INT Off = 0; @@ -739,7 +739,7 @@ L3INT Q931Uie_CalledNum(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_CalledNum(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_CalledNum(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_CalledSub * pIE = (Q931ie_CalledSub*)IBuf; L3INT rc=0; @@ -783,7 +783,7 @@ L3INT Q931Pie_CalledNum(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_CallingNum(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_CallingNum(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_CallingNum * pie = (Q931ie_CallingNum*)OBuf; L3INT Off = 0; @@ -843,7 +843,7 @@ L3INT Q931Uie_CallingNum(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHA Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_CallingNum(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_CallingNum(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_CallingSub * pIE = (Q931ie_CallingSub*)IBuf; L3INT rc=0; @@ -897,7 +897,7 @@ L3INT Q931Pie_CallingNum(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_CallingSub(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_CallingSub(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_CallingSub * pie = (Q931ie_CallingSub*)OBuf; L3INT Off = 0; @@ -949,7 +949,7 @@ L3INT Q931Uie_CallingSub(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_CallingSub(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_CallingSub(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_CallingSub * pIE = (Q931ie_CallingSub*)IBuf; L3INT rc=0; @@ -993,7 +993,7 @@ L3INT Q931Pie_CallingSub(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_Cause(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_Cause(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_Cause * pie = (Q931ie_Cause*)OBuf; L3INT Off = 0; @@ -1045,7 +1045,7 @@ L3INT Q931Uie_Cause(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * O Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_Cause(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_Cause(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_Cause * pIE = (Q931ie_Cause*)IBuf; L3INT rc=0; @@ -1085,7 +1085,7 @@ L3INT Q931Pie_Cause(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_CongLevel(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_CongLevel(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_CongLevel *pie = (Q931ie_CongLevel*)OBuf; L3INT Off = 0; @@ -1117,7 +1117,7 @@ L3INT Q931Uie_CongLevel(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_CongLevel(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_CongLevel(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_CongLevel * pIE = (Q931ie_CongLevel*)IBuf; L3INT rc=0; @@ -1143,7 +1143,7 @@ L3INT Q931Pie_CongLevel(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Uie_ChanID(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_ChanID(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_ChanID * pie = (Q931ie_ChanID*)OBuf; L3INT Off = 0; @@ -1224,7 +1224,7 @@ L3INT Q931Uie_ChanID(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR *OB Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_ChanID(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_ChanID(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_ChanID * pIE = (Q931ie_ChanID*)IBuf; L3INT rc=Q931E_NO_ERROR; @@ -1289,7 +1289,7 @@ L3INT Q931Pie_ChanID(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Return Value: CRV *****************************************************************************/ -L3USHORT Q931Uie_CRV(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff) +L3USHORT Q931Uie_CRV(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff) { L3INT Octet = *IOff; L3INT l = IBuf[Octet]; @@ -1336,7 +1336,7 @@ L3USHORT Q931Uie_CRV(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_DateTime(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_DateTime(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_DateTime * pie = (Q931ie_DateTime*)OBuf; L3INT Off = 0; @@ -1409,7 +1409,7 @@ L3INT Q931Uie_DateTime(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR *IBuf, L3UCHAR * Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_DateTime(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_DateTime(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_DateTime * pIE = (Q931ie_DateTime*)IBuf; L3INT rc=0; @@ -1455,7 +1455,7 @@ L3INT Q931Pie_DateTime(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_Display(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_Display(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_Display * pie = (Q931ie_Display*)OBuf; L3INT Off = 0; @@ -1498,7 +1498,7 @@ L3INT Q931Uie_Display(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_Display(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_Display(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_Display * pIE = (Q931ie_Display*)IBuf; L3INT rc=0; @@ -1538,7 +1538,7 @@ L3INT Q931Pie_Display(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3IN Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_HLComp(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_HLComp(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_HLComp * pie = (Q931ie_HLComp*)OBuf; L3INT Off = 0; @@ -1609,7 +1609,7 @@ L3INT Q931Uie_HLComp(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_HLComp(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_HLComp(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_HLComp * pIE = (Q931ie_HLComp*)IBuf; L3INT rc=0; @@ -1659,7 +1659,7 @@ L3INT Q931Pie_HLComp(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_KeypadFac(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_KeypadFac(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_KeypadFac * pie = (Q931ie_KeypadFac*)OBuf; L3INT Off = 0; @@ -1702,7 +1702,7 @@ L3INT Q931Uie_KeypadFac(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_KeypadFac(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_KeypadFac(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_KeypadFac * pIE = (Q931ie_KeypadFac*)IBuf; L3INT rc=0; @@ -1741,7 +1741,7 @@ L3INT Q931Pie_KeypadFac(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_LLComp(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_LLComp(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_LLComp * pie = (Q931ie_LLComp*)OBuf; L3INT Off = 0; @@ -1957,7 +1957,7 @@ L3INT Q931Uie_LLComp(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * O Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_LLComp(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_LLComp(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_LLComp * pIE = (Q931ie_LLComp*)IBuf; L3INT rc=0; @@ -2122,7 +2122,7 @@ L3INT Q931Pie_LLComp(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_NetFac(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_NetFac(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_NetFac * pie = (Q931ie_NetFac*)OBuf; L3INT Off = 0; @@ -2183,7 +2183,7 @@ L3INT Q931Uie_NetFac(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * O Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_NetFac(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_NetFac(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_NetFac * pIE = (Q931ie_NetFac*)IBuf; L3INT rc=Q931E_NO_ERROR; @@ -2232,7 +2232,7 @@ L3INT Q931Pie_NetFac(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_NotifInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_NotifInd(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_NotifInd * pie = (Q931ie_NotifInd*)OBuf; L3INT Off = 0; @@ -2275,7 +2275,7 @@ L3INT Q931Uie_NotifInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_NotifInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_NotifInd(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_NotifInd * pIE = (Q931ie_NotifInd*)IBuf; L3INT rc=Q931E_NO_ERROR; @@ -2308,7 +2308,7 @@ L3INT Q931Pie_NotifInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_ProgInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_ProgInd(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_ProgInd * pie = (Q931ie_ProgInd*)OBuf; L3INT Off = 0; @@ -2357,7 +2357,7 @@ L3INT Q931Uie_ProgInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_ProgInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_ProgInd(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_ProgInd * pIE = (Q931ie_ProgInd*)IBuf; L3INT rc=Q931E_NO_ERROR; @@ -2393,7 +2393,7 @@ L3INT Q931Pie_ProgInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3IN Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_RepeatInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_RepeatInd(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_RepeatInd *pie = (Q931ie_RepeatInd*)OBuf; L3INT Off = 0; @@ -2425,7 +2425,7 @@ L3INT Q931Uie_RepeatInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_RepeatInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_RepeatInd(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_RepeatInd * pIE = (Q931ie_RepeatInd*)IBuf; L3INT rc=0; @@ -2452,7 +2452,7 @@ L3INT Q931Pie_RepeatInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_RevChargeInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_RevChargeInd(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { ie iE; Q931SetIE(iE, *OOff); @@ -2471,7 +2471,7 @@ L3INT Q931Uie_RevChargeInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCH Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_RevChargeInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_RevChargeInd(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { L3BOOL RetCode = L3FALSE; @@ -2497,7 +2497,7 @@ L3INT Q931Pie_RevChargeInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_RestartInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_RestartInd(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_RestartInd * pie = (Q931ie_RestartInd*)OBuf; L3INT Off = 0; @@ -2540,7 +2540,7 @@ L3INT Q931Uie_RestartInd(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_RestartInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_RestartInd(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_RestartInd * pIE = (Q931ie_RestartInd*)IBuf; L3INT rc=Q931E_NO_ERROR; @@ -2573,7 +2573,7 @@ L3INT Q931Pie_RestartInd(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_Segment(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_Segment(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_Segment * pie = (Q931ie_Segment*)OBuf; L3INT Off = 0; @@ -2619,7 +2619,7 @@ L3INT Q931Uie_Segment(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_Segment(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_Segment(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_Segment * pIE = (Q931ie_Segment*)IBuf; L3INT rc=Q931E_NO_ERROR; @@ -2655,7 +2655,7 @@ L3INT Q931Pie_Segment(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3IN Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_SendComplete(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_SendComplete(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_SendComplete *pie = (Q931ie_SendComplete*)OBuf; L3INT Off = 0; @@ -2685,7 +2685,7 @@ L3INT Q931Uie_SendComplete(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCH Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_SendComplete(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_SendComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { /* Q931ie_SendComplete * pIE = (Q931ie_SendComplete*)IBuf; */ L3INT rc=Q931E_NO_ERROR; @@ -2712,7 +2712,7 @@ L3INT Q931Pie_SendComplete(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_Signal(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_Signal(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_Signal * pie = (Q931ie_Signal*)OBuf; L3INT Off = 0; @@ -2753,7 +2753,7 @@ L3INT Q931Uie_Signal(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * O Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_Signal(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_Signal(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_Signal * pIE = (Q931ie_Signal*)IBuf; L3INT rc=Q931E_NO_ERROR; @@ -2786,7 +2786,7 @@ L3INT Q931Pie_Signal(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_TransNetSel(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_TransNetSel(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_TransNetSel * pie = (Q931ie_TransNetSel*)OBuf; L3INT Off = 0; @@ -2835,7 +2835,7 @@ L3INT Q931Uie_TransNetSel(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHA Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_TransNetSel(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_TransNetSel(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_TransNetSel * pIE = (Q931ie_TransNetSel*)IBuf; L3INT rc=Q931E_NO_ERROR; @@ -2877,7 +2877,7 @@ L3INT Q931Pie_TransNetSel(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, Return Value: Error Message *****************************************************************************/ -L3INT Q931Uie_UserUser(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) +L3INT Q931Uie_UserUser(Q931_TrunkInfo_t *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff) { Q931ie_UserUser * pie = (Q931ie_UserUser*)OBuf; L3INT Off = 0; @@ -2924,7 +2924,7 @@ L3INT Q931Uie_UserUser(Q931_TrunkInfo *pTrunk, ie *pIE,L3UCHAR * IBuf, L3UCHAR * Return Value: Error code, 0 = OK *****************************************************************************/ -L3INT Q931Pie_UserUser(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) +L3INT Q931Pie_UserUser(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet) { Q931ie_UserUser * pIE = (Q931ie_UserUser*)IBuf; L3INT rc=Q931E_NO_ERROR; diff --git a/libs/openzap/src/isdn/Q931mes.c b/libs/openzap/src/isdn/Q931mes.c index d376f8d176..d52a06efc8 100644 --- a/libs/openzap/src/isdn/Q931mes.c +++ b/libs/openzap/src/isdn/Q931mes.c @@ -49,7 +49,7 @@ *****************************************************************************/ -L3INT Q931Umes_Alerting(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Alerting(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -105,7 +105,7 @@ L3INT Q931Umes_Alerting(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Function: Q931Pmes_Alerting *****************************************************************************/ -L3INT Q931Pmes_Alerting(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Alerting(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Alerting *pMes = (Q931mes_Alerting *)IBuf; @@ -159,7 +159,7 @@ L3INT Q931Pmes_Alerting(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCH Function: Q931Umes_CallProceeding *****************************************************************************/ -L3INT Q931Umes_CallProceeding(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_CallProceeding(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -209,7 +209,7 @@ L3INT Q931Umes_CallProceeding(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBu Function: Q931Pmes_CallProceeding *****************************************************************************/ -L3INT Q931Pmes_CallProceeding(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_CallProceeding(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_CallProceeding *pMes = (Q931mes_CallProceeding *)IBuf; @@ -258,7 +258,7 @@ L3INT Q931Pmes_CallProceeding(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3INT ISize, Function: Q931Umes_CongestionControl *****************************************************************************/ -L3INT Q931Umes_CongestionControl(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O) +L3INT Q931Umes_CongestionControl(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O) { L3BOOL RetCode = L3FALSE; @@ -274,7 +274,7 @@ L3INT Q931Umes_CongestionControl(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR * Function: Q931Pmes_CongestionControl *****************************************************************************/ -L3INT Q931Pmes_CongestionControl(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_CongestionControl(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -289,7 +289,7 @@ L3INT Q931Pmes_CongestionControl(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3INT ISi Function: Q931Umes_Connect *****************************************************************************/ -L3INT Q931Umes_Connect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Connect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -354,7 +354,7 @@ L3INT Q931Umes_Connect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Function: Q931Pmes_Connect *****************************************************************************/ -L3INT Q931Pmes_Connect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Connect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Connect *pMes = (Q931mes_Connect *)IBuf; @@ -418,7 +418,7 @@ L3INT Q931Pmes_Connect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCH Function: Q931Umes_ConnectAck *****************************************************************************/ -L3INT Q931Umes_ConnectAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_ConnectAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -455,7 +455,7 @@ L3INT Q931Umes_ConnectAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, Function: Q931Pmes_ConnectAck *****************************************************************************/ -L3INT Q931Pmes_ConnectAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_ConnectAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_ConnectAck *pMes = (Q931mes_ConnectAck *)IBuf; @@ -487,7 +487,7 @@ L3INT Q931Pmes_ConnectAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3 Function: Q931Umes_Disconnect *****************************************************************************/ -L3INT Q931Umes_Disconnect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Disconnect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -532,7 +532,7 @@ L3INT Q931Umes_Disconnect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, Function: Q931Pmes_Disconnect *****************************************************************************/ -L3INT Q931Pmes_Disconnect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Disconnect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Disconnect *pMes = (Q931mes_Disconnect *)IBuf; @@ -574,7 +574,7 @@ L3INT Q931Pmes_Disconnect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3 Function: Q931Umes_Information *****************************************************************************/ -L3INT Q931Umes_Information(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Information(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -623,7 +623,7 @@ L3INT Q931Umes_Information(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, Function: Q931Pmes_Information *****************************************************************************/ -L3INT Q931Pmes_Information(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Information(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Information *pMes = (Q931mes_Information *)IBuf; @@ -669,7 +669,7 @@ L3INT Q931Pmes_Information(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L Function: Q931Umes_Notify *****************************************************************************/ -L3INT Q931Umes_Notify(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Notify(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -708,7 +708,7 @@ L3INT Q931Umes_Notify(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3IN Function: Q931Pmes_Notify *****************************************************************************/ -L3INT Q931Pmes_Notify(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Notify(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Notify *pMes = (Q931mes_Notify *)IBuf; @@ -742,7 +742,7 @@ L3INT Q931Pmes_Notify(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHA Function: Q931Umes_Progress *****************************************************************************/ -L3INT Q931Umes_Progress(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Progress(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -792,7 +792,7 @@ L3INT Q931Umes_Progress(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Function: Q931Pmes_Progress *****************************************************************************/ -L3INT Q931Pmes_Progress(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Progress(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Progress *pMes = (Q931mes_Progress *)IBuf; @@ -838,7 +838,7 @@ L3INT Q931Pmes_Progress(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UC Function: Q931Umes_Release *****************************************************************************/ -L3INT Q931Umes_Release(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Release(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -878,7 +878,7 @@ L3INT Q931Umes_Release(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Function: Q931Pmes_Release *****************************************************************************/ -L3INT Q931Pmes_Release(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Release(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Release *pMes = (Q931mes_Release *)IBuf; @@ -913,7 +913,7 @@ L3INT Q931Pmes_Release(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCH Function: Q931Umes_ReleaseComplete *****************************************************************************/ -L3INT Q931Umes_ReleaseComplete(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -953,7 +953,7 @@ L3INT Q931Umes_ReleaseComplete(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *O Function: Q931Pmes_ReleaseComplete *****************************************************************************/ -L3INT Q931Pmes_ReleaseComplete(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_ReleaseComplete *pMes = (Q931mes_ReleaseComplete *)IBuf; @@ -988,7 +988,7 @@ L3INT Q931Pmes_ReleaseComplete(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISiz Function: Q931Umes_Restart *****************************************************************************/ -L3INT Q931Umes_Restart(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O) +L3INT Q931Umes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O) { L3BOOL RetCode = L3FALSE; @@ -1003,7 +1003,7 @@ L3INT Q931Umes_Restart(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3 Function: Q931Pmes_Restart *****************************************************************************/ -L3INT Q931Pmes_Restart(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -1018,7 +1018,7 @@ L3INT Q931Pmes_Restart(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCH Function: Q931Umes_RestartAck *****************************************************************************/ -L3INT Q931Umes_RestartAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O) +L3INT Q931Umes_RestartAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O) { L3BOOL RetCode = L3FALSE; @@ -1033,7 +1033,7 @@ L3INT Q931Umes_RestartAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, Function: Q931Pmes_RestartAck *****************************************************************************/ -L3INT Q931Pmes_RestartAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_RestartAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -1048,7 +1048,7 @@ L3INT Q931Pmes_RestartAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3 Function: Q931Umes_Resume *****************************************************************************/ -L3INT Q931Umes_Resume(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Resume(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1078,7 +1078,7 @@ L3INT Q931Umes_Resume(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3IN Function: Q931Pmes_Resume *****************************************************************************/ -L3INT Q931Pmes_Resume(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Resume(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Resume *pMes = (Q931mes_Resume *)IBuf; @@ -1105,7 +1105,7 @@ L3INT Q931Pmes_Resume(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHA Function: Q931Umes_ResumeAck *****************************************************************************/ -L3INT Q931Umes_ResumeAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_ResumeAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1141,7 +1141,7 @@ L3INT Q931Umes_ResumeAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L Function: Q931Pmes_ResumeAck *****************************************************************************/ -L3INT Q931Pmes_ResumeAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_ResumeAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_ResumeAck *pMes = (Q931mes_ResumeAck *)IBuf; @@ -1172,7 +1172,7 @@ L3INT Q931Pmes_ResumeAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3U Function: Q931Umes_ResumeReject *****************************************************************************/ -L3INT Q931Umes_ResumeReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_ResumeReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1208,7 +1208,7 @@ L3INT Q931Umes_ResumeReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBu Function: Q931Pmes_ResumeReject *****************************************************************************/ -L3INT Q931Pmes_ResumeReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_ResumeReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_ResumeReject *pMes = (Q931mes_ResumeReject *)IBuf; @@ -1234,14 +1234,14 @@ L3INT Q931Pmes_ResumeReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, return rc; } -L3INT Q931Umes_Segment(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT OOff) +L3INT Q931Umes_Segment(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT OOff) { L3INT i = IOff; return IOff - i; } -L3INT Q931Pmes_Segment(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Segment(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -1253,7 +1253,7 @@ L3INT Q931Pmes_Segment(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCH Function: Q931Umes_Setup *****************************************************************************/ -L3INT Q931Umes_Setup(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ L3INT ir=0; @@ -1387,7 +1387,7 @@ L3INT Q931Umes_Setup(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT Called By: Q931ProcSetup *****************************************************************************/ -L3INT Q931Pmes_Setup(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Setup *pMes = (Q931mes_Setup *)IBuf; @@ -1502,7 +1502,7 @@ L3INT Q931Pmes_Setup(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR Function: Q931Umes_SetupAck *****************************************************************************/ -L3INT Q931Umes_SetupAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_SetupAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1547,7 +1547,7 @@ L3INT Q931Umes_SetupAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 Function: Q931Pmes_SetupAck *****************************************************************************/ -L3INT Q931Pmes_SetupAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_SetupAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_SetupAck *pMes = (Q931mes_SetupAck *)IBuf; @@ -1589,7 +1589,7 @@ L3INT Q931Pmes_SetupAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UC Function: Q931Umes_Status *****************************************************************************/ -L3INT Q931Umes_Status(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Status(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1630,7 +1630,7 @@ L3INT Q931Umes_Status(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3IN Function: Q931Pmes_Status *****************************************************************************/ -L3INT Q931Pmes_Status(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Status(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Status *pMes = (Q931mes_Status *)IBuf; @@ -1665,7 +1665,7 @@ L3INT Q931Pmes_Status(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHA Function: Q931Umes_StatusEnquiry *****************************************************************************/ -L3INT Q931Umes_StatusEnquiry(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_StatusEnquiry(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1695,7 +1695,7 @@ L3INT Q931Umes_StatusEnquiry(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBu Function: Q931Pmes_StatusEnquiry *****************************************************************************/ -L3INT Q931Pmes_StatusEnquiry(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_StatusEnquiry(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_StatusEnquiry *pMes = (Q931mes_StatusEnquiry *)IBuf; @@ -1722,7 +1722,7 @@ L3INT Q931Pmes_StatusEnquiry(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, Function: Q931Umes_Suspend *****************************************************************************/ -L3INT Q931Umes_Suspend(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_Suspend(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1752,7 +1752,7 @@ L3INT Q931Umes_Suspend(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Function: Q931Pmes_Suspend *****************************************************************************/ -L3INT Q931Pmes_Suspend(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_Suspend(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_Suspend *pMes = (Q931mes_Suspend *)IBuf; @@ -1779,7 +1779,7 @@ L3INT Q931Pmes_Suspend(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCH Function: Q931Umes_SuspendAck *****************************************************************************/ -L3INT Q931Umes_SuspendAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_SuspendAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1810,7 +1810,7 @@ L3INT Q931Umes_SuspendAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, Function: Q931Pmes_SuspendAck *****************************************************************************/ -L3INT Q931Pmes_SuspendAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_SuspendAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_SuspendAck *pMes = (Q931mes_SuspendAck *)IBuf; @@ -1837,7 +1837,7 @@ L3INT Q931Pmes_SuspendAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3 Function: Q931Umes_SuspendReject *****************************************************************************/ -L3INT Q931Umes_SuspendReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q931Umes_SuspendReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -1872,7 +1872,7 @@ L3INT Q931Umes_SuspendReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBu Function: Q931Pmes_SuspendReject *****************************************************************************/ -L3INT Q931Pmes_SuspendReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_SuspendReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; Q931mes_SuspendReject *pMes = (Q931mes_SuspendReject *)IBuf; @@ -1904,7 +1904,7 @@ L3INT Q931Pmes_SuspendReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, Function: Q931Umes_UserInformation *****************************************************************************/ -L3INT Q931Umes_UserInformation(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O) +L3INT Q931Umes_UserInformation(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O) { L3BOOL RetCode = L3FALSE; @@ -1919,7 +1919,7 @@ L3INT Q931Umes_UserInformation(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * Function: Q931Pmes_UserInformation *****************************************************************************/ -L3INT Q931Pmes_UserInformation(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q931Pmes_UserInformation(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; diff --git a/libs/openzap/src/isdn/Q932mes.c b/libs/openzap/src/isdn/Q932mes.c index c04d4f7ee4..b6dce79443 100644 --- a/libs/openzap/src/isdn/Q932mes.c +++ b/libs/openzap/src/isdn/Q932mes.c @@ -43,7 +43,7 @@ *****************************************************************************/ -L3INT Q932Umes_Facility(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q932Umes_Facility(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -61,7 +61,7 @@ L3INT Q932Umes_Facility(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Function: Q931Pmes_Facility *****************************************************************************/ -L3INT Q932Pmes_Facility(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q932Pmes_Facility(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -77,7 +77,7 @@ L3INT Q932Pmes_Facility(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UC *****************************************************************************/ -L3INT Q932Umes_Hold(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q932Umes_Hold(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -95,7 +95,7 @@ L3INT Q932Umes_Hold(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT I Function: Q931Pmes_Hold *****************************************************************************/ -L3INT Q932Pmes_Hold(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q932Pmes_Hold(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -111,7 +111,7 @@ L3INT Q932Pmes_Hold(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *****************************************************************************/ -L3INT Q932Umes_HoldAck(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q932Umes_HoldAck(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -129,7 +129,7 @@ L3INT Q932Umes_HoldAck(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3IN Function: Q931Pmes_HoldAck *****************************************************************************/ -L3INT Q932Pmes_HoldAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q932Pmes_HoldAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -145,7 +145,7 @@ L3INT Q932Pmes_HoldAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCH *****************************************************************************/ -L3INT Q932Umes_HoldReject(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q932Umes_HoldReject(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -163,7 +163,7 @@ L3INT Q932Umes_HoldReject(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L Function: Q931Pmes_HoldReject *****************************************************************************/ -L3INT Q932Pmes_HoldReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q932Pmes_HoldReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -179,7 +179,7 @@ L3INT Q932Pmes_HoldReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3 *****************************************************************************/ -L3INT Q932Umes_Register(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q932Umes_Register(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -197,7 +197,7 @@ L3INT Q932Umes_Register(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Function: Q931Pmes_Register *****************************************************************************/ -L3INT Q932Pmes_Register(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q932Pmes_Register(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -213,7 +213,7 @@ L3INT Q932Pmes_Register(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UC *****************************************************************************/ -L3INT Q932Umes_Retrieve(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q932Umes_Retrieve(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -231,7 +231,7 @@ L3INT Q932Umes_Retrieve(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Function: Q931Pmes_Retrieve *****************************************************************************/ -L3INT Q932Pmes_Retrieve(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q932Pmes_Retrieve(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -247,7 +247,7 @@ L3INT Q932Pmes_Retrieve(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UC *****************************************************************************/ -L3INT Q932Umes_RetrieveAck(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q932Umes_RetrieveAck(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -265,7 +265,7 @@ L3INT Q932Umes_RetrieveAck(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, Function: Q931Pmes_RetrieveAck *****************************************************************************/ -L3INT Q932Pmes_RetrieveAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q932Pmes_RetrieveAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; @@ -281,7 +281,7 @@ L3INT Q932Pmes_RetrieveAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L *****************************************************************************/ -L3INT Q932Umes_RetrieveReject(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) +L3INT Q932Umes_RetrieveReject(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { /* L3INT i = IOff; */ /* L3INT ir=0; */ @@ -299,7 +299,7 @@ L3INT Q932Umes_RetrieveReject(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBu Function: Q931Pmes_RetrieveReject *****************************************************************************/ -L3INT Q932Pmes_RetrieveReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) +L3INT Q932Pmes_RetrieveReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3BOOL RetCode = L3FALSE; diff --git a/libs/openzap/src/isdn/include/Q921.h b/libs/openzap/src/isdn/include/Q921.h index 4acdf8ece9..1f7f53a99b 100644 --- a/libs/openzap/src/isdn/include/Q921.h +++ b/libs/openzap/src/isdn/include/Q921.h @@ -1,129 +1,129 @@ -/***************************************************************************** - - FileName: q921.h - - Description: Contains headers of a Q.921 protocol. - - Note: This header file is the only include file that should be - acessed by users of the Q.921 stack. - - Interface: The Q.921 stack contains 2 layers. - - - One interface layer. - - One driver layer. - - The interface layer contains the interface functions required - for a layer 2 stack to be able to send and receive messages. - - The driver layer will simply feed bytes into the ship as - required and queue messages received out from the ship. - - Q921TimeTick The Q.921 like any other blackbox - modules contains no thread by it's own - and must therefore be called regularly - by an external 'thread' to do maintenance - etc. - - Q921Rx32 Receive message from layer 3. Called by - the layer 3 stack to send a message. - - - NOTE: The following are not yet implemented - - OnQ921Error Function called every if an error is - deteceted. - - OnQ921Log Function called if logging is active. - - - Maintenance/Configuration interface - Logging - DL_ message passing to layer 3 - Timers - Api commands to tell 921 to stop and start for a trunk - - Created: 27.dec.2000/JVB - - License/Copyright: - - Copyright (c) 2007, Jan Vidar Berger, Case Labs, Ltd. All rights reserved. - email:janvb@caselaboratories.com - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Case Labs, Ltd nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*****************************************************************************/ - -#ifndef _Q921 -#define _Q921 - -#define Q921MAXHDLCSPACE 3000 -#define L2UCHAR unsigned char /* Min 8 bit */ -#define L2INT int /* Min 16 bit signed */ -#define L2TRUNK Q921Data_t * - -typedef enum /* Network/User Mode. */ -{ - Q921_TE=0, /* 0 : User Mode */ - Q921_NT=1 /* 1 : Network Mode */ -} Q921NetUser_t; - -typedef struct Q921Data Q921Data_t; -typedef int (*Q921TxCB_t) (void *, L2UCHAR *, L2INT); - -#define INITIALIZED_MAGIC 42 -struct Q921Data -{ - L2UCHAR HDLCInQueue[Q921MAXHDLCSPACE]; - L2INT initialized; - L2UCHAR vs; - L2UCHAR vr; - L2INT state; - L2UCHAR sapi; - L2UCHAR tei; - Q921NetUser_t NetUser; - Q921TxCB_t Q921Tx21Proc; - Q921TxCB_t Q921Tx23Proc; - void *PrivateData21; - void *PrivateData23; - L2INT Q921HeaderSpace; - -}; - -void Q921_InitTrunk(L2TRUNK trunk, - L2UCHAR sapi, - L2UCHAR tei, - Q921NetUser_t NetUser, - L2INT hsize, - Q921TxCB_t cb21, - Q921TxCB_t cb23, - void *priv21, - void *priv23); -int Q921QueueHDLCFrame(L2TRUNK trunk, L2UCHAR *b, L2INT size); -int Q921Rx12(L2TRUNK trunk); -int Q921Rx32(L2TRUNK trunk, L2UCHAR * Mes, L2INT Size); -int Q921Start(L2TRUNK trunk); -#endif - +/***************************************************************************** + + FileName: q921.h + + Description: Contains headers of a Q.921 protocol. + + Note: This header file is the only include file that should be + acessed by users of the Q.921 stack. + + Interface: The Q.921 stack contains 2 layers. + + - One interface layer. + - One driver layer. + + The interface layer contains the interface functions required + for a layer 2 stack to be able to send and receive messages. + + The driver layer will simply feed bytes into the ship as + required and queue messages received out from the ship. + + Q921TimeTick The Q.921 like any other blackbox + modules contains no thread by it's own + and must therefore be called regularly + by an external 'thread' to do maintenance + etc. + + Q921Rx32 Receive message from layer 3. Called by + the layer 3 stack to send a message. + + + NOTE: The following are not yet implemented + + OnQ921Error Function called every if an error is + deteceted. + + OnQ921Log Function called if logging is active. + + + Maintenance/Configuration interface + Logging + DL_ message passing to layer 3 + Timers + Api commands to tell 921 to stop and start for a trunk + + Created: 27.dec.2000/JVB + + License/Copyright: + + Copyright (c) 2007, Jan Vidar Berger, Case Labs, Ltd. All rights reserved. + email:janvb@caselaboratories.com + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Case Labs, Ltd nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*****************************************************************************/ + +#ifndef _Q921 +#define _Q921 + +#define Q921MAXHDLCSPACE 3000 +#define L2UCHAR unsigned char /* Min 8 bit */ +#define L2INT int /* Min 16 bit signed */ +#define L2TRUNK Q921Data_t * + +typedef enum /* Network/User Mode. */ +{ + Q921_TE=0, /* 0 : User Mode */ + Q921_NT=1 /* 1 : Network Mode */ +} Q921NetUser_t; + +typedef struct Q921Data Q921Data_t; +typedef int (*Q921TxCB_t) (void *, L2UCHAR *, L2INT); + +#define INITIALIZED_MAGIC 42 +struct Q921Data +{ + L2UCHAR HDLCInQueue[Q921MAXHDLCSPACE]; + L2INT initialized; + L2UCHAR vs; + L2UCHAR vr; + L2INT state; + L2UCHAR sapi; + L2UCHAR tei; + Q921NetUser_t NetUser; + Q921TxCB_t Q921Tx21Proc; + Q921TxCB_t Q921Tx23Proc; + void *PrivateData21; + void *PrivateData23; + L2INT Q921HeaderSpace; + +}; + +void Q921_InitTrunk(L2TRUNK trunk, + L2UCHAR sapi, + L2UCHAR tei, + Q921NetUser_t NetUser, + L2INT hsize, + Q921TxCB_t cb21, + Q921TxCB_t cb23, + void *priv21, + void *priv23); +int Q921QueueHDLCFrame(L2TRUNK trunk, L2UCHAR *b, L2INT size); +int Q921Rx12(L2TRUNK trunk); +int Q921Rx32(L2TRUNK trunk, L2UCHAR * Mes, L2INT Size); +int Q921Start(L2TRUNK trunk); +#endif + diff --git a/libs/openzap/src/isdn/include/Q931.h b/libs/openzap/src/isdn/include/Q931.h index 3d9eee0338..fe8d3a8e8c 100644 --- a/libs/openzap/src/isdn/include/Q931.h +++ b/libs/openzap/src/isdn/include/Q931.h @@ -1917,7 +1917,7 @@ typedef struct the trunk Info entry. *****************************************************************************/ -typedef struct Q931_TrunkInfo Q931_TrunkInfo; +typedef struct Q931_TrunkInfo Q931_TrunkInfo_t; typedef L3INT (*Q931TxCB_t) (void *,L3UCHAR *, L3INT); typedef L3INT (*Q931ErrorCB_t) (void *,L3INT,L3INT,L3INT); @@ -2070,13 +2070,13 @@ typedef struct The proc tables are defined in Q931.c and initialized in Q931Initialize. *****************************************************************************/ -extern L3INT (*Q931Proc [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo *pTrunk, L3UCHAR *,L3INT); +extern L3INT (*Q931Proc [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo_t *pTrunk, L3UCHAR *,L3INT); -extern L3INT (*Q931Umes [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size); -extern L3INT (*Q931Pmes [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +extern L3INT (*Q931Umes [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size); +extern L3INT (*Q931Pmes [Q931MAXDLCT][Q931MAXMES]) (Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -extern L3INT (*Q931Uie [Q931MAXDLCT][Q931MAXIE] ) (Q931_TrunkInfo *pTrunk,ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -extern L3INT (*Q931Pie [Q931MAXDLCT][Q931MAXIE] ) (Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +extern L3INT (*Q931Uie [Q931MAXDLCT][Q931MAXIE] ) (Q931_TrunkInfo_t *pTrunk,ie *pIE,L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +extern L3INT (*Q931Pie [Q931MAXDLCT][Q931MAXIE] ) (Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); /***************************************************************************** @@ -2185,7 +2185,7 @@ extern L3INT (*Q931Pie [Q931MAXDLCT][Q931MAXIE] ) (Q931_TrunkInfo *pTrunk,L3 *****************************************************************************/ -extern Q931_TrunkInfo Q931Trunk[Q931MAXTRUNKS]; +extern Q931_TrunkInfo_t Q931Trunk[Q931MAXTRUNKS]; #include "Q932.h" @@ -2195,186 +2195,186 @@ extern Q931_TrunkInfo Q931Trunk[Q931MAXTRUNKS]; *****************************************************************************/ -L3INT Q931Pie_BearerCap(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_ChanID(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_ProgInd(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_Display(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_Signal(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_HLComp(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_Segment(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_DateTime(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_Cause(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_SendComplete(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_KeypadFac(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_NotifInd(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_CallID(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_RepeatInd(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_NetFac(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_CallingNum(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_CallingSub(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_CalledNum(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_CalledSub(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_CalledNum(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_TransNetSel(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_LLComp(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_CallState(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_RestartInd(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Pie_UserUser(Q931_TrunkInfo *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_BearerCap(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_ChanID(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_ProgInd(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_Display(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_Signal(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_HLComp(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_Segment(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_DateTime(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_Cause(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_SendComplete(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_KeypadFac(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_NotifInd(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_CallID(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_RepeatInd(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_NetFac(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_CallingNum(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_CallingSub(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_CalledNum(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_CalledSub(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_CalledNum(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_TransNetSel(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_LLComp(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_CallState(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_RestartInd(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); +L3INT Q931Pie_UserUser(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet); -L3INT Q931Uie_BearerCap(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3USHORT Q931Uie_CRV(Q931_TrunkInfo *pTrunk,L3UCHAR * IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_ChanID(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_ProgInd(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_Display(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_Signal(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_HLComp(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_Segment(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_DateTime(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_Cause(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_SendComplete(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_KeypadFac(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_NotifInd(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_CallID(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_RepeatInd(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_NetFac(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_CallingNum(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_CallingSub(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_CalledNum(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_CalledSub(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_TransNetSel(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_LLComp(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_CallState(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_RestartInd(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); -L3INT Q931Uie_UserUser(Q931_TrunkInfo *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_BearerCap(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3USHORT Q931Uie_CRV(Q931_TrunkInfo_t *pTrunk,L3UCHAR * IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_ChanID(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR *OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_ProgInd(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_Display(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_Signal(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_HLComp(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_Segment(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_DateTime(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_Cause(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_SendComplete(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_KeypadFac(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_NotifInd(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_CallID(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_RepeatInd(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_NetFac(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_CallingNum(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_CallingSub(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_CalledNum(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_CalledSub(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_TransNetSel(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_LLComp(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_CallState(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_RestartInd(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); +L3INT Q931Uie_UserUser(Q931_TrunkInfo_t *pTrunk,ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff); /***************************************************************************** Q.931 Message Pack/Unpack functions. Implemented in Q931mes.c *****************************************************************************/ -L3INT Q931Pmes_Alerting(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_CallProceeding(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Connect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_ConnectAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Progress(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Setup(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_SetupAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Resume(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_ResumeAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_ResumeReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Suspend(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_SuspendAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_SuspendReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_UserInformation(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Disconnect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Release(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_ReleaseComplete(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Restart(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_RestartAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_CongestionControl(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Information(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Notify(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Segment(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_Status(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Pmes_StatusEnquiry(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Alerting(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_CallProceeding(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Connect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_ConnectAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Progress(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_SetupAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Resume(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_ResumeAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_ResumeReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Suspend(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_SuspendAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_SuspendReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_UserInformation(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Disconnect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Release(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_RestartAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_CongestionControl(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Information(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Notify(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Segment(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_Status(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q931Pmes_StatusEnquiry(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q931Umes_Alerting(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_CallProceeding(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Connect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_ConnectAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Progress(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Setup(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_SetupAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Resume(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_ResumeAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_ResumeReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Suspend(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_SuspendAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_SuspendReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_UserInformation(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Disconnect(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Release(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_ReleaseComplete(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Restart(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_RestartAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_CongestionControl(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Information(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Notify(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Segment(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_Status(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q931Umes_StatusEnquiry(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Alerting(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_CallProceeding(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Connect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_ConnectAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Progress(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_SetupAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Resume(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_ResumeAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_ResumeReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Suspend(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_SuspendAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_SuspendReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_UserInformation(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Disconnect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Release(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_RestartAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_CongestionControl(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Information(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Notify(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Segment(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_Status(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q931Umes_StatusEnquiry(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); /***************************************************************************** Q.931 Process Function Prototyping. Implemented in Q931StateTE.c *****************************************************************************/ -L3INT Q931ProcAlertingTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcCallProceedingTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcConnectTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcConnectAckTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcProgressTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSetupTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSetupAckTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcResumeTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcResumeAckTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcResumeRejectTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSuspendTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSuspendAckTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSuspendRejectTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcUserInformationTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcDisconnectTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcReleaseTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcReleaseCompleteTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcRestartTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcRestartAckTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcCongestionControlTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcInformationTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcNotifyTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcStatusTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcStatusEnquiryTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSegmentTE(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcAlertingTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcCallProceedingTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcConnectTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcConnectAckTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcProgressTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSetupTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSetupAckTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcResumeTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcResumeAckTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcResumeRejectTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSuspendTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSuspendAckTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSuspendRejectTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcUserInformationTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcDisconnectTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcReleaseTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcReleaseCompleteTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcRestartTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcRestartAckTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcCongestionControlTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcInformationTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcNotifyTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcStatusTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcStatusEnquiryTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSegmentTE(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcAlertingNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcCallProceedingNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcConnectNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcConnectAckNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcProgressNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSetupNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSetupAckNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcResumeNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcResumeAckNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcResumeRejectNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSuspendNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSuspendAckNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSuspendRejectNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcUserInformationNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcDisconnectNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcReleaseNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcReleaseCompleteNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcRestartNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcRestartAckNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcCongestionControlNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcInformationNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcNotifyNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcStatusNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcStatusEnquiryNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcSegmentNT(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcAlertingNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcCallProceedingNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcConnectNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcConnectAckNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcProgressNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSetupNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSetupAckNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcResumeNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcResumeAckNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcResumeRejectNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSuspendNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSuspendAckNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSuspendRejectNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcUserInformationNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcDisconnectNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcReleaseNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcReleaseCompleteNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcRestartNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcRestartAckNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcCongestionControlNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcInformationNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcNotifyNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcStatusNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcStatusEnquiryNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcSegmentNT(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcUnknownMessage(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); -L3INT Q931ProcUnexpectedMessage(Q931_TrunkInfo *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcUnknownMessage(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); +L3INT Q931ProcUnexpectedMessage(Q931_TrunkInfo_t *pTrunk,L3UCHAR * b, L3INT iFrom); /***************************************************************************** Interface Function Prototypes. Implemented in Q931.c *****************************************************************************/ -void Q931TimeTick(Q931_TrunkInfo *pTrunk, L3ULONG ms); -L3INT Q931Rx23(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size); -L3INT Q931Tx32(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size); -L3INT Q931Rx43(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size); -L3INT Q931Tx34(Q931_TrunkInfo *pTrunk, L3UCHAR * Mes, L3INT Size); -void Q931SetError(Q931_TrunkInfo *pTrunk,L3INT ErrID, L3INT ErrPar1, L3INT ErrPar2); +void Q931TimeTick(Q931_TrunkInfo_t *pTrunk, L3ULONG ms); +L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3UCHAR * Mes, L3INT Size); +L3INT Q931Tx32(Q931_TrunkInfo_t *pTrunk, L3UCHAR * Mes, L3INT Size); +L3INT Q931Rx43(Q931_TrunkInfo_t *pTrunk, L3UCHAR * Mes, L3INT Size); +L3INT Q931Tx34(Q931_TrunkInfo_t *pTrunk, L3UCHAR * Mes, L3INT Size); +void Q931SetError(Q931_TrunkInfo_t *pTrunk,L3INT ErrID, L3INT ErrPar1, L3INT ErrPar2); void Q931SetDefaultErrorCB(Q931ErrorCB_t Q931ErrorPar); @@ -2384,25 +2384,25 @@ void Q931SetMesCreateCB(L3INT (*callback)()); void Q931SetDialectCreateCB(L3INT (*callback)(L3INT)); void Q931SetHeaderSpace(L3INT space); void Q931SetMesProc(L3UCHAR mes, L3UCHAR dialect, - L3INT (*Q931ProcFunc)(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom), - L3INT (*Q931UmesFunc)(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size), - L3INT (*Q931PmesFunc)(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize)); + L3INT (*Q931ProcFunc)(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom), + L3INT (*Q931UmesFunc)(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size), + L3INT (*Q931PmesFunc)(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize)); void Q931SetIEProc(L3UCHAR iec, L3UCHAR dialect, - L3INT (*Q931PieProc)(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet), - L3INT (*Q931UieProc)(Q931_TrunkInfo *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff)); + L3INT (*Q931PieProc)(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT *Octet), + L3INT (*Q931UieProc)(Q931_TrunkInfo_t *pTrunk, ie *pIE, L3UCHAR * IBuf, L3UCHAR * OBuf, L3INT *IOff, L3INT *OOff)); void Q931Initialize(); void Q931AddDialect(L3UCHAR iDialect, void (*Q931CreateDialectCB)(L3UCHAR iDialect)); L3INT Q931InitMesSetup(Q931mes_Setup *p); -L3INT Q931CreateCRV(Q931_TrunkInfo *pTrunk, L3INT * callIndex); -L3INT Q931AllocateCRV(Q931_TrunkInfo *pTrunk, L3INT iCRV, L3INT * callIndex); -L3INT Q931FindCRV(Q931_TrunkInfo *pTrunk, L3INT crv, L3INT *callindex); -L3INT Q931GetCallState(Q931_TrunkInfo *pTrunk, L3INT iCRV); -L3INT Q931StartTimer(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3USHORT iTimer); -L3INT Q931StopTimer(Q931_TrunkInfo *pTrunk, L3INT callindex, L3USHORT iTimer); -L3INT Q931SetState(Q931_TrunkInfo *pTrunk, L3INT callIndex, L3INT iState); +L3INT Q931CreateCRV(Q931_TrunkInfo_t *pTrunk, L3INT * callIndex); +L3INT Q931AllocateCRV(Q931_TrunkInfo_t *pTrunk, L3INT iCRV, L3INT * callIndex); +L3INT Q931FindCRV(Q931_TrunkInfo_t *pTrunk, L3INT crv, L3INT *callindex); +L3INT Q931GetCallState(Q931_TrunkInfo_t *pTrunk, L3INT iCRV); +L3INT Q931StartTimer(Q931_TrunkInfo_t *pTrunk, L3INT callIndex, L3USHORT iTimer); +L3INT Q931StopTimer(Q931_TrunkInfo_t *pTrunk, L3INT callindex, L3USHORT iTimer); +L3INT Q931SetState(Q931_TrunkInfo_t *pTrunk, L3INT callIndex, L3INT iState); L3ULONG Q931GetTime(); void Q931AddStateEntry(L3UCHAR iD, L3INT iState, L3INT iMes, L3UCHAR cDir); L3BOOL Q931IsEventLegal(L3UCHAR iD, L3INT iState, L3INT iMes, L3UCHAR cDir); @@ -2413,7 +2413,7 @@ L3BOOL Q931IsEventLegal(L3UCHAR iD, L3INT iState, L3INT iMes, L3UCHAR cDir); *****************************************************************************/ ie Q931AppendIE(L3UCHAR *pm, L3UCHAR *pi); -L3INT Q931GetUniqueCRV(Q931_TrunkInfo *pTrunk); +L3INT Q931GetUniqueCRV(Q931_TrunkInfo_t *pTrunk); L3INT Q931InitIEBearerCap(Q931ie_BearerCap *p); L3INT Q931InitIEChanID(Q931ie_ChanID *p); @@ -2431,10 +2431,10 @@ L3INT Q931InitIETransNetSel(Q931ie_TransNetSel * pIE); L3INT Q931InitIELLComp(Q931ie_LLComp * pIE); L3INT Q931InitIEHLComp(Q931ie_HLComp * pIE); -L3INT Q931Disconnect(Q931_TrunkInfo *pTrunk, L3INT iTo, L3INT iCRV, L3INT iCause); -L3INT Q931ReleaseComplete(Q931_TrunkInfo *pTrunk, L3INT iTo); +L3INT Q931Disconnect(Q931_TrunkInfo_t *pTrunk, L3INT iTo, L3INT iCRV, L3INT iCause); +L3INT Q931ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3INT iTo); -L3INT Q931Api_InitTrunk(Q931_TrunkInfo *pTrunk, +L3INT Q931Api_InitTrunk(Q931_TrunkInfo_t *pTrunk, Q931Dialect_t Dialect, Q931NetUser_t NetUser, Q931_TrunkType_t TrunkType, diff --git a/libs/openzap/src/isdn/include/Q932.h b/libs/openzap/src/isdn/include/Q932.h index 19b5c4c149..5d018a9187 100644 --- a/libs/openzap/src/isdn/include/Q932.h +++ b/libs/openzap/src/isdn/include/Q932.h @@ -154,38 +154,38 @@ typedef struct /***************************************************************************** Function Prototypes. *****************************************************************************/ -L3INT Q932ProcFacilityTE(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcHoldTE(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcHoldAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcHoldRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcRegisterTE(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcRetrieveTE(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcRetrieveAckTE(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcRetrieveRejectTE(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcFacilityTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcHoldTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcHoldAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcHoldRejectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcRegisterTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcRetrieveTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcRetrieveAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcRetrieveRejectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcFacilityNT(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcHoldNT(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcHoldAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcHoldRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcRegisterNT(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcRetrieveNT(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcRetrieveAckNT(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932ProcRetrieveRejectNT(Q931_TrunkInfo *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcFacilityNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcHoldNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcHoldAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcHoldRejectNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcRegisterNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcRetrieveNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcRetrieveAckNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); +L3INT Q932ProcRetrieveRejectNT(Q931_TrunkInfo_t *pTrunk, L3UCHAR * b, L3INT iFrom); -L3INT Q932Pmes_Facility(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q932Pmes_Hold(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q932Pmes_HoldAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q932Pmes_HoldReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q932Pmes_Register(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q932Pmes_Retrieve(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q932Pmes_RetrieveAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q932Pmes_RetrieveReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q932Pmes_Facility(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q932Pmes_Hold(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q932Pmes_HoldAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q932Pmes_HoldReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q932Pmes_Register(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q932Pmes_Retrieve(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q932Pmes_RetrieveAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); +L3INT Q932Pmes_RetrieveReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize); -L3INT Q932Umes_Facility(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q932Umes_Hold(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q932Umes_HoldAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q932Umes_HoldReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q932Umes_Register(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q932Umes_Retrieve(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q932Umes_RetrieveAck(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); -L3INT Q932Umes_RetrieveReject(Q931_TrunkInfo *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q932Umes_Facility(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q932Umes_Hold(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q932Umes_HoldAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q932Umes_HoldReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q932Umes_Register(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q932Umes_Retrieve(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q932Umes_RetrieveAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); +L3INT Q932Umes_RetrieveReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * OBuf, L3INT I, L3INT O); diff --git a/libs/openzap/src/testapp.c b/libs/openzap/src/testapp.c index 8160496c29..75ddae66e5 100644 --- a/libs/openzap/src/testapp.c +++ b/libs/openzap/src/testapp.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) zap_channel_t *chan; unsigned ms = 20; zap_codec_t codec = ZAP_CODEC_SLIN; - unsigned runs = 4; + unsigned runs = 1; if (zap_global_init() != ZAP_SUCCESS) { fprintf(stderr, "Error loading OpenZAP\n"); diff --git a/libs/openzap/src/testisdn.c b/libs/openzap/src/testisdn.c new file mode 100644 index 0000000000..c55905d3f4 --- /dev/null +++ b/libs/openzap/src/testisdn.c @@ -0,0 +1,36 @@ +#include "openzap.h" +#include "zap_isdn.h" + +static ZIO_SIGNAL_CB_FUNCTION(on_signal) +{ + return ZAP_FAIL; +} + +int main(int argc, char *argv[]) +{ + zap_span_t *span; + + zap_global_set_default_logger(ZAP_LOG_LEVEL_DEBUG); + + if (zap_global_init() != ZAP_SUCCESS) { + fprintf(stderr, "Error loading OpenZAP\n"); + exit(-1); + } + + printf("OpenZAP loaded\n"); + + if (zap_span_find("wanpipe", 1, &span) != ZAP_SUCCESS) { + fprintf(stderr, "Error finding OpenZAP span\n"); + } + + + zap_isdn_configure_span(span, Q931_TE, 0, on_signal); + zap_isdn_start(span); + + while(zap_test_flag(span->isdn_data, ZAP_ISDN_RUNNING)) { + sleep(1); + } + + zap_global_destroy(); + +} diff --git a/libs/openzap/src/zap_analog.c b/libs/openzap/src/zap_analog.c new file mode 100644 index 0000000000..dabea87c4e --- /dev/null +++ b/libs/openzap/src/zap_analog.c @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2007, Anthony Minessale II + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of the original author; nor the names of any contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "openzap.h" diff --git a/libs/openzap/src/zap_io.c b/libs/openzap/src/zap_io.c index 9a55b2cb27..5a65e0d52e 100644 --- a/libs/openzap/src/zap_io.c +++ b/libs/openzap/src/zap_io.c @@ -32,6 +32,7 @@ */ #include "openzap.h" +#include "zap_isdn.h" #include #ifdef ZAP_WANPIPE_SUPPORT #include "zap_wanpipe.h" @@ -45,6 +46,16 @@ static struct { zap_mutex_t *mutex; } globals; + +static char *TRUNK_TYPE_NAMES[] = { + "E1", + "T1", + "J1", + "BRI", + "NONE", + NULL +}; + static char *LEVEL_NAMES[] = { "EMERG", "ALERT", @@ -57,6 +68,31 @@ static char *LEVEL_NAMES[] = { NULL }; + +zap_trunk_type_t str2zap_trunk_type(char *name) +{ + int i; + zap_trunk_type_t t = ZAP_TRUNK_NONE; + + for (i = 0; i < ZAP_TRUNK_NONE; i++) { + if (!strcasecmp(name, TRUNK_TYPE_NAMES[i])) { + t = (zap_trunk_type_t) i; + break; + } + } + + return t; +} + +char *zap_trunk_type2str(zap_trunk_type_t type) +{ + if (type > ZAP_TRUNK_NONE) { + type = ZAP_TRUNK_NONE; + } + return TRUNK_TYPE_NAMES[(int)type]; +} + + static char *cut_path(char *in) { char *p, *ret = in; @@ -177,6 +213,9 @@ zap_status_t zap_span_close_all(zap_io_interface_t *zio) if (span->mutex) { zap_mutex_destroy(&span->mutex); } + if (span->isdn_data) { + free(span->isdn_data); + } } return i ? ZAP_SUCCESS : ZAP_FAIL; @@ -383,12 +422,11 @@ zap_status_t zap_channel_open(const char *name, uint32_t span_id, uint32_t chan_ zio = (zap_io_interface_t *) hashtable_search(globals.interface_hash, (char *)name); zap_mutex_unlock(globals.mutex); - if (span_id < ZAP_MAX_SPANS_INTERFACE && chan_id < ZAP_MAX_CHANNELS_SPAN && zio) { zap_channel_t *check; zap_mutex_lock(zio->spans[span_id].mutex); check = &zio->spans[span_id].channels[chan_id]; - + if (zap_test_flag(check, ZAP_CHANNEL_READY) && ! zap_test_flag(check, ZAP_CHANNEL_OPEN)) { status = check->zio->open(check); if (status == ZAP_SUCCESS) { @@ -974,6 +1012,8 @@ zap_status_t zap_global_init(void) uint32_t configured = 0; int modcount; + zap_isdn_init(); + memset(&interfaces, 0, sizeof(interfaces)); globals.interface_hash = create_hashtable(16, hashfromstring, equalkeys); modcount = 0; @@ -1110,3 +1150,32 @@ uint32_t zap_separate_string(char *buf, char delim, char **array, int arraylen) return argc; } + +void print_bits(uint8_t *b, int bl, char *buf, int blen, int e) +{ + int i,j = 0,k; + + if (blen < (bl * 10) + 2) { + return; + } + + for (k = 0 ; k < bl; k++) { + buf[j++] = '['; + if (e) { + for(i = 7; i >= 0; i--) { + buf[j++] = ((b[k] & (1 << i)) ? '1' : '0'); + } + } else { + for(i = 0; i < 8; i++) { + buf[j++] = ((b[k] & (1 << i)) ? '1' : '0'); + } + } + buf[j++] = ']'; + buf[j++] = '\n'; + } + + buf[j++] = '\0'; + +} + + diff --git a/libs/openzap/src/zap_isdn.c b/libs/openzap/src/zap_isdn.c new file mode 100644 index 0000000000..fbcc31bafc --- /dev/null +++ b/libs/openzap/src/zap_isdn.c @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2007, Anthony Minessale II + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of the original author; nor the names of any contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "openzap.h" +#include "zap_isdn.h" +#include "Q931.h" +#include "Q921.h" + + +static L3INT zap_isdn_931_err(void *pvt, L3INT id, L3INT p1, L3INT p2) +{ + zap_log(ZAP_LOG_ERROR, "ERROR: %d %d %d", id, p1, p2); + return 0; +} + +static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen) +{ + zap_span_t *span = (zap_span_t *) pvt; + Q931mes_Generic *gen = (Q931mes_Generic *) msg; + + assert(span != NULL); + + zap_log(ZAP_LOG_DEBUG, "Yay I got an event! %d\n", gen->MesType); + + return 0; +} + +static int zap_isdn_921_21(void *pvt, L2UCHAR *msg, L2INT mlen) +{ + zap_span_t *span = (zap_span_t *) pvt; + zap_size_t len = (zap_size_t) mlen; + assert(span != NULL); + return zap_channel_write(span->isdn_data->dchan, msg, &len) == ZAP_SUCCESS ? 0 : -1; +} + + +static void *zap_isdn_run(zap_thread_t *me, void *obj) +{ + zap_span_t *span = (zap_span_t *) obj; + zap_isdn_data_t *data = span->isdn_data; + unsigned char buf[1024]; + zap_size_t len = sizeof(buf); + + zap_log(ZAP_LOG_DEBUG, "ISDN thread starting.\n"); + + Q921Start(&data->q921); + + while(zap_test_flag(data, ZAP_ISDN_RUNNING)) { + zap_wait_flag_t flags = ZAP_READ; + zap_status_t status = zap_channel_wait(data->dchan, &flags, 100); + + switch(status) { + case ZAP_FAIL: + { + zap_log(ZAP_LOG_ERROR, "D-Chan Read Error!\n"); + snprintf(span->last_error, sizeof(span->last_error), "D-Chan Read Error!"); + goto done; + } + break; + case ZAP_TIMEOUT: + { + /*zap_log(ZAP_LOG_DEBUG, "Timeout!\n");*/ + /*Q931TimeTick(data->q931, L3ULONG ms);*/ + } + break; + default: + { + if (flags & ZAP_READ) { + len = sizeof(buf); + if (zap_channel_read(data->dchan, buf, &len) == ZAP_SUCCESS) { + /*char bb[512] = ""; + + print_bits(buf, (int)len, bb, sizeof(bb), 1); + zap_log(ZAP_LOG_DEBUG, "Read %d bytes\n%s\n", (int)len, bb); + */ + + Q921QueueHDLCFrame(&data->q921, buf, (int)len); + Q921Rx12(&data->q921); + } + } else { + zap_log(ZAP_LOG_DEBUG, "No Read FLAG!\n"); + } + } + break; + } + + } + + done: + + zap_channel_close(&data->dchans[0]); + zap_channel_close(&data->dchans[1]); + zap_clear_flag(span->isdn_data, ZAP_ISDN_RUNNING); + + zap_log(ZAP_LOG_DEBUG, "ISDN thread ended.\n"); + return NULL; +} + +zap_status_t zap_isdn_init(void) +{ + Q931Initialize(); + + return ZAP_SUCCESS; +} + +zap_status_t zap_isdn_start(zap_span_t *span) +{ + zap_set_flag(span->isdn_data, ZAP_ISDN_RUNNING); + return zap_thread_create_detached(zap_isdn_run, span); +} + +zap_status_t zap_isdn_configure_span(zap_span_t *span, Q921NetUser_t mode, Q931Dialect_t dialect, zio_signal_cb_t sig_cb) +{ + uint32_t x,i; + zap_channel_t *dchans[2] = {0}; + + if (span->signal_type) { + snprintf(span->last_error, sizeof(span->last_error), "Span is already configured for signalling."); + return ZAP_FAIL; + } + + if (span->trunk_type >= ZAP_TRUNK_NONE) { + snprintf(span->last_error, sizeof(span->last_error), "Unknown trunk type!"); + return ZAP_FAIL; + } + + for(i = 1; i <= span->chan_count; i++) { + if (span->channels[i].type == ZAP_CHAN_TYPE_DQ921) { + if (zap_channel_open(span->zio->name, span->span_id, i, &dchans[x]) == ZAP_SUCCESS) { + zap_log(ZAP_LOG_DEBUG, "opening d-channel #%d %d:%d\n", x, dchans[x]->span_id, dchans[x]->chan_id); + x++; + } + } + } + + if (!x) { + snprintf(span->last_error, sizeof(span->last_error), "Span has no D-Channels!"); + return ZAP_FAIL; + } + + + span->isdn_data = malloc(sizeof(*span->isdn_data)); + assert(span->isdn_data != NULL); + memset(span->isdn_data, 0, sizeof(*span->isdn_data)); + + span->isdn_data->sig_cb = sig_cb; + span->isdn_data->dchans[0] = dchans[0]; + span->isdn_data->dchans[1] = dchans[1]; + span->isdn_data->dchan = span->isdn_data->dchans[0]; + + Q921_InitTrunk(&span->isdn_data->q921, + 0, + 0, + mode, + 0, + zap_isdn_921_21, + (Q921TxCB_t)Q931Rx23, + span, + &span->isdn_data->q931); + + Q931Api_InitTrunk(&span->isdn_data->q931, + dialect, + mode, + span->trunk_type, + zap_isdn_931_34, + (Q931TxCB_t)Q921Rx32, + zap_isdn_931_err, + &span->isdn_data->q921, + span); + + + span->signal_type = ZAP_SIGTYPE_ISDN; + + return ZAP_SUCCESS; +} diff --git a/libs/openzap/src/zap_wanpipe.c b/libs/openzap/src/zap_wanpipe.c index c3ddbcbb9a..04dc44d507 100644 --- a/libs/openzap/src/zap_wanpipe.c +++ b/libs/openzap/src/zap_wanpipe.c @@ -203,6 +203,9 @@ static ZIO_CONFIGURE_FUNCTION(wanpipe_configure) if (!strcasecmp(var, "enabled")) { zap_log(ZAP_LOG_WARNING, "'enabled' command ignored when it's not the first command in a [span]\n"); + } else if (!strcasecmp(var, "trunk_type")) { + span->trunk_type = str2zap_trunk_type(val); + zap_log(ZAP_LOG_DEBUG, "setting trunk type to '%s'\n", zap_trunk_type2str(span->trunk_type)); } else if (!strcasecmp(var, "b-channel")) { configured += wp_configure_channel(&cfg, val, span, ZAP_CHAN_TYPE_B); } else if (!strcasecmp(var, "d-channel")) {