/*****************************************************************************

 @(#) $Id: ss7mtp.h,v 0.7.2.1 2000/09/07 12:49:16 brian Exp $

 -----------------------------------------------------------------------------

 Copyright (C) 1997, 1998, 1999, 2000  Brian Bidulock <bidulock@dallas.net>

 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/07 12:49:16 $ by $Author: brian $

 -----------------------------------------------------------------------------

 $Log: ss7mtp.h,v $
 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.1.1.1  2000/09/05 11:00:20  brian
 Initial import of new OpenSS7 stack for Linux.

 *****************************************************************************/

#ifndef __NET_SS7MTP_H__
#define __NET_SS7MTP_H__

/* Standard well-defined MTP User protocols */
enum {
    SS7_PROTO_SNMM = 0,      /* Signalling Network Managment */
    SS7_PROTO_SNTM = 1,      /* Signalling Network Test and Maintenance */
    SS7_PROTO_SNSM = 2,      /* Signalling Network Test and Maintenance Special */
    SS7_PROTO_SCCP = 3,      /* Signalling Connection Control Part */
    SS7_PROTO_TUP  = 4,      /* Telephone User Part */
    SS7_PROTO_ISUP = 5,      /* Integrated Services Digital Network User Part */
    SS7_PROTO_DUP1 = 6,      /* Data User Part (1) */
    SS7_PROTO_DUP2 = 7,      /* Data User Part (2) */
    SS7_PROTO_MTUP = 8,      /* Message Transfer Part Test User Part */
    SS7_PROTO_TUPE = 12,     /* Telephone User Part Extended */
    SS7_PROTO_TUPP = 15,     /* Telephone User Part Plus */
    SS7_PROTO_MAX  = 16      /* That's it folks! */
};

struct ss7sccp_cb {
    struct {
    } user;
    struct {
    } mtp;
    struct {
    } data;
};


struct ss7mtp_cb {
    struct {
        /*
         *  These are abstract service primitives sent downwards from the
         *  SS7 MTP User protocol layer to (this) SS7 NET protocol object.
         *  These are also represented as IOCTLs which can be applied to
         *  the SOL_MTP protocol object use the any of the SS7 sockets.
         */
    } user;
    struct {
        /*
         *  These are abstract service primitives sent upwards from the SS7
         *  LINK interface to the SS7 NET object.
         */
        int (*data)(struct device* from, struct sk_buff* skb);
        int (*congested)(struct device* from);
        int (*congestion_ceased)(struct device* from);
        int (*retreived_messages)(struct device* from, struct sk_buff* skb);
        int (*retreival_complete)(struct device* from);
        int (*rb_cleared)(struct device* from);
        int (*bsnt)(struct device* from, int bsnt);
        int (*in_service)(struct device* from);
        int (*out_of_service)(struct device* from);
        int (*remote_processor_outage)(struct device* from);
        int (*rtb_cleared)(struct device* from);
    } link;
    struct {
    } data;
};

struct ss7link_cb {
    struct {
        /*
         *  These are abstract service primitives sent downwards from the
         *  SS7 NET protocol layer to (this) SS7 LINK interface.  These are
         *  also represented as IOCTLs which can be applied to the SOL_LINK
         *  link device using any of the socket interfaces.
         */
        int (*data)(struct device* to);
        int (*emergency)(struct device* to);
        int (*emergency_ceases)(struct device* to);
        int (*start)(struct device* to);
        int (*stop)(struct device* to);
        int (*retreive_bsnt)(struct device* to, int* bsnt);
        int (*retreival_request_and_fsnc)(struct device* to);
        int (*resume)(struct device* to);
        int (*clear_buffers)(struct device* to);
        int (*local_processor_outage)(struct device* to);
        int (*congestion_discard)(struct device* to, int level);
        int (*congestion_accept)(struct device* to, int level);
        int (*no_congestion)(struct device* to);
        int (*break_tx_line)(struct device* to);     /* testing only */
        int (*connect_tx_line)(struct device* to);   /* testing only */
    } mtp;
    struct {
        /*
         *  These are abstract service primitives sent upwards from the SS7
         *  LINK device driver to the SS7 LINK interface.
         */
    } dev;
    struct {
    } data;
};








#endif  __NET_SS7MTP_H__
