diff --git a/libs/openzap/src/isdn/Q931.c b/libs/openzap/src/isdn/Q931.c index 0e130a3668..ef2ddd63c2 100644 --- a/libs/openzap/src/isdn/Q931.c +++ b/libs/openzap/src/isdn/Q931.c @@ -319,7 +319,7 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT Size) { L3UCHAR *Mes = &buf[Q931L2HeaderSpace]; L3INT RetCode = Q931E_NO_ERROR; - Q931mes_Alerting *m = (Q931mes_Alerting *) pTrunk->L3Buf; + Q931mes_Generic *m = (Q931mes_Generic *) pTrunk->L3Buf; L3INT ISize; L3INT IOff = 0; @@ -409,7 +409,7 @@ L3INT Q931Rx43(Q931_TrunkInfo_t *pTrunk,L3UCHAR * buf, L3INT Size) L3INT Q931Tx32(Q931_TrunkInfo_t *pTrunk, L3UCHAR * Mes, L3INT Size) { L3INT OSize; - Q931mes_Alerting *ptr = (Q931mes_Alerting*)Mes; + Q931mes_Generic *ptr = (Q931mes_Generic*)Mes; L3INT RetCode = Q931E_NO_ERROR; L3INT iDialect = pTrunk->Dialect; diff --git a/libs/openzap/src/isdn/Q931StateNT.c b/libs/openzap/src/isdn/Q931StateNT.c index 55857c7268..3343170786 100644 --- a/libs/openzap/src/isdn/Q931StateNT.c +++ b/libs/openzap/src/isdn/Q931StateNT.c @@ -294,7 +294,7 @@ L3INT Q931ProcProgressNT(Q931_TrunkInfo_t *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]; + Q931mes_Generic *pMes = (Q931mes_Generic *)&buf[Q931L4HeaderSpace]; L3INT callIndex; L3INT ret=Q931E_NO_ERROR; diff --git a/libs/openzap/src/isdn/Q931StateTE.c b/libs/openzap/src/isdn/Q931StateTE.c index e0653b125d..eb9c2a38fb 100644 --- a/libs/openzap/src/isdn/Q931StateTE.c +++ b/libs/openzap/src/isdn/Q931StateTE.c @@ -376,7 +376,7 @@ L3INT Q931ProcProgressTE(Q931_TrunkInfo_t *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]; + Q931mes_Generic *pMes = (Q931mes_Generic *)&buf[Q931L4HeaderSpace]; L3INT callIndex; L3INT ret=Q931E_NO_ERROR; @@ -482,7 +482,7 @@ L3INT Q931ProcSetupAckTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) *****************************************************************************/ L3INT Q931ProcResumeTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { - Q931mes_Resume * pMes = (Q931mes_Resume *)&buf[Q931L4HeaderSpace]; + Q931mes_Generic * pMes = (Q931mes_Generic *)&buf[Q931L4HeaderSpace]; L3INT callIndex; L3INT ret = Q931E_NO_ERROR; @@ -750,7 +750,7 @@ L3INT Q931ProcDisconnectTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) *****************************************************************************/ L3INT Q931ProcReleaseTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { - Q931mes_Release *pMes = (Q931mes_Release *)&buf[Q931L4HeaderSpace]; + Q931mes_Generic *pMes = (Q931mes_Generic *)&buf[Q931L4HeaderSpace]; L3INT state = Q931GetCallState(pTrunk, pMes->CRV); L3INT ret = Q931E_NO_ERROR; if(state == Q931_U0 && iFrom == 2) @@ -772,7 +772,7 @@ L3INT Q931ProcReleaseTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) *****************************************************************************/ L3INT Q931ProcReleaseCompleteTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom) { - Q931mes_ReleaseComplete *pMes = (Q931mes_ReleaseComplete *)&buf[Q931L4HeaderSpace]; + Q931mes_Generic *pMes = (Q931mes_Generic *)&buf[Q931L4HeaderSpace]; L3INT state = Q931GetCallState(pTrunk, pMes->CRV); L3INT ret = Q931E_NO_ERROR; if(state == Q931_U0 && iFrom == 2) diff --git a/libs/openzap/src/isdn/Q931api.c b/libs/openzap/src/isdn/Q931api.c index b5e3662316..eba3c23acb 100644 --- a/libs/openzap/src/isdn/Q931api.c +++ b/libs/openzap/src/isdn/Q931api.c @@ -182,47 +182,47 @@ void Q931SetIEProc(L3UCHAR iec, L3UCHAR dialect, L3UCHAR * Q931GetIEBuf(L3UCHAR *pm) { L3UCHAR * s=NULL; - Q931mes_Alerting * pMes= (Q931mes_Alerting *)pm; + Q931mes_Generic * pMes= (Q931mes_Generic *)pm; switch(pMes->MesType) { case Q931mes_ALERTING : - trampoline(Q931mes_Alerting); + trampoline(Q931mes_Generic); break; case Q931mes_CALL_PROCEEDING : - trampoline(Q931mes_CallProceeding); + trampoline(Q931mes_Generic); break; case Q931mes_CONNECT : - trampoline(Q931mes_Connect); + trampoline(Q931mes_Generic); break; case Q931mes_CONNECT_ACKNOWLEDGE : - trampoline(Q931mes_ConnectAck); + trampoline(Q931mes_Generic); break; case Q931mes_PROGRESS : - trampoline(Q931mes_Progress); + trampoline(Q931mes_Generic); break; case Q931mes_SETUP : - trampoline(Q931mes_Setup); + trampoline(Q931mes_Generic); break; case Q931mes_SETUP_ACKNOWLEDGE : - trampoline(Q931mes_SetupAck); + trampoline(Q931mes_Generic); break; case Q931mes_RESUME : - trampoline(Q931mes_Resume); + trampoline(Q931mes_Generic); break; case Q931mes_RESUME_ACKNOWLEDGE : - trampoline(Q931mes_ResumeAck); + trampoline(Q931mes_Generic); break; case Q931mes_RESUME_REJECT : - trampoline(Q931mes_ResumeReject); + trampoline(Q931mes_Generic); break; case Q932mes_RETRIEVE : @@ -238,43 +238,43 @@ L3UCHAR * Q931GetIEBuf(L3UCHAR *pm) break; case Q931mes_SUSPEND : - trampoline(Q931mes_Suspend); + trampoline(Q931mes_Generic); break; case Q931mes_SUSPEND_ACKNOWLEDGE : - trampoline(Q931mes_SuspendAck); + trampoline(Q931mes_Generic); break; case Q931mes_SUSPEND_REJECT : - trampoline(Q931mes_SuspendReject); + trampoline(Q931mes_Generic); break; case Q931mes_USER_INFORMATION : - trampoline(Q931mes_UserInformation); + trampoline(Q931mes_Generic); break; case Q931mes_DISCONNECT : - trampoline(Q931mes_Disconnect); + trampoline(Q931mes_Generic); break; case Q931mes_RELEASE : - trampoline(Q931mes_Release); + trampoline(Q931mes_Generic); break; case Q931mes_RELEASE_COMPLETE : - trampoline(Q931mes_ReleaseComplete); + trampoline(Q931mes_Generic); break; case Q931mes_RESTART : - trampoline(Q931mes_Restart); + trampoline(Q931mes_Generic); break; case Q931mes_RESTART_ACKNOWLEDGE : - trampoline(Q931mes_RestartAck); + trampoline(Q931mes_Generic); break; case Q931mes_CONGESTION_CONTROL : - trampoline(Q931mes_CongestionControl); + trampoline(Q931mes_Generic); break; #if 0 case Q931mes_FACILITY : @@ -283,11 +283,11 @@ L3UCHAR * Q931GetIEBuf(L3UCHAR *pm) #endif case Q931mes_INFORMATION : - trampoline(Q931mes_Information); + trampoline(Q931mes_Generic); break; case Q931mes_NOTIFY : - trampoline(Q931mes_Notify); + trampoline(Q931mes_Generic); break; #if 0 @@ -297,15 +297,15 @@ L3UCHAR * Q931GetIEBuf(L3UCHAR *pm) #endif case Q931mes_STATUS : - trampoline(Q931mes_Status); + trampoline(Q931mes_Generic); break; case Q931mes_STATUS_ENQUIRY : - trampoline(Q931mes_StatusEnquiry); + trampoline(Q931mes_Generic); break; case Q931mes_SEGMENT : - trampoline(Q931mes_Segment); + trampoline(Q931mes_Generic); break; default: @@ -340,7 +340,7 @@ L3INT Q931GetMesSize(L3UCHAR *pMes) ie Q931AppendIE( L3UCHAR *pm, L3UCHAR *pi) { ie IE = 0; - Q931mes_Alerting * pMes= (Q931mes_Alerting *)pm; + Q931mes_Generic * pMes= (Q931mes_Generic *)pm; Q931ie_BearerCap * pIE= (Q931ie_BearerCap *)pi; L3INT iISize = pIE->Size; @@ -363,7 +363,7 @@ L3INT Q931GetUniqueCRV(Q931_TrunkInfo_t *pTrunk) return crv++; } -L3INT Q931InitMesSetup(Q931mes_Setup *pMes) +L3INT Q931InitMesSetup(Q931mes_Generic *pMes) { pMes->ProtDisc = 0x80; pMes->CRV = 0; /* CRV to be allocated, might be receive*/ @@ -393,7 +393,7 @@ L3INT Q931InitMesSetup(Q931mes_Setup *pMes) return 0; } -L3INT Q931InitMesResume(Q931mes_Resume * pMes) +L3INT Q931InitMesResume(Q931mes_Generic * pMes) { pMes->ProtDisc = 0x80; pMes->CRV = 0; /* CRV to be allocated, might be receive*/ @@ -404,7 +404,7 @@ L3INT Q931InitMesResume(Q931mes_Resume * pMes) return 0; } -L3INT Q931InitMesRestartAck(Q931mes_RestartAck * pMes) +L3INT Q931InitMesRestartAck(Q931mes_Generic * pMes) { pMes->ProtDisc = 0x80; pMes->CRV = 0; /* CRV to be allocated, might be receive*/ diff --git a/libs/openzap/src/isdn/Q931mes.c b/libs/openzap/src/isdn/Q931mes.c index b1c9851611..62777dd13f 100644 --- a/libs/openzap/src/isdn/Q931mes.c +++ b/libs/openzap/src/isdn/Q931mes.c @@ -54,7 +54,7 @@ L3INT Q931Umes_Alerting(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Alerting *mes = (Q931mes_Alerting*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; L3UCHAR mescode = (L3UCHAR)IBuf[IOff]; while(IOff < Size) @@ -96,7 +96,7 @@ L3INT Q931Umes_Alerting(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, break; } } - mes->Size = sizeof(Q931mes_Alerting) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -108,7 +108,7 @@ L3INT Q931Umes_Alerting(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -166,7 +166,7 @@ L3INT Q931Umes_CallProceeding(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *O /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_CallProceeding *mes = (Q931mes_CallProceeding*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -202,7 +202,7 @@ L3INT Q931Umes_CallProceeding(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *O break; } } - mes->Size = sizeof(Q931mes_CallProceeding) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -214,7 +214,7 @@ L3INT Q931Umes_CallProceeding(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, L3UCHAR *O 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -300,7 +300,7 @@ L3INT Q931Umes_Connect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Connect *mes = (Q931mes_Connect*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -351,7 +351,7 @@ L3INT Q931Umes_Connect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L break; } } - mes->Size = sizeof(Q931mes_Connect) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -363,7 +363,7 @@ L3INT Q931Umes_Connect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -431,7 +431,7 @@ L3INT Q931Umes_ConnectAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_ConnectAck *mes = (Q931mes_ConnectAck*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -453,7 +453,7 @@ L3INT Q931Umes_ConnectAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf break; } } - mes->Size = sizeof(Q931mes_ConnectAck) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -466,7 +466,7 @@ L3INT Q931Umes_ConnectAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -502,7 +502,7 @@ L3INT Q931Umes_Disconnect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Disconnect *mes = (Q931mes_Disconnect*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -533,7 +533,7 @@ L3INT Q931Umes_Disconnect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf break; } } - mes->Size = sizeof(Q931mes_Disconnect) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -545,7 +545,7 @@ L3INT Q931Umes_Disconnect(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -591,7 +591,7 @@ L3INT Q931Umes_Information(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBu /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Information *mes = (Q931mes_Information*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -626,7 +626,7 @@ L3INT Q931Umes_Information(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBu break; } } - mes->Size = sizeof(Q931mes_Information) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -638,7 +638,7 @@ L3INT Q931Umes_Information(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBu 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -688,7 +688,7 @@ L3INT Q931Umes_Notify(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Notify *mes = (Q931mes_Notify*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -713,7 +713,7 @@ L3INT Q931Umes_Notify(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 break; } } - mes->Size = sizeof(Q931mes_Notify) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -725,7 +725,7 @@ L3INT Q931Umes_Notify(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -763,7 +763,7 @@ L3INT Q931Umes_Progress(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Progress *mes = (Q931mes_Progress*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -799,7 +799,7 @@ L3INT Q931Umes_Progress(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, break; } } - mes->Size = sizeof(Q931mes_Progress) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -811,7 +811,7 @@ L3INT Q931Umes_Progress(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -861,7 +861,7 @@ L3INT Q931Umes_Release(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Release *mes = (Q931mes_Release*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -887,7 +887,7 @@ L3INT Q931Umes_Release(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L break; } } - mes->Size = sizeof(Q931mes_Release) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -899,7 +899,7 @@ L3INT Q931Umes_Release(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -938,7 +938,7 @@ L3INT Q931Umes_ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_ReleaseComplete *mes = (Q931mes_ReleaseComplete*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -964,7 +964,7 @@ L3INT Q931Umes_ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR break; } } - mes->Size = sizeof(Q931mes_ReleaseComplete) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -976,7 +976,7 @@ L3INT Q931Umes_ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1013,7 +1013,7 @@ L3INT Q931Pmes_ReleaseComplete(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT IS L3INT Q931Umes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { L3INT OOff=0; - Q931mes_Restart *mes = (Q931mes_Restart*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1039,7 +1039,7 @@ L3INT Q931Umes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L break; } } - mes->Size = sizeof(Q931mes_Restart) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1051,7 +1051,7 @@ L3INT Q931Umes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L L3INT Q931Pmes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; - Q931mes_Restart *pMes = (Q931mes_Restart *)IBuf; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1088,7 +1088,7 @@ L3INT Q931Pmes_Restart(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3U L3INT Q931Umes_RestartAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT IOff, L3INT Size) { L3INT OOff=0; - Q931mes_RestartAck *mes = (Q931mes_RestartAck*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1114,7 +1114,7 @@ L3INT Q931Umes_RestartAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf break; } } - mes->Size = sizeof(Q931mes_RestartAck) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1126,7 +1126,7 @@ L3INT Q931Umes_RestartAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf L3INT Q931Pmes_RestartAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; - Q931mes_RestartAck *pMes = (Q931mes_RestartAck *)IBuf; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1165,7 +1165,7 @@ L3INT Q931Umes_Resume(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Resume *mes = (Q931mes_Resume*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1181,7 +1181,7 @@ L3INT Q931Umes_Resume(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 break; } } - mes->Size = sizeof(Q931mes_Resume) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1193,7 +1193,7 @@ L3INT Q931Umes_Resume(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1224,7 +1224,7 @@ L3INT Q931Umes_ResumeAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_ResumeAck *mes = (Q931mes_ResumeAck*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1245,7 +1245,7 @@ L3INT Q931Umes_ResumeAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, break; } } - mes->Size = sizeof(Q931mes_ResumeAck) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1258,7 +1258,7 @@ L3INT Q931Umes_ResumeAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1293,7 +1293,7 @@ L3INT Q931Umes_ResumeReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * O /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_ResumeReject *mes = (Q931mes_ResumeReject*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1314,7 +1314,7 @@ L3INT Q931Umes_ResumeReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * O break; } } - mes->Size = sizeof(Q931mes_ResumeReject) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1327,7 +1327,7 @@ L3INT Q931Umes_ResumeReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR * O 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1378,7 +1378,7 @@ L3INT Q931Umes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I /* L3INT i = IOff; */ L3INT ir=0; L3INT OOff=0; - Q931mes_Setup *mes = (Q931mes_Setup*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1485,7 +1485,7 @@ L3INT Q931Umes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I break; } } - mes->Size = sizeof(Q931mes_Setup) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1493,7 +1493,7 @@ L3INT Q931Umes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I Function: Q931Pmes_Setup - Decription: Pack a Q931mes_Setup into a real Q.931 message. The user will + Decription: Pack a Q931mes_Generic into a real Q.931 message. The user will set up a SETUP message and issue this to the stack where it is processed by Q931ProcSetup that processes and validates it before it actually sends it out. This function is called @@ -1510,7 +1510,7 @@ L3INT Q931Umes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3I 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1629,7 +1629,7 @@ L3INT Q931Umes_SetupAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_SetupAck *mes = (Q931mes_SetupAck*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1660,7 +1660,7 @@ L3INT Q931Umes_SetupAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, break; } } - mes->Size = sizeof(Q931mes_SetupAck) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1672,7 +1672,7 @@ L3INT Q931Umes_SetupAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1718,7 +1718,7 @@ L3INT Q931Umes_Status(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Status *mes = (Q931mes_Status*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1744,7 +1744,7 @@ L3INT Q931Umes_Status(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 break; } } - mes->Size = sizeof(Q931mes_Status) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1757,7 +1757,7 @@ L3INT Q931Umes_Status(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1796,7 +1796,7 @@ L3INT Q931Umes_StatusEnquiry(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *O /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_StatusEnquiry *mes = (Q931mes_StatusEnquiry*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1812,7 +1812,7 @@ L3INT Q931Umes_StatusEnquiry(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *O break; } } - mes->Size = sizeof(Q931mes_StatusEnquiry) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1824,7 +1824,7 @@ L3INT Q931Umes_StatusEnquiry(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *O 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1855,7 +1855,7 @@ L3INT Q931Umes_Suspend(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_Suspend *mes = (Q931mes_Suspend*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1871,7 +1871,7 @@ L3INT Q931Umes_Suspend(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L break; } } - mes->Size = sizeof(Q931mes_Suspend) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1883,7 +1883,7 @@ L3INT Q931Umes_Suspend(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1914,7 +1914,7 @@ L3INT Q931Umes_SuspendAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_SuspendAck *mes = (Q931mes_SuspendAck*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) @@ -1931,7 +1931,7 @@ L3INT Q931Umes_SuspendAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf break; } } - mes->Size = sizeof(Q931mes_SuspendAck) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -1943,7 +1943,7 @@ L3INT Q931Umes_SuspendAck(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ @@ -1974,7 +1974,7 @@ L3INT Q931Umes_SuspendReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *O /* L3INT i = IOff; */ /* L3INT ir=0; */ L3INT OOff=0; - Q931mes_SuspendReject *mes = (Q931mes_SuspendReject*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -1995,7 +1995,7 @@ L3INT Q931Umes_SuspendReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *O break; } } - mes->Size = sizeof(Q931mes_SuspendReject) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -2007,7 +2007,7 @@ L3INT Q931Umes_SuspendReject(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *O 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; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ diff --git a/libs/openzap/src/isdn/include/Q931.h b/libs/openzap/src/isdn/include/Q931.h index 00e4f3738f..28b16873ea 100644 --- a/libs/openzap/src/isdn/include/Q931.h +++ b/libs/openzap/src/isdn/include/Q931.h @@ -1373,6 +1373,7 @@ typedef struct ie Segment; /* Segmented message */ ie BearerCap; /* Bearer Capability */ ie Cause; /* Cause */ + ie CallState; /* Call State */ ie CallID; /* Call Identity */ ie ChanID; /* Channel Identification */ ie ProgInd; /* Progress Indicator */ @@ -1396,6 +1397,8 @@ typedef struct ie CallingSub; /* Calling Party Subaddress */ ie RedirNum; /* Redirection Number */ ie TransNetSel; /* Transmit Network Selection */ + ie LLRepeatInd; /* Repeat Indicator 2 LLComp */ + ie RestartWin; /* Restart Window */ ie RestartInd; /* Restart Indicator */ ie LLComp; /* Low Layer Compatibility */ ie HLComp; /* High Layer Compatibility */ @@ -1405,505 +1408,6 @@ typedef struct }Q931mes_Generic; -/***************************************************************************** - - Struct: Q931mes_Alerting - - Description: This message is send by the called party to indicate that - the phone is ringing. - - The message consist of an header that MUST be identical with - Q931mes_Header, a fixed number of IE flags w/offset, and - a dynamic buffer storing normalized IE's. - -*****************************************************************************/ -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie BearerCap; /* Bearer Capability */ - ie ChanID; /* Channel Identification */ - ie ProgInd; /* Progress Indicator */ - ie Display; /* Display */ - ie Signal; /* Signal */ - ie HLComp; /* High Layer Compatibility */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Alerting; - -/***************************************************************************** - - Struct: Q931mes_CallProceeding - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie BearerCap; /* Bearer Capability */ - ie ChanID; /* Channel Identification */ - ie ProgInd; /* Progress Indicator */ - ie Display; /* Display */ - ie HLComp; /* High Layer Compatibility */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_CallProceeding; - -/***************************************************************************** - - Struct: Q931mes_Connect - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie BearerCap; /* Bearer Capability */ - ie ChanID; /* Channel Identification */ - ie ProgInd; /* Progress Indicator */ - ie Display; /* Display */ - ie DateTime; /* Date/Time */ - ie Signal; /* Signal */ - ie LLComp; /* Low Layer Compatibility */ - ie HLComp; /* High layer Compatibility */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Connect; - -/***************************************************************************** - - Struct: Q931mes_ConnectAck - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Display; /* Display */ - ie Signal; /* Signal */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_ConnectAck; - -/***************************************************************************** - - Struct: Q931mes_Disconnect - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Cause; /* Cause */ - ie ProgInd; /* Progress Indicator */ - ie Display; /* Display */ - ie Signal; /* Signal */ -#ifdef Q931_X25_SUPPORT - ie UserUser; /* User - user. Packed Mode. */ -#endif - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Disconnect; - -/***************************************************************************** - - Struct: Q931mes_Information - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie SendComplete; /* Sending Complete */ - ie Display; /* Display */ - ie KeypadFac; /* Keypad facility */ - ie Signal; /* Signal */ - ie CalledNum; /* Called party number */ -#ifdef Q931_X25_SUPPORT - ie Cause; /* Cause (packed only) */ -#endif - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Information; - -/***************************************************************************** - - Struct: Q931mes_Notify - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie BearerCap; /* Bearer Capability */ - ie NotifInd; /* Notification Indicator */ - ie Display; /* Display */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Notify; - -/***************************************************************************** - - Struct: Q931mes_Progress - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie BearerCap; /* Bearer Capability */ - ie Cause; /* Cause */ - ie ProgInd; /* Progress Indicator */ - ie Display; /* Display */ - ie HLComp; /* High Layer Compatibility */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Progress; - -/***************************************************************************** - - Struct: Q931mes_Release - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Cause; /* Cause */ - ie Display; /* Display */ - ie Signal; /* Signal */ -#ifdef Q931_X25_SUPPORT - ie UserUser; /* User-User packed mode */ -#endif - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Release; - -/***************************************************************************** - - Struct: Q931mes_ReleaseComplete - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Cause; /* Cause */ - ie Display; /* Display */ - ie Signal; /* Signal */ -#ifdef Q931_X25_SUPPORT - ie UserUser; /* User-User packed mode */ -#endif - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_ReleaseComplete; - -/***************************************************************************** - - Struct: Q931mes_Resume - -*****************************************************************************/ -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie CallID; /* Call Identity */ - L3UCHAR buf[1]; -}Q931mes_Resume; - -/***************************************************************************** - - Struct: Q931mes_ResumeAck - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie ChanID; /* Channel ID */ - ie Display; /* Display */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_ResumeAck; - -/***************************************************************************** - - Struct: Q931mes_ResumeReject - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Cause; /* Cause */ - ie Display; /* Display */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_ResumeReject; - -/***************************************************************************** - - Struct: Q931mes_Segment - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Segment; - -/***************************************************************************** - - Struct: Q931mes_Setup - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie SendComplete; /* Sending Complete */ - ie RepeatInd; /* Repeat Indicator */ - ie BearerCap; /* Bearer Capability */ - ie ChanID; /* Channel ID */ - ie ProgInd; /* Progress Indicator */ - ie NetFac; /* Network-specific facilities */ - /* Note: Up to 4 NetFac's may be */ - /* included. */ - ie Display; /* Display */ - ie DateTime; /* Date/Time */ - ie KeypadFac; /* Keypad Facility */ - ie Signal; /* Signal */ - ie CallingNum; /* Calling party number */ - ie CallingSub; /* Calling party sub address */ - ie CalledNum; /* Called party number */ - ie CalledSub; /* Called party sub address */ - ie TransNetSel; /* Transit network selection */ - ie LLRepeatInd; /* Repeat Indicator 2 LLComp */ - ie LLComp; /* Low layer compatibility */ - ie HLComp; /* High layer compatibility */ - -#ifdef Q931_X25_SUPPORT - /* Packed mode additions */ - ie IndoRate; /* Information Rate */ - ie EndEndDelay; /* End-end transit delay */ - ie TransDelayInd; /* TRansit delay selection and ind. */ - ie PackParam; /* Packed layer binary parameters */ - ie PackWinSize; /* Packed layer window size */ - ie PackSize; /* Packet Size */ - ie ClosedUserGrp; /* Closed User Group */ - ie RevChargInd; /* Reverse charhing indicator */ - ie RedirNum; /* Redirection number */ - ie UserUser; /* User-user. */ -#endif - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Setup; - -/***************************************************************************** - - Struct: Q931mes_SetupAck - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie ChanID; /* Channel ID */ - ie ProgInd; /* Progress Indicator */ - ie Display; /* Display */ - ie Signal; /* Signal */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_SetupAck; - -/***************************************************************************** - - Struct: Q931mes_Status - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Cause; /* Cause */ - ie CallState; /* Call State */ - ie Display; /* Display */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Status; - -/***************************************************************************** - - Struct: Q931mes_StatusEnquire - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Display; /* Display */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_StatusEnquiry; - -/***************************************************************************** - - Struct: Q931mes_Suspend - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie CallID; /* Call Identity */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Suspend; - -/***************************************************************************** - - Struct: Q931mes_SuspendAck - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Display; /* Display */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_SuspendAck; - -/***************************************************************************** - - Struct: Q931mes_SuspendReject - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie Cause; /* Cause */ - ie Display; /* Display */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_SuspendReject; - -/***************************************************************************** - - Struct: Q931mes_CongestionControl - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie CongLevel; /* Congestion level */ - ie Cause; /* Cause */ - ie Display; /* Display */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_CongestionControl; - -/***************************************************************************** - - Struct: Q931mes_UserInformation - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie MoreData; /* More data */ - ie UserUser; /* User-user */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_UserInformation; - -/***************************************************************************** - - Struct: Q931mes_Restart - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie ChanID; /* Channel identification */ - ie Display; /* Display */ - ie RestartWin; /* Restart Window */ - ie RestartInd; /* Restart indicator */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_Restart; - -/***************************************************************************** - - Struct: Q931mes_RestartAck - -*****************************************************************************/ - -typedef struct -{ - L3UINT Size; /* Size of message in bytes */ - L3UCHAR ProtDisc; /* Protocol Discriminator */ - L3UCHAR MesType; /* Message type */ - L3INT CRV; /* Call reference value */ - ie ChanID; /* Channel identification */ - ie Display; /* Display */ - ie RestartWin; /* Restart Window */ - ie RestartInd; /* Restart Indicator */ - L3UCHAR buf[1]; /* Dynamic buffer */ -}Q931mes_RestartAck; /***************************************************************************** @@ -2396,8 +1900,8 @@ void Q931SetIEProc(L3UCHAR iec, L3UCHAR dialect, void Q931Initialize(); void Q931AddDialect(L3UCHAR iDialect, void (*Q931CreateDialectCB)(L3UCHAR iDialect)); -L3INT Q931InitMesSetup(Q931mes_Setup *p); -L3INT Q931InitMesRestartAck(Q931mes_RestartAck * pMes); +L3INT Q931InitMesSetup(Q931mes_Generic *p); +L3INT Q931InitMesRestartAck(Q931mes_Generic * pMes); L3INT Q931CreateCRV(Q931_TrunkInfo_t *pTrunk, L3INT * callIndex); L3INT Q931AllocateCRV(Q931_TrunkInfo_t *pTrunk, L3INT iCRV, L3INT * callIndex); diff --git a/libs/openzap/src/isdn/nationalmes.c b/libs/openzap/src/isdn/nationalmes.c index c32398d00d..70f995d245 100644 --- a/libs/openzap/src/isdn/nationalmes.c +++ b/libs/openzap/src/isdn/nationalmes.c @@ -56,7 +56,7 @@ L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, /* L3INT i = IOff; */ L3INT ir=0; L3INT OOff=0; - Q931mes_Setup *mes = (Q931mes_Setup*)OBuf; + Q931mes_Generic *mes = (Q931mes_Generic*)OBuf; L3INT rc=Q931E_NO_ERROR; while(IOff < Size) { @@ -166,7 +166,7 @@ L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, break; } } - mes->Size = sizeof(Q931mes_Setup) - 1 + OOff; + mes->Size = sizeof(Q931mes_Generic) - 1 + OOff; return Q931E_NO_ERROR; } @@ -174,7 +174,7 @@ L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, Function: nationalPmes_Setup - Decription: Pack a Q931mes_Setup into a real Q.931 message. The user will + Decription: Pack a Q931mes_Generic into a real Q.931 message. The user will set up a SETUP message and issue this to the stack where it is processed by Q931ProcSetup that processes and validates it before it actually sends it out. This function is called @@ -191,7 +191,7 @@ L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3UCHAR *OBuf, L3INT nationalPmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize) { L3INT rc = Q931E_NO_ERROR; - Q931mes_Setup *pMes = (Q931mes_Setup *)IBuf; + Q931mes_Generic *pMes = (Q931mes_Generic *)IBuf; L3INT Octet = 0; /* Q931 Message Header */ diff --git a/libs/openzap/src/zap_isdn.c b/libs/openzap/src/zap_isdn.c index 814a19c237..7da934b0bb 100644 --- a/libs/openzap/src/zap_isdn.c +++ b/libs/openzap/src/zap_isdn.c @@ -68,7 +68,7 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen) Q931mes_Generic *gen = (Q931mes_Generic *) msg; - Q931mes_Restart * restart = (Q931mes_Restart*)msg; + Q931mes_Generic * restart = (Q931mes_Generic*)msg; L3INT ieoff = Q931GetIEOffset(restart->RestartInd); Q931ie_RestartInd * restartind = (void *)(&restart->buf + (ieoff * sizeof(restart->buf[1]))); @@ -76,10 +76,10 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen) assert(span != NULL); assert(data != NULL); - printf("WTF: %d", ((Q931mes_Restart*)gen)->Size); - zap_log(ZAP_LOG_DEBUG, "Yay I got an event! %d %d\n", gen->MesType, ((Q931mes_Restart*)gen)->Size); + printf("WTF: %d", ((Q931mes_Generic*)gen)->Size); + zap_log(ZAP_LOG_DEBUG, "Yay I got an event! %d %d\n", gen->MesType, ((Q931mes_Generic*)gen)->Size); zap_log(ZAP_LOG_DEBUG, "send ack %d\n", restartind->Class); - zap_log(ZAP_LOG_DEBUG, "send ack %d\n", ((Q931mes_Restart*)gen)->Size); + zap_log(ZAP_LOG_DEBUG, "send ack %d\n", ((Q931mes_Generic*)gen)->Size); printf("XXXXXXXXXXXXx"); gen->MesType = Q931mes_RESTART_ACKNOWLEDGE;