Erlang PDU decoding or use Port driver library call
Casper
casper2000a@REDACTED
Fri Jan 28 13:44:43 CET 2005
Hi All,
I have a concern to whether a PDU I received from a C Port Driver to decode
in the Erlang side to get the full PDU or call a C Library Port Driver to
extract the only required information. For example in a SS7 ISUP C library,
the structure I receive for ISUP IAM message is as below. As you can see all
those variables are again structures. The PDU size is about 7820 bytes. If I
have to decode that PDU in the Erlang side, I may have to define a vast
amount of Records and will have to do very tedious binary processing. I
receive this over a C port driver, which interface the SS7 boards. From the
structure I get, I may only need to extract the Calling/Called party
numbers, Circuit ID, etc like limited number of information.
Now my concern is whether I should decode this structure in Erlang or I use
another C Port Driver library to get the required information then and there
required, by passing the binary PDU I received from the earlier Port?
If any of you have some working experience with above kind of work, please
advice me.
Thanks in advance!
- Eranga
---------------------- Structure start -----------------------------------
typedef struct _siConEvnt /* ISUP Connect Event */
{
SiNatConInd natConInd; /* Nature of connection
indicators */
SiFwdCallInd fwdCallInd; /* forward call indicators */
SiCgPtyCat cgPtyCat; /* calling party category */
SiTxMedReq txMedReq; /* transmission medium
requirement */
SiTxMedReq txMedReqPr; /* transmission medium
requirement prime */
SiCdPtyNum cdPtyNum; /* called party number */
SiTranNetSel tranNetSel; /* transit network selection */
SiCallRef callRef; /* call reference */
SiCgPtyNum cgPtyNum; /* calling party number */
SiOpFwdCalInd opFwdCalInd; /* optional forward call
indicators */
SiRedirgNum redirgNum; /* redirecting number */
SiRedirInfo redirInfo; /* redirection information */
SiCugIntCode cugIntCode; /* closed group interlock code
*/
SiConnReq connReq; /* connection request */
SiOrigCdNum origCdNum; /* original called number */
SiUsr2UsrInfo usr2UsrInfo; /* user to user information */
SiAccTrnspt accTrnspt; /* access transport */
SiChargeNum chargeNum; /* charge number */
SiOrigLineInf origLineInf; /* originating line information
*/
SiUsrServInfo usrServInfo; /* user service infiormation */
SiUsr2UsrInd usr2UsrInd; /* user to user indicators */
SiPropDly propDly; /* propagation delay counter */
SiUsrServInfo usrServInfo1; /* user service info prime */
SiNetSpecFacil netFac; /* network specific facility */
SiSigPointCode orgPteCde; /* originating ISC point code */
SiGenDigits genDigits; /* generic digits */
SiGenNum genNmb; /* generic number */
SiRemotOper remotOper; /* remote operations */
SiParmCompInfo parmCom; /* parameter compatibility
information */
SiNotifInd notifInd; /* notification indicator */
SiInfoInd infoInd; /* information indicator */
SiServiceAct serviceAct; /* service activation */
SiMlppPrec mlppPrec; /* MLPP precedence */
SiTxMedReq txMedUsed; /* transmission medium used */
SiBckCalInd bckCallInd; /* backward call indicators */
SiOptBckCalInd optBckCalInd; /* optional backward call
indicators */
SiConnectedNum connNum; /* connected number */
SiAccDelInfo accDelInfo; /* access delivery information
*/
SiPropDly cllHstry; /* call history information */
SiRedirNum redirNum; /* redirection number */
SiRedirRestr redirRstr; /* redirection restriction */
SiBusinessGrp businessGrp; /* business group */
SiCarrierId carrierId; /* carrier identification */
SiCarrierSelInf carSelInf; /* carrier selection information
*/
SiEgress egress; /* ergress service */
SiGenAddr genAddr; /* generic address */
SiInfoReqInd infoReqInd; /* information request
indicators */
SiJurisInf jurisInf; /* jurisdiction information */
SiNetTransport netTransport; /* network transport */
SiSpecProcReq specProcReq; /* special processing request */
SiTransReq transReq; /* transaction request */
SiEchoCtl echoControl; /* echo control */
SiCirAssignMap cirAssignMap; /* circuit assignment map */
SiGenName genName; /* generic name */
SiHopCount hopCount; /* hop counter */
SiOpServInfo opServInfo; /* operator services information
*/
SiServiceCode serviceCode; /* service code */
SiLocNum locNum; /* location number */
SiMsgAreaInfo msgAreaInfo; /* message area information */
SiContractorNum contractorNum; /* conttractor number */
SiCgNumNonNotRsn cgNumNonNotRsn; /* calling number
non-notification reason */
SiAddUsrId addUsrId; /* additional user
identification */
SiCarrierInfoTrans carrierInfoTrans; /* carrier information transfer
*/
SiCCSS cCSS;
SiNetMngmtCtrls netMngmtCtrls;
SiCirAssMap cirAssMap;
SiCallDivTrtmnt callDivTrtmnt;
SiCdINNum cdINNum;
SiCallOffTrtmnt callOffTrtmnt;
SiConfTrtmnt confTrtmnt;
SiUIDCapInd uIDCapInd;
SiCollCallReq collCallReq;
SiBckGVNS bckGVNS;
SiFreePhnInd freePhone;
SiScfID scfId;
SiCorrelationID corrId;
SiElementExt elementExt[NUM_EXT_ELMTS]; /* extended elements */
} SiConEvnt;
---------------------- Structure start -----------------------------------
More information about the erlang-questions
mailing list