Formatting

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@457 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Shane Burrell 2008-04-16 22:42:24 +00:00
parent 99a1776aff
commit 231b7d7a58
1 changed files with 9 additions and 32 deletions

View File

@ -37,29 +37,6 @@
#include "mstm3ua.h"
int build_route_context(unsigned char *opc, unsigned char *dpc, unsigned char *bytemsg, unsigned char len)
{
//Routing Context
bytemsg[8] = 0x10; //Tag 0x210 Protocol Data
bytemsg[9] = 0x02;
bytemsg[10] = len; //Len
bytemsg[11] = 0x00;
bytemsg[12] = opc[2]; //OPC Member
bytemsg[13] = opc[1]; //OPC Cluster
bytemsg[14] = opc[0]; //OPC Network
bytemsg[15] = 0x00;
bytemsg[16] = dpc[2];//DPC Member
bytemsg[17] = dpc[1];//DPC Cluster
bytemsg[18] = dpc[0];//DPC Network
bytemsg[19] = 0x00;
return 0;
}
@ -67,19 +44,19 @@ int build_m3ua_hdr(unsigned char len,unsigned char *bytemsg)
{
bytemsg[0] = M_VERSION_REL1; // 1 Verison
*bytemsg++ = M_VERSION_REL1; // 1 Verison
//bytemsg[1] = 0x00; // 2 RESERVED
//bytemsg[2] = M_CLASS_XFER; // 3 Msg Class
//SS7 BOX Kludge
bytemsg[1] = 0x01; // 2 RESERVED
bytemsg[2] = 0x00; // 2 RESERVED
*bytemsg++ = 0x01; // 2 RESERVED
*bytemsg++ = 0x00; // 2 RESERVED
bytemsg[3] = M_TYPE_DATA ; // 4 Msg Type
*bytemsg++ = M_TYPE_DATA ; // 4 Msg Type
bytemsg[4] = len; // 5 Msg LENGTH 81 32bit field
bytemsg[5] = 0x00; // 6
bytemsg[6] = 0x00; // 7
bytemsg[7] = 0x00; // 8
*bytemsg++ = len; // 5 Msg LENGTH 81 32bit field
*bytemsg++ = 0x00; // 6
*bytemsg++ = 0x00; // 7
*bytemsg++ = 0x00; // 8
return(0);
};