OpenSS7 |
Copyright © 1997-2002,
OpenSS7 Corporation,
All Rights Reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The Message Transfer Part (MTP) Interface design is explained in the following sections:
Overview | - A brief overview of the Message Transfer Part driver. |
Model | - The model of a Message Transfer Part. |
Services | - Services of the Message Transfer Part provider. |
Primitives | - Primitives described at the Message Transfer Part Interface. |
Sequences | - Allowed sequences of primitives and interface state transitions |
Implementation | - Considerations for implementation of modules using the Message Transfer Part Interface. |
Header File | - A header file which provides definitions for the Message Transfer Part (MTP) Interface. |
The Message Transfer Part module is a multiplexor which is used to group collections of signalling link sets into a network nodal function and implement the MTP L3 state machines such as those of Q.704, T1.111.3, and ETSI ETS 300 008-1. The MTP multiplexor fans-out downstream by signalling link set and fans-out upstream by MTP-user type.
The Message Transfer Part module provides OSI Layer 3 capabilities and, as such, presents a NPI interface upwards. The NPI interface has been extended to permit configuration and SS7 protocol specific information to be exchanged between the Network Layer (MTP) and the Transport Layer (SCCP and MTP-Users). The details of the NPI mapping and the extensions for the SS7 protocol are provided in the section on Message Transfer Part.
The SS7 configuration daemon opens a control stream and configures a
multiplexor by linking signalling link sets to the MTP module for each
configured MTP nodal function. The SS7 configuration daemon's config file
provides information about which signalling link sets are connected to which
message transfer parts.
Model
Services
Primitives
Sequences
Implementation
Header File
/***************************************************************************** @(#) $Id: mtp.h,v 0.7.8.1 2001/12/11 13:16:05 brian Exp $ ----------------------------------------------------------------------------- Copyright (C) 1997-2002 OpenSS7 Corporation. All Rights Reserved. PUBLIC LICENSE This license is provided without fee, provided that the above copy- right notice and this public license must be retained on all copies, extracts, compilations and derivative works. Use or distribution of this work in a manner that restricts its use except as provided here will render this license void. The author(s) hereby waive any and all other restrictions in respect of their copyright in this software and its associated documentation. The authors(s) of this software place in the public domain any novel methods or processes which are embodied in this software. The author(s) undertook to write it for the sake of the advancement of the Arts and Sciences, but it is provided as is, and the author(s) will not take any responsibility in it. ----------------------------------------------------------------------------- U.S. GOVERNMENT RESTRICTED RIGHTS. If you are licensing this Software on behalf of the U.S. Government ("Government"), the following provisions apply to you. If the Software is supplied by the Department of Defense ("DoD"), it is classified as "Commercial Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the Federal Acquisition Regulations ("DFARS") (or any successor regulations) and the Government is acquiring only the license rights granted herein (the license rights customarily provided to non-Government users). If the Software is supplied to any unit or agency of the Government other than DoD, it is classified as "Restricted Computer Software" and the Government's rights in the Software are defined in paragraph 52.227-19 of the Federal Acquisition Regulations ("FAR") (or any success regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to the FAR (or any successor regulations). ----------------------------------------------------------------------------- Last Modified $Date: 2001/12/11 13:16:05 $ by $Author: brian $ *****************************************************************************/ #ifndef __SS7_MTP_H__ #define __SS7_MTP_H__ #ident "@(#) $Name: $($Revision: 0.7.8.1 $) Copyright (c) 1997-2001 OpenSS7 Corporation." #ifdef __KERNEL__ #include "../../include/npi.h" #else #include "<sys/npi.h>" #endif /* * These are MTP specific definitions for NPI... */ /* * QOS structure types for MTP */ #define N_QOS_SEL_MTP 0x0801 #define N_QOS_OPT_SEL_MTP 0x0802 #define N_QOS_RANGE_MTP 0x0803 /* QOS for use with N_UNITDATA_REQ, N_UNITDATA_IND, N_UDERROR_IND */ typedef struct { np_ulong n_qos_type; /* always N_QOS_SEL_MTP */ ulong sls; /* signalling link selection */ ulong mp; /* message priority */ } N_qos_sel_mtp_t; /* QOS for use with N_OPTMGMT_REQ, N_CONN_REQ, N_CONN_RES, N_CONN_IND, N_CONN_CON */ typedef struct { np_ulong n_qos_type; /* always N_QOS_OPT_SEL_MTP */ } N_qos_opt_sel_mtp_t; /* QOS range for use with N_OPTMGMT_REQ */ typedef struct { np_ulong n_qos_type; /* always N_QOS_RANGE_MTP */ ulong sls_range; /* signalling link selection */ ulong mp_range; /* message priority */ } N_qos_range_mtp_t; /* fix me: make these unique */ #define MTP_DEST_CONGESTED N_UD_CONGESTION #define MTP_DEST_PROHIBITED N_UD_ROUTE_UNAVAIL #define MTP_DEST_RESTRICTED N_UD_QOS_UNAVAIL #define MTP_CLUSTER_PROHIBITED N_UD_ROUTE_UNAVAIL #define MTP_CLUSTER_RESTRICTED N_UD_QOS_UNAVAIL #define MTP_RESTARTING N_UD_ROUTE_UNAVAIL #define MTP_USER_PART_UNKNOWN N_UD_ROUTE_UNAVAIL #define MTP_USER_PART_UNEQUIPPED N_UD_ROUTE_UNAVAIL #define MTP_USER_PART_UNAVAILABLE N_UD_ROUTE_UNAVAIL /* * MTP Address format: */ typedef struct mtp_pc { ulong ni; /* network indicator */ ulong pc; /* point code */ } mtp_pc_t; #ifndef N_unitdata_req_t #define N_unitdata_req_t MTP_unitdata_req_t /* * Unitdata transfer request. */ typedef struct { np_ulong PRIM_type; /* always N_UNITDATA_REQ */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong RESERVED_field[2]; /* reserved field for DLPI compat*/ np_ulong SRC_length; /* source address length */ /* XXX */ np_ulong SRC_offset; /* source address offset */ /* XXX */ np_ulong QOS_length; /* QOS parameter set length */ /* XXX */ np_ulong QOS_offset; /* QOS parameter set offset */ /* XXX */ } MTP_unitdata_req_t; #endif #ifndef N_unitdata_ind_t #define N_unitdata_ind_t MTP_unitdata_ind_t /* * Unitdata transfer indication */ typedef struct { np_ulong PRIM_type; /* always N_UNITDATA_IND */ np_ulong SRC_length; /* source address length */ np_ulong SRC_offset; /* source address offset */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong ERROR_type; /* return error cause */ np_ulong QOS_length; /* QOS parameter set length */ /* XXX */ np_ulong QOS_offset; /* QOS parameter set offset */ /* XXX */ } MTP_unitdata_ind_t; #endif #ifndef N_uderror_ind_t #define N_uderror_ind_t MTP_uderror_ind_t /* * Unitdata error indication for CLNS services */ typedef struct { np_ulong PRIM_type; /* always N_UDERROR_IND */ np_ulong DEST_length; /* destination address length */ np_ulong DEST_offset; /* destination address offset */ np_ulong RESERVED_field; /* reserved for DLPI compatibility */ np_ulong ERROR_type; /* error type */ np_ulong SRC_length; /* source address length */ /* XXX */ np_ulong SRC_offset; /* source address offset */ /* XXX */ } MTP_uderror_ind_t; #endif #ifdef __KERNEL__ /* * N_UNITDATA_REQ 8 - Connection-less data send request * --------------------------------------------------------------- */ #ifndef n_unitdata_req #define n_unitdata_req mtp_n_unitdata_req static inline mblk_t *mtp_n_unitdata_req( caddr_t dst_ptr, size_t dst_len, caddr_t src_ptr, size_t src_len, caddr_t qos_ptr, size_t qos_len, mblk_t *dp) { mblk_t *mp; N_unitdata_req_t *p; if ( (mp = allocb(sizeof(*p)+dst_len+src_len+qos_len, BPRI_MED)) ) { mp->b_datap->db_type = M_PROTO; p = (N_unitdata_req_t *)mp->b_wptr; p->PRIM_type = N_UNITDATA_REQ; p->DEST_length = dst_len; p->DEST_offset = dst_len?sizeof(*p):0; p->SRC_length = src_len; p->SRC_offset = src_len?sizeof(*p)+dst_len:0; p->QOS_length = qos_len; p->QOS_offset = qos_len?sizeof(*p)+dst_len+src_len:0; p->RESERVED_field[0] = 0; p->RESERVED_field[1] = 0; mp->b_wptr += sizeof(*p); bcopy(dst_ptr, mp->b_wptr, dst_len); mp->b_wptr += dst_len; bcopy(src_ptr, mp->b_wptr, src_len); mp->b_wptr += src_len; bcopy(qos_ptr, mp->b_wptr, qos_len); mp->b_wptr += qos_len; mp->b_cont = dp; } return(mp); } #endif /* * N_UNITDATA_IND 20 - Connection-less data receive indication * --------------------------------------------------------------- */ #ifndef n_unitdata_ind #define n_unitdata_ind mtp_n_unitdata_ind static inline mblk_t *mtp_n_unitdata_ind( caddr_t dst_ptr, size_t dst_len, caddr_t src_ptr, size_t src_len, caddr_t qos_ptr, size_t qos_len, mblk_t *dp) { mblk_t *mp; N_unitdata_ind_t *p; if ( (mp = allocb(sizeof(*p)+dst_len+src_len, BPRI_MED)) ) { mp->b_datap->db_type = M_PROTO; p = (N_unitdata_ind_t *)mp->b_wptr; p->PRIM_type = N_UNITDATA_IND; p->DEST_length = dst_len; p->DEST_offset = dst_len?sizeof(*p):0; p->SRC_length = src_len; p->SRC_offset = src_len?sizeof(*p)+dst_len:0; p->QOS_length = qos_len; p->QOS_offset = qos_len?sizeof(*p)+dst_len+src_len:0; p->ERROR_type = 0; mp->b_wptr += sizeof(*p); bcopy(dst_ptr, mp->b_wptr, dst_len); mp->b_wptr += dst_len; bcopy(src_ptr, mp->b_wptr, src_len); mp->b_wptr += src_len; bcopy(qos_ptr, mp->b_wptr, qos_len); mp->b_wptr += qos_len; mp->b_cont = dp; } return(mp); } #endif /* * N_UDERROR_IND 21 - UNITDATA Error Indication * --------------------------------------------------------------- */ #ifndef n_uderror_ind #define n_uderror_ind mtp_n_uderror_ind static inline mblk_t *mtp_n_uderror_ind(uint etype, caddr_t dst_ptr, size_t dst_len, caddr_t src_ptr, size_t src_len, mblk_t *dp) { mblk_t *mp; N_uderror_ind_t *p; if ( (mp = allocb(sizeof(*p)+dst_len+src_len, BPRI_MED)) ) { mp->b_datap->db_type = M_PROTO; p = (N_uderror_ind_t *)mp->b_wptr; p->PRIM_type = N_UDERROR_IND; p->ERROR_type = etype; p->DEST_length = dst_len; p->DEST_offset = dst_len?sizeof(*p):0; p->SRC_length = src_len; p->SRC_offset = src_len?sizeof(*p)+dst_len:0; p->RESERVED_field = 0; mp->b_wptr += sizeof(*p); bcopy(dst_ptr, mp->b_wptr, dst_len); mp->b_wptr += dst_len; bcopy(src_ptr, mp->b_wptr, src_len); mp->b_wptr += src_len; mp->b_cont = dp; } return(mp); } #endif #endif /* __KERNEL__ */#endif /* __KERNEL__ */ #endif __SS7_MTP_H__
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
OpenSS7 |
Copyright © 1997-2002,
OpenSS7 Corporation,
All Rights Reserved. |