1335640Shselasky/* 2335640Shselasky * Copyright (c) 1997 Yen Yen Lim and North Dakota State University 3335640Shselasky * All rights reserved. 4335640Shselasky * 5335640Shselasky * Redistribution and use in source and binary forms, with or without 6335640Shselasky * modification, are permitted provided that the following conditions 7335640Shselasky * are met: 8335640Shselasky * 1. Redistributions of source code must retain the above copyright 9335640Shselasky * notice, this list of conditions and the following disclaimer. 10335640Shselasky * 2. Redistributions in binary form must reproduce the above copyright 11335640Shselasky * notice, this list of conditions and the following disclaimer in the 12335640Shselasky * documentation and/or other materials provided with the distribution. 13335640Shselasky * 3. All advertising materials mentioning features or use of this software 14335640Shselasky * must display the following acknowledgement: 15335640Shselasky * This product includes software developed by Yen Yen Lim and 16335640Shselasky North Dakota State University 17335640Shselasky * 4. The name of the author may not be used to endorse or promote products 18335640Shselasky * derived from this software without specific prior written permission. 19335640Shselasky * 20335640Shselasky * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21335640Shselasky * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22335640Shselasky * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23335640Shselasky * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 24335640Shselasky * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25335640Shselasky * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26335640Shselasky * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27335640Shselasky * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 28335640Shselasky * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 29335640Shselasky * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30335640Shselasky * POSSIBILITY OF SUCH DAMAGE. 31335640Shselasky */ 32335640Shselasky 33335640Shselasky/* Based on UNI3.1 standard by ATM Forum */ 34335640Shselasky 35335640Shselasky/* ATM traffic types based on VPI=0 and (the following VCI */ 36335640Shselasky#define VCI_PPC 0x05 /* Point-to-point signal msg */ 37335640Shselasky#define VCI_BCC 0x02 /* Broadcast signal msg */ 38335640Shselasky#define VCI_OAMF4SC 0x03 /* Segment OAM F4 flow cell */ 39335640Shselasky#define VCI_OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */ 40335640Shselasky#define VCI_METAC 0x01 /* Meta signal msg */ 41335640Shselasky#define VCI_ILMIC 0x10 /* ILMI msg */ 42335640Shselasky 43335640Shselasky/* Q.2931 signalling messages */ 44335640Shselasky#define CALL_PROCEED 0x02 /* call proceeding */ 45335640Shselasky#define CONNECT 0x07 /* connect */ 46335640Shselasky#define CONNECT_ACK 0x0f /* connect_ack */ 47335640Shselasky#define SETUP 0x05 /* setup */ 48335640Shselasky#define RELEASE 0x4d /* release */ 49335640Shselasky#define RELEASE_DONE 0x5a /* release_done */ 50335640Shselasky#define RESTART 0x46 /* restart */ 51335640Shselasky#define RESTART_ACK 0x4e /* restart ack */ 52335640Shselasky#define STATUS 0x7d /* status */ 53335640Shselasky#define STATUS_ENQ 0x75 /* status ack */ 54335640Shselasky#define ADD_PARTY 0x80 /* add party */ 55335640Shselasky#define ADD_PARTY_ACK 0x81 /* add party ack */ 56335640Shselasky#define ADD_PARTY_REJ 0x82 /* add party rej */ 57335640Shselasky#define DROP_PARTY 0x83 /* drop party */ 58335640Shselasky#define DROP_PARTY_ACK 0x84 /* drop party ack */ 59335640Shselasky 60335640Shselasky/* Information Element Parameters in the signalling messages */ 61335640Shselasky#define CAUSE 0x08 /* cause */ 62335640Shselasky#define ENDPT_REF 0x54 /* endpoint reference */ 63335640Shselasky#define AAL_PARA 0x58 /* ATM adaptation layer parameters */ 64335640Shselasky#define TRAFF_DESCRIP 0x59 /* atm traffic descriptors */ 65335640Shselasky#define CONNECT_ID 0x5a /* connection identifier */ 66335640Shselasky#define QOS_PARA 0x5c /* quality of service parameters */ 67335640Shselasky#define B_HIGHER 0x5d /* broadband higher layer information */ 68335640Shselasky#define B_BEARER 0x5e /* broadband bearer capability */ 69335640Shselasky#define B_LOWER 0x5f /* broadband lower information */ 70335640Shselasky#define CALLING_PARTY 0x6c /* calling party number */ 71335640Shselasky#define CALLED_PARTY 0x70 /* called party nmber */ 72335640Shselasky 73335640Shselasky#define Q2931 0x09 74335640Shselasky 75335640Shselasky/* Q.2931 signalling general messages format */ 76335640Shselasky#define PROTO_POS 0 /* offset of protocol discriminator */ 77335640Shselasky#define CALL_REF_POS 2 /* offset of call reference value */ 78335640Shselasky#define MSG_TYPE_POS 5 /* offset of message type */ 79335640Shselasky#define MSG_LEN_POS 7 /* offset of mesage length */ 80335640Shselasky#define IE_BEGIN_POS 9 /* offset of first information element */ 81335640Shselasky 82335640Shselasky/* format of signalling messages */ 83335640Shselasky#define TYPE_POS 0 84335640Shselasky#define LEN_POS 2 85335640Shselasky#define FIELD_BEGIN_POS 4 86