libisdn
|
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "Q921.h"
#include "Q931.h"
#include "Q931priv.h"
#include "Q931call.h"
#include <assert.h>
Go to the source code of this file.
#define Q931_MAX_ERROR 32 |
Definition at line 724 of file Q931.c.
Referenced by q931_error_to_name().
#define Q931_TRUNK_FLAG_GET_FUNC | ( | _name, | |
_flag | |||
) |
Q931_API L3BOOL _name(Q931_TrunkInfo_t *trunk) { \ assert(trunk); \ return Q931TrunkIsSetFlag(trunk, _flag); \ }
Macro used for mass-defining flag get functions
[in] | _name | Name of flag |
[in] | _flag | Value of flag |
#define Q931_TRUNK_FLAG_SET_FUNC | ( | _name, | |
_flag | |||
) |
Q931_API void _name(Q931_TrunkInfo_t *trunk, L3BOOL enable) { \ assert(trunk); \ if (enable) { \ Q931TrunkSetFlag(trunk, _flag); \ } else { \ Q931TrunkClearFlag(trunk, _flag); \ } \ }
Macro used for mass-defining flag set functions
[in] | _name | Name of flag |
[in] | _flag | Value of flag |
Q931_API const char* q931_error_to_name | ( | q931_error_t | error | ) |
Return description of error code
[in] | error | Error code |
Definition at line 731 of file Q931.c.
References Q931_MAX_ERROR.
L3INT Q931Die | ( | Q931_TrunkInfo_t * | trunk, |
Q931ie_Generic * | ie, | ||
struct strstream * | ostream | ||
) |
Invoke IE specific debug function
[in] | trunk | Q.931 trunk |
[in] | ie | Pointer to Information Element |
Definition at line 1189 of file Q931.c.
References Q931_TrunkInfo::Dialect, Q931ie_Generic::IEId, Q931DialectGetDieProc(), and Q931E_INTERNAL.
Referenced by Q931Dmes_Generic().
L3BOOL Q931DieIsNull | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR | id | ||
) |
Check whether information element has a debug function available
[in] | trunk | Q.931 trunk |
[in] | id | Information element id to check |
Definition at line 1233 of file Q931.c.
References Q931_TrunkInfo::Dialect, and Q931DialectGetDieProc().
Referenced by Q931Dmes_Generic().
Q931_API Q931LogLevel_t Q931GetLogLevel | ( | Q931_TrunkInfo_t * | trunk | ) |
Get log level
[in] | trunk | Q.931 trunk |
Definition at line 836 of file Q931.c.
References Q931_TrunkInfo::loglevel, and Q931_LOG_NONE.
Q931_API const char* Q931GetLogLevelName | ( | Q931_TrunkInfo_t * | trunk | ) |
Get name of log level set on trunk
[in] | trunk | Q.931 trunk |
Definition at line 865 of file Q931.c.
References Q931_TrunkInfo::loglevel, and Q931_LOG_NONE.
L3ULONG Q931GetTime | ( | void | ) |
Get current time in milliseconds
Definition at line 654 of file Q931.c.
References L3ULONG, and Q931GetTimeProc.
Referenced by Q931CallRestartTimer(), Q931CallStartTimer(), and Q931TimerTick().
Q931_API void Q931Initialize | ( | void | ) |
Initialize Q.931 stack
Definition at line 178 of file Q931.c.
References ATT5ESSCreateTE(), Q931_Dialect_5ESS, Q931_Dialect_Q931, Q931_NT, Q931_TE, Q931CreateNT(), Q931CreateTE(), Q931DialectRegister(), and Q931DialectRegistryInit().
L3INT Q931Log | ( | const Q931_TrunkInfo_t * | trunk, |
Q931LogLevel_t | level, | ||
const char * | fmt, | ||
... | |||
) |
Log formatted string
[in] | trunk | Q.931 trunk |
[in] | level | Log level of message |
[in] | fmt | Format string |
[in] | ... | Optional arguments |
Definition at line 758 of file Q931.c.
References L3INT, Q931_TrunkInfo::loglevel, Q931_TrunkInfo::PrivateDataLog, Q931_LOGBUFSIZE, and Q931_TrunkInfo::Q931LogCBProc.
Referenced by Q931CallDump(), Q931CallNew(), Q931CallRestartTimer(), Q931CallSendEvent(), Q931CallSetState(), Q931CallStartTimer(), Q931CallStopAllTimers(), Q931CallStopTimer(), Q931Die_CalledSub(), Q931DumpAllCalls(), Q931MesgErrorsPrint(), Q931MesgHeader(), Q931Pie_BearerCap(), Q931Pmes_Generic(), Q931Proc(), Q931ProcAlertingNT(), Q931ProcCallProceedingNT(), Q931ProcConnectAckNT(), Q931ProcConnectNT(), Q931ProcDisconnectNT(), Q931ProcDisconnectTE(), Q931ProcProgressNT(), Q931ProcResumeAckNT(), Q931ProcResumeRejectNT(), Q931ProcSetupAckNT(), Q931ProcSetupNT(), Q931ProcSetupTE(), Q931ProcSuspendAckNT(), Q931ProcSuspendNT(), Q931ProcSuspendRejectNT(), Q931ProcTimeoutT301NT(), Q931ProcTimeoutT301TE(), Q931ProcTimeoutT302NT(), Q931ProcTimeoutT302TE(), Q931ProcTimeoutT303NT(), Q931ProcTimeoutT303TE(), Q931ProcTimeoutT304NT(), Q931ProcTimeoutT304TE(), Q931ProcTimeoutT305NT(), Q931ProcTimeoutT305TE(), Q931ProcTimeoutT306NT(), Q931ProcTimeoutT307NT(), Q931ProcTimeoutT308NT(), Q931ProcTimeoutT308TE(), Q931ProcTimeoutT309NT(), Q931ProcTimeoutT309TE(), Q931ProcTimeoutT310NT(), Q931ProcTimeoutT310TE(), Q931ProcTimeoutT311TE(), Q931ProcTimeoutT312NT(), Q931ProcTimeoutT313NT(), Q931ProcTimeoutT313TE(), Q931ProcTimeoutT314NT(), Q931ProcTimeoutT314TE(), Q931ProcTimeoutT316NT(), Q931ProcTimeoutT316TE(), Q931ProcTimeoutT317NT(), Q931ProcTimeoutT317TE(), Q931ProcTimeoutT318TE(), Q931ProcTimeoutT319TE(), Q931ProcTimeoutT320NT(), Q931ProcTimeoutT321NT(), Q931ProcTimeoutT321TE(), Q931ProcTimeoutT322NT(), Q931ProcTimeoutT322TE(), Q931ProcUnexpectedMessage(), Q931ProcUnknownMessage(), Q931Rx23(), Q931Rx43(), Q931TimeoutDummy(), Q931TimerTick(), Q931Tx32(), Q931Tx34(), Q931Uie_ChanID(), Q931Uie_Generic(), and Q931Umes_Generic().
L3INT Q931LogRaw | ( | const Q931_TrunkInfo_t * | trunk, |
Q931LogLevel_t | level, | ||
const char * | str | ||
) |
Definition at line 787 of file Q931.c.
References Q931_TrunkInfo::loglevel, Q931_TrunkInfo::PrivateDataLog, and Q931_TrunkInfo::Q931LogCBProc.
Referenced by Q931Dmes_Generic().
L3INT Q931Pie | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR | id, | ||
L3UCHAR * | IBuf, | ||
L3UCHAR * | OBuf, | ||
L3INT * | Octet | ||
) |
Invoke IE specific encoder function
[in] | trunk | Q.931 trunk |
[in] | id | ID of information element (type) |
[in] | IBuf | Input buffer |
[out] | OBuf | Output buffer |
[in,out] | Octet | Input buffer offset |
Definition at line 1171 of file Q931.c.
References Q931_TrunkInfo::Dialect, Q931DialectGetPieProc(), and Q931E_INTERNAL.
Referenced by Q931Pmes_Generic().
L3INT Q931PieDummy | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR * | IBuf, | ||
L3UCHAR * | OBuf, | ||
L3INT * | Octet | ||
) |
Dummy function for IE encoding.
[in] | trunk | Q.931 trunk |
[in] | IBuf | Message input buffer |
[out] | OBuf | Message output buffer (encoded IE) |
[out] | Octet | Output buffer offset |
Definition at line 167 of file Q931.c.
References Q931E_UNKNOWN_IE.
L3BOOL Q931PieIsNull | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR | id | ||
) |
Check whether information element has a encoder function available
[in] | trunk | Q.931 trunk |
[in] | id | Information element id to check |
Definition at line 1220 of file Q931.c.
References Q931_TrunkInfo::Dialect, and Q931DialectGetPieProc().
Referenced by Q931Pmes_Generic().
L3INT Q931Pmes | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR | id, | ||
Q931mes_Generic * | IBuf, | ||
L3INT | ISize, | ||
L3UCHAR * | OBuf, | ||
L3INT * | OSize | ||
) |
Invoke message specific encoder function
[in] | trunk | Q.931 trunk |
[in] | id | ID of message (type) |
[in] | IBuf | Input buffer |
[in] | ISize | Size of input message |
[out] | OBuf | Output buffer |
[out] | OSize | Output message size |
Definition at line 1125 of file Q931.c.
References Q931_TrunkInfo::Dialect, Q931DialectGetPmesProc(), and Q931E_INTERNAL.
Referenced by Q931Tx32().
L3INT Q931PmesDummy | ( | Q931_TrunkInfo_t * | trunk, |
Q931mes_Generic * | IBuf, | ||
L3INT | ISize, | ||
L3UCHAR * | OBuf, | ||
L3INT * | OSize | ||
) |
Dummy function for message encoding.
[in] | trunk | Q.931 trunk |
[in] | IBuf | Message input buffer |
[in] | ISize | Input message size |
[out] | OBuf | Message output buffer |
[out] | OSize | Output message size |
Definition at line 152 of file Q931.c.
References Q931E_UNKNOWN_MESSAGE.
L3INT Q931Proc | ( | Q931_TrunkInfo_t * | trunk, |
struct Q931_Call * | call, | ||
Q931mes_Generic * | msg, | ||
q931_msg_from_t | from | ||
) |
Invoke message specific handler function
[in] | trunk | Q.931 trunk |
[in] | call | Q.931 call handle |
[in] | msg | Decoded message to handle (Q931mes_Generic *) |
[in] | from | Source of message (Q931_MSG_FROM_L2 or Q931_MSG_FROM_L4) |
Definition at line 1020 of file Q931.c.
References Q931_TrunkInfo::Dialect, L3INT, Q931mes_Generic::MesType, Q931_LOG_ERROR, Q931_TFLAG_IGNORE_UNKNOWN_MSG, Q931CallGetCRV(), Q931CallGetState(), Q931CallGetStateName(), Q931DialectGetMesProc(), Q931DialectGetUnknownMesProc(), Q931DialectIsEventLegal(), Q931E_INTERNAL, Q931E_NO_ERROR, Q931E_UNEXPECTED_MESSAGE, Q931Log(), and Q931TrunkIsSetFlag().
Referenced by Q931AckRestart(), Q931AckService(), Q931AckSetup(), Q931Rx23(), Q931Rx43(), and Q931Start().
L3INT Q931ProcDummy | ( | Q931_TrunkInfo_t * | trunk, |
struct Q931_Call * | call, | ||
Q931mes_Generic * | msg, | ||
q931_msg_from_t | from | ||
) |
Dummy function for message processing.
[in] | trunk | Q.931 trunk |
[in] | call | Q.931 call handle |
[in] | msg | Message |
[in] | from | Message coming from Layer 2 or Layer 4? |
Definition at line 102 of file Q931.c.
References Q931E_INTERNAL.
L3INT Q931ProcInvalid | ( | Q931_TrunkInfo_t * | trunk, |
struct Q931_Call * | call, | ||
Q931mes_Generic * | msg, | ||
q931_msg_from_t | from | ||
) |
Invoke invalid message handling function
[in] | trunk | Q.931 trunk |
[in] | call | Q.931 call handle |
[in] | msg | Decoded message to handle (Q931mes_Generic *) |
[in] | from | Source of message (Q931_MSG_FROM_L2 or Q931_MSG_FROM_L4) |
Definition at line 1069 of file Q931.c.
References Q931_TrunkInfo::Dialect, Q931DialectGetInvalidMesProc(), and Q931E_INTERNAL.
L3INT Q931ProcUnexpectedMessage | ( | Q931_TrunkInfo_t * | trunk, |
struct Q931_Call * | call, | ||
Q931mes_Generic * | msg, | ||
q931_msg_from_t | from | ||
) |
Handle unexpected message
[in] | trunk | Q.931 trunk |
[in] | call | Q.931 call handle |
[in] | msg | Input buffer (Q931mes_Generic *) |
[in] | from | Source of message (Q931_MSG_FROM_L2 or Q931_MSG_FROM_L4) |
Definition at line 1284 of file Q931.c.
References Q931mes_Generic::MesType, Q931_LOG_NOTICE, Q931E_NO_ERROR, and Q931Log().
Referenced by ATT5ESSCreateTE(), Q931CreateNT(), and Q931CreateTE().
L3INT Q931ProcUnknownMessage | ( | Q931_TrunkInfo_t * | trunk, |
struct Q931_Call * | call, | ||
Q931mes_Generic * | msg, | ||
q931_msg_from_t | from | ||
) |
Handle unknown message
[in] | trunk | Q.931 trunk |
[in] | call | Q.931 call handle |
[in] | msg | Input buffer (Q931mes_Generic *) |
[in] | from | Source of message (Q931_MSG_FROM_L2 or Q931_MSG_FROM_L4) |
Definition at line 1268 of file Q931.c.
References Q931mes_Generic::MesType, Q931_LOG_NOTICE, Q931E_NO_ERROR, and Q931Log().
Referenced by ATT5ESSCreateTE(), Q931CreateNT(), and Q931CreateTE().
Q931_API L3INT Q931ReleaseCRV | ( | Q931_TrunkInfo_t * | trunk, |
L3INT | crv | ||
) |
Release a CRV (= call)
[in] | trunk | Q.931 trunk |
[in] | crv | CRV to release |
Definition at line 635 of file Q931.c.
References Q931_Call::InUse, Q931E_INVALID_CRV, Q931E_NO_ERROR, and Q931GetCallByCRV().
Q931_API L3INT Q931Rx23 | ( | Q931_TrunkInfo_t * | trunk, |
L3INT | ind, | ||
L3UCHAR | tei, | ||
L3UCHAR * | buf, | ||
L3INT | Size | ||
) |
Receive message from Q.921 (Layer 2) stack
[in] | trunk | Q.931 trunk |
[in] | ind | Type of Q.921 message: Q921_DL_UNIT_DATA, Q921_DL_DATA |
[in] | tei | TEI this message is coming in on |
[in] | buf | Message buffer |
[in] | Size | Size of message |
Definition at line 267 of file Q931.c.
References Q931mes_Generic::buf, Q931mes_Generic::CRV, Q931mes_Generic::CRVFlag, Q931_TrunkInfo::Dialect, Q931_CallEvent::id, Q931_TrunkInfo::L3Buf, L3INT, L3UCHAR, Q931mes_Generic::MesType, MSGF_FROM_L2, Q931mes_Generic::ProtDisc, Q850_CAUSE_IE_NONEXIST, Q850_CAUSE_INVALID_IE_CONTENTS, Q850_CAUSE_MANDATORY_IE_MISSING, Q850_CAUSE_MESSAGE_TYPE_NONEXIST, Q850_CAUSE_WRONG_MESSAGE, Q921_DL_DATA, Q921_DL_UNIT_DATA, Q931_EVENT_RELEASE_CRV, Q931_EVENT_TYPE_CRV, Q931_LOG_DEBUG, Q931_MSG_FROM_L2, Q931_U0, Q931CallGetCRV(), Q931CallGetState(), Q931CallGetStateName(), Q931CallIsGlobal(), Q931CallIsOutgoing(), Q931CallNewIncoming(), Q931CallRelease(), Q931CallSendEvent(), Q931CallSendQueuedEvents(), Q931DialectGetName(), Q931Disconnect(), Q931E_ILLEGAL_IE, Q931E_INTERNAL, Q931E_INVALID_CRV, Q931E_MANDATORY_IE_MISSING, Q931E_NO_ERROR, Q931E_UNEXPECTED_MESSAGE, Q931E_UNKNOWN_IE, Q931E_UNRECOGNIZED_MESSAGE, Q931GetCallByCRV(), Q931GetGlobalCall(), Q931InitMesGeneric(), Q931L2HeaderSpace, Q931Log(), Q931mes_RELEASE, Q931mes_RELEASE_COMPLETE, Q931mes_SETUP, Q931mes_STATUS_ENQUIRY, Q931MesgErrorsInit(), Q931MesgErrorsPrint(), Q931Proc(), Q931StatusEnquiryResponse(), Q931TrunkGetStatusEnquiry(), Q931Tx32(), Q931Uie_CRV(), Q931Umes(), Q931mes_Generic::Size, and Q931mes_Generic::Tei.
Q931_API L3INT Q931Rx43 | ( | Q931_TrunkInfo_t * | trunk, |
Q931mes_Generic * | msg, | ||
int | size | ||
) |
Receive and process message from Layer 4 (application)
[in] | trunk | Q.931 trunk |
[in] | msg | Message buffer (Q931mes_Generic *) |
[in] | size | Size of message |
Definition at line 478 of file Q931.c.
References Q931mes_Generic::CRV, Q931mes_Generic::CRVFlag, Q931_TrunkInfo::Dialect, Q931_CallEvent::id, L3INT, Q931mes_Generic::MesType, Q931_EVENT_RELEASE_CRV, Q931_EVENT_TYPE_CRV, Q931_LOG_DEBUG, Q931_LOG_ERROR, Q931_LOG_NOTICE, Q931_LOG_WARNING, Q931_MSG_FROM_L4, Q931_TFLAG_IGNORE_UNKNOWN_MSG, Q931_U0, Q931CallGetCRV(), Q931CallGetState(), Q931CallIsGlobal(), Q931CallIsOutgoing(), Q931CallRelease(), Q931CallSendEvent(), Q931DialectGetMesProc(), Q931DialectIsEventLegal(), Q931E_INVALID_CRV, Q931E_NO_ERROR, Q931E_UNEXPECTED_MESSAGE, Q931E_UNRECOGNIZED_MESSAGE, Q931GetCallByCRV(), Q931GetGlobalCall(), Q931Log(), Q931Proc(), and Q931TrunkIsSetFlag().
Referenced by Q931ProcStatusTE().
void Q931SetError | ( | Q931_TrunkInfo_t * | trunk, |
L3INT | ErrID, | ||
L3INT | ErrPar1, | ||
L3INT | ErrPar2 | ||
) |
Used by the stack to indicate an error
[in] | trunk | Q.931 trunk |
[in] | ErrID | ID of error (Q931E_*) |
[in] | ErrPar1 | Parameter1 |
[in] | ErrPar2 | Parameter2 |
Definition at line 621 of file Q931.c.
References Q931_TrunkInfo::PrivateData34, and Q931_TrunkInfo::Q931ErrorCBProc.
Referenced by Q931Pie_LLComp(), Q931Uie_BearerCap(), Q931Uie_GenericDigits(), Q931Uie_HLComp(), and Q931Uie_LLComp().
Q931_API void Q931SetGetTimeCB | ( | L3ULONG(*)(void) | callback | ) |
Set timer callback
[in] | callback | callback function used to get the current time in milliseconds |
Definition at line 675 of file Q931.c.
References Q931GetTimeProc.
void Q931SetL2HeaderSpace | ( | L3INT | space | ) |
Definition at line 86 of file Q931.c.
References Q931L2HeaderSpace.
void Q931SetL4HeaderSpace | ( | L3INT | space | ) |
Definition at line 71 of file Q931.c.
References Q931L4HeaderSpace.
Q931_API void Q931SetLogCB | ( | Q931_TrunkInfo_t * | trunk, |
Q931LogCB_t | func, | ||
void * | priv | ||
) |
Set Logging callback function and private data
[in] | trunk | Q.931 trunk |
[in] | func | Log callback function |
[in] | priv | Optional private data passed to logging function |
Definition at line 804 of file Q931.c.
References Q931_TrunkInfo::PrivateDataLog, and Q931_TrunkInfo::Q931LogCBProc.
Q931_API void Q931SetLogLevel | ( | Q931_TrunkInfo_t * | trunk, |
Q931LogLevel_t | level | ||
) |
Set log level
[in] | trunk | Q.931 trunk |
[in] | level | Log level |
Definition at line 816 of file Q931.c.
References Q931_TrunkInfo::loglevel, Q931_LOG_DEBUG, and Q931_LOG_NONE.
L3INT Q931Timeout | ( | Q931_TrunkInfo_t * | trunk, |
struct Q931_Call * | call, | ||
L3UCHAR | timer | ||
) |
Invoke timeout handler function
[in] | trunk | Q.931 trunk |
[in] | call | Q.931 call |
[in] | timer | Timer to handle |
Definition at line 1247 of file Q931.c.
References Q931_TrunkInfo::Dialect, Q931DialectGetTimerProc(), and Q931E_INTERNAL.
Referenced by Q931TimerTick().
L3INT Q931TimeoutDummy | ( | Q931_TrunkInfo_t * | trunk, |
struct Q931_Call * | call | ||
) |
Dummy handler for timeouts
[in] | trunk | Q.931 trunk |
[in] | call | Q.931 call |
Definition at line 884 of file Q931.c.
References Q931_Call::CRV, Q931_LOG_DEBUG, Q931E_NO_ERROR, Q931Log(), and Q931_Call::TimerID.
Referenced by Q931CreateNT(), and Q931CreateTE().
Q931_API void Q931TimerTick | ( | Q931_TrunkInfo_t * | trunk | ) |
Periodically called to update and check for expired timers
trunk | Q.931 trunk |
Definition at line 201 of file Q931.c.
References Q931_TrunkInfo::call, Q931_CallEvent::id, Q931_Call::InUse, L3INT, L3ULONG, Q931_EVENT_RELEASE_CRV, Q931_EVENT_TYPE_CRV, Q931_LOG_DEBUG, Q931_U0, Q931CallGetCRV(), Q931CallGetState(), Q931CallIncrementTimerExpireCount(), Q931CallIsGlobal(), Q931CallRelease(), Q931CallSendEvent(), Q931CallStopTimer(), Q931GetTime(), Q931Log(), Q931MAXCALLPERTRUNK, Q931Timeout(), Q931_Call::Timer, and Q931_Call::TimerID.
void Q931TrunkClearAllFlags | ( | Q931_TrunkInfo_t * | trunk | ) |
Helper function to clear all flags of a trunk
[in] | trunk | Q.931 trunk |
Definition at line 923 of file Q931.c.
References Q931_TrunkInfo::flags.
void Q931TrunkClearFlag | ( | Q931_TrunkInfo_t * | trunk, |
L3INT | flag | ||
) |
Helper function to unset a trunk flag
[in] | trunk | Q.931 trunk |
[in] | flag | Flag (mask) to clear |
Definition at line 913 of file Q931.c.
References Q931_TrunkInfo::flags.
Referenced by Q931TrunkSetRelaxedMode().
L3BOOL Q931TrunkIsSetFlag | ( | const Q931_TrunkInfo_t * | trunk, |
const L3INT | flag | ||
) |
Helper function to check if a trunk flag is set
[in] | trunk | Q.931 trunk |
[in] | flag | Flag (mask) to check |
Definition at line 935 of file Q931.c.
References Q931_TrunkInfo::flags.
Referenced by Q931Proc(), Q931ProcConnectTE(), Q931ProcRestartNT(), Q931ProcRestartTE(), Q931ProcSetupNT(), Q931ProcSetupTE(), Q931Rx43(), Q931Umes(), and Q931Umes_Generic().
void Q931TrunkSetFlag | ( | Q931_TrunkInfo_t * | trunk, |
L3INT | flag | ||
) |
Helper function to set a trunk flag
[in] | trunk | Q.931 trunk |
[in] | flag | Flag (mask) to set |
Definition at line 902 of file Q931.c.
References Q931_TrunkInfo::flags.
Referenced by Q931TrunkSetRelaxedMode().
Q931_API void Q931TrunkSetRelaxedMode | ( | Q931_TrunkInfo_t * | trunk, |
L3BOOL | enable | ||
) |
Relax IE and Message checks: incoming unknown messages and unknown/invalid IEs will be ignored
[in] | trunk | Q.931 Trunk handle |
[in] | enable | Enable or disable Relaxed mode (Q931_TRUE / Q931_FALSE) |
Definition at line 997 of file Q931.c.
References Q931_TFLAG_IGNORE_ILLEGAL_IE, Q931_TFLAG_IGNORE_UNKNOWN_IE, Q931_TFLAG_IGNORE_UNKNOWN_MSG, Q931TrunkClearFlag(), and Q931TrunkSetFlag().
L3INT Q931Tx32 | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR | bcast, | ||
Q931mes_Generic * | msg, | ||
int | size | ||
) |
Encode and send message to Layer 2
[in] | trunk | Q.931 trunk |
[in] | bcast | Broadcast message to all TEIs |
[in] | msg | Message buffer |
[in] | size | Size of message |
Definition at line 570 of file Q931.c.
References Q931mes_Generic::CRV, Q931mes_Generic::CRVFlag, Q931_TrunkInfo::L2Buf, L3INT, L3UCHAR, Q931mes_Generic::MesType, Q931_TrunkInfo::PrivateData32, Q921_DL_DATA, Q921_DL_UNIT_DATA, Q931_LOG_DEBUG, Q931CallIsOutgoing(), Q931E_INVALID_CRV, Q931E_MISSING_CB, Q931E_NO_ERROR, Q931GetCallByCRV(), Q931L2HeaderSpace, Q931Log(), Q931Pmes(), Q931_TrunkInfo::Q931Tx32CBProc, and Q931_Call::Tei.
Referenced by Q931AckConnect(), Q931CallSendStatus(), Q931ProcAlertingNT(), Q931ProcAlertingTE(), Q931ProcCallProceedingNT(), Q931ProcCallProceedingTE(), Q931ProcCongestionControlNT(), Q931ProcCongestionControlTE(), Q931ProcConnectAckNT(), Q931ProcConnectAckTE(), Q931ProcConnectNT(), Q931ProcConnectTE(), Q931ProcDisconnectNT(), Q931ProcDisconnectTE(), Q931ProcInformationNT(), Q931ProcInformationTE(), Q931ProcNotifyNT(), Q931ProcNotifyTE(), Q931ProcProgressTE(), Q931ProcReleaseCompleteNT(), Q931ProcReleaseNT(), Q931ProcReleaseTE(), Q931ProcRestartAckNT(), Q931ProcRestartAckTE(), Q931ProcRestartNT(), Q931ProcRestartTE(), Q931ProcResumeAckNT(), Q931ProcResumeAckTE(), Q931ProcResumeRejectNT(), Q931ProcResumeRejectTE(), Q931ProcResumeTE(), Q931ProcSegmentNT(), Q931ProcSegmentTE(), Q931ProcSetupAckNT(), Q931ProcSetupAckTE(), Q931ProcSetupNT(), Q931ProcSetupTE(), Q931ProcStatusEnquiryNT(), Q931ProcStatusEnquiryTE(), Q931ProcStatusNT(), Q931ProcStatusTE(), Q931ProcSuspendAckNT(), Q931ProcSuspendAckTE(), Q931ProcSuspendRejectNT(), Q931ProcSuspendRejectTE(), Q931ProcSuspendTE(), Q931ProcTimeoutT304TE(), Q931ProcTimeoutT305TE(), Q931ProcTimeoutT308TE(), Q931ProcTimeoutT310TE(), Q931ProcTimeoutT313TE(), Q931ProcTimeoutT318TE(), Q931ProcUserInformationNT(), Q931ProcUserInformationTE(), Q931Release(), Q931ReleaseComplete(), Q931Rx23(), Q931Send(), Q931StatusEnquiryResponse(), Q932ProcFacilityNT(), Q932ProcFacilityTE(), Q932ProcHoldAckNT(), Q932ProcHoldAckTE(), Q932ProcHoldNT(), Q932ProcHoldRejectNT(), Q932ProcHoldRejectTE(), Q932ProcHoldTE(), Q932ProcRegisterNT(), Q932ProcRegisterTE(), Q932ProcRetrieveAckNT(), Q932ProcRetrieveAckTE(), Q932ProcRetrieveNT(), Q932ProcRetrieveRejectNT(), Q932ProcRetrieveRejectTE(), and Q932ProcRetrieveTE().
L3INT Q931Tx34 | ( | Q931_TrunkInfo_t * | trunk, |
struct Q931_Call * | call, | ||
Q931mes_Generic * | msg, | ||
int | size | ||
) |
Send message to Layer 4
[in] | trunk | Q.931 trunk |
[in] | call | Q.931 call |
[in] | msg | Message to send (Q931mes_Generic *) |
[in] | size | Size of message |
Definition at line 460 of file Q931.c.
References Q931_TrunkInfo::PrivateData34, Q931_LOG_DEBUG, Q931E_MISSING_CB, Q931Log(), and Q931_TrunkInfo::Q931Tx34CBProc.
Referenced by Q931ProcAlertingNT(), Q931ProcAlertingTE(), Q931ProcCallProceedingNT(), Q931ProcCallProceedingTE(), Q931ProcCongestionControlNT(), Q931ProcCongestionControlTE(), Q931ProcConnectAckTE(), Q931ProcConnectNT(), Q931ProcConnectTE(), Q931ProcDisconnectNT(), Q931ProcDisconnectTE(), Q931ProcInformationNT(), Q931ProcInformationTE(), Q931ProcNotifyNT(), Q931ProcNotifyTE(), Q931ProcProgressNT(), Q931ProcProgressTE(), Q931ProcReleaseCompleteNT(), Q931ProcReleaseCompleteTE(), Q931ProcReleaseNT(), Q931ProcReleaseTE(), Q931ProcRestartAckNT(), Q931ProcRestartAckTE(), Q931ProcRestartNT(), Q931ProcRestartTE(), Q931ProcResumeAckTE(), Q931ProcResumeNT(), Q931ProcResumeRejectTE(), Q931ProcSegmentNT(), Q931ProcSegmentTE(), Q931ProcSetupNT(), Q931ProcSetupTE(), Q931ProcStatusNT(), Q931ProcStatusTE(), Q931ProcSuspendAckTE(), Q931ProcSuspendNT(), Q931ProcSuspendRejectTE(), Q931ProcSuspendTE(), Q931ProcUserInformationNT(), Q931ProcUserInformationTE(), Q932ProcFacilityNT(), Q932ProcFacilityTE(), Q932ProcHoldAckNT(), Q932ProcHoldAckTE(), Q932ProcHoldNT(), Q932ProcHoldRejectNT(), Q932ProcHoldRejectTE(), Q932ProcHoldTE(), Q932ProcRegisterNT(), Q932ProcRegisterTE(), Q932ProcRetrieveAckNT(), Q932ProcRetrieveAckTE(), Q932ProcRetrieveNT(), Q932ProcRetrieveRejectNT(), Q932ProcRetrieveRejectTE(), and Q932ProcRetrieveTE().
L3INT Q931Uie | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR | id, | ||
Q931mes_Generic * | pMes, | ||
L3UCHAR * | IBuf, | ||
L3UCHAR * | OBuf, | ||
L3INT * | IOff, | ||
L3INT * | OOff | ||
) |
Invoke IE specific decoder function
[in] | trunk | Q.931 trunk |
[in] | id | ID of information element (type) |
[in] | pMes | Message |
[in] | IBuf | Input buffer |
[out] | OBuf | Output buffer |
[in,out] | IOff | Input buffer offset |
[in,out] | OOff | Output buffer offset |
Definition at line 1149 of file Q931.c.
References Q931_TrunkInfo::Dialect, Q931DialectGetUieProc(), and Q931E_INTERNAL.
Referenced by Q931Umes_Generic().
L3INT Q931UieDummy | ( | Q931_TrunkInfo_t * | trunk, |
Q931mes_Generic * | msg, | ||
L3UCHAR * | IBuf, | ||
L3UCHAR * | OBuf, | ||
L3INT * | IOff, | ||
L3INT * | OOff | ||
) |
Dummy function for IE decoding.
[in] | trunk | Q.931 trunk |
[in] | msg | Message |
[in] | IBuf | Input buffer |
[out] | OBuf | Output buffer |
[in,out] | IOff | Input buffer offset |
[in,out] | OOff | Output buffer offset |
Definition at line 136 of file Q931.c.
References Q931E_UNKNOWN_IE.
L3BOOL Q931UieIsNull | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR | id | ||
) |
Check whether information element has a decoder function available
[in] | trunk | Q.931 trunk |
[in] | id | Information element id to check |
Definition at line 1207 of file Q931.c.
References Q931_TrunkInfo::Dialect, and Q931DialectGetUieProc().
Referenced by Q931Umes_Generic().
L3INT Q931Umes | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR | id, | ||
L3UCHAR * | IBuf, | ||
Q931mes_Generic * | OBuf, | ||
L3INT | IOff, | ||
L3INT | Size, | ||
struct Q931MesgErrors * | errs | ||
) |
Invoke message specific decoder function
[in] | trunk | Q.931 trunk |
[in] | id | ID of message (type) |
[in] | IBuf | Input buffer (raw encoded message) |
[out] | OBuf | Output buffer |
[in] | IOff | Input buffer offset |
[in] | Size | Size of input message |
[out] | errs | Message errors reported by parser |
Definition at line 1093 of file Q931.c.
References Q931_TrunkInfo::Dialect, Q931_TFLAG_IGNORE_UNKNOWN_MSG, Q931DialectGetUmesProc(), Q931E_INTERNAL, Q931E_NO_ERROR, and Q931TrunkIsSetFlag().
Referenced by Q931Rx23().
L3INT Q931UmesDummy | ( | Q931_TrunkInfo_t * | trunk, |
L3UCHAR * | IBuf, | ||
Q931mes_Generic * | OBuf, | ||
L3INT | IOff, | ||
L3INT | Size, | ||
struct Q931MesgErrors * | errs | ||
) |
Dummy function for message decoding.
[in] | trunk | Q.931 trunk |
[in] | IBuf | Message input buffer |
[out] | OBuf | Message output buffer |
[in] | IOff | Input buffer offset |
[in] | Size | Size of input |
[out] | errs | Message parser errors |
Definition at line 119 of file Q931.c.
References Q931E_UNKNOWN_MESSAGE.
L3ULONG(* Q931GetTimeProc)(void) = NULL |
Definition at line 59 of file Q931.c.
Referenced by Q931GetTime(), and Q931SetGetTimeCB().
L3INT Q931L2HeaderSpace = {4} |
Definition at line 57 of file Q931.c.
Referenced by Q931Rx23(), Q931SetL2HeaderSpace(), and Q931Tx32().
L3INT Q931L4HeaderSpace = {0} |
Definition at line 55 of file Q931.c.
Referenced by Q931SetL4HeaderSpace().