/***************************************************************************** @(#) $Id: ss7.h,v 0.7.2.2 2000/09/24 06:30:54 brian Exp $ ----------------------------------------------------------------------------- Copyright (C) 1997, 1998, 1999, 2000 Brian Bidulock All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Last Modified $Date: 2000/09/24 06:30:54 $ by $Author: brian $ ----------------------------------------------------------------------------- $Log: ss7.h,v $ Revision 0.7.2.2 2000/09/24 06:30:54 brian Committing changes. Revision 0.7.2.1 2000/09/07 12:49:16 brian Got ss7link interface support for drivers compiling. Revision 0.7 2000/09/07 11:18:12 brian Initial import of OpenSS7 stack. Revision 1.2 2000/09/07 10:51:51 brian Got these files going. Revision 1.1.1.1 2000/09/05 11:00:20 brian Initial import of new OpenSS7 stack for Linux. *****************************************************************************/ #ifndef __NET_SS7_H__ #define __NET_SS7_H__ #define SS7_PROT_LINK 2 /* SS7 Link Level */ #define SS7_PROT_NTWK 3 /* SS7 Network Level */ #define SS7_PROT_SCCP 4 /* SS7 Transport Level */ /* * SOCK_LINK_RAW == SOCK_RAW * ------------------------------------ * SS7 Level 2 is not normally accessed by applications as there is no * application part which is defined to ride abov it. (Perhaps with the * exception of some Work In Progress SIGTRAN protocols such as M2UA/M2PA). * Therfore, it takes a RAW socket to access the protocol level. * * SOCK_PACKET * ------------------------------------ * SS7 Level 2 is the link level and the appropriate layer to provide a * packet socket. This socket should have really been opened with * packet_socket() instead of socket(), but we'll allow that. * * SOCK_NTWK_NSEQ == SOCK_RDM * ------------------------------------ * SS7 MTP is normally accessed by applications user parts such as ISUP, TUP, * etc. (This information is contained in the SS7 address sockaddr_ss7 much * like a TCP port number is for IP.) MTP provides reliable, sequenced * end-to-end packet delivery or reliable but unsequenced packet delivery * depending upon the user's use of the SLS (Signaling Link Selection) field. * All messages with the same SLS are guaranteed in-sequence delivery, * whereas different SLSs does not necessarily provide in-sequence delivery. * * When SOCK_RDM is chosen, the MTP protocol layer will rotate the SLS field * to ensure balancing of messages across links in a linkset. * * SOCK_NTWK_ISEQ == SOCK_SEQPACKET * ------------------------------------ * When SOCK_SEQPACKET is chosen, the socket user must provide a stream * number which the MTP protocol layer will use to assign a consistent SLS * value for a given stream. There are conditions on the stream identifier * which make it suitable for simple SLS selection, and there is no guarantee * that the MTP will not just use the bottom 5 bits. * * SOCK_NETWK_RAW == SOCK_RAW * ------------------------------------ * For testing and other purposes, it is ncessary to gain access to the MTP * and be able to provide the MTP routing label directly. SOCK_RAW does * this. * * SOCK_SCCP_CC_0 == SOCK_DGRAM * ------------------------------------ * These mappings really don't make total sense; however, there are four * classes of SCCP transport service of which some correspond to the standard * socket definitions here. * * SOCK_DGRAM corresponds to SCCP Connection Class 0. SCCP Connection Class * 0 is unsequenced connectionless delivery. (Not necessarily unreliable.) * * SOCK_SCCP_CC_1 == SOCK_RDM * ------------------------------------ * SOCK_RDB corresponds to SCCP Connection Clase 1. SCCP Connection Class 1 * is sequenced connectionless delivery. (Again, not necessarily reliable.) * * SOCK_SCCP_CC_2 == SOCK_SEQPACKET * ------------------------------------ * SOCK_SEQPACKET corresponse to SCCP Connection Class 2. SCCP Connection * Class 2 is sequenced connection-oriented delivery without flow control. * * SOCK_SCCP_CC_3 == SOCK_STREAM * ------------------------------------ * SOCK_STREAM corresponse to SCCP Connection Class 3. SCCP Connection Class * 3 is sequenced connection-oriented delivery with flow control. * * SOCK_SCCP_RAW == SOCK_RAW * ------------------------------------ * Again, for testing it will be necesary to have direct access to the SCCP * protocol layer to permit fabrication by the user of the SCCP headers. * */ #define SOCK_NTWK_RAW SOCK_RAW /* NTWK raw socket. */ #define SOCK_NTWK_NSEQ SOCK_RDM /* NTWK insequence. */ #define SOCK_NTWK_ISEQ SOCK_SEQPACKET /* NTWK insequence. */ #define SOCK_SCCP_CC_0 SOCK_DGRAM /* SCCP Class 0 */ #define SOCK_SCCP_CC_1 SOCK_RDM /* SCCP Class 1 */ #define SOCK_SCCP_CC_2 SOCK_SEQPACKET /* SCCP Class 2 */ #define SOCK_SCCP_CC_3 SOCK_STREAM /* SCCP Class 3 */ /* SOCK_RAW * direct access to protocol */ /* SOCK_PACKET * Linux link interface */ /* SOCK_DGRAM * unreliable, unsequenced, packet */ /* SOCK_RDM * reliable, unsequenced, packet */ /* SOCK_SEQPACKET * reliable, sequenced, packet */ /* SOCK_STREAM * reliable, sequenced, stream */ /* * Device private ioctl's for controlling SS7 link interfaces. They * should be allocated in decending order to keep out of the way of the * actual device's ioctls. */ enum { SIOCSPRIV_f = SIOCDEVPRIVATE + 15, SIOCSPRIV_e = SIOCDEVPRIVATE + 14, SIOCSPRIV_d = SIOCDEVPRIVATE + 13, SIOCSPRIV_c = SIOCDEVPRIVATE + 12, SIOCSPRIV_b = SIOCDEVPRIVATE + 11, SIOCSPRIV_a = SIOCDEVPRIVATE + 10, SIOCSPRIV_9 = SIOCDEVPRIVATE + 9, SIOCSPRIV_8 = SIOCDEVPRIVATE + 8, SIOCSPRIV_7 = SIOCDEVPRIVATE + 7, SIOCSPRIV_6 = SIOCDEVPRIVATE + 6, SIOCSPRIV_5 = SIOCDEVPRIVATE + 5, SIOCSPRIV_4 = SIOCDEVPRIVATE + 4, SIOCSPRIV_3 = SIOCDEVPRIVATE + 3, SIOCSPRIV_2 = SIOCDEVPRIVATE + 2, SIOCSPRIV_1 = SIOCDEVPRIVATE + 1, SIOCSPRIV_0 = SIOCDEVPRIVATE }; #endif __NET_SS7_H__