1 /* WARNING WORK IN PROGRESS 2 * mstm3ua.c 3 * mstss7d port 4 * 5 * Created by Shane Burrell on 2/2/08. 6 * Copyright 2008 Shane Burrell. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 12 * * Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 15 * * Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 19 * * Neither the name of the original author; nor the names of any contributors 20 * may be used to endorse or promote products derived from this software 21 * without specific prior written permission. 22 * 23 * 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 28 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 31 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 32 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 33 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 */ 36 37 #include "mstm3ua.h" 38 39 40 41 42 43 int build_m3ua_hdr(unsigned char len,unsigned char *bytemsg) 44 45 { 46 47 *bytemsg++ = M_VERSION_REL1; // 1 Verison 48 //bytemsg[1] = 0x00; // 2 RESERVED 49 //bytemsg[2] = M_CLASS_XFER; // 3 Msg Class 50 //SS7 BOX Kludge 51 *bytemsg++ = 0x01; // 2 RESERVED 52 *bytemsg++ = 0x00; // 2 RESERVED 53 54 *bytemsg++ = M_TYPE_DATA ; // 4 Msg Type 55 56 *bytemsg++ = len; // 5 Msg LENGTH 81 32bit field 57 *bytemsg++ = 0x00; // 6 58 *bytemsg++ = 0x00; // 7 59 *bytemsg++ = 0x00; // 8 60 return(0); 61